From 936aeda484d0a0ceead61f91a3db63957c0ecd6a Mon Sep 17 00:00:00 2001 From: fourtf Date: Thu, 29 Dec 2016 18:45:08 +0100 Subject: [PATCH] asd --- notebook.cpp | 11 +++++++++-- notebook.h | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/notebook.cpp b/notebook.cpp index 2c7f7c27..cdcc87bb 100644 --- a/notebook.cpp +++ b/notebook.cpp @@ -5,11 +5,18 @@ Notebook::Notebook(QWidget *parent) : QWidget(parent) { + auto list = new QList>(); + 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; } diff --git a/notebook.h b/notebook.h index 78f88cfd..f8400377 100644 --- a/notebook.h +++ b/notebook.h @@ -13,10 +13,10 @@ Q_OBJECT public: Notebook(QWidget *parent); - NotebookPage AddPage(); + NotebookPage* AddPage(); private: - QList> pages; + QList>* pages; }; #endif // NOTEBOOK_H