4 #include <QtGui/QMainWindow>
6 #include "pirkeynames.h"
7 #include "pirpanelnames.h"
8 #include "pirmodprobe.h"
11 class QListWidgetItem;
14 class PIRSelectKeysetForm;
15 class PIRSelectDeviceForm;
16 class PIRPreferencesForm;
17 class PIRDocumentationForm;
19 class PIRFavoritesDialog;
20 class PIRKeysetWidgetItem;
22 class PIRKeysetManager;
23 class PIRPanelManager;
29 class MainWindow : public QMainWindow
34 enum ScreenOrientation {
35 ScreenOrientationLockPortrait,
36 ScreenOrientationLockLandscape,
40 explicit MainWindow(QWidget *parent = 0);
41 virtual ~MainWindow();
43 // Note that this will only have an effect on Symbian and Fremantle.
44 void setOrientation(ScreenOrientation orientation);
53 unsigned int keysetID);
57 // Favorites panel actions:
59 PIRKeysetWidgetItem *kwi);
61 void removeFromFavorites(
62 unsigned int keysetID);
66 // Preferences actions:
68 void useAltMainPanel();
70 QString getCurrentMake();
71 QString getCurrentName();
72 QString getCurrentFullName();
74 unsigned int getCurrentKeyset()
79 void insertCornerButtons();
80 void disableUpdates();
86 void setupTabs(PIRTabBarName name);
88 bool selectNextKeyset();
89 bool selectPrevKeyset();
93 unsigned int keysetID,
96 void buttonReleased();
99 void receivedExternalWarning(
100 const char *warning);
102 void selectPrevFavKeyset();
103 void selectNextFavKeyset();
105 void keysetSelectionChanged(
106 QListWidgetItem *item);
109 void on_actionSelectKeyset_triggered();
110 void on_actionBrowse_Device_List_triggered();
111 void on_actionPreferences_triggered();
112 void on_actionAbout_triggered();
113 void on_actionDocumentation_triggered();
119 void populateFavorites();
123 PIRSelectKeysetForm *selectKeysetForm;
124 PIRSelectDeviceForm *selectDeviceForm;
125 PIRPreferencesForm *preferencesForm;
126 PIRDocumentationForm *documentationForm;
127 PIRAboutForm *aboutForm;
128 PIRFavoritesDialog *favoritesDialog;
130 PIRKeysetManager *myKeysets;
131 PIRPanelManager *myPanels;
133 unsigned int currentKeyset;
135 PIRModprobe modprobeObj;
139 #endif // MAINWINDOW_H