File indexing completed on 2024-05-12 15:28:18
0001 /*************************************************************************** 0002 File : FitParametersWidget.h 0003 Project : LabPlot 0004 Description : widget for editing the fit parameters 0005 -------------------------------------------------------------------- 0006 Copyright : (C) 2014-2016 by Alexander Semke (alexander.semke@web.de) 0007 Copyright : (C) 2016-2018 by Stefan Gerlach (stefan.gerlach@uni-konstanz.de) 0008 0009 ***************************************************************************/ 0010 0011 /*************************************************************************** 0012 * * 0013 * This program is free software; you can redistribute it and/or modify * 0014 * it under the terms of the GNU General Public License as published by * 0015 * the Free Software Foundation; either version 2 of the License, or * 0016 * (at your option) any later version. * 0017 * * 0018 * This program is distributed in the hope that it will be useful, * 0019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0021 * GNU General Public License for more details. * 0022 * * 0023 * You should have received a copy of the GNU General Public License * 0024 * along with this program; if not, write to the Free Software * 0025 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0026 * Boston, MA 02110-1301 USA * 0027 * * 0028 ***************************************************************************/ 0029 #ifndef FITPARAMETERSWIDGET_H 0030 #define FITPARAMETERSWIDGET_H 0031 0032 #include <QWidget> 0033 0034 #include "backend/worksheet/plots/cartesian/XYFitCurve.h" 0035 #include "ui_fitparameterswidget.h" 0036 0037 class FitParametersWidget : public QWidget { 0038 Q_OBJECT 0039 0040 public: 0041 explicit FitParametersWidget(QWidget*); 0042 void setFitData(XYFitCurve::FitData*); 0043 0044 private: 0045 Ui::FitParametersWidget ui; 0046 XYFitCurve::FitData* m_fitData{nullptr}; 0047 bool m_initializing{false}; 0048 bool m_rehighlighting{false}; 0049 bool m_invalidRanges{false}; 0050 bool m_resizing{false}; 0051 0052 bool eventFilter(QObject*, QEvent*) override; 0053 void resizeEvent(QResizeEvent*) override; 0054 0055 void highlightInvalid(int row, int col, bool invalid); 0056 void updateTableSize(); 0057 0058 signals: 0059 void parametersChanged(bool); 0060 void parametersValid(bool); 0061 0062 private slots: 0063 void changed(); 0064 void apply(); 0065 void startValueChanged(); 0066 void lowerLimitChanged(); 0067 void upperLimitChanged(); 0068 }; 0069 0070 #endif //FITPARAMETERSWIDGET_H