X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=mainwindow.h;h=c47b619e1ee2d4150da6c5ed45901076d85ee894;hb=HEAD;hp=fec96940f73d260437f12cd45e502de275f93e55;hpb=c5a79dc4b67e59dcbd51047d045b17ffe268a6f0;p=mverbiste diff --git a/mainwindow.h b/mainwindow.h index fec9694..c47b619 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -4,10 +4,14 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include /* Verbiste */ #include @@ -15,12 +19,34 @@ #include #include #include "gui/conjugation.h" +#include "about.h" + +#ifndef QT_NO_DEBUG +#include +#include +#endif + using namespace verbiste; namespace Ui { class MainWindow; + class ResultPage; } +class ResultPage +{ +public: + QScrollArea *page; + QGridLayout *grid; + + ResultPage(); + // No destructor because this object does not own the two widgets. + void packContent(); + +private: + QWidget *immediate; +}; + class MainWindow : public QMainWindow { Q_OBJECT @@ -42,21 +68,41 @@ public: void showExpanded(); void initverbiste(); + QVBoxLayout* makeResultCell(const VVS &tenseIterator, + const std::string &tenseName, + const std::string &inputWord, + FrenchVerbDictionary *verbDict); public slots: void startLookup(); + void switchLang(); private: Ui::MainWindow *ui; QWidget *cent; // Central widget QVBoxLayout *mlayout; // Main layout + QTabWidget *resultPages; QHBoxLayout *btlayout; // Layout to pack the functional buttons QPushButton *btnClear; // Clear button + QCheckBox *btnPron; QLineEdit *wordinput; // Word input QPushButton *btnLookup; // Lookup button - QLabel *labVerb; + QAction *filFrench; + QAction *filItalian; + QMessageBox *msgbox; std::string langCode; FrenchVerbDictionary *freVerbDic; + AboutDialog *aboutDialog; + + ResultPage* addResultPage(const std::string &labelText); +#ifndef QT_NO_DEBUG + QElapsedTimer timer; +#endif + +private slots: + void clearResults(); + void startAgain(); }; + #endif // MAINWINDOW_H