File indexing completed on 2024-05-12 15:28:06
0001 /*************************************************************************** 0002 File : XYDifferentiationCurveDock.h 0003 Project : LabPlot 0004 -------------------------------------------------------------------- 0005 Copyright : (C) 2016 Stefan Gerlach (stefan.gerlach@uni.kn) 0006 Copyright : (C) 2017 Alexander Semke (alexander.semke@web.de) 0007 Description : widget for editing properties of differentiation curves 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 0030 #ifndef XYDIFFERENTIATIONCURVEDOCK_H 0031 #define XYDIFFERENTIATIONCURVEDOCK_H 0032 0033 #include "kdefrontend/dockwidgets/XYCurveDock.h" 0034 #include "backend/worksheet/plots/cartesian/XYDifferentiationCurve.h" 0035 #include "ui_xydifferentiationcurvedockgeneraltab.h" 0036 0037 class TreeViewComboBox; 0038 0039 class XYDifferentiationCurveDock : public XYCurveDock { 0040 Q_OBJECT 0041 0042 public: 0043 explicit XYDifferentiationCurveDock(QWidget*); 0044 void setCurves(QList<XYCurve*>); 0045 void setupGeneral() override; 0046 0047 private: 0048 void initGeneralTab() override; 0049 void showDifferentiationResult(); 0050 void updateSettings(const AbstractColumn*); 0051 0052 Ui::XYDifferentiationCurveDockGeneralTab uiGeneralTab; 0053 TreeViewComboBox* cbDataSourceCurve{nullptr}; 0054 TreeViewComboBox* cbXDataColumn{nullptr}; 0055 TreeViewComboBox* cbYDataColumn{nullptr}; 0056 0057 XYDifferentiationCurve* m_differentiationCurve{nullptr}; 0058 XYDifferentiationCurve::DifferentiationData m_differentiationData; 0059 bool m_dateTimeRange{false}; 0060 0061 protected: 0062 void setModel() override; 0063 0064 private slots: 0065 //SLOTs for changes triggered in XYDifferentiationCurveDock 0066 //general tab 0067 void dataSourceTypeChanged(int); 0068 void dataSourceCurveChanged(const QModelIndex&); 0069 void xDataColumnChanged(const QModelIndex&); 0070 void yDataColumnChanged(const QModelIndex&); 0071 void autoRangeChanged(); 0072 void xRangeMinChanged(double); 0073 void xRangeMaxChanged(double); 0074 void xRangeMinDateTimeChanged(const QDateTime&); 0075 void xRangeMaxDateTimeChanged(const QDateTime&); 0076 void derivOrderChanged(int); 0077 void accOrderChanged(int); 0078 0079 void recalculateClicked(); 0080 void enableRecalculate() const; 0081 0082 //SLOTs for changes triggered in XYDifferentiationCurve 0083 //General-Tab 0084 void curveDescriptionChanged(const AbstractAspect*); 0085 void curveDataSourceTypeChanged(XYAnalysisCurve::DataSourceType); 0086 void curveDataSourceCurveChanged(const XYCurve*); 0087 void curveXDataColumnChanged(const AbstractColumn*); 0088 void curveYDataColumnChanged(const AbstractColumn*); 0089 void curveDifferentiationDataChanged(const XYDifferentiationCurve::DifferentiationData&); 0090 void dataChanged(); 0091 void curveVisibilityChanged(bool); 0092 }; 0093 0094 #endif