30fdaec3f78711ef4a55a0f30ec1ae6a64996a8c
[mverbiste] / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QtGui/QMainWindow>
5 #include <QtGui/QTextEdit>
6 #include <QtGui/QPushButton>
7 #include <QtGui/QVBoxLayout>
8 #include <QtGui/QLineEdit>
9 #include <QtGui/QScrollArea>
10 #include <QtGui/QLabel>
11
12 namespace Ui {
13     class MainWindow;
14 }
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     // Setup UI by coding, not by QtDesigner
30     void setupcodedUI();
31
32     // Note that this will only have an effect on Symbian and Fremantle.
33     void setOrientation(ScreenOrientation orientation);
34
35     void showExpanded();
36
37 public slots:
38     void startLookup();
39
40 private:
41     Ui::MainWindow *ui;
42     QWidget     *cent;               // Central widget
43     QVBoxLayout *mlayout;            // Main layout
44     QHBoxLayout *btlayout;           // Layout to pack the functional buttons
45     QPushButton *btnClear;           // Clear button
46     QLineEdit   *wordinput;          //  Word input
47     QPushButton *btnLookup;          // Lookup button
48     QLabel      *labVerb;
49 };
50
51 #endif // MAINWINDOW_H