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>
12 #include <QtGui/QMessageBox>
18 #include <verbiste/FrenchVerbDictionary.h>
19 #include "gui/conjugation.h"
23 #include <QtCore/QDebug>
24 #include <QtCore/QElapsedTimer>
27 using namespace verbiste;
41 // No destructor because this object does not own the two widgets.
48 class MainWindow : public QMainWindow
52 enum ScreenOrientation {
53 ScreenOrientationLockPortrait,
54 ScreenOrientationLockLandscape,
58 explicit MainWindow(QWidget *parent = 0);
59 virtual ~MainWindow();
61 // Setup UI by coding, not by QtDesigner
64 // Note that this will only have an effect on Symbian and Fremantle.
65 void setOrientation(ScreenOrientation orientation);
69 QVBoxLayout* makeResultCell(const VVS &tenseIterator,
70 const std::string &tenseName,
71 const std::string &inputWord,
72 FrenchVerbDictionary *verbDict);
79 QWidget *cent; // Central widget
80 QVBoxLayout *mlayout; // Main layout
81 QTabWidget *resultPages;
82 QHBoxLayout *btlayout; // Layout to pack the functional buttons
83 QPushButton *btnClear; // Clear button
84 QLineEdit *wordinput; // Word input
85 QPushButton *btnLookup; // Lookup button
88 FrenchVerbDictionary *freVerbDic;
89 AboutDialog *aboutDialog;
91 ResultPage* addResultPage(const std::string &labelText);
102 #endif // MAINWINDOW_H