Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/editorwindow.cc')
-rw-r--r--src/editorwindow.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/editorwindow.cc b/src/editorwindow.cc
index 759263f..208c309 100644
--- a/src/editorwindow.cc
+++ b/src/editorwindow.cc
@@ -152,7 +152,14 @@ bool EditorWindow::loadFile(const QString &filename)
} else if (ini.in_section("zone")) {
if (ini.got_key_string("name", str)) {
+ editorwindow_zoneproperties.set_name(str);
editorwindow_sidebar->setZoneName(str);
+
+ } else if (ini.got_key_string("info", str)) {
+ editorwindow_zoneproperties.add_info(str);
+
+ } else if (ini.got_key()) {
+ editorwindow_zoneproperties.add_value(ini.key(), ini.value());
}
}
@@ -169,8 +176,21 @@ bool EditorWindow::loadFile(const QString &filename)
bool EditorWindow::saveFile(const QString &filename)
{
-
+ QString buffer;
+ QTextStream textstream(&buffer);
+
+ editorwindow_zoneproperties.save(textstream);
+ editorwindow_mapwidget->save(textstream);
+
+ // debug output
+ QTextStream out(&buffer);
+ QString line;
+ while (!out.atEnd()) {
+ line = out.readLine(1024);
+ qDebug() << line;
+ }
}
+
}