src/mainwindow.cpp

changeset 1103
ac7db4c076c3
parent 1098
0b837bed121d
child 1113
5f3139c802bf
--- a/src/mainwindow.cpp	Thu Feb 09 01:08:57 2017 +0200
+++ b/src/mainwindow.cpp	Thu Feb 09 11:53:55 2017 +0200
@@ -23,7 +23,7 @@
 #include <QPushButton>
 #include <QSettings>
 #include "main.h"
-#include "glRenderer.h"
+#include "canvas.h"
 #include "mainwindow.h"
 #include "ldDocument.h"
 #include "miscallenous.h"
@@ -959,9 +959,9 @@
 
 // ---------------------------------------------------------------------------------------------------------------------
 //
-GLRenderer* MainWindow::renderer()
+Canvas* MainWindow::renderer()
 {
-	return static_cast<GLRenderer*>(ui.rendererStack->currentWidget());
+	return static_cast<Canvas*>(ui.rendererStack->currentWidget());
 }
 
 // ---------------------------------------------------------------------------------------------------------------------
@@ -1172,7 +1172,7 @@
 		return;
 
 	m_currentDocument = document;
-	GLRenderer* renderer = getRendererForDocument(document);
+	Canvas* renderer = getRendererForDocument(document);
 	ui.rendererStack->setCurrentWidget(renderer);
 
 	if (document)
@@ -1188,14 +1188,14 @@
 /*
  * Returns the associated renderer for the given document
  */
-GLRenderer* MainWindow::getRendererForDocument(LDDocument *document)
+Canvas* MainWindow::getRendererForDocument(LDDocument *document)
 {
-	GLRenderer* renderer = m_renderers.value(document);
+	Canvas* renderer = m_renderers.value(document);
 
 	if (not renderer)
 	{
 		print("MainWindow: Couldn't find a renderer for %1, creating one now", document->getDisplayName());
-		renderer = new GLRenderer {document, this};
+		renderer = new Canvas {document, this};
 		print("Created renderer: %1", renderer);
 		m_renderers[document] = renderer;
 		ui.rendererStack->addWidget(renderer);
@@ -1214,7 +1214,7 @@
 	if (currentDocument() == document)
 		currentDocumentClosed();
 
-	GLRenderer* renderer = m_renderers.value(document);
+	Canvas* renderer = m_renderers.value(document);
 
 	if (renderer)
 	{

mercurial