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 <QThread>
7 #include "selectionwindow.h"
8 #include "pirdocumentationform.h"
9 #include "piraboutform.h"
10 #include "pirkeysetmanager.h"
12 namespace Ui {
13     class MainWindow;
14 }
16 class MainWindow : public QMainWindow
17 {
18   Q_OBJECT
20 public:
21   enum ScreenOrientation {
22     ScreenOrientationLockPortrait,
23     ScreenOrientationLockLandscape,
24     ScreenOrientationAuto
25   };
27   explicit MainWindow(QWidget *parent = 0);
28   virtual ~MainWindow();
30   // Note that this will only have an effect on Symbian and Fremantle.
31   void setOrientation(ScreenOrientation orientation);
33   void showExpanded();
35 signals:
36   // Main keys
37   void powerEnabled(bool);
38   void volumeUpEnabled(bool);
39   void volumeDownEnabled(bool);
40   void channelUpEnabled(bool);
41   void channelDownEnabled(bool);
43   // Utility keys:
44   void redEnabled(bool);
45   void greenEnabled(bool);
46   void yellowEnabled(bool);
47   void blueEnabled(bool);
48   void aspectRatioEnabled(bool);
49   void surroundEnabled(bool);
50   void languageEnabled(bool);
51   void favoritesEnabled(bool);
52   void captionsEnabled(bool);
53   void inputEnabled(bool);
54   void muteEnabled(bool);
55   void sleepEnabled(bool);
57   // Keypad
58   void zeroEnabled(bool);
59   void oneEnabled(bool);
60   void twoEnabled(bool);
61   void threeEnabled(bool);
62   void fourEnabled(bool);
63   void fiveEnabled(bool);
64   void sixEnabled(bool);
65   void sevenEnabled(bool);
66   void eightEnabled(bool);
67   void nineEnabled(bool);
68   void enterEnabled(bool);
69   void clearEnabled(bool);
70   void dashEnabled(bool);
71   void plusOneHundredEnabled(bool);
72   void doubleDigitEnabled(bool);
73   void prevChannelEnabled(bool);
75   // Menu Keys
76   void menuEnabled(bool);
77   void upEnabled(bool);
78   void downEnabled(bool);
79   void leftEnabled(bool);
80   void rightEnabled(bool);
81   void selectEnabled(bool);
82   void exitEnabled(bool);
83   void infoEnabled(bool);
84   void guideEnabled(bool);
86   // Media keys
87   void playEnabled(bool);
88   void pauseEnabled(bool);
89   void stopEnabled(bool);
90   void fastForwardEnabled(bool);
91   void reverseEnabled(bool);
92   void nextEnabled(bool);
93   void previousEnabled(bool);
94   void stepForwardEnabled(bool);
95   void stepBackEnabled(bool);
96   void advanceEnabled(bool);
97   void replayEnabled(bool);
98   void ejectEnabled(bool);
100   // Other Keys
101   void pipEnabled(bool);
102   void pipSwapEnabled(bool);
103   void pipMoveEnabled(bool);
104   void pipSourceEnabled(bool);
105   void scanEnabled(bool);
106   void programEnabled(bool);
107   void pictureModeEnabled(bool);
108   void soundModeEnabled(bool);
109   void discTitleEnabled(bool);
110   void discMenuEnabled(bool);
111   void discSelectEnabled(bool);
112   void recordEnabled(bool);
113   void trackingMinusEnabled(bool);
114   void trackingPlusEnabled(bool);
115   void autoTrackingEnabled(bool);
116   void vhsSpeedEnabled(bool);
118   void keysetMakeChanged(QString);
119   void keysetNameChanged(QString);
121   void buttonPressed(
122     unsigned int keysetID,
123     PIRKeyName name);
125   void buttonReleased();
127 public slots:
128   void receivedExternalWarning(
129     const char *warning);
131 private slots:
132   // Main tab slots:
133   void on_powerButton_pressed();
134   void on_powerButton_released();
135   void on_mainChannelUpButton_pressed();
136   void on_mainChannelUpButton_released();
137   void on_mainChannelDownButton_pressed();
138   void on_mainChannelDownButton_released();
139   void on_mainVolumeUp_pressed();
140   void on_mainVolumeUp_released();
141   void on_mainVolumeDownButton_pressed();
142   void on_mainVolumeDownButton_released();
144   // Utility tab slots:
145   void on_redButton_pressed();
146   void on_redButton_released();
147   void on_greenButton_pressed();
148   void on_greenButton_released();
149   void on_yellowButton_pressed();
150   void on_yellowButton_released();
151   void on_blueButton_pressed();
152   void on_blueButton_released();
153   void on_aspectRatioButton_pressed();
154   void on_aspectRatioButton_released();
155   void on_surroundButton_pressed();
156   void on_surroundButton_released();
157   void on_languageButton_pressed();
158   void on_languageButton_released();
159   void on_favoritesButton_pressed();
160   void on_favoritesButton_released();
161   void on_captionButton_pressed();
162   void on_captionButton_released();
163   void on_inputButton_pressed();
164   void on_inputButton_released();
165   void on_sleepButton_pressed();
166   void on_sleepButton_released();
167   void on_muteButton_pressed();
168   void on_muteButton_released();
170   // Keypad tab slots:
171   void on_oneButton_pressed();
172   void on_oneButton_released();
173   void on_twoButton_pressed();
174   void on_twoButton_released();
175   void on_threeButton_pressed();
176   void on_threeButton_released();
177   void on_fourButton_pressed();
178   void on_fourButton_released();
179   void on_fiveButton_pressed();
180   void on_fiveButton_released();
181   void on_sixButton_pressed();
182   void on_sixButton_released();
183   void on_sevenButton_pressed();
184   void on_sevenButton_released();
185   void on_eightButton_pressed();
186   void on_eightButton_released();
187   void on_nineButton_pressed();
188   void on_nineButton_released();
189   void on_zeroButton_pressed();
190   void on_zeroButton_released();
191   void on_enterButton_pressed();
192   void on_enterButton_released();
193   void on_clearButton_pressed();
194   void on_clearButton_released();
195   void on_prevChannelButton_pressed();
196   void on_prevChannelButton_released();
197   void on_plusOneHundredButton_pressed();
198   void on_plusOneHundredButton_released();
199   void on_dashButton_pressed();
200   void on_dashButton_released();
201   void on_doubleDigitButton_pressed();
202   void on_doubleDigitButton_released();
204   // Menu tab slots:
205   void on_upButton_pressed();
206   void on_upButton_released();
207   void on_leftButton_pressed();
208   void on_leftButton_released();
209   void on_rightButton_pressed();
210   void on_rightButton_released();
211   void on_downButton_pressed();
212   void on_downButton_released();
213   void on_selectButton_pressed();
214   void on_selectButton_released();
215   void on_menuButton_pressed();
216   void on_menuButton_released();
217   void on_exitButton_pressed();
218   void on_exitButton_released();
220   // Media tab slots:
221   void on_mediaPreviousButton_pressed();
222   void on_mediaPreviousButton_released();
223   void on_mediaNextButton_pressed();
224   void on_mediaNextButton_released();
225   void on_replayButton_pressed();
226   void on_replayButton_released();
227   void on_advanceButton_pressed();
228   void on_advanceButton_released();
229   void on_stepBackButton_pressed();
230   void on_stepBackButton_released();
231   void on_stepForwardButton_pressed();
232   void on_stepForwardButton_released();
233   void on_reverseButton_pressed();
234   void on_reverseButton_released();
235   void on_fastForwardButton_pressed();
236   void on_fastForwardButton_released();
237   void on_playButton_pressed();
238   void on_playButton_released();
239   void on_pauseButton_pressed();
240   void on_pauseButton_released();
241   void on_stopButton_pressed();
242   void on_stopButton_released();
243   void on_ejectButton_pressed();
244   void on_ejectButton_released();
246   // Misc tab slots:
247   void on_pipOnOffButton_pressed();
248   void on_pipOnOffButton_released();
249   void on_pipSwapButton_pressed();
250   void on_pipSwapButton_released();
251   void on_recordButton_pressed();
252   void on_recordButton_released();
253   void on_pipPositionButton_pressed();
254   void on_pipPositionButton_released();
255   void on_pipSourceButton_pressed();
256   void on_pipSourceButton_released();
257   void on_scanButton_pressed();
258   void on_scanButton_released();
259   void on_programButton_pressed();
260   void on_programButton_released();
261   void on_pictureModeButton_pressed();
262   void on_pictureModeButton_released();
263   void on_soundModeButton_pressed();
264   void on_soundModeButton_released();
265   void on_discTitleButton_pressed();
266   void on_discTitleButton_released();
267   void on_discMenuButton_pressed();
268   void on_discMenuButton_released();
269   void on_discSelectButton_pressed();
270   void on_discSelectButton_released();
271   void on_trackingPlusButton_pressed();
272   void on_trackingPlusButton_released();
273   void on_trackingMinusButton_pressed();
274   void on_trackingMinusButton_released();
275   void on_autoTrackingButton_pressed();
276   void on_autoTrackingButton_released();
277   void on_vhsSpeedButton_pressed();
278   void on_vhsSpeedButton_released();
280   // Favorites tab actions:
281   void on_addKeysetButton_clicked();
282   void on_removeKeysetButton_clicked();
284   // Menu actions:
285   void on_actionSelectKeyset_triggered();
286   void on_actionAbout_triggered();
287   void on_actionDocumentation_triggered();
289   // Internal actions:
290   void keysetSelectionChanged(
291     QListWidgetItem *item);
293 private:
294   void enableButtons();
296   void stopRepeating();
298   void populateFavorites();
300   Ui::MainWindow *ui;
302   SelectionWindow *mySelectionWindow;
303   PIRDocumentationForm *documentationForm;
304   PIRAboutForm *aboutForm;
306   PIRKeysetManager *myKeysets;
308   unsigned int currentKeyset;
309 };
312 inline void MainWindow::stopRepeating()
314   myKeysets->stopRepeating();
317 #endif // MAINWINDOW_H

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment