First commit
[ameter] / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QtCore/QSettings>
5
6 #include <QtGui/QMainWindow>
7 #include <QtGui/QMenuBar>
8
9 #include <QtSensors/QAccelerometer>
10
11 // Neccessary for Qt Mobility API usage
12 QTM_USE_NAMESPACE
13
14 #include "ameterwidget.h"
15
16 class MainWindow : public QMainWindow
17 {
18     Q_OBJECT
19 public:
20     enum ScreenOrientation {
21         ScreenOrientationLockPortrait,
22         ScreenOrientationLockLandscape,
23         ScreenOrientationAuto
24     };
25
26     explicit MainWindow(QWidget *parent = 0);
27     virtual ~MainWindow();
28
29     // Note that this will only have an effect on Symbian and Fremantle.
30     void setOrientation(ScreenOrientation orientation);
31
32     void showExpanded();
33
34 public slots:
35         void changeSettings();
36
37 private:
38         QAccelerometer *accelerometer;
39         AMeterWidget *awidget;
40 };
41
42 #endif // MAINWINDOW_H