labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XYCurveDock.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYCurveDock.h
3  Project : LabPlot
4  Description : widget for curve properties
5  --------------------------------------------------------------------
6  Copyright : (C) 2010-2020 Alexander Semke (alexander.semke@web.de)
7  Copyright : (C) 2013 Stefan Gerlach (stefan.gerlach@uni.kn)
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 
30 #ifndef XYCURVEDOCK_H
31 #define XYCURVEDOCK_H
32 
38 #include "ui_xycurvedock.h"
39 #include "ui_xycurvedockgeneraltab.h"
40 
41 class TreeViewComboBox;
42 class AspectTreeModel;
43 class Column;
44 class QLineEdit;
45 
46 class XYCurveDock : public BaseDock {
47  Q_OBJECT
48 
49 public:
50  explicit XYCurveDock(QWidget*);
51  ~XYCurveDock() override;
52 
54  virtual void setupGeneral();
55  void checkColumnAvailability(TreeViewComboBox*, const AbstractColumn*, const QString& columnPath);
56  void updateLocale() override;
57 
58 private:
59  virtual void initGeneralTab();
60  void updateValuesWidgets();
61 
62  void load();
63  void loadConfig(KConfig&);
64 
65  Ui::XYCurveDockGeneralTab uiGeneralTab;
66 
74 
75 protected:
76  void initTabs();
77  virtual void setModel();
79 
80  Ui::XYCurveDock ui;
82  XYCurve* m_curve{nullptr};
84 
85 public slots:
86  void visibilityChanged(bool);
87 
88 private slots:
89  void init();
90  void retranslateUi();
91 
92  //SLOTs for changes triggered in XYCurveDock
93  void xColumnChanged(const QModelIndex&);
94  void yColumnChanged(const QModelIndex&);
95 
96  //Line-Tab
97  void lineTypeChanged(int);
98  void lineSkipGapsChanged(bool);
99  void lineIncreasingXOnlyChanged(bool);
101  void lineStyleChanged(int);
102  void lineColorChanged(const QColor&);
103  void lineWidthChanged(double);
104  void lineOpacityChanged(int);
105 
106  void dropLineTypeChanged(int);
107  void dropLineStyleChanged(int);
108  void dropLineColorChanged(const QColor&);
109  void dropLineWidthChanged(double);
110  void dropLineOpacityChanged(int);
111 
112  //Symbol-tab
113  void symbolsStyleChanged(int);
114  void symbolsSizeChanged(double);
115  void symbolsRotationChanged(int);
116  void symbolsOpacityChanged(int);
117  void symbolsFillingStyleChanged(int);
118  void symbolsFillingColorChanged(const QColor&);
119  void symbolsBorderStyleChanged(int);
120  void symbolsBorderColorChanged(const QColor&);
121  void symbolsBorderWidthChanged(double);
122 
123  //Values-Tab
124  void valuesTypeChanged(int);
125  void valuesColumnChanged(const QModelIndex&);
126  void valuesPositionChanged(int);
127  void valuesDistanceChanged(double);
128  void valuesRotationChanged(int);
129  void valuesOpacityChanged(int);
130  void valuesNumericFormatChanged(int);
131  void valuesPrecisionChanged(int);
132  void valuesDateTimeFormatChanged(const QString&);
133  void valuesPrefixChanged();
134  void valuesSuffixChanged();
135  void valuesFontChanged(const QFont&);
136  void valuesColorChanged(const QColor&);
137 
138  //Filling-tab
139  void fillingPositionChanged(int);
140  void fillingTypeChanged(int);
141  void fillingColorStyleChanged(int);
142  void fillingImageStyleChanged(int);
143  void fillingBrushStyleChanged(int);
144  void fillingFirstColorChanged(const QColor&);
145  void fillingSecondColorChanged(const QColor&);
146  void selectFile();
147  void fileNameChanged();
148  void fillingOpacityChanged(int);
149 
150  //"Error bars"-Tab
151  void xErrorTypeChanged(int) const;
152  void yErrorTypeChanged(int) const;
153  void xErrorPlusColumnChanged(const QModelIndex&) const;
154  void xErrorMinusColumnChanged(const QModelIndex&) const;
155  void yErrorPlusColumnChanged(const QModelIndex&) const;
156  void yErrorMinusColumnChanged(const QModelIndex&) const;
157  void errorBarsTypeChanged(int) const;
158  void errorBarsCapSizeChanged(double) const;
159  void errorBarsStyleChanged(int) const;
160  void errorBarsColorChanged(const QColor&);
161  void errorBarsWidthChanged(double) const;
162  void errorBarsOpacityChanged(int) const;
163 
164  //SLOTs for changes triggered in XYCurve
165  //General-Tab
167  void curveXColumnChanged(const AbstractColumn*);
168  void curveYColumnChanged(const AbstractColumn*);
169  void curveVisibilityChanged(bool);
170 
171  //Line-Tab
173  void curveLineSkipGapsChanged(bool);
176  void curveLinePenChanged(const QPen&);
177  void curveLineOpacityChanged(qreal);
179  void curveDropLinePenChanged(const QPen&);
180  void curveDropLineOpacityChanged(qreal);
181 
182  //Symbol-Tab
184  void curveSymbolsSizeChanged(qreal);
186  void curveSymbolsOpacityChanged(qreal);
187  void curveSymbolsBrushChanged(const QBrush&);
188  void curveSymbolsPenChanged(const QPen&);
189 
190  //Values-Tab
194  void curveValuesDistanceChanged(qreal);
195  void curveValuesOpacityChanged(qreal);
198  void curveValuesPrecisionChanged(int);
199  void curveValuesDateTimeFormatChanged(const QString&);
200  void curveValuesPrefixChanged(const QString&);
201  void curveValuesSuffixChanged(const QString&);
202  void curveValuesFontChanged(QFont);
203  void curveValuesColorChanged(QColor);
204 
205  //Filling-Tab
210  void curveFillingBrushStyleChanged(Qt::BrushStyle);
211  void curveFillingFirstColorChanged(QColor&);
212  void curveFillingSecondColorChanged(QColor&);
213  void curveFillingFileNameChanged(QString&);
214  void curveFillingOpacityChanged(float);
215 
216  //"Error bars"-Tab
223  void curveErrorBarsCapSizeChanged(qreal);
225  void curveErrorBarsPenChanged(const QPen&);
226  void curveErrorBarsOpacityChanged(qreal);
227 
228  //load and save
229  void loadConfigFromTemplate(KConfig&);
230  void saveConfigAsTemplate(KConfig&);
231 
232 signals:
233  void info(const QString&);
234 };
235 
236 #endif
Base class of all persistent objects in a Project.
Interface definition for data with column logic.
Represents a tree of AbstractAspect objects as a Qt item model.
Aspect that manages a column.
Definition: Column.h:42
BackgroundColorStyle
Definition: PlotArea.h:46
BackgroundImageStyle
Definition: PlotArea.h:48
BackgroundType
Definition: PlotArea.h:45
Style
Definition: Symbol.h:38
Provides a QTreeView in a QComboBox.
Provides a widget for editing the properties of the XYCurves (2D-curves) currently selected in the pr...
Definition: XYCurveDock.h:46
void yErrorTypeChanged(int) const
void curveDropLinePenChanged(const QPen &)
void curveSymbolsOpacityChanged(qreal)
void curveLineOpacityChanged(qreal)
void setCurves(QList< XYCurve * >)
void curveFillingPositionChanged(XYCurve::FillingPosition)
void curveFillingColorStyleChanged(PlotArea::BackgroundColorStyle)
void valuesPrefixChanged()
void curveXErrorTypeChanged(XYCurve::ErrorType)
void fillingTypeChanged(int)
void curveValuesPositionChanged(XYCurve::ValuesPosition)
virtual void initGeneralTab()
void xErrorMinusColumnChanged(const QModelIndex &) const
void lineInterpolationPointsCountChanged(int)
void symbolsSizeChanged(double)
void curveErrorBarsPenChanged(const QPen &)
void curveValuesOpacityChanged(qreal)
void saveConfigAsTemplate(KConfig &)
void initTabs()
void updateValuesWidgets()
void curveErrorBarsTypeChanged(XYCurve::ErrorBarsType)
void selectFile()
void errorBarsColorChanged(const QColor &)
TreeViewComboBox * cbXErrorPlusColumn
Definition: XYCurveDock.h:70
void symbolsBorderWidthChanged(double)
void curveFillingImageStyleChanged(PlotArea::BackgroundImageStyle)
void valuesDistanceChanged(double)
void valuesColorChanged(const QColor &)
void curveXErrorMinusColumnChanged(const AbstractColumn *)
void yErrorPlusColumnChanged(const QModelIndex &) const
void curveLineTypeChanged(XYCurve::LineType)
void lineWidthChanged(double)
void curveFillingBrushStyleChanged(Qt::BrushStyle)
void symbolsRotationChanged(int)
void symbolsStyleChanged(int)
void yErrorMinusColumnChanged(const QModelIndex &) const
void dropLineOpacityChanged(int)
void curveYErrorMinusColumnChanged(const AbstractColumn *)
void curveFillingTypeChanged(PlotArea::BackgroundType)
void valuesSuffixChanged()
void fillingColorStyleChanged(int)
void curveValuesDistanceChanged(qreal)
void xColumnChanged(const QModelIndex &)
void xErrorPlusColumnChanged(const QModelIndex &) const
void curveLineIncreasingXOnlyChanged(bool)
void valuesOpacityChanged(int)
XYCurve * m_curve
Definition: XYCurveDock.h:82
void dropLineColorChanged(const QColor &)
void fileNameChanged()
void curveValuesTypeChanged(XYCurve::ValuesType)
void errorBarsCapSizeChanged(double) const
void curveFillingFileNameChanged(QString &)
void valuesRotationChanged(int)
TreeViewComboBox * cbYErrorPlusColumn
Definition: XYCurveDock.h:72
void errorBarsWidthChanged(double) const
void fillingFirstColorChanged(const QColor &)
Ui::XYCurveDockGeneralTab uiGeneralTab
Definition: XYCurveDock.h:65
AspectTreeModel * m_aspectTreeModel
Definition: XYCurveDock.h:83
void symbolsBorderColorChanged(const QColor &)
void valuesDateTimeFormatChanged(const QString &)
void curveVisibilityChanged(bool)
void curveDescriptionChanged(const AbstractAspect *)
void errorBarsTypeChanged(int) const
void symbolsOpacityChanged(int)
void retranslateUi()
void dropLineWidthChanged(double)
void valuesTypeChanged(int)
void curveValuesColumnChanged(const AbstractColumn *)
void lineStyleChanged(int)
void yColumnChanged(const QModelIndex &)
void curveFillingOpacityChanged(float)
void curveYColumnChanged(const AbstractColumn *)
void info(const QString &)
virtual void setModel()
void curveYErrorPlusColumnChanged(const AbstractColumn *)
void curveValuesDateTimeFormatChanged(const QString &)
void curveValuesPrecisionChanged(int)
void curveErrorBarsOpacityChanged(qreal)
void curveDropLineTypeChanged(XYCurve::DropLineType)
void lineSkipGapsChanged(bool)
void lineColorChanged(const QColor &)
QList< XYCurve * > m_curvesList
Definition: XYCurveDock.h:81
void setModelIndexFromAspect(TreeViewComboBox *, const AbstractAspect *)
void curveSymbolsRotationAngleChanged(qreal)
void curveFillingSecondColorChanged(QColor &)
virtual void setupGeneral()
void curveYErrorTypeChanged(XYCurve::ErrorType)
void errorBarsStyleChanged(int) const
void dropLineTypeChanged(int)
void errorBarsOpacityChanged(int) const
void curveLinePenChanged(const QPen &)
void curveSymbolsSizeChanged(qreal)
void loadConfig(KConfig &)
void curveValuesRotationAngleChanged(qreal)
XYCurveDock(QWidget *)
Definition: XYCurveDock.cpp:62
void curveValuesColorChanged(QColor)
TreeViewComboBox * cbYErrorMinusColumn
Definition: XYCurveDock.h:73
TreeViewComboBox * cbYColumn
Definition: XYCurveDock.h:68
void valuesFontChanged(const QFont &)
void curveValuesPrefixChanged(const QString &)
void lineOpacityChanged(int)
void updateLocale() override
void fillingSecondColorChanged(const QColor &)
void curveXErrorPlusColumnChanged(const AbstractColumn *)
void curveValuesFontChanged(QFont)
void fillingOpacityChanged(int)
void loadConfigFromTemplate(KConfig &)
Ui::XYCurveDock ui
Definition: XYCurveDock.h:80
void curveErrorBarsCapSizeChanged(qreal)
void curveSymbolsBrushChanged(const QBrush &)
TreeViewComboBox * cbXErrorMinusColumn
Definition: XYCurveDock.h:71
void symbolsFillingColorChanged(const QColor &)
void curveValuesNumericFormatChanged(char)
void xErrorTypeChanged(int) const
void curveSymbolsPenChanged(const QPen &)
~XYCurveDock() override
TreeViewComboBox * cbValuesColumn
Definition: XYCurveDock.h:69
void lineTypeChanged(int)
void curveXColumnChanged(const AbstractColumn *)
void curveFillingFirstColorChanged(QColor &)
void fillingImageStyleChanged(int)
void dropLineStyleChanged(int)
void curveLineInterpolationPointsCountChanged(int)
void fillingPositionChanged(int)
void valuesPositionChanged(int)
void symbolsBorderStyleChanged(int)
void visibilityChanged(bool)
void curveValuesSuffixChanged(const QString &)
TreeViewComboBox * cbXColumn
Definition: XYCurveDock.h:67
void valuesNumericFormatChanged(int)
void curveSymbolsStyleChanged(Symbol::Style)
void curveDropLineOpacityChanged(qreal)
void fillingBrushStyleChanged(int)
void valuesColumnChanged(const QModelIndex &)
void lineIncreasingXOnlyChanged(bool)
void curveLineSkipGapsChanged(bool)
void checkColumnAvailability(TreeViewComboBox *, const AbstractColumn *, const QString &columnPath)
void symbolsFillingStyleChanged(int)
void valuesPrecisionChanged(int)
A 2D-curve, provides an interface for editing many properties of the curve.
Definition: XYCurve.h:46
LineType
Definition: XYCurve.h:57
ErrorType
Definition: XYCurve.h:63
ValuesType
Definition: XYCurve.h:61
ValuesPosition
Definition: XYCurve.h:62
FillingPosition
Definition: XYCurve.h:64
ErrorBarsType
Definition: XYCurve.h:65
DropLineType
Definition: XYCurve.h:60