summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/graphics/rbscene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics/rbscene.cpp')
-rw-r--r--utils/themeeditor/graphics/rbscene.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/utils/themeeditor/graphics/rbscene.cpp b/utils/themeeditor/graphics/rbscene.cpp
index 206f68f184..c80cb2357d 100644
--- a/utils/themeeditor/graphics/rbscene.cpp
+++ b/utils/themeeditor/graphics/rbscene.cpp
@@ -21,16 +21,38 @@
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsItem>
-
-#include <QDebug>
+#include <QGraphicsProxyWidget>
#include "rbscene.h"
+#include "rbconsole.h"
RBScene::RBScene(QObject* parent)
- : QGraphicsScene(parent)
+ : QGraphicsScene(parent), consoleProxy(0), console(0)
{
}
RBScene::~RBScene()
{
+ if(console)
+ console->deleteLater();
+
+ if(consoleProxy)
+ consoleProxy->deleteLater();
+}
+
+void RBScene::clear()
+{
+ QGraphicsScene::clear();
+
+ console = new RBConsole();
+ consoleProxy = addWidget(console);
+ consoleProxy->setZValue(1000);
+ consoleProxy->resize(screen.width(), screen.height());
+ consoleProxy->hide();
+}
+
+void RBScene::addWarning(QString warning)
+{
+ console->addWarning(warning);
+ console->show();
}