[Kst] branches/work/kst/portto4/kst/src/libkstapp
Adam Treat
treat at kde.org
Tue Oct 9 18:39:28 CEST 2007
SVN commit 723426 by treat:
* Whitespace changes.
* Class methods should never be pascal case.
* Don't pass QString by value.
* Simplify qcheckbox get/set.
M +10 -11 equationdialog.cpp
M +4 -4 equationdialog.h
--- branches/work/kst/portto4/kst/src/libkstapp/equationdialog.cpp #723425:723426
@@ -78,7 +78,6 @@
Operators->addItem("LN()");
Operators->addItem("LOG()");
Operators->addItem("PLUGIN()");
-
}
@@ -91,27 +90,27 @@
_xVectors->setSelectedVector(vector);
}
-QString EquationTab::Equation() const {
+
+QString EquationTab::equation() const {
return _equation->text();
}
-void EquationTab::setEquation(QString equation) {
+void EquationTab::setEquation(const QString &equation) {
_equation->setText(equation);
}
-bool EquationTab::DoInterpolation() const {
- return _doInterpolation->checkState() == Qt::Checked;
+
+bool EquationTab::doInterpolation() const {
+ return _doInterpolation->isChecked();
}
void EquationTab::setDoInterpolation(bool doInterpolation) {
- if (doInterpolation)
- _doInterpolation->setCheckState(Qt::Checked);
- else
- _doInterpolation->setCheckState(Qt::Unchecked);
+ _doInterpolation->setChecked(doInterpolation);
}
+
EquationDialog::EquationDialog(ObjectPtr dataObject, QWidget *parent)
: DataDialog(dataObject, parent) {
@@ -139,9 +138,9 @@
ObjectPtr EquationDialog::createNewDataObject() const {
//FIXME Eli, how should I construct this tag??
EquationPtr equation = new Equation(tagName(),
- _equationTab->Equation(),
+ _equationTab->equation(),
_equationTab->xVector(),
- _equationTab->DoInterpolation());
+ _equationTab->doInterpolation());
equation->writeLock();
equation->update(0);
--- branches/work/kst/portto4/kst/src/libkstapp/equationdialog.h #723425:723426
@@ -30,10 +30,10 @@
VectorPtr xVector() const;
void setXVector(VectorPtr vector);
- QString Equation() const;
- void setEquation(QString equation);
+ QString equation() const;
+ void setEquation(const QString &equation);
- bool DoInterpolation() const;
+ bool doInterpolation() const;
void setDoInterpolation(bool doInterpolation);
private Q_SLOTS:
@@ -58,6 +58,6 @@
}
+#endif
-#endif
// vim: ts=2 sw=2 et
More information about the Kst
mailing list