Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/editorwindow.cc13
-rw-r--r--src/editorwindow.h3
2 files changed, 14 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)
diff --git a/src/editorwindow.h b/src/editorwindow.h
index dc1ed6e..4305aea 100644
--- a/src/editorwindow.h
+++ b/src/editorwindow.h
@@ -10,6 +10,8 @@
#include <QWidget>
+class QSplitter;
+
namespace editor
{
@@ -36,6 +38,7 @@ protected:
private:
MapWidget *editorwindow_mapwidget;
SideBar *editorwindow_sidebar;
+ QSplitter *editorwindow_splitter;
};
}