X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=inline;f=mainwindow.h;h=d09491d68a4e466e683e4c4e6de02366b048bc66;hb=0f544c4b78f242a3ac985c69874c6e41493cb8f0;hp=30fdaec3f78711ef4a55a0f30ec1ae6a64996a8c;hpb=b852b4dfc8d0b85d85c00963eb9b23e12b1b86cf;p=mverbiste diff --git a/mainwindow.h b/mainwindow.h index 30fdaec..d09491d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -8,11 +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 @@ -33,6 +57,11 @@ public: void setOrientation(ScreenOrientation orientation); void showExpanded(); + void initverbiste(); + QVBoxLayout* makeResultCell(const VVS &tenseIterator, + const std::string &tenseName, + const std::string &inputWord, + FrenchVerbDictionary *verbDict); public slots: void startLookup(); @@ -41,11 +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(); }; + #endif // MAINWINDOW_H