aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/batteryindicator/mainwindow.h
blob: fe219713c2f1bea4138d96a1e133cabfff825103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// checksum 0xa940 version 0x10001
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>

//! [1]
#include <QSystemInfo>
//! [1]

//! [2]
QTM_USE_NAMESPACE
//! [2]

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
public:
    enum Orientation {
        LockPortrait,
        LockLandscape,
        Auto
    };

    MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void setOrientation(Orientation orientation);

//! [3]
private:
    Ui::MainWindow *ui;
    void setupGeneral();

    QSystemDeviceInfo *deviceInfo;
//! [3]
};

#endif // MAINWINDOW_H