[Kst] branches/work/kst/portto4/kst/src
Mike Fenton
mike at staikos.net
Thu Nov 13 17:15:50 CET 2008
SVN commit 883802 by fenton:
Add lockable vectors for Fit/Filter context menu options.
M +6 -1 libkstapp/filterfitdialog.cpp
M +1 -0 libkstapp/filterfitdialog.h
M +5 -0 libkstmath/dataobject.cpp
M +1 -0 libkstmath/dataobject.h
M +3 -0 plugins/filters/butterworth_bandpass/butterworth_bandpass.cpp
M +3 -0 plugins/filters/butterworth_bandstop/butterworth_bandstop.cpp
M +3 -0 plugins/filters/butterworth_highpass/butterworth_highpass.cpp
M +3 -0 plugins/filters/butterworth_lowpass/butterworth_lowpass.cpp
M +3 -0 plugins/filters/despike/filterdespike.cpp
M +5 -0 plugins/fits/exponential_unweighted/fitexponential_unweighted.cpp
M +5 -1 plugins/fits/exponential_weighted/fitexponential_weighted.cpp
M +5 -0 plugins/fits/gaussian_unweighted/fitgaussian_unweighted.cpp
M +5 -1 plugins/fits/gaussian_weighted/fitgaussian_weighted.cpp
M +5 -1 plugins/fits/gradient_unweighted/fitgradient_unweighted.cpp
M +5 -0 plugins/fits/gradient_weighted/fitgradient_weighted.cpp
M +5 -0 plugins/fits/kneefrequency/fitkneefrequency.cpp
M +5 -1 plugins/fits/linear_unweighted/fitlinear_unweighted.cpp
M +5 -0 plugins/fits/linear_weighted/fitlinear_weighted.cpp
M +5 -0 plugins/fits/lorentzian_unweighted/fitlorentzian_unweighted.cpp
M +5 -1 plugins/fits/lorentzian_weighted/fitlorentzian_weighted.cpp
M +5 -1 plugins/fits/polynomial_unweighted/fitpolynomial_unweighted.cpp
M +5 -1 plugins/fits/polynomial_weighted/fitpolynomial_weighted.cpp
M +5 -1 plugins/fits/sinusoid_unweighted/fitsinusoid_unweighted.cpp
M +5 -1 plugins/fits/sinusoid_weighted/fitsinusoid_weighted.cpp
M +0 -1 widgets/vectorselector.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.cpp #883801:883802
@@ -24,7 +24,7 @@
namespace Kst {
FilterFitTab::FilterFitTab(QString& pluginName, QWidget *parent)
- : DataTab(parent), _configWidget(0), _layout(0), _store(0), _vectorX(0), _vectorY(0) {
+ : DataTab(parent), _configWidget(0), _layout(0), _store(0), _vectorX(0), _vectorY(0), _lockVectors(false) {
setupUi(this);
setTabTitle(tr("Plugin"));
@@ -71,6 +71,8 @@
void FilterFitTab::setPlotMode() {
_curveAppearance->setVisible(true);
+ _lockVectors = true;
+ _configWidget->setVectorsLocked(true);
}
@@ -110,6 +112,9 @@
if (_vectorY) {
_configWidget->setVectorY(_vectorY);
}
+ if (_lockVectors) {
+ _configWidget->setVectorsLocked(true);
+ }
_layout->addWidget(_configWidget, 0, 0);
_layout->activate();
}
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.h #883801:883802
@@ -53,6 +53,7 @@
DataObjectPluginInterface::PluginTypeID _type;
ObjectStore *_store;
VectorPtr _vectorX, _vectorY;
+ bool _lockVectors;
};
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.cpp #883801:883802
@@ -972,6 +972,11 @@
}
+void DataObjectConfigWidget::setVectorsLocked(bool locked) {
+ Q_UNUSED(locked);
+}
+
+
bool DataObjectConfigWidget::configurePropertiesFromXml(ObjectStore *store, QXmlStreamAttributes& attrs) {
Q_UNUSED(store);
Q_UNUSED(attrs);
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.h #883801:883802
@@ -200,6 +200,7 @@
virtual void setVectorX(VectorPtr vector);
virtual void setVectorY(VectorPtr vector);
+ virtual void setVectorsLocked(bool locked = true);
virtual bool configurePropertiesFromXml(ObjectStore *store, QXmlStreamAttributes& attrs);
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_bandpass/butterworth_bandpass.cpp #883801:883802
@@ -55,6 +55,9 @@
Q_UNUSED(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vector->setEnabled(!locked);
+ }
Kst::VectorPtr selectedVector() { return _vector->selectedVector(); };
void setSelectedVector(Kst::VectorPtr vector) { return _vector->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_bandstop/butterworth_bandstop.cpp #883801:883802
@@ -55,6 +55,9 @@
Q_UNUSED(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vector->setEnabled(!locked);
+ }
Kst::VectorPtr selectedVector() { return _vector->selectedVector(); };
void setSelectedVector(Kst::VectorPtr vector) { return _vector->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_highpass/butterworth_highpass.cpp #883801:883802
@@ -52,6 +52,9 @@
Q_UNUSED(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vector->setEnabled(!locked);
+ }
Kst::VectorPtr selectedVector() { return _vector->selectedVector(); };
void setSelectedVector(Kst::VectorPtr vector) { return _vector->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_lowpass/butterworth_lowpass.cpp #883801:883802
@@ -53,6 +53,9 @@
Q_UNUSED(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vector->setEnabled(!locked);
+ }
Kst::VectorPtr selectedVector() { return _vector->selectedVector(); };
void setSelectedVector(Kst::VectorPtr vector) { return _vector->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/filters/despike/filterdespike.cpp #883801:883802
@@ -50,6 +50,9 @@
Q_UNUSED(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vector->setEnabled(!locked);
+ }
Kst::VectorPtr selectedVector() { return _vector->selectedVector(); };
void setSelectedVector(Kst::VectorPtr vector) { return _vector->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/exponential_unweighted/fitexponential_unweighted.cpp #883801:883802
@@ -58,6 +58,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/exponential_weighted/fitexponential_weighted.cpp #883801:883802
@@ -52,7 +52,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -61,6 +60,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/gaussian_unweighted/fitgaussian_unweighted.cpp #883801:883802
@@ -58,6 +58,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/gaussian_weighted/fitgaussian_weighted.cpp #883801:883802
@@ -52,7 +52,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -61,6 +60,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/gradient_unweighted/fitgradient_unweighted.cpp #883801:883802
@@ -48,7 +48,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -57,6 +56,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/gradient_weighted/fitgradient_weighted.cpp #883801:883802
@@ -60,6 +60,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/kneefrequency/fitkneefrequency.cpp #883801:883802
@@ -64,6 +64,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/linear_unweighted/fitlinear_unweighted.cpp #883801:883802
@@ -48,7 +48,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -57,6 +56,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/linear_weighted/fitlinear_weighted.cpp #883801:883802
@@ -60,6 +60,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/lorentzian_unweighted/fitlorentzian_unweighted.cpp #883801:883802
@@ -58,6 +58,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/lorentzian_weighted/fitlorentzian_weighted.cpp #883801:883802
@@ -52,7 +52,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -61,6 +60,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/polynomial_unweighted/fitpolynomial_unweighted.cpp #883801:883802
@@ -50,7 +50,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -59,6 +58,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/polynomial_weighted/fitpolynomial_weighted.cpp #883801:883802
@@ -53,7 +53,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -62,6 +61,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/sinusoid_unweighted/fitsinusoid_unweighted.cpp #883801:883802
@@ -53,7 +53,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -62,6 +61,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/plugins/fits/sinusoid_weighted/fitsinusoid_weighted.cpp #883801:883802
@@ -56,7 +56,6 @@
}
}
-
void setVectorX(Kst::VectorPtr vector) {
setSelectedVectorX(vector);
}
@@ -65,6 +64,11 @@
setSelectedVectorY(vector);
}
+ void setVectorsLocked(bool locked = true) {
+ _vectorX->setEnabled(!locked);
+ _vectorY->setEnabled(!locked);
+ }
+
Kst::VectorPtr selectedVectorX() { return _vectorX->selectedVector(); };
void setSelectedVectorX(Kst::VectorPtr vector) { return _vectorX->setSelectedVector(vector); };
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #883801:883802
@@ -36,7 +36,6 @@
connect(_editVector, SIGNAL(pressed()), this, SLOT(editVector()));
connect(_vector, SIGNAL(activated(int)), this, SLOT(emitSelectionChanged()));
connect(_vector, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDescriptionTip()));
-
}
More information about the Kst
mailing list