Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
4 #include <QtGui/QMainWindow>
6 #include "pirkeynames.h"
7 #include "pirmodprobe.h"
9 class QListWidgetItem;
10 class PIRSelectKeysetForm;
11 class PIRSecondaryForm;
12 class PIRDocumentationForm;
13 class PIRAboutForm;
14 class PIRKeysetManager;
16 namespace Ui {
17     class MainWindow;
18 }
20 class MainWindow : public QMainWindow
21 {
22   Q_OBJECT
24 public:
25   enum ScreenOrientation {
26     ScreenOrientationLockPortrait,
27     ScreenOrientationLockLandscape,
28     ScreenOrientationAuto
29   };
31   explicit MainWindow(QWidget *parent = 0);
32   virtual ~MainWindow();
34   // Note that this will only have an effect on Symbian and Fremantle.
35   void setOrientation(ScreenOrientation orientation);
37   void showExpanded();
39   void startRepeating(
40     PIRKeyName name);
42   void stopRepeating();
44   // This is a bit of a hack:
45   QWidget *getSecondaryWindow();
47 signals:
48   // Main keys
49   void powerEnabled(bool);
50   void volumeUpEnabled(bool);
51   void volumeDownEnabled(bool);
52   void channelUpEnabled(bool);
53   void channelDownEnabled(bool);
54   void muteEnabled(bool);
56   // Utility keys:
57   void redEnabled(bool);
58   void greenEnabled(bool);
59   void yellowEnabled(bool);
60   void blueEnabled(bool);
61   void pictureModeEnabled(bool);
62   void soundModeEnabled(bool);
63   void aspectRatioEnabled(bool);
64 //  void surroundEnabled(bool);
65   void audioEnabled(bool);
66   void infoEnabled(bool);
67   void captionsEnabled(bool);
68   void inputEnabled(bool);
69   void sleepEnabled(bool);
71   // Keypad
72   void zeroEnabled(bool);
73   void oneEnabled(bool);
74   void twoEnabled(bool);
75   void threeEnabled(bool);
76   void fourEnabled(bool);
77   void fiveEnabled(bool);
78   void sixEnabled(bool);
79   void sevenEnabled(bool);
80   void eightEnabled(bool);
81   void nineEnabled(bool);
82   void enterEnabled(bool);
83   void clearEnabled(bool);
84   void dashEnabled(bool);
85   void plusOneHundredEnabled(bool);
86   void doubleDigitEnabled(bool);
87   void prevChannelEnabled(bool);
89   // Menu Keys
90   void menuEnabled(bool);
91   void upEnabled(bool);
92   void downEnabled(bool);
93   void leftEnabled(bool);
94   void rightEnabled(bool);
95   void selectEnabled(bool);
96   void exitEnabled(bool);
97   void guideEnabled(bool);
98   void discMenuEnabled(bool);
100   // Media keys
101   void playEnabled(bool);
102   void pauseEnabled(bool);
103   void stopEnabled(bool);
104   void fastForwardEnabled(bool);
105   void reverseEnabled(bool);
106   void nextEnabled(bool);
107   void previousEnabled(bool);
108   void stepForwardEnabled(bool);
109   void stepBackEnabled(bool);
110   void advanceEnabled(bool);
111   void replayEnabled(bool);
112   void ejectEnabled(bool);
114 /*
115   // Media2 Keys
116   void discTitleEnabled(bool);
117   void discSelectEnabled(bool);
118   void vhsSpeedEnabled(bool);
119   void trackingMinusEnabled(bool);
120   void trackingPlusEnabled(bool);
121   void autoTrackingEnabled(bool);
122   void pageUpEnabled(bool);
123   void pageDownEnabled(bool);
124   void slowEnabled(bool);
125   void slowPlusEnabled(bool);
126   void slowMinusEnabled(bool);
127   void programEnabled(bool);
128   void tunerBandEnabled(bool);
129   void repeatEnabled(bool);
130   void repeatABEnabled(bool);
131   void randomEnabled(bool);
133   // TV Keys
134   void pictureModeEnabled(bool);
135   void soundModeEnabled(bool);
136   void liveTVEnabled(bool);
137   void favoritesEnabled(bool);
138   void teletextEnabled(bool);
139   void teletextHoldEnabled(bool);
140   void teletextRevealEnabled(bool);
141   void teletextSizeEnabled(bool);
142   void pipEnabled(bool);
143   void pipSwapEnabled(bool);
144   void pipMoveEnabled(bool);
145   void pipSourceEnabled(bool);
146   void pipChannelUpEnabled(bool);
147   void pipChannelDownEnabled(bool);
148   void pipPauseEnabled(bool);
149   void pipSizeEnabled(bool);
150 */
152   void keysetMakeChanged(QString);
153   void keysetNameChanged(QString);
155   void buttonPressed(
156     unsigned int keysetID,
157     PIRKeyName name);
159   void buttonReleased();
161 public slots:
162   void receivedExternalWarning(
163     const char *warning);
165   void selectPrevFavKeyset();
166   void selectNextFavKeyset();
168 private slots:
169   // Main tab slots:
170   void on_powerButton_pressed();
171   void on_powerButton_released();
172   void on_mainChannelUpButton_pressed();
173   void on_mainChannelUpButton_released();
174   void on_mainChannelDownButton_pressed();
175   void on_mainChannelDownButton_released();
176   void on_mainVolumeUp_pressed();
177   void on_mainVolumeUp_released();
178   void on_mainVolumeDownButton_pressed();
179   void on_mainVolumeDownButton_released();
180   void on_muteButton_pressed();
181   void on_muteButton_released();
183   // Utility tab slots:
184   void on_redButton_pressed();
185   void on_redButton_released();
186   void on_greenButton_pressed();
187   void on_greenButton_released();
188   void on_yellowButton_pressed();
189   void on_yellowButton_released();
190   void on_blueButton_pressed();
191   void on_blueButton_released();
192   void on_pictureModeButton_pressed();
193   void on_pictureModeButton_released();
194   void on_soundModeButton_pressed();
195   void on_soundModeButton_released();
196   void on_aspectRatioButton_pressed();
197   void on_aspectRatioButton_released();
198 //  void on_surroundButton_pressed();
199 //  void on_surroundButton_released();
200   void on_audioButton_pressed();
201   void on_audioButton_released();
202   void on_infoButton_pressed();
203   void on_infoButton_released();
204   void on_captionButton_pressed();
205   void on_captionButton_released();
206   void on_inputButton_pressed();
207   void on_inputButton_released();
208   void on_sleepButton_pressed();
209   void on_sleepButton_released();
211   // Keypad tab slots:
212   void on_oneButton_pressed();
213   void on_oneButton_released();
214   void on_twoButton_pressed();
215   void on_twoButton_released();
216   void on_threeButton_pressed();
217   void on_threeButton_released();
218   void on_fourButton_pressed();
219   void on_fourButton_released();
220   void on_fiveButton_pressed();
221   void on_fiveButton_released();
222   void on_sixButton_pressed();
223   void on_sixButton_released();
224   void on_sevenButton_pressed();
225   void on_sevenButton_released();
226   void on_eightButton_pressed();
227   void on_eightButton_released();
228   void on_nineButton_pressed();
229   void on_nineButton_released();
230   void on_zeroButton_pressed();
231   void on_zeroButton_released();
232   void on_enterButton_pressed();
233   void on_enterButton_released();
234   void on_clearButton_pressed();
235   void on_clearButton_released();
236   void on_prevChannelButton_pressed();
237   void on_prevChannelButton_released();
238   void on_plusOneHundredButton_pressed();
239   void on_plusOneHundredButton_released();
240   void on_dashButton_pressed();
241   void on_dashButton_released();
242   void on_doubleDigitButton_pressed();
243   void on_doubleDigitButton_released();
245   // Menu tab slots:
246   void on_upButton_pressed();
247   void on_upButton_released();
248   void on_leftButton_pressed();
249   void on_leftButton_released();
250   void on_rightButton_pressed();
251   void on_rightButton_released();
252   void on_downButton_pressed();
253   void on_downButton_released();
254   void on_selectButton_pressed();
255   void on_selectButton_released();
256   void on_menuButton_pressed();
257   void on_menuButton_released();
258   void on_exitButton_pressed();
259   void on_exitButton_released();
260   void on_guideButton_pressed();
261   void on_guideButton_released();
262   void on_discMenuButton_pressed();
263   void on_discMenuButton_released();
265   // Media tab slots:
266   void on_mediaPreviousButton_pressed();
267   void on_mediaPreviousButton_released();
268   void on_mediaNextButton_pressed();
269   void on_mediaNextButton_released();
270   void on_replayButton_pressed();
271   void on_replayButton_released();
272   void on_advanceButton_pressed();
273   void on_advanceButton_released();
274   void on_stepBackButton_pressed();
275   void on_stepBackButton_released();
276   void on_stepForwardButton_pressed();
277   void on_stepForwardButton_released();
278   void on_reverseButton_pressed();
279   void on_reverseButton_released();
280   void on_fastForwardButton_pressed();
281   void on_fastForwardButton_released();
282   void on_playButton_pressed();
283   void on_playButton_released();
284   void on_pauseButton_pressed();
285   void on_pauseButton_released();
286   void on_stopButton_pressed();
287   void on_stopButton_released();
288   void on_ejectButton_pressed();
289   void on_ejectButton_released();
291 /*
292   // Media2 tab slots:
293   void on_discTitleButton_pressed();
294   void on_discTitleButton_released();
295   void on_discSelectButton_pressed();
296   void on_discSelectButton_released();
297   void on_vhsSpeedButton_pressed();
298   void on_vhsSpeedButton_released();
299   void on_trackingPlusButton_pressed();
300   void on_trackingPlusButton_released();
301   void on_trackingMinusButton_pressed();
302   void on_trackingMinusButton_released();
303   void on_autoTrackingButton_pressed();
304   void on_autoTrackingButton_released();
305   void on_pageUpButton_pressed();
306   void on_pageUpButton_released();
307   void on_pageDownButton_pressed();
308   void on_pageDownButton_released();
309   void on_slowButton_pressed();
310   void on_slowButton_released();
311   void on_slowMinusButton_pressed();
312   void on_slowMinusButton_released();
313   void on_slowPlusButton_pressed();
314   void on_slowPlusButton_released();
315   void on_programButton_pressed();
316   void on_programButton_released();
317   void on_tunerBandButton_pressed();
318   void on_tunerBandButton_released();
319   void on_repeatButton_pressed();
320   void on_repeatButton_released();
321   void on_repeatABButton_pressed();
322   void on_repeatABButton_released();
323   void on_randomButton_pressed();
324   void on_randomButton_released();
326   // TV Tab slots:
327   void on_pictureModeButton_pressed();
328   void on_pictureModeButton_released();
329   void on_soundModeButton_pressed();
330   void on_soundModeButton_released();
331   void on_liveTVButton_pressed();
332   void on_liveTVButton_released();
333   void on_favoritesButton_pressed();
334   void on_favoritesButton_released();
335   void on_teletextButton_pressed();
336   void on_teletextButton_released();
337   void on_teletextHoldButton_pressed();
338   void on_teletextHoldButton_released();
339   void on_teletextRevealButton_pressed();
340   void on_teletextRevealButton_released();
341   void on_teletextSizeButton_pressed();
342   void on_teletextSizeButton_released();
343   void on_pipOnOffButton_pressed();
344   void on_pipOnOffButton_released();
345   void on_pipSwapButton_pressed();
346   void on_pipSwapButton_released();
347   void on_pipPositionButton_pressed();
348   void on_pipPositionButton_released();
349   void on_pipSourceButton_pressed();
350   void on_pipSourceButton_released();
351   void on_pipChannelUpButton_pressed();
352   void on_pipChannelUpButton_released();
353   void on_pipChannelDownButton_pressed();
354   void on_pipChannelDownButton_released();
355   void on_pipPauseButton_pressed();
356   void on_pipPauseButton_released();
357   void on_pipSizeButton_pressed();
358   void on_pipSizeButton_released();
359 */
361   // Favorites tab actions:
362   void on_addKeysetButton_clicked();
363   void on_removeKeysetButton_clicked();
365   // Menu actions:
366   void on_actionSelectKeyset_triggered();
367   void on_actionSecondary_Buttons_triggered();
368   void on_actionAbout_triggered();
369   void on_actionDocumentation_triggered();
371   // Internal actions:
372   void keysetSelectionChanged(
373     QListWidgetItem *item);
375   void finalCleanup();
377 private:
378   void enableButtons();
380   void populateFavorites();
382   Ui::MainWindow *ui;
384   PIRSelectKeysetForm *selectKeysetForm;
385   PIRSecondaryForm *secondaryForm;
386   PIRDocumentationForm *documentationForm;
387   PIRAboutForm *aboutForm;
389   PIRKeysetManager *myKeysets;
391   unsigned int currentKeyset;
393   PIRModprobe modprobeObj;
394 };
397 #endif // MAINWINDOW_H

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment