Setting.h 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef SETTING_H
  2. #define SETTING_H
  3. #include <QObject>
  4. #include <QCoreApplication>
  5. #include "ark_api.h"
  6. class Setting : public QObject
  7. {
  8. Q_OBJECT
  9. #ifdef g_Setting
  10. #undef g_Setting
  11. #endif
  12. #define g_Setting (Setting::instance())
  13. public:
  14. inline static Setting* instance() {
  15. static Setting *setting(new Setting(qApp));
  16. return setting;
  17. }
  18. enum WidgetType {
  19. WIDGET_UNDEFINE = -1,
  20. WIDGET_HOME,
  21. WIDGET_MULTIMUSIC,
  22. WIDGET_PHONELINK,
  23. WIDGET_BTTELEPHONE,
  24. WIDGET_VIDEOPICTURE,
  25. WIDGET_SETTING,
  26. };
  27. public:
  28. void setDisplayMode(int mode);
  29. void setWidgetType(WidgetType type);
  30. void setUsbMusicFileName(QString fileName);
  31. WidgetType getWidgetType();
  32. disp_handle* getUIDispLayer();
  33. disp_handle* getVideoDispLayer();
  34. QString getUsbMusicFileName();
  35. private:
  36. explicit Setting(QObject *parent = NULL);
  37. ~Setting();
  38. WidgetType m_WidgetType;
  39. QString m_UsbMusicFileName;
  40. };
  41. #endif // SETTING_H