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

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment