27 QWidget* parent) : |
28 QWidget* parent) : |
28 QWidget{parent}, |
29 QWidget{parent}, |
29 model{model}, |
30 model{model}, |
30 documents{documents}, |
31 documents{documents}, |
31 colorTable{colorTable}, |
32 colorTable{colorTable}, |
32 renderer{new PartRenderer{model, documents, colorTable, this}}, |
33 renderer{new Canvas{model, documents, colorTable, this}}, |
33 ui{*new Ui::Document} |
34 ui{*new Ui::Document} |
34 { |
35 { |
35 this->ui.setupUi(this); |
36 this->ui.setupUi(this); |
36 this->ui.listView->setModel(model); |
37 this->ui.listView->setModel(model); |
37 QVBoxLayout* layout = new QVBoxLayout; |
38 QVBoxLayout* layout = new QVBoxLayout; |
38 layout->addWidget(this->renderer); |
39 layout->addWidget(this->renderer); |
39 this->ui.viewportFrame->setLayout(layout); |
40 this->ui.viewportFrame->setLayout(layout); |
|
41 this->setMouseTracking(true); |
40 connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged); |
42 connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged); |
|
43 connect(this->renderer, &Canvas::newStatusText, this, &Document::newStatusText); |
41 } |
44 } |
42 |
45 |
43 Document::~Document() |
46 Document::~Document() |
44 { |
47 { |
45 delete &this->ui; |
48 delete &this->ui; |