summaryrefslogtreecommitdiffstats
path: root/sigmodr
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-03-19 19:45:33 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-03-19 19:45:33 -0400
commit08f186920e4f4efbf466c84a47c18c5561c6dd18 (patch)
tree41591e18eca0d37c5fc62635f080e28c7f56675f /sigmodr
parent657acf19d896267f96bf1b659c85117e7118da64 (diff)
downloadsigen-08f186920e4f4efbf466c84a47c18c5561c6dd18.tar.gz
sigen-08f186920e4f4efbf466c84a47c18c5561c6dd18.tar.xz
sigen-08f186920e4f4efbf466c84a47c18c5561c6dd18.zip
Update the MapWarp widget
Diffstat (limited to 'sigmodr')
-rw-r--r--sigmodr/widgets/MapWarpUI.cpp9
-rw-r--r--sigmodr/widgets/MapWarpUI_p.h2
-rw-r--r--sigmodr/widgets/gui/mapwarp.ui31
3 files changed, 2 insertions, 40 deletions
diff --git a/sigmodr/widgets/MapWarpUI.cpp b/sigmodr/widgets/MapWarpUI.cpp
index 4da4b034..7a698fde 100644
--- a/sigmodr/widgets/MapWarpUI.cpp
+++ b/sigmodr/widgets/MapWarpUI.cpp
@@ -71,16 +71,13 @@ QWidget* MapWarpUI::Private::makeWidgets(ObjectUI* widget)
{
QWidget *form = openUiFile(":/gui/mapwarp.ui", widget);
ui_name = form->findChild<KLineEdit*>("varName");
- ui_type = form->findChild<KComboBox*>("varType");
ui_toMap = form->findChild<KComboBox*>("varToMap");
ui_toWarp = form->findChild<KComboBox*>("varToWarp");
ui_script = form->findChild<ScriptWidget*>("varScript");
connect(ui_name, SIGNAL(textChanged(QString)), this, SLOT(nameChanged(QString)));
- connect(ui_type, SIGNAL(currentIndexChanged(int)), this, SLOT(typeChanged(int)));
connect(ui_toMap, SIGNAL(currentIndexChanged(int)), this, SLOT(toMapChanged(int)));
connect(ui_toWarp, SIGNAL(currentIndexChanged(int)), this, SLOT(toWarpChanged(int)));
connect(ui_script, SIGNAL(valueChanged(Sigcore::Script)), this, SLOT(scriptChanged(Sigcore::Script)));
- ui_type->addItems(MapWarp::TypeStr);
return form;
}
@@ -97,7 +94,6 @@ void MapWarpUI::Private::refreshGui()
void MapWarpUI::Private::resetGui()
{
ui_name->setText(m_warp->name());
- ui_type->setCurrentIndex(m_warp->type());
ui_toMap->setCurrentIndex(m_warp->game()->mapIndex(m_warp->toMap()));
const Map* map = m_warp->game()->mapById(m_warp->toMap());
ui_toWarp->setCurrentIndex(map ? map->warpIndex(m_warp->toWarp()) : -1);
@@ -111,11 +107,6 @@ void MapWarpUI::Private::nameChanged(const QString& name)
ui_name->setCursorPosition(cursor);
}
-void MapWarpUI::Private::typeChanged(const int type)
-{
- m_warp->setType(static_cast<MapWarp::Type>(type));
-}
-
void MapWarpUI::Private::toMapChanged(const int toMap)
{
if (0 <= toMap)
diff --git a/sigmodr/widgets/MapWarpUI_p.h b/sigmodr/widgets/MapWarpUI_p.h
index 4411dbac..69fa4278 100644
--- a/sigmodr/widgets/MapWarpUI_p.h
+++ b/sigmodr/widgets/MapWarpUI_p.h
@@ -57,13 +57,11 @@ class SIGMODRWIDGETS_NO_EXPORT MapWarpUI::Private : public ObjectUIPrivate
void resetGui();
protected slots:
void nameChanged(const QString& name);
- void typeChanged(const int type);
void toMapChanged(const int toMap);
void toWarpChanged(const int toWarp);
void scriptChanged(const Sigcore::Script& script);
private:
KLineEdit* ui_name;
- KComboBox* ui_type;
KComboBox* ui_toMap;
KComboBox* ui_toWarp;
CoreWidgets::ScriptWidget* ui_script;
diff --git a/sigmodr/widgets/gui/mapwarp.ui b/sigmodr/widgets/gui/mapwarp.ui
index 6c39dd66..b68845e9 100644
--- a/sigmodr/widgets/gui/mapwarp.ui
+++ b/sigmodr/widgets/gui/mapwarp.ui
@@ -32,32 +32,6 @@
</widget>
</item>
<item row="1" column="0" >
- <widget class="QLabel" name="labelType" >
- <property name="text" >
- <string>Type:</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignVCenter</set>
- </property>
- <property name="buddy" >
- <cstring>varType</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="KComboBox" name="varType" >
- <property name="toolTip" >
- <string>The type of warp</string>
- </property>
- <property name="statusTip" >
- <string>The type of warp</string>
- </property>
- <property name="whatsThis" >
- <string>The type of warp</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
<widget class="QLabel" name="labelDestination" >
<property name="text" >
<string>Destination:</string>
@@ -67,7 +41,7 @@
</property>
</widget>
</item>
- <item row="2" column="1" >
+ <item row="1" column="1" >
<widget class="QWidget" >
<layout class="QGridLayout" >
<item row="0" column="0" >
@@ -131,7 +105,7 @@
</layout>
</widget>
</item>
- <item row="3" column="0" colspan="2" >
+ <item row="2" column="0" colspan="2" >
<widget class="QGroupBox" name="boxScript" >
<property name="title" >
<string>Script</string>
@@ -174,7 +148,6 @@
</customwidgets>
<tabstops>
<tabstop>varName</tabstop>
- <tabstop>varType</tabstop>
<tabstop>varToMap</tabstop>
<tabstop>varToWarp</tabstop>
<tabstop>varScript</tabstop>