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();
90 bool selectFirstKeyset();
91 void openCurrentKeysetDialog();
93 void updateKeysetSelection(
94 unsigned int targetID);
98 unsigned int keysetID,
101 void buttonReleased();
104 void receivedExternalWarning(
105 const char *warning);
107 void selectPrevFavKeyset();
108 void selectNextFavKeyset();
110 void keysetSelectionChanged(
111 QListWidgetItem *item);
114 void on_actionSelectKeyset_triggered();
115 void on_actionBrowse_Device_List_triggered();
116 void on_actionPreferences_triggered();
117 void on_actionAbout_triggered();
118 void on_actionDocumentation_triggered();
124 void populateFavorites();
128 PIRSelectKeysetForm *selectKeysetForm;
129 PIRSelectDeviceForm *selectDeviceForm;
130 PIRPreferencesForm *preferencesForm;
131 PIRDocumentationForm *documentationForm;
132 PIRAboutForm *aboutForm;
133 PIRFavoritesDialog *favoritesDialog;
135 PIRKeysetManager *myKeysets;
136 PIRPanelManager *myPanels;
138 unsigned int currentKeyset;
140 PIRModprobe modprobeObj;
144 #endif // MAINWINDOW_H