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 #include <QtGui/QTableWidget>
17 #include <verbiste/FrenchVerbDictionary.h>
18 #include "gui/conjugation.h"
21 #include <QtCore/QDebug>
22 #include <QtCore/QElapsedTimer>
25 using namespace verbiste;
39 // No destructor because this object does not own the two widgets.
46 class MainWindow : public QMainWindow
50 enum ScreenOrientation {
51 ScreenOrientationLockPortrait,
52 ScreenOrientationLockLandscape,
56 explicit MainWindow(QWidget *parent = 0);
57 virtual ~MainWindow();
59 // Setup UI by coding, not by QtDesigner
62 // Note that this will only have an effect on Symbian and Fremantle.
63 void setOrientation(ScreenOrientation orientation);
67 QVBoxLayout* makeResultCell(const VVS &tenseIterator,
68 const std::string &tenseName,
69 const std::string &inputWord,
70 FrenchVerbDictionary *verbDict);
77 QWidget *cent; // Central widget
78 QVBoxLayout *mlayout; // Main layout
79 QTabWidget *resultPages;
80 QHBoxLayout *btlayout; // Layout to pack the functional buttons
81 QPushButton *btnClear; // Clear button
82 QLineEdit *wordinput; // Word input
83 QPushButton *btnLookup; // Lookup button
85 FrenchVerbDictionary *freVerbDic;
87 ResultPage* addResultPage(const std::string &labelText);
98 #endif // MAINWINDOW_H