New version: 1.0.1
[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 showAbout();
36         void showSettings();
37
38 private:
39         QAccelerometer *accelerometer;
40         AMeterWidget *awidget;
41 };
42
43 #endif // MAINWINDOW_H
44