File indexing completed on 2024-05-12 15:28:06
0001 /*************************************************************************** 0002 File : XYEquationCurveDock.h 0003 Project : LabPlot 0004 -------------------------------------------------------------------- 0005 Copyright : (C) 2014 Alexander Semke (alexander.semke@web.de) 0006 Description : widget for editing properties of equation curves 0007 0008 ***************************************************************************/ 0009 0010 /*************************************************************************** 0011 * * 0012 * This program is free software; you can redistribute it and/or modify * 0013 * it under the terms of the GNU General Public License as published by * 0014 * the Free Software Foundation; either version 2 of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 * This program is distributed in the hope that it will be useful, * 0018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0020 * GNU General Public License for more details. * 0021 * * 0022 * You should have received a copy of the GNU General Public License * 0023 * along with this program; if not, write to the Free Software * 0024 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0025 * Boston, MA 02110-1301 USA * 0026 * * 0027 ***************************************************************************/ 0028 0029 #ifndef XYEQUATIONCURVEDOCK_H 0030 #define XYEQUATIONCURVEDOCK_H 0031 0032 #include "kdefrontend/dockwidgets/XYCurveDock.h" 0033 #include "backend/worksheet/plots/cartesian/XYEquationCurve.h" 0034 #include "ui_xyequationcurvedockgeneraltab.h" 0035 0036 class EquationHighlighter; 0037 class QCompleter; 0038 0039 class XYEquationCurveDock: public XYCurveDock { 0040 Q_OBJECT 0041 0042 public: 0043 explicit XYEquationCurveDock(QWidget *parent); 0044 void setupGeneral() override; 0045 void setCurves(QList<XYCurve*>); 0046 0047 private: 0048 void initGeneralTab() override; 0049 0050 Ui::XYEquationCurveDockGeneralTab uiGeneralTab; 0051 XYEquationCurve* m_equationCurve{nullptr}; 0052 0053 private slots: 0054 //SLOTs for changes triggered in XYCurveDock 0055 void typeChanged(int); 0056 void recalculateClicked(); 0057 void showConstants(); 0058 void showFunctions(); 0059 void insertFunction1(const QString&); 0060 void insertConstant1(const QString&); 0061 void insertFunction2(const QString&); 0062 void insertConstant2(const QString&); 0063 void enableRecalculate() const; 0064 0065 //SLOTs for changes triggered in XYCurve 0066 //General-Tab 0067 void curveDescriptionChanged(const AbstractAspect*); 0068 void curveEquationDataChanged(const XYEquationCurve::EquationData&); 0069 }; 0070 0071 #endif