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