diff options
| author | Stijn Buys <ingar@osirion.org> | 2012-02-19 21:39:11 +0000 | 
|---|---|---|
| committer | Stijn Buys <ingar@osirion.org> | 2012-02-19 21:39:11 +0000 | 
| commit | 84f9c2b6e31c46d7d692224c36bd42bcd969a5f2 (patch) | |
| tree | 989f5c4f22ad08959f68a73cf6487be6068a1306 | |
| parent | 9e7fa49f168c4ae25d23e4858a895216e997d205 (diff) | |
Added a splitter to the editorwindow.
| -rw-r--r-- | src/editorwindow.cc | 13 | ||||
| -rw-r--r-- | src/editorwindow.h | 3 | 
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;  };  } | 
