summaryrefslogtreecommitdiff
path: root/src/gui/mainwindow.cpp
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2018-02-15 16:32:33 +0100
committerAleks Kissinger <aleks0@gmail.com>2018-02-15 16:32:33 +0100
commit09c331761648541de907c866c56fb6084c6f7a9b (patch)
tree8e5a11c282255a0e5248c8a6093e362aa136861f /src/gui/mainwindow.cpp
parent768e097abd17d07dd2748894b4dc1b09471dd6da (diff)
added support for changing edge mode, and started working on windows support
Diffstat (limited to 'src/gui/mainwindow.cpp')
-rw-r--r--src/gui/mainwindow.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index 54474ae..eac7c44 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -1,5 +1,7 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
+
+#include "mainmenu.h"
#include "tikzassembler.h"
#include "toolpalette.h"
#include "tikzit.h"
@@ -22,11 +24,22 @@ MainWindow::MainWindow(QWidget *parent) :
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true);
_tikzDocument = new TikzDocument(this);
- _tikzScene = new TikzScene(_tikzDocument, this);
+
+ _tools = new ToolPalette(this);
+ addToolBar(_tools);
+
+ _tikzScene = new TikzScene(_tikzDocument, _tools, this);
ui->tikzView->setScene(_tikzScene);
_fileName = "";
_pristine = true;
+
+ // TODO: check if each window should have a menu
+ _menu = new MainMenu();
+ _menu->setParent(this);
+
+ setMenuBar(_menu);
+
// initially, the source view should be collapsed
QList<int> sz = ui->splitter->sizes();
sz[0] = sz[0] + sz[1];
@@ -59,7 +72,7 @@ void MainWindow::open(QString fileName)
void MainWindow::closeEvent(QCloseEvent *event)
{
- //qDebug() << "got close event";
+ qDebug() << "got close event";
QMainWindow::closeEvent(event);
}