summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-03-29 22:31:46 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-03-29 22:31:46 -0400
commitb451815fb11dde8dce172e7378aa553a9b2c79d2 (patch)
treea2ce3004250004d08b560568d8f7ae979c6c9aec
parentb6b602a1599db6d844f7912fdf0fc5506664eda1 (diff)
downloadsigen-b451815fb11dde8dce172e7378aa553a9b2c79d2.tar.gz
sigen-b451815fb11dde8dce172e7378aa553a9b2c79d2.tar.xz
sigen-b451815fb11dde8dce172e7378aa553a9b2c79d2.zip
Connect up the grid size widget
-rw-r--r--sigmodr/widgets/mapeditor/MapEditor.cpp3
-rw-r--r--sigmodr/widgets/mapeditor/MapEditor.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/sigmodr/widgets/mapeditor/MapEditor.cpp b/sigmodr/widgets/mapeditor/MapEditor.cpp
index 002e29c2..ea129233 100644
--- a/sigmodr/widgets/mapeditor/MapEditor.cpp
+++ b/sigmodr/widgets/mapeditor/MapEditor.cpp
@@ -56,6 +56,7 @@ MapEditor::MapEditor(Map* map, QWidget* parent) :
file.close();
ui_view = formWidget->findChild<QGraphicsView*>("varView");
ui_width = formWidget->findChild<KIntNumInput*>("varWidth");
+ ui_gridSize = formWidget->findChild<KIntNumInput*>("varGridSize");
ui_height = formWidget->findChild<KIntNumInput*>("varHeight");
ui_buttonAdd = formWidget->findChild<KPushButton*>("buttonAdd");
ui_buttonRemove = formWidget->findChild<KPushButton*>("buttonRemove");
@@ -80,6 +81,7 @@ MapEditor::MapEditor(Map* map, QWidget* parent) :
ui_buttonBottom->setEnabled(false);
connect(ui_width, SIGNAL(valueChanged(int)), this, SLOT(setMapWidth(int)));
connect(ui_height, SIGNAL(valueChanged(int)), this, SLOT(setMapHeight(int)));
+ connect(ui_gridSize, SIGNAL(valueChanged(int)), this, SLOT(setGridSize(int)));
reset();
QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget(formWidget);
@@ -103,6 +105,7 @@ void MapEditor::reset()
ui_view->setScene(m_scene);
ui_width->setValue(m_map->width());
ui_height->setValue(m_map->height());
+ m_rect->setGridSize(ui_gridSize->value());
makeConnections();
}
diff --git a/sigmodr/widgets/mapeditor/MapEditor.h b/sigmodr/widgets/mapeditor/MapEditor.h
index c0df096c..038b9082 100644
--- a/sigmodr/widgets/mapeditor/MapEditor.h
+++ b/sigmodr/widgets/mapeditor/MapEditor.h
@@ -73,6 +73,7 @@ class SIGMODRWIDGETS_NO_EXPORT MapEditor : public QWidget
KIntNumInput* ui_width;
KIntNumInput* ui_height;
+ KIntNumInput* ui_gridSize;
KPushButton* ui_buttonAdd;
KPushButton* ui_buttonRemove;
KPushButton* ui_buttonTop;