Add author info.
[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 /* Verbiste */
13 #include <iostream>
14 #include <vector>
15 #include <string.h>
16 #include <verbiste/FrenchVerbDictionary.h>
17 #include "gui/conjugation.h"
18 using namespace verbiste;
19
20 namespace Ui {
21     class MainWindow;
22 }
23
24 class MainWindow : public QMainWindow
25 {
26     Q_OBJECT
27 public:
28     enum ScreenOrientation {
29         ScreenOrientationLockPortrait,
30         ScreenOrientationLockLandscape,
31         ScreenOrientationAuto
32     };
33
34     explicit MainWindow(QWidget *parent = 0);
35     virtual ~MainWindow();
36
37     // Setup UI by coding, not by QtDesigner
38     void setupcodedUI();
39
40     // Note that this will only have an effect on Symbian and Fremantle.
41     void setOrientation(ScreenOrientation orientation);
42
43     void showExpanded();
44     void initverbiste();
45
46 public slots:
47     void startLookup();
48
49 private:
50     Ui::MainWindow *ui;
51     QWidget     *cent;               // Central widget
52     QVBoxLayout *mlayout;            // Main layout
53     QHBoxLayout *btlayout;           // Layout to pack the functional buttons
54     QPushButton *btnClear;           // Clear button
55     QLineEdit   *wordinput;          //  Word input
56     QPushButton *btnLookup;          // Lookup button
57     QLabel      *labVerb;
58     std::string langCode;
59     FrenchVerbDictionary *freVerbDic;
60 };
61
62 #endif // MAINWINDOW_H