[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Jul 1 01:13:06 CEST 2008
SVN commit 826552 by netterfield:
If the content of any vector combo in the curve dialog is changed (eg, new vector, or edit,
which could change the name) then repopulate all of the combos - so they read and contain all
the correct stuff.
This needs to be done to all of the other combos that refer to multiple vectors as well
(ie, equation dialog)
M +18 -0 libkstapp/curvedialog.cpp
M +1 -1 libkstapp/curvedialog.h
M +3 -0 widgets/vectorselector.cpp
M +3 -3 widgets/vectorselector.h
--- branches/work/kst/portto4/kst/src/libkstapp/curvedialog.cpp #826551:826552
@@ -61,6 +61,15 @@
connect(_yError, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));
connect(_xMinusError, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));
connect(_yMinusError, SIGNAL(selectionChanged(QString)), this, SIGNAL(modified()));
+
+ // if the content of any of the vector combos is changed (new or edit), update them all.
+ connect(_xVector, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
+ connect(_yVector, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
+ connect(_xError, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
+ connect(_yError, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
+ connect(_xMinusError, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
+ connect(_yMinusError, SIGNAL(contentChanged()), this, SLOT(updateVectorCombos()));
+
connect(_curveAppearance, SIGNAL(modified()), this, SIGNAL(modified()));
connect(_ignoreAutoScale, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
connect(_xMinusSameAsPlus, SIGNAL(stateChanged(int)), this, SIGNAL(modified()));
@@ -241,7 +250,16 @@
_curveAppearance->clearValues();
}
+void CurveTab::updateVectorCombos() {
+ _xVector->fillVectors();
+ _yVector->fillVectors();
+ _xError->fillVectors();
+ _yError->fillVectors();
+ _xMinusError->fillVectors();
+ _yMinusError->fillVectors();
+}
+
CurveDialog::CurveDialog(ObjectPtr dataObject, QWidget *parent)
: DataDialog(dataObject, parent) {
--- branches/work/kst/portto4/kst/src/libkstapp/curvedialog.h #826551:826552
@@ -73,7 +73,7 @@
void yCheckboxClicked();
void xErrorChanged();
void yErrorChanged();
-
+ void updateVectorCombos();
};
class KST_EXPORT CurveDialog : public DataDialog {
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #826551:826552
@@ -123,12 +123,15 @@
setSelectedVector(vector);
}
+ emit contentChanged();
}
void VectorSelector::editVector() {
QString vectorname;
DialogLauncher::self()->showVectorDialog(vectorname, ObjectPtr(selectedVector()));
+
+ emit contentChanged();
}
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.h #826551:826552
@@ -40,8 +40,11 @@
void clearSelection();
+ void fillVectors();
+
Q_SIGNALS:
void selectionChanged(const QString&);
+ void contentChanged(); // something in the combo changed (new or edit)
private Q_SLOTS:
void newVector();
@@ -50,9 +53,6 @@
void updateDescriptionTip();
private:
- void fillVectors();
-
- private:
bool _allowEmptySelection;
ObjectStore *_store;
More information about the Kst
mailing list