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>
6 #include "pirkeynames.h"
7 #include "pirpanelnames.h"
8 #include "pirmodprobe.h"
10 class QListWidget;
11 class QListWidgetItem;
12 class PIRSelectKeysetForm;
13 class PIRSelectDeviceForm;
14 class PIRPanelSelectionForm;
15 class PIRDocumentationForm;
16 class PIRAboutForm;
17 class PIRKeysetManager;
18 class PIRPanelManager;
20 namespace Ui {
21     class MainWindow;
22 }
24 class MainWindow : public QMainWindow
25 {
26   Q_OBJECT
28 public:
29   enum ScreenOrientation {
30     ScreenOrientationLockPortrait,
31     ScreenOrientationLockLandscape,
32     ScreenOrientationAuto
33   };
35   explicit MainWindow(QWidget *parent = 0);
36   virtual ~MainWindow();
38   // Note that this will only have an effect on Symbian and Fremantle.
39   void setOrientation(ScreenOrientation orientation);
41   void showExpanded();
43   void startRepeating(
44     PIRKeyName name);
46   void stopRepeating();
48   void managePanel(
49     PIRPanelName name,
50     int state);
52   void insertPanel(
53     int index,
54     QWidget *panel,
55     const QString &displayName);
57   void removePanel(
58     int index,
59     QWidget *panel);
61   // Favorites panel actions:
62   void addCurrentKeyset(
63     QListWidget *qlw);
65   void removeFavoriteKeyset(
66     QListWidget *qlw);
68   void enableButtons();
70 signals:
71   void buttonPressed(
72     unsigned int keysetID,
73     PIRKeyName name);
75   void buttonReleased();
77 public slots:
78   void receivedExternalWarning(
79     const char *warning);
81   void selectPrevFavKeyset();
82   void selectNextFavKeyset();
84   void keysetSelectionChanged(
85     QListWidgetItem *item);
87 private slots:
88   void on_actionSelectKeyset_triggered();
89   void on_actionSelect_Device_By_Name_triggered();
90   void on_actionArrange_Button_Panels_triggered();
91   void on_actionAbout_triggered();
92   void on_actionDocumentation_triggered();
94   void on_prevPanelButton_clicked();
95   void on_nextPanelButton_clicked();
96   void on_selectPanelComboBox_currentIndexChanged(int index);
98   // Internal actions:
99   void finalCleanup();
101 private:
102   void populateFavorites();
103 //  void setupTabs();
105   Ui::MainWindow *ui;
107   PIRSelectKeysetForm *selectKeysetForm;
108   PIRSelectDeviceForm *selectDeviceForm;
109   PIRPanelSelectionForm *panelSelectionForm;
110   PIRDocumentationForm *documentationForm;
111   PIRAboutForm *aboutForm;
113   PIRKeysetManager *myKeysets;
114   PIRPanelManager *myPanels;
116   unsigned int currentKeyset;
118   PIRModprobe modprobeObj;
119 };
122 #endif // MAINWINDOW_H

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment