[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Sat Jul 24 06:54:57 CEST 2004
CVS commit by staikos:
big pile of missing consts, and a tool to fix #85214
M +24 -15 kstvectordefaults.cpp 1.4
M +19 -16 kstvectordefaults.h 1.4
--- kdeextragear-2/kst/kst/kstvectordefaults.cpp #1.3:1.4
@@ -42,43 +42,45 @@ KstVectorDefaults::KstVectorDefaults() {
}
-int KstVectorDefaults::f0() {
- //sync();
+int KstVectorDefaults::f0() const {
return _f0;
}
-int KstVectorDefaults::n() {
- //sync();
+int KstVectorDefaults::n() const {
return _n;
}
-bool KstVectorDefaults::readToEOF() {
+bool KstVectorDefaults::readToEOF() const {
return _n <= 0;
}
-bool KstVectorDefaults::countFromEOF() {
+bool KstVectorDefaults::countFromEOF() const {
return _f0 < 0;
}
-QString KstVectorDefaults::dataSource() {
+const QString& KstVectorDefaults::wizardXVector() const {
+ return _wizardX;
+}
+
+const QString& KstVectorDefaults::dataSource() const {
return _dataSource;
}
-bool KstVectorDefaults::doSkip() {
+bool KstVectorDefaults::doSkip() const {
return _doSkip;
}
-bool KstVectorDefaults::doAve() {
+bool KstVectorDefaults::doAve() const {
return _doAve;
}
-int KstVectorDefaults::skip() {
+int KstVectorDefaults::skip() const {
return _skip;
}
-int KstVectorDefaults::fftLen() {
+int KstVectorDefaults::fftLen() const {
return _fft_len;
}
-double KstVectorDefaults::psdFreq() {
+double KstVectorDefaults::psdFreq() const {
return _psd_freq;
}
@@ -100,10 +102,8 @@ void KstVectorDefaults::sync() {
}
- KST::dataObjectList.lock().readLock();
KstPSDCurveList pl = kstObjectSubList<KstDataObject, KstPSDCurve>(KST::dataObjectList);
- KST::dataObjectList.lock().readUnlock();
j = pl.count() - 1;
- if (j >=0 ) {
+ if (j >= 0) {
pl[j]->readLock();
_psd_freq = pl[j]->getFreq();
@@ -122,4 +122,5 @@ void KstVectorDefaults::sync() {
void KstVectorDefaults::writeConfig(KConfig *config) {
config->writeEntry("defaultDataSource", KST::vectorDefaults.dataSource());
+ config->writeEntry("defaultWizardXVector", KST::vectorDefaults.wizardXVector());
config->writeEntry("defaultStartFrame", KST::vectorDefaults.f0());
config->writeEntry("defaultNumFrames", KST::vectorDefaults.n());
@@ -141,4 +142,5 @@ void KstVectorDefaults::readConfig(KConf
_n = config->readNumEntry("defaultNumFrames", -1);
_dataSource = config->readEntry("defaultDataSource", ".");
+ _wizardX = config->readEntry("defaultWizardXVector", "INDEX");
_doSkip = config->readNumEntry("defaultDoSkip", 0);
_doAve = config->readNumEntry("defaultDoAve", 0);
@@ -153,2 +155,9 @@ void KstVectorDefaults::readConfig(KConf
_psd_average = config->readNumEntry("defaultPSDAverage", 1 );
}
+
+
+void KstVectorDefaults::setWizardXVector(const QString& vector) {
+ _wizardX = vector;
+}
+
+// vim: ts=2 sw=2 et
--- kdeextragear-2/kst/kst/kstvectordefaults.h #1.3:1.4
@@ -27,20 +27,22 @@ class KstVectorDefaults {
KstVectorDefaults();
void sync();
- QString dataSource();
- int f0();
- int n();
- bool countFromEOF();
- bool readToEOF();
- bool doSkip();
- bool doAve();
- int skip();
- double psdFreq();
- int fftLen();
+ const QString& dataSource() const;
+ const QString& wizardXVector() const;
+ void setWizardXVector(const QString& vector);
+ int f0() const;
+ int n() const;
+ bool countFromEOF() const;
+ bool readToEOF() const;
+ bool doSkip() const;
+ bool doAve() const;
+ int skip() const;
+ double psdFreq() const;
+ int fftLen() const;
- QString vUnits() {return _vUnits;}
- QString rUnits() {return _rUnits;}
- bool apodize() {return _apodize;}
- bool removeMean() {return _removeMean;}
- bool psdAverage() {return _psd_average;}
+ const QString& vUnits() const { return _vUnits; }
+ const QString& rUnits() const { return _rUnits; }
+ bool apodize() const { return _apodize; }
+ bool removeMean() const { return _removeMean; }
+ bool psdAverage() const { return _psd_average; }
void readConfig(KConfig *config);
@@ -46,6 +48,7 @@ class KstVectorDefaults {
void readConfig(KConfig *config);
void writeConfig(KConfig *config);
+
private:
- QString _dataSource;
+ QString _dataSource, _wizardX;
int _f0;
int _n;
More information about the Kst
mailing list