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

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment