[Kst] extragear/graphics/kst/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Fri Dec 16 06:13:40 CET 2005
SVN commit 488852 by netterfield:
BUG:
Lines can now be saved.
Lines and arrows can now be loaded.
M +1 -0 kstviewarrow.cpp
M +12 -2 kstviewline.cpp
M +4 -0 kstviewobject.cpp
--- trunk/extragear/graphics/kst/kst/kstviewarrow.cpp #488851:488852
@@ -68,6 +68,7 @@
}
// always has this value
+ setTransparent(true);
_type = "Arrow";
}
--- trunk/extragear/graphics/kst/kst/kstviewline.cpp #488851:488852
@@ -44,7 +44,17 @@
_container = false;
_capStyle = Qt::FlatCap;
_penStyle = Qt::SolidLine;
-
+ QDomNode n = e.firstChild();
+ while (!n.isNull()) {
+ QDomElement el = n.toElement();
+ if (!el.isNull()) {
+ if (metaObject()->findProperty(el.tagName().latin1(), true) > -1) {
+ setProperty(el.tagName().latin1(), QVariant(el.text()));
+ }
+ }
+ n = n.nextSibling();
+ }
+
// always these values
setTransparent(true);
_type = "Line";
@@ -165,7 +175,7 @@
void KstViewLine::setWidth(int width) {
if (_width != width) {
_width = width;
- updateOrientation();
+ //updateOrientation();
setDirty();
}
}
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #488851:488852
@@ -199,6 +199,10 @@
KstViewArrowPtr arrow = new KstViewArrow(el);
appendChild(arrow.data(), true);
arrow->loadChildren(el);
+ } else if (el.tagName() == "Line") {
+ KstViewLinePtr line = new KstViewArrow(el);
+ appendChild(line.data(), true);
+ line->loadChildren(el);
} else if (el.tagName() == "Ellipse") {
KstViewEllipsePtr ellipse = new KstViewEllipse(el);
appendChild(ellipse.data(), true);
More information about the Kst
mailing list