[Kst] branches/work/kst/portto4/kst/src
Mike Fenton
mike at staikos.net
Mon Nov 17 16:46:01 CET 2008
SVN commit 885641 by fenton:
Lock to Curve Y Vector for Filters.
Remove DataManager Create Fit from Vectors.
Add DataManager Create Filter from DataObject Vectors.
Add Vector Locking in Fit/Filters from DataManager.
M +7 -7 libkstapp/datamanager.cpp
M +13 -2 libkstapp/filterfitdialog.cpp
M +1 -0 libkstapp/filterfitdialog.h
M +1 -1 plugins/filters/butterworth_bandpass/butterworth_bandpass.cpp
M +1 -1 plugins/filters/butterworth_bandstop/butterworth_bandstop.cpp
M +1 -1 plugins/filters/butterworth_highpass/butterworth_highpass.cpp
M +1 -1 plugins/filters/butterworth_lowpass/butterworth_lowpass.cpp
M +1 -1 plugins/filters/despike/filterdespike.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/datamanager.cpp #885640:885641
@@ -185,12 +185,6 @@
connect(action, SIGNAL(triggered()), this, SLOT(showHistogramDialog()));
actions.append(action);
- if (!DataObject::fitsPluginList().empty()) {
- action = new QAction(tr("Apply Fit"), this);
- connect(action, SIGNAL(triggered()), this, SLOT(showFitDialog()));
- actions.append(action);
- }
-
if (!DataObject::filterPluginList().empty()) {
action = new QAction(tr("Apply Filter"), this);
connect(action, SIGNAL(triggered()), this, SLOT(showFilterDialog()));
@@ -229,7 +223,6 @@
action->setMenu(addMenu);
actions.append(action);
-
connect(removeMenu, SIGNAL(triggered(QAction*)), this, SLOT(removeFromPlot(QAction*)));
action = new QAction(tr("Remove From Plot"), this);
connect(action, SIGNAL(triggered()), this, SLOT(showImageDialog()));
@@ -283,6 +276,13 @@
action = new QAction(tr("Make Histogram"), this);
connect(action, SIGNAL(triggered()), this, SLOT(showHistogramDialog()));
actions.append(action);
+
+ if (!DataObject::filterPluginList().empty()) {
+ action = new QAction(tr("Apply Filter"), this);
+ connect(action, SIGNAL(triggered()), this, SLOT(showFilterDialog()));
+ actions.append(action);
+ }
+
} else if (MatrixPtr m = kst_cast<Matrix>(_currentObject)) {
action = new QAction(tr("Make Image"), this);
connect(action, SIGNAL(triggered()), this, SLOT(showImageDialog()));
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.cpp #885640:885641
@@ -58,6 +58,7 @@
if (_configWidget) {
_configWidget->setVectorX(vector);
}
+ lockVectors();
}
@@ -66,16 +67,26 @@
if (_configWidget) {
_configWidget->setVectorY(vector);
}
+ lockVectors();
}
void FilterFitTab::setPlotMode() {
_curveAppearance->setVisible(true);
- _lockVectors = true;
- _configWidget->setVectorsLocked(true);
+ lockVectors();
}
+void FilterFitTab::lockVectors() {
+ if (!_lockVectors) {
+ _lockVectors = true;
+ if (_configWidget) {
+ _configWidget->setVectorsLocked(true);
+ }
+ }
+}
+
+
CurveAppearance* FilterFitTab::curveAppearance() const {
return _curveAppearance;
}
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.h #885640:885641
@@ -41,6 +41,7 @@
void saveSettings();
void setPlotMode();
+ void lockVectors();
QString pluginName();
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_bandpass/butterworth_bandpass.cpp #885640:885641
@@ -55,7 +55,7 @@
}
void setVectorY(Kst::VectorPtr vector) {
- Q_UNUSED(vector);
+ setSelectedVector(vector);
}
void setVectorsLocked(bool locked = true) {
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_bandstop/butterworth_bandstop.cpp #885640:885641
@@ -55,7 +55,7 @@
}
void setVectorY(Kst::VectorPtr vector) {
- Q_UNUSED(vector);
+ setSelectedVector(vector);
}
void setVectorsLocked(bool locked = true) {
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_highpass/butterworth_highpass.cpp #885640:885641
@@ -51,7 +51,7 @@
}
void setVectorY(Kst::VectorPtr vector) {
- Q_UNUSED(vector);
+ setSelectedVector(vector);
}
void setVectorsLocked(bool locked = true) {
--- branches/work/kst/portto4/kst/src/plugins/filters/butterworth_lowpass/butterworth_lowpass.cpp #885640:885641
@@ -52,7 +52,7 @@
}
void setVectorY(Kst::VectorPtr vector) {
- Q_UNUSED(vector);
+ setSelectedVector(vector);
}
void setVectorsLocked(bool locked = true) {
--- branches/work/kst/portto4/kst/src/plugins/filters/despike/filterdespike.cpp #885640:885641
@@ -49,7 +49,7 @@
}
void setVectorY(Kst::VectorPtr vector) {
- Q_UNUSED(vector);
+ setSelectedVector(vector);
}
void setVectorsLocked(bool locked = true) {
More information about the Kst
mailing list