X-Git-Url: http://git.maemo.org/git/?p=mverbiste;a=blobdiff_plain;f=mainwindow.h;h=b7357478b387b2772d2625c9e7df4f6c23a15c3e;hp=476ecee375f360b737f9988c976d583617391dba;hb=cc80761bdb1c9e1dd83d7713ec77e215051dc534;hpb=3363c69bdbc38494b966567f4dbf8384402e5877 diff --git a/mainwindow.h b/mainwindow.h index 476ecee..b735747 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -8,18 +8,35 @@ #include #include #include +#include /* Verbiste */ #include #include #include #include +#include "gui/conjugation.h" 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,6 +58,10 @@ public: void showExpanded(); void initverbiste(); + QVBoxLayout* makeResultCell(const VVS &tenseIterator, + const std::string &tenseName, + const std::string &inputWord, + FrenchVerbDictionary *verbDict); public slots: void startLookup(); @@ -49,13 +70,20 @@ 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 QLineEdit *wordinput; // Word input QPushButton *btnLookup; // Lookup button - QLabel *labVerb; std::string langCode; FrenchVerbDictionary *freVerbDic; + + ResultPage* addResultPage(const std::string &labelText); + +private slots: + void clearResults(); + void startAgain(); }; + #endif // MAINWINDOW_H