src/document.cpp

changeset 47
cd6704009eb9
parent 39
caac957e9834
child 51
1a9eac27698d
--- a/src/document.cpp	Thu Feb 06 20:33:05 2020 +0200
+++ b/src/document.cpp	Thu Feb 06 23:41:20 2020 +0200
@@ -16,6 +16,7 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <QMouseEvent>
 #include "document.h"
 #include "ui_document.h"
 #include "model.h"
@@ -29,7 +30,7 @@
 	model{model},
 	documents{documents},
 	colorTable{colorTable},
-	renderer{new PartRenderer{model, documents, colorTable, this}},
+	renderer{new Canvas{model, documents, colorTable, this}},
 	ui{*new Ui::Document}
 {
 	this->ui.setupUi(this);
@@ -37,7 +38,9 @@
 	QVBoxLayout* layout = new QVBoxLayout;
 	layout->addWidget(this->renderer);
 	this->ui.viewportFrame->setLayout(layout);
+	this->setMouseTracking(true);
 	connect(this->ui.splitter, &QSplitter::splitterMoved, this, &Document::splitterChanged);
+	connect(this->renderer, &Canvas::newStatusText, this, &Document::newStatusText);
 }
 
 Document::~Document()

mercurial