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)  

CartesianPlotDock.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : CartesianPlotDock.h
3  Project : LabPlot
4  Description : widget for cartesian plot properties
5  --------------------------------------------------------------------
6  Copyright : (C) 2011-2020 Alexander Semke (alexander.semke@web.de)
7  Copyright : (C) 2012-2013 by Stefan Gerlach (stefan.gerlach@uni-konstanz.de)
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 CARTESIANPLOTDOCK_H
31 #define CARTESIANPLOTDOCK_H
32 
35 #include "ui_cartesianplotdock.h"
37 
38 #include <KConfig>
39 
40 template <class T> class QList;
41 class LabelWidget;
42 class ThemeHandler;
43 class KLocalizedString;
44 
45 class CartesianPlotDock : public BaseDock {
46  Q_OBJECT
47 
48 public:
49  explicit CartesianPlotDock(QWidget*);
51  void activateTitleTab();
52  void updateLocale() override;
53  void updateUnits() override;
54 
55 private:
56  Ui::CartesianPlotDock ui;
58  CartesianPlot* m_plot{nullptr};
61 
62  void loadConfig(KConfig&);
63 
64 private slots:
65  void init();
66  void retranslateUi();
67 
68  //SLOTs for changes triggered in CartesianPlotDock
69  //"General"-tab
70  void visibilityChanged(bool);
71  void geometryChanged();
73 
74  void rangeTypeChanged();
75  void rangeFirstChanged(const QString&);
76  void rangeLastChanged(const QString&);
77 
78  void autoScaleXChanged(int);
79  void xMinChanged(const QString&);
80  void xMaxChanged(const QString&);
81  void xMinDateTimeChanged(const QDateTime&);
82  void xMaxDateTimeChanged(const QDateTime&);
83  void xRangeFormatChanged(int);
84  void xScaleChanged(int);
85 
86  void autoScaleYChanged(int);
87  void yMinChanged(const QString&);
88  void yMaxChanged(const QString&);
89  void yMinDateTimeChanged(const QDateTime&);
90  void yMaxDateTimeChanged(const QDateTime&);
91  void yRangeFormatChanged(int);
92  void yScaleChanged(int);
93 
94  //"Range Breaks"-tab
95  void toggleXBreak(bool);
96  void addXBreak();
97  void removeXBreak();
98  void currentXBreakChanged(int);
99  void xBreakStartChanged();
100  void xBreakEndChanged();
101  void xBreakPositionChanged(int);
102  void xBreakStyleChanged(int);
103 
104  void toggleYBreak(bool);
105  void addYBreak();
106  void removeYBreak();
107  void currentYBreakChanged(int);
108  void yBreakStartChanged();
109  void yBreakEndChanged();
110  void yBreakPositionChanged(int);
111  void yBreakStyleChanged(int);
112 
113  //"Plot area"-tab
114  void backgroundTypeChanged(int);
115  void backgroundColorStyleChanged(int);
116  void backgroundImageStyleChanged(int);
117  void backgroundBrushStyleChanged(int);
118  void backgroundFirstColorChanged(const QColor&);
119  void backgroundSecondColorChanged(const QColor&);
120  void selectFile();
121  void fileNameChanged();
122  void backgroundOpacityChanged(int);
123  void borderStyleChanged(int);
124  void borderColorChanged(const QColor&);
125  void borderWidthChanged(double);
126  void borderCornerRadiusChanged(double);
127  void borderOpacityChanged(int);
128  void symmetricPaddingChanged(bool);
129  void horizontalPaddingChanged(double);
130  void rightPaddingChanged(double);
131  void verticalPaddingChanged(double);
132  void bottomPaddingChanged(double);
133 
134  // "Cursor"-tab
135  void cursorLineWidthChanged(int);
136  void cursorLineColorChanged(const QColor&);
137  void cursorLineStyleChanged(int);
138 
139  //SLOTs for changes triggered in CartesianPlot
140  //general
142  void plotRectChanged(QRectF&);
144  void plotRangeFirstValuesChanged(int);
145  void plotRangeLastValuesChanged(int);
146 
147  void plotXAutoScaleChanged(bool);
148  void plotXMinChanged(double);
149  void plotXMaxChanged(double);
152 
153 
154  void plotYAutoScaleChanged(bool);
155  void plotYMinChanged(double);
156  void plotYMaxChanged(double);
159 
160  void plotVisibleChanged(bool);
161 
162  //range breaks
167 
168  //background
172  void plotBackgroundBrushStyleChanged(Qt::BrushStyle);
173  void plotBackgroundFirstColorChanged(QColor&);
174  void plotBackgroundSecondColorChanged(QColor&);
175  void plotBackgroundFileNameChanged(QString&);
176  void plotBackgroundOpacityChanged(float);
177  void plotBorderPenChanged(QPen&);
178  void plotBorderCornerRadiusChanged(float);
179  void plotBorderOpacityChanged(float);
180  void plotHorizontalPaddingChanged(float);
181  void plotVerticalPaddingChanged(float);
182  void plotRightPaddingChanged(double);
183  void plotBottomPaddingChanged(double);
184  void plotSymmetricPaddingChanged(bool);
185 
186  // Cursor
187  void plotCursorPenChanged(const QPen&);
188 
189  //save/load template
190  void loadConfigFromTemplate(KConfig&);
191  void saveConfigAsTemplate(KConfig&);
192 
193  //save/load themes
194  void loadTheme(const QString&);
195  void saveTheme(KConfig& config) const;
196 
197  void load();
198 
199 signals:
200  void info(const QString&);
201 };
202 
203 #endif
Base class of all persistent objects in a Project.
Provides a widget for editing the properties of the cartesian plot currently selected in the project ...
void plotRangeFirstValuesChanged(int)
void borderWidthChanged(double)
CartesianPlotDock(QWidget *)
void plotYMaxChanged(double)
void yMinDateTimeChanged(const QDateTime &)
void plotXRangeFormatChanged(CartesianPlot::RangeFormat)
LabelWidget * labelWidget
void plotDescriptionChanged(const AbstractAspect *)
QList< CartesianPlot * > m_plotList
void plotXRangeBreakingEnabledChanged(bool)
void xMinChanged(const QString &)
void loadConfigFromTemplate(KConfig &)
CartesianPlot * m_plot
void plotBottomPaddingChanged(double)
void plotYRangeFormatChanged(CartesianPlot::RangeFormat)
Ui::CartesianPlotDock ui
void plotXRangeBreaksChanged(const CartesianPlot::RangeBreaks &)
void plotBackgroundImageStyleChanged(PlotArea::BackgroundImageStyle)
void saveTheme(KConfig &config) const
void plotYRangeBreakingEnabledChanged(bool)
void updateLocale() override
void backgroundColorStyleChanged(int)
void plotHorizontalPaddingChanged(float)
void plotVerticalPaddingChanged(float)
void backgroundImageStyleChanged(int)
void plotBackgroundFileNameChanged(QString &)
void backgroundFirstColorChanged(const QColor &)
void plotBackgroundTypeChanged(PlotArea::BackgroundType)
void plotRangeTypeChanged(CartesianPlot::RangeType)
void plotBackgroundColorStyleChanged(PlotArea::BackgroundColorStyle)
void plotBorderPenChanged(QPen &)
void backgroundOpacityChanged(int)
void backgroundSecondColorChanged(const QColor &)
void plotBackgroundFirstColorChanged(QColor &)
void symmetricPaddingChanged(bool)
void updateUnits() override
void cursorLineColorChanged(const QColor &)
void plotSymmetricPaddingChanged(bool)
void bottomPaddingChanged(double)
void plotYScaleChanged(CartesianPlot::Scale)
void loadConfig(KConfig &)
void layoutChanged(Worksheet::Layout)
void borderColorChanged(const QColor &)
void loadTheme(const QString &)
void plotBackgroundBrushStyleChanged(Qt::BrushStyle)
ThemeHandler * m_themeHandler
void plotRangeLastValuesChanged(int)
void setPlots(QList< CartesianPlot * >)
void rangeLastChanged(const QString &)
void rightPaddingChanged(double)
void rangeFirstChanged(const QString &)
void horizontalPaddingChanged(double)
void plotYAutoScaleChanged(bool)
void plotYRangeBreaksChanged(const CartesianPlot::RangeBreaks &)
void plotXMinChanged(double)
void info(const QString &)
void plotRectChanged(QRectF &)
void saveConfigAsTemplate(KConfig &)
void plotYMinChanged(double)
void plotBackgroundOpacityChanged(float)
void yMinChanged(const QString &)
void verticalPaddingChanged(double)
void plotBorderOpacityChanged(float)
void backgroundBrushStyleChanged(int)
void yMaxChanged(const QString &)
void xMaxDateTimeChanged(const QDateTime &)
void plotXAutoScaleChanged(bool)
void plotRightPaddingChanged(double)
void plotXMaxChanged(double)
void plotBorderCornerRadiusChanged(float)
void plotXScaleChanged(CartesianPlot::Scale)
void yMaxDateTimeChanged(const QDateTime &)
void borderCornerRadiusChanged(double)
void plotCursorPenChanged(const QPen &)
void xMaxChanged(const QString &)
void plotBackgroundSecondColorChanged(QColor &)
void xMinDateTimeChanged(const QDateTime &)
A xy-plot.
Definition: CartesianPlot.h:58
Widget for editing the properties of a TextLabel object, mostly used in an appropriate dock widget.
Definition: LabelWidget.h:48
BackgroundColorStyle
Definition: PlotArea.h:46
BackgroundImageStyle
Definition: PlotArea.h:48
BackgroundType
Definition: PlotArea.h:45
Provides a widget with buttons for loading of themes.
Definition: ThemeHandler.h:39