# HG changeset patch
# User Chris Cannam
# Date 1137675278 0
# Node ID 44bbf5793d84a75ca192d060352740a89efb6eb4
# Parent 31c4ed2d5da6b1af96adf6fd86f3d15681523209
* Rework handling of layer properties in file I/O -- we now get the individual
layers to load and save them rather than doing it via generic property lists
in the base class, so as to ensure we read and write meaningful values rather
than generic int values requiring conversion.
diff -r 31c4ed2d5da6 -r 44bbf5793d84 base/Layer.cpp
--- a/base/Layer.cpp Tue Jan 17 17:45:55 2006 +0000
+++ b/base/Layer.cpp Thu Jan 19 12:54:38 2006 +0000
@@ -41,7 +41,7 @@
s += indent;
- s += QString("\n")
+ s += QString("\n")
.arg(LayerFactory::instance()->getLayerTypeName
(LayerFactory::instance()->getLayerType(this)))
.arg(getObjectExportId(this))
@@ -49,18 +49,6 @@
.arg(getObjectExportId(getModel()))
.arg(extraAttributes);
- PropertyList properties = getProperties();
-
- for (PropertyList::const_iterator i = properties.begin();
- i != properties.end(); ++i) {
-
- int pv = getPropertyRangeAndValue(*i, 0, 0);
- s += indent + "";
- s += QString("\n").arg(*i).arg(pv);
- }
-
- s += indent + "\n";
-
return s;
}
diff -r 31c4ed2d5da6 -r 44bbf5793d84 base/Layer.h
--- a/base/Layer.h Tue Jan 17 17:45:55 2006 +0000
+++ b/base/Layer.h Thu Jan 19 12:54:38 2006 +0000
@@ -16,6 +16,7 @@
#include
#include
+#include
class ZoomConstraint;
class Model;
@@ -91,6 +92,8 @@
virtual QString toXmlString(QString indent = "",
QString extraAttributes = "") const;
+ virtual void setProperties(const QXmlAttributes &) = 0;
+
signals:
void modelChanged();
void modelCompletionChanged();