changeset 33 | 3e2da88830cd |
parent 18 | 2f34d5167611 |
child 37 | 758a864f9613 |
30:5dc02b23752f | 33:3e2da88830cd |
---|---|
59 class MenuManager : public QObject |
59 class MenuManager : public QObject |
60 { |
60 { |
61 Q_OBJECT |
61 Q_OBJECT |
62 |
62 |
63 public: |
63 public: |
64 enum BUTTON_TYPE {ROOT, MENU1, MENU2, LAUNCH, DOCUMENTATION, QUIT, FULLSCREEN, UP, DOWN, BACK}; |
64 enum BUTTON_TYPE {ROOT, MENU1, MENU2, LAUNCH, DOCUMENTATION, QUIT, FULLSCREEN, UP, DOWN, BACK, LAUNCH_QML}; |
65 |
65 |
66 // singleton pattern: |
66 // singleton pattern: |
67 static MenuManager *instance(); |
67 static MenuManager *instance(); |
68 virtual ~MenuManager(); |
68 virtual ~MenuManager(); |
69 |
69 |
81 ItemCircleAnimation *ticker; |
81 ItemCircleAnimation *ticker; |
82 MainWindow *window; |
82 MainWindow *window; |
83 Score *score; |
83 Score *score; |
84 int currentMenuCode; |
84 int currentMenuCode; |
85 |
85 |
86 QDeclarativeEngine* declarativeEngine; |
|
87 QDeclarativeItem *qmlRoot; |
|
88 |
|
86 private slots: |
89 private slots: |
87 void exampleFinished(); |
90 void exampleFinished(); |
88 void exampleError(QProcess::ProcessError error); |
91 void exampleError(QProcess::ProcessError error); |
89 |
92 |
90 private: |
93 private: |
98 void initHelpEngine(); |
101 void initHelpEngine(); |
99 void getDocumentationDir(); |
102 void getDocumentationDir(); |
100 void readInfoAboutExample(const QDomElement &example); |
103 void readInfoAboutExample(const QDomElement &example); |
101 void showDocInAssistant(const QString &docFile); |
104 void showDocInAssistant(const QString &docFile); |
102 void launchExample(const QString &uniqueName); |
105 void launchExample(const QString &uniqueName); |
106 void launchQmlExample(const QString &uniqueName); |
|
103 |
107 |
104 void createMenu(const QDomElement &category, BUTTON_TYPE type); |
108 void createMenu(const QDomElement &category, BUTTON_TYPE type); |
105 void createLowLeftButton(const QString &label, BUTTON_TYPE type, |
109 void createLowLeftButton(const QString &label, BUTTON_TYPE type, |
106 Movie *movieIn, Movie *movieOut, Movie *movieShake, const QString &menuString = QString()); |
110 Movie *movieIn, Movie *movieOut, Movie *movieShake, const QString &menuString = QString()); |
107 void createLowRightButton(const QString &label, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie *movieShake); |
111 void createLowRightButton(const QString &label, BUTTON_TYPE type, Movie *movieIn, Movie *movieOut, Movie *movieShake); |
126 QDir imgDir; |
130 QDir imgDir; |
127 QHelpEngineCore *helpEngine; |
131 QHelpEngineCore *helpEngine; |
128 |
132 |
129 TextButton *upButton; |
133 TextButton *upButton; |
130 TextButton *downButton; |
134 TextButton *downButton; |
135 |
|
131 }; |
136 }; |
132 |
137 |
133 #endif // MENU_MANAGER_H |
138 #endif // MENU_MANAGER_H |
134 |
139 |