Setting.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "Setting.h"
  2. Setting::Setting(QObject *parent) : QObject(parent)
  3. {
  4. m_WidgetType = WIDGET_HOME;
  5. m_UsbMusicFileName = QString("");
  6. }
  7. Setting::~Setting(){
  8. }
  9. void Setting::setDisplayMode(int mode){
  10. arkapi_video_set_display_mode(mode);
  11. return;
  12. }
  13. void Setting::setWidgetType(Setting::WidgetType type)
  14. {
  15. m_WidgetType = type;
  16. return;
  17. }
  18. void Setting::setUsbMusicFileName(QString fileName)
  19. {
  20. m_UsbMusicFileName = fileName;
  21. }
  22. Setting::WidgetType Setting::getWidgetType()
  23. {
  24. return m_WidgetType;
  25. }
  26. disp_handle *Setting::getUIDispLayer()
  27. {
  28. disp_handle* disp_layer_ui = arkapi_display_open_layer(PRIMARY_LAYER); //UI
  29. if (disp_layer_ui != NULL) {
  30. return disp_layer_ui;
  31. }
  32. return NULL;
  33. }
  34. disp_handle *Setting::getVideoDispLayer()
  35. {
  36. disp_handle* disp_layer_video = arkapi_display_open_layer(VIDEO_LAYER); //video
  37. if (disp_layer_video != NULL) {
  38. return disp_layer_video;
  39. }
  40. return NULL;
  41. }
  42. QString Setting::getUsbMusicFileName()
  43. {
  44. return m_UsbMusicFileName;
  45. }