[Kst] branches/work/kst/1.6/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Wed Dec 5 02:32:18 CET 2007
SVN commit 744988 by arwalker:
BUG:153148 Apply buttons now fully functional
M +12 -2 kstbasicdialog_i.cpp
M +44 -0 kstvvdialog_i.cpp
--- branches/work/kst/1.6/kst/src/libkstapp/kstbasicdialog_i.cpp #744987:744988
@@ -289,7 +289,6 @@
bool KstBasicDialogI::editObject() {
//called upon clicking 'ok' in 'edit' mode
//return false if the specified objects can't be edited, otherwise true
-
KstBasicPluginPtr ptr = kst_cast<KstBasicPlugin>(_dp);
Q_ASSERT(ptr); //should never happen...
@@ -323,7 +322,6 @@
}
ptr->setDirty();
-
emit modified();
return true;
}
@@ -420,7 +418,11 @@
QStringList iv = ptr->inputVectorList();
for (QStringList::ConstIterator ivI = iv.begin(); ivI != iv.end(); ++ivI) {
if (VectorSelector *w = vector(*ivI)) {
+ disconnect(w->_vector, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+ disconnect(w->_vector, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
w->update();
+ connect(w->_vector, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+ connect(w->_vector, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
}
}
@@ -428,7 +430,11 @@
QStringList is = ptr->inputScalarList();
for (QStringList::ConstIterator isI = is.begin(); isI != is.end(); ++isI) {
if (ScalarSelector *w = scalar(*isI)) {
+ disconnect(w->_scalar, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+ disconnect(w->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
w->update();
+ connect(w->_scalar, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+ connect(w->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
}
}
@@ -436,7 +442,11 @@
QStringList istr = ptr->inputStringList();
for (QStringList::ConstIterator istrI = istr.begin(); istrI != istr.end(); ++istrI) {
if (StringSelector *w = string(*istrI)) {
+ disconnect(w->_string, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+ disconnect(w->_string, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
w->update();
+ connect(w->_string, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+ connect(w->_string, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
}
}
}
--- branches/work/kst/1.6/kst/src/libkstapp/kstvvdialog_i.cpp #744987:744988
@@ -261,6 +261,28 @@
void KstVvDialogI::update() {
+ disconnect(_w->_xVector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xVector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xVector->_vector, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yVector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yVector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yVector->_vector, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xMinScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xMinScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xMinScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xMaxScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xMaxScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_xMaxScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yMinScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yMinScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yMinScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yMaxScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yMaxScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_yMaxScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_FlagVector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_FlagVector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ disconnect(_w->_plotList, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
+
_w->_curvePlacement->update();
_w->_xVector->update();
_w->_yVector->update();
@@ -273,6 +295,28 @@
_w->_yMaxScalar->update();
updatePlotList();
+
+ connect(_w->_xVector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xVector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xVector->_vector, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yVector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yVector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yVector->_vector, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xMinScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xMinScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xMinScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xMaxScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xMaxScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_xMaxScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yMinScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yMinScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yMinScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yMaxScalar, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yMaxScalar, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_yMaxScalar->_scalar, SIGNAL(textChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_FlagVector, SIGNAL(selectionChanged(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_FlagVector, SIGNAL(selectionChangedLabel(const QString&)), this, SLOT(wasModifiedApply()));
+ connect(_w->_plotList, SIGNAL(highlighted(int)), this, SLOT(wasModifiedApply()));
}
More information about the Kst
mailing list