diff options
Diffstat (limited to 'src/editorwindow.cc')
-rw-r--r-- | src/editorwindow.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/editorwindow.cc b/src/editorwindow.cc index f01548d..65a84e6 100644 --- a/src/editorwindow.cc +++ b/src/editorwindow.cc @@ -13,6 +13,7 @@ #include <QtGui> #include <QFile> + #include <QSplitter> #include <QTextStream> #include <QDebug> @@ -21,8 +22,13 @@ namespace editor EditorWindow::EditorWindow(QWidget *parent) : QWidget(parent) { - editorwindow_mapwidget = new MapWidget(this); - editorwindow_sidebar = new SideBar(this); + editorwindow_splitter = new QSplitter(this); + + editorwindow_mapwidget = new MapWidget(); + editorwindow_sidebar = new SideBar(); + + editorwindow_splitter->addWidget(editorwindow_sidebar); + editorwindow_splitter->addWidget(editorwindow_mapwidget); connect(editorwindow_mapwidget, SIGNAL(propertiesChanged(EntityProperties *)), editorwindow_sidebar, SLOT(setProperties(EntityProperties *))); connect(editorwindow_sidebar, SIGNAL(entityChanged()), editorwindow_mapwidget, SLOT(resizeChildren())); @@ -30,11 +36,14 @@ EditorWindow::EditorWindow(QWidget *parent) : QWidget(parent) void EditorWindow::resizeEvent (QResizeEvent *event) { + /* editorwindow_sidebar->resize(256, height()); editorwindow_mapwidget->setGeometry( editorwindow_sidebar->width(), 0, width() - editorwindow_sidebar->width(), height() ); + */ + editorwindow_splitter->resize(width(), height()); } bool EditorWindow::loadFile(const QString &filename) |