X-Git-Url: http://git.maemo.org/git/?p=mverbiste;a=blobdiff_plain;f=mainwindow.h;h=c47b619e1ee2d4150da6c5ed45901076d85ee894;hp=476ecee375f360b737f9988c976d583617391dba;hb=HEAD;hpb=3363c69bdbc38494b966567f4dbf8384402e5877 diff --git a/mainwindow.h b/mainwindow.h index 476ecee..c47b619 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -4,22 +4,49 @@ #include #include #include +#include #include #include #include #include +#include +#include +#include /* Verbiste */ #include #include #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 @@ -41,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