src/document.cpp

changeset 21
0133e565e072
parent 9
8b9780700b5e
child 24
1a0faaaceb84
equal deleted inserted replaced
20:cef43609a374 21:0133e565e072
1 #include "document.h" 1 #include "document.h"
2 #include "ui_document.h" 2 #include "ui_document.h"
3 #include "model.h" 3 #include "model.h"
4 4
5 Document::Document(Model* model, QWidget* parent) : 5 Document::Document(Model* model, DocumentManager* documents, QWidget* parent) :
6 QWidget{parent}, 6 QWidget{parent},
7 model{model}, 7 model{model},
8 documents{documents},
9 renderer{new PartRenderer{model, documents, this}},
8 ui{*new Ui::Document} 10 ui{*new Ui::Document}
9 { 11 {
10 this->ui.setupUi(this); 12 this->ui.setupUi(this);
11 this->ui.listView->setModel(model); 13 this->ui.listView->setModel(model);
14 QVBoxLayout* layout = new QVBoxLayout;
15 layout->addWidget(this->renderer);
16 this->ui.viewportFrame->setLayout(layout);
12 connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged); 17 connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged);
13 } 18 }
14 19
15 Document::~Document() 20 Document::~Document()
16 { 21 {

mercurial