4 #include <QtGui/QMainWindow>
6 #include "pirkeynames.h"
7 #include "pirpanelnames.h"
8 #include "pirmodprobe.h"
11 class QListWidgetItem;
17 class PIRSelectKeysetForm;
18 class PIRSelectDeviceForm;
19 class PIRPreferencesForm;
20 class PIRDocumentationForm;
22 class PIRFavoritesDialog;
23 class PIRKeysetWidgetItem;
26 class PIRKeysetManager;
27 class PIRPanelManager;
28 class PIRMacroManager;
34 class MainWindow : public QMainWindow
39 enum ScreenOrientation {
40 ScreenOrientationLockPortrait,
41 ScreenOrientationLockLandscape,
45 explicit MainWindow(QWidget *parent = 0);
46 virtual ~MainWindow();
48 // Note that this will only have an effect on Symbian and Fremantle.
49 void setOrientation(ScreenOrientation orientation);
58 unsigned int keysetID);
62 // Favorites panel actions:
64 PIRKeysetWidgetItem *kwi);
66 void removeFromFavorites(
67 unsigned int keysetID);
71 // Preferences actions:
73 void useAltMainPanel();
75 QString getCurrentMake();
76 QString getCurrentName();
77 QString getCurrentFullName();
79 QString getKeysetMake(
82 QString getKeysetName(
85 QString getFullKeysetName(
88 unsigned int getCurrentKeyset()
98 void insertCornerButtons();
99 void disableUpdates();
100 void enableUpdates();
105 void setupTabs(PIRTabBarName name);
107 bool selectNextKeyset();
108 bool selectPrevKeyset();
109 bool selectFirstKeyset();
110 void openCurrentKeysetDialog();
112 void updateKeysetSelection(
113 unsigned int targetID);
115 PIRMacroPack *getUserPack();
116 PIRMacroPack *getMultitapPack();
119 unsigned int buttonID);
121 QString getMacroButtonText(
122 unsigned int buttonID);
124 void executeMacroButton(
125 unsigned int buttonID);
127 void updateUserButtons(); // Should this be a slot?
131 void setMacroKbdFocus(
134 void setMacroBtnFocus(
143 // void handleKeyRelease(
146 void gotoPreviousTabs();
152 unsigned int keysetID,
155 void buttonReleased();
158 void receivedExternalWarning(
159 const char *warning);
161 void selectPrevFavKeyset();
162 void selectNextFavKeyset();
164 void keysetSelectionChanged(
165 QListWidgetItem *item);
168 void on_actionSelectKeyset_triggered();
169 void on_actionBrowse_Device_List_triggered();
170 void on_actionPreferences_triggered();
171 void on_actionAbout_triggered();
172 void on_actionDocumentation_triggered();
178 // void keyPressEvent(
179 // QKeyEvent *event);
181 // void keyReleaseEvent(
182 // QKeyEvent *event);
184 void populateFavorites();
188 // PIRTabWidget *myTabWidget;
190 PIRSelectKeysetForm *selectKeysetForm;
191 PIRSelectDeviceForm *selectDeviceForm;
192 PIRPreferencesForm *preferencesForm;
193 PIRDocumentationForm *documentationForm;
194 PIRAboutForm *aboutForm;
195 PIRFavoritesDialog *favoritesDialog;
197 PIRKeysetManager *myKeysets;
198 PIRPanelManager *myPanels;
199 PIRMacroManager *myMacros;
201 unsigned int currentKeyset;
203 PIRModprobe modprobeObj;
207 #endif // MAINWINDOW_H