[labplot/frameworks] /: merge fix
Stefan Gerlach
stefan.gerlach at uni-konstanz.de
Mon Oct 17 22:27:29 UTC 2016
Git commit 5d3782511d6f33b5cdbc2113495e05ee3cc7ee9b by Stefan Gerlach.
Committed on 17/10/2016 at 22:27.
Pushed by sgerlach into branch 'frameworks'.
merge fix
M +9 -5 doc/index.docbook
M +1 -0 src/CMakeLists.txt
M +6 -6 src/backend/worksheet/plots/cartesian/XYDataReductionCurve.cpp
M +6 -6 src/backend/worksheet/plots/cartesian/XYDifferentiationCurve.cpp
M +392 -235 src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
M +6 -6 src/backend/worksheet/plots/cartesian/XYFourierFilterCurve.cpp
M +6 -6 src/backend/worksheet/plots/cartesian/XYFourierTransformCurve.cpp
M +6 -6 src/backend/worksheet/plots/cartesian/XYInterpolationCurve.cpp
M +6 -6 src/backend/worksheet/plots/cartesian/XYSmoothCurve.cpp
M +6 -6 src/kdefrontend/MainWin.cpp
M +6 -6 src/kdefrontend/dockwidgets/XYDataReductionCurveDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/XYDifferentiationCurveDock.cpp
M +105 -94 src/kdefrontend/dockwidgets/XYFitCurveDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/XYFourierFilterCurveDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/XYFourierTransformCurveDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/XYIntegrationCurveDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/XYInterpolationCurveDock.cpp
M +4 -4 src/kdefrontend/dockwidgets/XYSmoothCurveDock.cpp
M +4 -4 src/kdefrontend/widgets/FitOptionsWidget.cpp
M +294 -27 src/kdefrontend/widgets/FitParametersWidget.cpp
http://commits.kde.org/labplot/5d3782511d6f33b5cdbc2113495e05ee3cc7ee9b
diff --cc src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
index bb5d07d,ea388a1..76cb7ac
--- a/src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
+++ b/src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
@@@ -48,12 -48,15 +48,15 @@@ extern "C"
#include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_version.h>
+ #include "backend/nsl/nsl_fit.h"
}
+ #include <cmath>
-#include <KIcon>
-#include <KLocale>
#include <QElapsedTimer>
+#include <QIcon>
+#include <KLocalizedString>
#include <QThreadPool>
+ #include <QDebug>
XYFitCurve::XYFitCurve(const QString& name)
: XYCurve(name, new XYFitCurvePrivate(this)) {
diff --cc src/kdefrontend/MainWin.cpp
index 474f67f,8a27f61..2120226
--- a/src/kdefrontend/MainWin.cpp
+++ b/src/kdefrontend/MainWin.cpp
@@@ -145,13 -130,11 +145,13 @@@ MainWin::MainWin(QWidget *parent, cons
MainWin::~MainWin() {
//write settings
- m_recentProjectsAction->saveEntries( KGlobal::config()->group("Recent Files") );
+ m_recentProjectsAction->saveEntries( KSharedConfig::openConfig()->group("Recent Files") );
+// qDebug()<<"SAVED m_recentProjectsAction->urls()="<<m_recentProjectsAction->urls()<<endl;
+ //etc...
- KGlobal::config()->sync();
+ KSharedConfig::openConfig()->sync();
- if (m_project!=0) {
+ if (m_project != 0) {
m_mdiArea->closeAllSubWindows();
disconnect(m_project, 0, this, 0);
delete m_project;
diff --cc src/kdefrontend/widgets/FitParametersWidget.cpp
index fc556a4,0ce26c8..52ed6f1
--- a/src/kdefrontend/widgets/FitParametersWidget.cpp
+++ b/src/kdefrontend/widgets/FitParametersWidget.cpp
@@@ -26,8 -27,13 +27,14 @@@
* *
***************************************************************************/
#include "FitParametersWidget.h"
+ #include <QLineEdit>
+ #include <QCheckBox>
#include <QKeyEvent>
+#include <KLocalizedString>
+ #ifndef NDEBUG
+ #include <QDebug>
+ #endif
+ #include <cfloat>
/*!
\class FitParametersWidget
@@@ -39,10 -45,10 +46,10 @@@
*/
FitParametersWidget::FitParametersWidget(QWidget* parent, XYFitCurve::FitData* data) : QWidget(parent), m_fitData(data), m_changed(false) {
ui.setupUi(this);
- ui.pbApply->setIcon(KIcon("dialog-ok-apply"));
- ui.pbCancel->setIcon(KIcon("dialog-cancel"));
+ ui.pbApply->setIcon(QIcon::fromTheme("dialog-ok-apply"));
+ ui.pbCancel->setIcon(QIcon::fromTheme("dialog-cancel"));
- ui.tableWidget->setColumnCount(2);
+ ui.tableWidget->setColumnCount(5);
QTableWidgetItem* headerItem = new QTableWidgetItem();
headerItem->setText(i18n("Name"));
@@@ -83,14 -179,44 +180,44 @@@
QTableWidgetItem* item = new QTableWidgetItem();
item->setBackground(QBrush(Qt::lightGray));
ui.tableWidget->setItem(0, 0, item);
- ui.tableWidget->setItem(0, 1, new QTableWidgetItem());
+
+ // start value
+ QLineEdit *le = new QLineEdit(ui.tableWidget);
+ le->setValidator(new QDoubleValidator(le));
+ le->setFrame(false);
+ ui.tableWidget->setCellWidget(0, 1, le);
+ connect(le, SIGNAL(textChanged(QString)), this, SLOT(startValueChanged()) );
+
+ // fixed
+ QWidget *widget = new QWidget();
+ QCheckBox *cb = new QCheckBox();
+ QHBoxLayout *cbl = new QHBoxLayout(widget);
+ cbl->addWidget(cb);
+ cbl->setAlignment(Qt::AlignCenter);
+ cbl->setContentsMargins(0, 0, 0, 0);
+ widget->setLayout(cbl);
+ ui.tableWidget->setCellWidget(0, 2, widget);
+ connect(cb, SIGNAL(stateChanged(int)), this, SLOT(changed()) );
+
+ // limits
+ le = new QLineEdit(ui.tableWidget);
+ le->setValidator(new QDoubleValidator(le));
+ le->setFrame(false);
+ ui.tableWidget->setCellWidget(0, 3, le);
+ connect(le, SIGNAL(textChanged(QString)), this, SLOT(lowerLimitChanged()) );
+
+ le = new QLineEdit(ui.tableWidget);
+ le->setValidator(new QDoubleValidator(le));
+ le->setFrame(false);
+ ui.tableWidget->setCellWidget(0, 4, le);
+ connect(le, SIGNAL(textChanged(QString)), this, SLOT(upperLimitChanged()) );
}
ui.tableWidget->setCurrentCell(0, 0);
- ui.pbAdd->setIcon(KIcon("list-add"));
+ ui.pbAdd->setIcon(QIcon::fromTheme("list-add"));
ui.pbAdd->setVisible(true);
- ui.pbRemove->setIcon(KIcon("list-remove"));
+ ui.pbRemove->setIcon(QIcon::fromTheme("list-remove"));
ui.pbRemove->setVisible(true);
- ui.pbRemove->setEnabled(m_fitData->paramNames.size()>1);
+ ui.pbRemove->setEnabled(m_fitData->paramNames.size() > 1);
}
ui.tableWidget->installEventFilter(this);
More information about the kde-doc-english
mailing list