This commit is contained in:
fourtf 2016-12-29 18:45:08 +01:00
parent 1d7eb937f4
commit 936aeda484
2 changed files with 11 additions and 4 deletions

View file

@ -5,11 +5,18 @@
Notebook::Notebook(QWidget *parent)
: QWidget(parent)
{
auto list = new QList<std::tuple<NotebookPage*, NotebookTab*>>();
this->pages = list;
}
NotebookPage
NotebookPage*
Notebook::AddPage()
{
return new NotebookPage(this);
auto page = new NotebookPage(this);
auto tab = new NotebookTab(this, this, page);
this->pages->append(std::make_tuple(page, tab));
return page;
}

View file

@ -13,10 +13,10 @@ Q_OBJECT
public:
Notebook(QWidget *parent);
NotebookPage AddPage();
NotebookPage* AddPage();
private:
QList<std::tuple<NotebookPage, NotebookTab>> pages;
QList<std::tuple<NotebookPage*, NotebookTab*>>* pages;
};
#endif // NOTEBOOK_H