Bug 98560

Summary: more (and independent) point and line properties should be provided
Product: [Applications] kst Reporter: Nicolas Brisset <nicolas.brisset>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Solaris   
Latest Commit: Version Fixed In:

Description Nicolas Brisset 2005-02-04 17:31:13 UTC
Version:           1.1.0_dr1 (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.3.2
OS:                SunOS (sun4u) release 5.8

The curve dialog allows for setting some options regarding point/line options. It would be nice to separate options to add new possibilities and avoid inconsistencies. 
In fact, this bug report was inspired by a kst user who complained that point size was not saved in his documents. He plotted curves with points only, and their size was > 0. When loading the document later, the point size was reset to 0.

I think it would be nice to offer the following (independent) options, and restore them when loading the document again:
- points: toggle on/off, type, color, size, density
- lines: toggle on/off, type, color, width
Comment 1 Andrew Walker 2005-03-04 20:17:40 UTC
CVS commit by arwalker: 

We want to remember the line width even if lines are disabled as the line width (now called weight) also impacts the point size. Also, we want to store line and point settings (even if not currently used) as they still give the last used setting, which the user might want to retain across sessions.

CCMAIL: 98560-done@bugs.kde.org


  M +10 -8     kstvcurve.cpp   1.58


--- kdeextragear-2/kst/kst/kstvcurve.cpp  #1.57:1.58
@@ -16,9 +16,12 @@
  ***************************************************************************/
 
+// includes for Qt
+#include <qstylesheet.h>
+
+// includes for KDE
 #include <klocale.h>
 #include <kdebug.h>
 
-#include <qstylesheet.h>
-
+// application specific includes
 #include "dialoglauncher.h"
 #include "kstcolorsequence.h"
@@ -71,5 +74,4 @@ KstVCurve::KstVCurve(QDomElement &e)
   setPointDensity(0);
 
-  /* parse the DOM tree */
   QDomNode n = e.firstChild();
   while( !n.isNull() ) {
@@ -390,16 +392,16 @@ void KstVCurve::save(QTextStream &ts, co
   if (HasLines) {
     ts << l2 << "<hasLines/>" << endl;
+  }
     ts << l2 << "<lineWidth>" << LineWidth << "</lineWidth>" << endl;
     ts << l2 << "<lineStyle>" << LineStyle << "</lineStyle>" << endl;
-  }
   if (HasPoints) {
     ts << l2 << "<hasPoints/>" << endl;
+  }
     ts << l2 << "<pointType>" << Point.type() << "</pointType>" << endl;
     ts << l2 << "<pointDensity>" << PointDensity << "</pointDensity>" << endl;
-  }
   if (HasBars) {
     ts << l2 << "<hasBars/>" << endl;
-    ts << l2 << "<barStyle>" << BarStyle << "</barStyle>" << endl;
   }
+  ts << l2 << "<barStyle>" << BarStyle << "</barStyle>" << endl;
   if (_ignoreAutoScale) {
     ts << l2 << "<ignoreAutoScale/>" << endl;


Comment 2 Nicolas Brisset 2005-03-07 09:36:55 UTC
I can't test your changes right now (which sound good!) but I am surprised you marked the bug as fixed while apparently the new properties are only saved, but not used in the drawing code... but maybe I missed something ?