4 #include <QtGui/QMainWindow>
6 #include "pirkeynames.h"
7 #include "pirpanelnames.h"
8 #include "pirmodprobe.h"
11 class QListWidgetItem;
15 class PIRSelectKeysetForm;
16 class PIRSelectDeviceForm;
17 class PIRPreferencesForm;
18 class PIRDocumentationForm;
20 class PIRFavoritesDialog;
21 class PIRKeysetWidgetItem;
24 class PIRKeysetManager;
25 class PIRPanelManager;
26 class PIRMacroManager;
32 class MainWindow : public QMainWindow
37 enum ScreenOrientation {
38 ScreenOrientationLockPortrait,
39 ScreenOrientationLockLandscape,
43 explicit MainWindow(QWidget *parent = 0);
44 virtual ~MainWindow();
46 // Note that this will only have an effect on Symbian and Fremantle.
47 void setOrientation(ScreenOrientation orientation);
56 unsigned int keysetID);
60 // Favorites panel actions:
62 PIRKeysetWidgetItem *kwi);
64 void removeFromFavorites(
65 unsigned int keysetID);
69 // Preferences actions:
71 void useAltMainPanel();
73 QString getCurrentMake();
74 QString getCurrentName();
75 QString getCurrentFullName();
77 QString getKeysetMake(
80 QString getKeysetName(
83 QString getFullKeysetName(
86 unsigned int getCurrentKeyset()
96 void insertCornerButtons();
97 void disableUpdates();
103 void setupTabs(PIRTabBarName name);
105 bool selectNextKeyset();
106 bool selectPrevKeyset();
107 bool selectFirstKeyset();
108 void openCurrentKeysetDialog();
110 void updateKeysetSelection(
111 unsigned int targetID);
113 PIRMacroPack *getUserPack();
114 PIRMacroPack *getMultitapPack();
117 unsigned int buttonID);
119 QString getMacroButtonText(
120 unsigned int buttonID);
122 void executeMacroButton(
123 unsigned int buttonID);
125 void updateUserButtons(); // Should this be a slot?
129 void setMacroKbdFocus(
132 void setMacroBtnFocus(
137 unsigned int keysetID,
140 void buttonReleased();
143 void receivedExternalWarning(
144 const char *warning);
146 void selectPrevFavKeyset();
147 void selectNextFavKeyset();
149 void keysetSelectionChanged(
150 QListWidgetItem *item);
153 void on_actionSelectKeyset_triggered();
154 void on_actionBrowse_Device_List_triggered();
155 void on_actionPreferences_triggered();
156 void on_actionAbout_triggered();
157 void on_actionDocumentation_triggered();
166 void populateFavorites();
170 PIRSelectKeysetForm *selectKeysetForm;
171 PIRSelectDeviceForm *selectDeviceForm;
172 PIRPreferencesForm *preferencesForm;
173 PIRDocumentationForm *documentationForm;
174 PIRAboutForm *aboutForm;
175 PIRFavoritesDialog *favoritesDialog;
177 PIRKeysetManager *myKeysets;
178 PIRPanelManager *myPanels;
179 PIRMacroManager *myMacros;
181 unsigned int currentKeyset;
183 PIRModprobe modprobeObj;
187 #endif // MAINWINDOW_H