[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Sat Mar 5 14:56:14 CET 2005


CVS commit by netterfield: 

Some changes to auto-labels for PSD's;


  M +2 -0      kstpsd.cpp   1.21
  M +6 -1      kstvector.cpp   1.96
  M +3 -0      kstvector.h   1.64


--- kdeextragear-2/kst/kst/kstpsd.cpp  #1.20:1.21
@@ -156,4 +156,5 @@ void KstPSD::commonConstructor(const QSt
   ov->setProvider(this);
   _fVector = _outputVectors.insert(FVECTOR, ov);
+  (*_fVector)->setLabel(i18n("Frequency [%1]").arg(RUnits));
 
   ov = new KstVector(in_tag+"-sv", _PSDLen);
@@ -161,4 +162,5 @@ void KstPSD::commonConstructor(const QSt
   ov->setProvider(this);
   _sVector = _outputVectors.insert(SVECTOR, ov);
+  (*_sVector)->setLabel(i18n("PSD [%1/sqrt(%2)]").arg(VUnits).arg(RUnits));
 
   _curveHints->append(new KstCurveHint(i18n("PSD Curve"), (*_fVector)->tagName(), (*_sVector)->tagName()));

--- kdeextragear-2/kst/kst/kstvector.cpp  #1.95:1.96
@@ -53,4 +53,5 @@ KstVector::KstVector(const QString& name
   NumNew = 0;
   _isScalarList = isScalarList;
+  _label = QString::null;
 
   if (size <= 0) {
@@ -417,5 +418,5 @@ void KstVector::setNewAndShift(int inNew
 
 QString KstVector::label() const {
-  return tagName(); // default
+  return _label; // default
 }
 
@@ -535,4 +536,8 @@ bool KstVector::deleteDependents() {
 }
 
+void KstVector::setLabel(QString label_in) {
+  _label = label_in;
+}
+
 #include "kstvector.moc"
 // vim: et sw=2 ts=2

--- kdeextragear-2/kst/kst/kstvector.h  #1.63:1.64
@@ -135,4 +135,6 @@ class KstVector : public KstObject {
     virtual bool deleteDependents();
 
+    void setLabel(QString label_in);
+
   protected: // Protected attributes
     /** current number of samples */
@@ -174,4 +176,5 @@ class KstVector : public KstObject {
     void RenameScalars();
 
+    QString _label;
   protected:
     friend class KstDataObject;




More information about the Kst mailing list