[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Thu Nov 25 21:36:34 CET 2004


CVS commit by staikos: 

- add more Q_PROPERTIES
- fix a bug discovered in testing: assignment operator didn't fire the trigger


  M +1 -0      kstscalar.cpp   1.31
  M +3 -1      kstscalar.h   1.22


--- kdeextragear-2/kst/kst/kstscalar.cpp  #1.30:1.31
@@ -100,4 +100,5 @@ void KstScalar::save(QTextStream &ts, co
 KstScalar& KstScalar::operator=(double v) {
   _value = v;
+  emit trigger();
   return *this;
 }

--- kdeextragear-2/kst/kst/kstscalar.h  #1.21:1.22
@@ -27,4 +27,6 @@ class KstScalar : public KstObject {
   Q_OBJECT
   Q_PROPERTY(bool orphan READ orphan WRITE setOrphan)
+  Q_PROPERTY(double value READ value WRITE setValue)
+  Q_PROPERTY(bool displayable READ displayable WRITE setDisplayable)
   public:
     KstScalar(const QString& in_tag = QString::null, double val = 0.0, bool orphan = false, bool displayable = true, bool bLock = true);
@@ -33,5 +35,5 @@ class KstScalar : public KstObject {
 
     /* return a string representation of the scalar */
-    const QString label() const { return QString::number(_value); }
+    QString label() const { return QString::number(_value); }
 
     /** Save vector information */





More information about the Kst mailing list