Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/zoneproperties.cc')
-rw-r--r--src/zoneproperties.cc50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/zoneproperties.cc b/src/zoneproperties.cc
index e69de29..35d994a 100644
--- a/src/zoneproperties.cc
+++ b/src/zoneproperties.cc
@@ -0,0 +1,50 @@
+/*
+ zonecc
+ This file is part of the Project::OSiRiON world editor
+ and is distributed under the terms and conditions of
+ the GNU General Public License version 2
+*/
+
+#include "zoneproperties.h"
+
+namespace editor
+{
+
+ZoneProperties::ZoneProperties() : Properties()
+{
+}
+
+ZoneProperties::~ZoneProperties()
+{
+}
+
+void ZoneProperties::save(QTextStream & textstream)
+{
+ textstream << "[zone]" << '\n';
+
+ if (name().size())
+ textstream << "name=" << name() << '\n';
+
+ // other values
+ if (values().size()) {
+ textstream << values();
+ }
+
+ // info string
+ if (info().size()) {
+ textstream << '\n';
+
+ // QTextStream operates on QString, not on QString const
+ QString infobuffer = info();
+ QTextStream infostream(&infobuffer);
+ QString line;
+ while (!infostream.atEnd()) {
+ line = infostream.readLine(1024);
+ textstream << "info=" << line << '\n';
+ }
+ }
+
+ textstream << '\n';
+}
+
+} // namespace editor