JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
jkqtpcomboboxes.h
1/*
2 Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
3
4
5
6 This software is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License (LGPL) as published by
8 the Free Software Foundation, either version 2.1 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License (LGPL) for more details.
15
16 You should have received a copy of the GNU Lesser General Public License (LGPL)
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21
22#ifndef JKQTPCOMBOBOXES_H
23#define JKQTPCOMBOBOXES_H
24
25#include "jkqtplotter/jkqtpbaseplotter.h"
26#include "jkqtplotter/jkqtplotter_imexport.h"
27#include "jkqtplotter/graphs/jkqtpimage.h"
28#include <QComboBox>
29#include "jkqtplotter/jkqtpimagetools.h"
30#include "jkqtplotter/jkqtptools.h"
31
32
33
34/*! \brief class to plot an image from an 2-dimensional array of values
35 \ingroup jkqtpcomboboxes
36
37 \image html JKQTPMathImageColorPaletteComboBox.png
38 */
54
55
56
57/*! \brief a QComboBox which shows JKQTPCADrawMode
58 \ingroup jkqtpcomboboxes
59 */
61 Q_OBJECT
62 public:
63 JKQTPCADrawModeComboBox(QWidget* parent=nullptr);
64
67 protected:
68 void addDrawMode(JKQTPCADrawMode position, const QString& name, const QIcon& icon=QIcon());
69};
70
71
72
73/*! \brief a QComboBox which shows JKQTPCALabelType
74 \ingroup jkqtpcomboboxes
75 */
77 Q_OBJECT
78 public:
79 JKQTPCALabelTypeComboBox(QWidget* parent=nullptr);
80
83 protected:
84 void addLabelType(JKQTPCALabelType position, const QString& name, const QIcon& icon=QIcon());
85};
86
87
88/*! \brief a QComboBox which shows JKQTPLabelPosition
89 \ingroup jkqtpcomboboxes
90 */
92 Q_OBJECT
93 public:
94 JKQTPLabelPositionComboBox(QWidget* parent=nullptr);
95
98 protected:
99 void addPosition(JKQTPLabelPosition position, const QString& name, const QIcon& icon=QIcon());
100};
101
102
103
104/*! \brief a QComboBox which shows JKQTPKeyPosition
105 \ingroup jkqtpcomboboxes
106
107 \image html JKQTPKeyPositionComboBox.png
108 */
110 Q_OBJECT
111 public:
112 JKQTPKeyPositionComboBox(QWidget* parent=nullptr);
113
116 Q_SIGNALS:
118 protected:
119 void addPosition(JKQTPKeyPosition position, const QString& name, const QIcon& icon=QIcon());
120 protected Q_SLOTS:
121 void posChanged(int index);
122};
123
124
125
126/*! \brief a QComboBox which shows JKQTPKeyPosition
127 \ingroup jkqtpcomboboxes
128
129 \image html JKQTPKeyLayoutComboBox.png
130 */
132 Q_OBJECT
133 public:
134 JKQTPKeyLayoutComboBox(QWidget* parent=nullptr);
135
138 Q_SIGNALS:
140 protected:
141 void addKeyLayout(JKQTPKeyLayout layout, const QString& name);
142 protected Q_SLOTS:
143 void currentIndexChangedP(int index);
144};
145
146
147/*! \brief a QComboBox which shows JKQTPErrorPlotstyle
148 \ingroup jkqtpcomboboxes
149
150 \image html JKQTPErrorPlotstyleComboBox.png
151 */
153 Q_OBJECT
154 public:
155 JKQTPErrorPlotstyleComboBox(QWidget* parent=nullptr);
156
160 protected:
161 void addSymbol(JKQTPErrorPlotstyle symbol, const QString& name, const QIcon &icon=QIcon());
162};
163
164
165
166/*! \brief a QComboBox which shows JKQTPGraphSymbols
167 \ingroup jkqtpcomboboxes
168
169 \image html JKQTPSymbolComboBox.png
170 */
172 Q_OBJECT
173 public:
174 JKQTPSymbolComboBox(QWidget* parent=nullptr);
175
179 protected:
180 void addSymbol(JKQTPGraphSymbols symbol, const QString& name);
181};
182
183
184/*! \brief a QComboBox to select whether a line, symbols or both should be displayed
185 \ingroup jkqtpcomboboxes
186 */
188 Q_OBJECT
189 public:
190 JKQTPLinePlotStyleComboBox(QWidget* parent=nullptr);
191
194
196 bool getDrawLine() const;
197 protected:
198 void refill();
199 void addSymbol(JKQTPGraphSymbols symbol, bool line, const QString& name=QString(""), const QVariant& data=QVariant());
200 QList<JKQTPGraphSymbols> symbols;
202};
203
204
205/*! \brief a QComboBox to select whether a line, symbols or both should be displayed, in addition to JKQTPLinePlotStyleComboBox this may also have different symbol sizes!
206 \ingroup jkqtpcomboboxes
207 */
209 Q_OBJECT
210 public:
212
213 void setDefaultSymbol(JKQTPGraphSymbols symbol, double size);
214 void addUsedSymbol(JKQTPGraphSymbols symbol, double symbolSize, bool line);
215
217 bool getDrawLine() const;
218 double getSymbolSize() const;
219 protected:
220 void refill();
221 void addSymbol(JKQTPGraphSymbols symbol, bool line, double symbolSize, const QString& name=QString(""), const QVariant& data=QVariant());
222 struct styleData {
224 bool line;
226 bool operator==(const styleData& other)const;
227 };
228
229 QList<styleData> symbols;
232};
233
234
235/*! \brief a QComboBox which shows JKQTPSpecialLineType
236 \ingroup jkqtpcomboboxes
237
238 \see JKQTPSpecialLineType
239 */
241 Q_OBJECT
242 public:
243 JKQTPSpecialLineTypeComboBox(QWidget* parent=nullptr);
244
248 protected:
249 void addStep(JKQTPSpecialLineType step, const QString& name, const QIcon &icon=QIcon());
250};
251
252
253/*! \brief a QComboBox which shows JKQTPMathImageModifierMode
254 \ingroup jkqtpcomboboxes
255
256 \see JKQTPMathImageModifierMode
257 */
259 Q_OBJECT
260 public:
261 JKQTPImageModifierModeComboBox(QWidget* parent=nullptr);
262
265 protected:
266 void addMode(JKQTPMathImageModifierMode mode, const QString& name, const QIcon& icon=QIcon());
267};
268
269#endif // JKQTPCOMBOBOXES_H
a QComboBox which shows JKQTPCADrawMode
Definition jkqtpcomboboxes.h:60
JKQTPCADrawModeComboBox(QWidget *parent=nullptr)
JKQTPCADrawMode getDrawMode() const
void setDrawMode(JKQTPCADrawMode position)
void addDrawMode(JKQTPCADrawMode position, const QString &name, const QIcon &icon=QIcon())
a QComboBox which shows JKQTPCALabelType
Definition jkqtpcomboboxes.h:76
JKQTPCALabelTypeComboBox(QWidget *parent=nullptr)
void setLabelType(JKQTPCALabelType position)
void addLabelType(JKQTPCALabelType position, const QString &name, const QIcon &icon=QIcon())
JKQTPCALabelType getLabelType() const
a QComboBox which shows JKQTPErrorPlotstyle
Definition jkqtpcomboboxes.h:152
void setSymbolType(JKQTPErrorPlotstyle symbol)
void setCurrentErrorStyle(JKQTPErrorPlotstyle symbol)
void addSymbol(JKQTPErrorPlotstyle symbol, const QString &name, const QIcon &icon=QIcon())
JKQTPErrorPlotstyleComboBox(QWidget *parent=nullptr)
JKQTPErrorPlotstyle getErrorLineStyle() const
a QComboBox which shows JKQTPMathImageModifierMode
Definition jkqtpcomboboxes.h:258
JKQTPImageModifierModeComboBox(QWidget *parent=nullptr)
void addMode(JKQTPMathImageModifierMode mode, const QString &name, const QIcon &icon=QIcon())
JKQTPMathImageModifierMode getModifierMode() const
void setModifierMode(JKQTPMathImageModifierMode mode)
a QComboBox which shows JKQTPKeyPosition
Definition jkqtpcomboboxes.h:131
JKQTPKeyLayout getKeyLayout() const
void addKeyLayout(JKQTPKeyLayout layout, const QString &name)
void currentLayoutChanged(JKQTPKeyLayout layout)
void currentIndexChangedP(int index)
JKQTPKeyLayoutComboBox(QWidget *parent=nullptr)
void setKeyLayout(JKQTPKeyLayout layout)
a QComboBox which shows JKQTPKeyPosition
Definition jkqtpcomboboxes.h:109
void addPosition(JKQTPKeyPosition position, const QString &name, const QIcon &icon=QIcon())
JKQTPKeyPosition getPosition() const
JKQTPKeyPositionComboBox(QWidget *parent=nullptr)
void posChanged(int index)
void currentPositionChanged(JKQTPKeyPosition pos)
void setPosition(JKQTPKeyPosition position)
a QComboBox which shows JKQTPLabelPosition
Definition jkqtpcomboboxes.h:91
void setPosition(JKQTPLabelPosition position)
JKQTPLabelPositionComboBox(QWidget *parent=nullptr)
void addPosition(JKQTPLabelPosition position, const QString &name, const QIcon &icon=QIcon())
JKQTPLabelPosition getPosition() const
a QComboBox to select whether a line, symbols or both should be displayed
Definition jkqtpcomboboxes.h:187
JKQTPGraphSymbols defaultSymbol
Definition jkqtpcomboboxes.h:201
void addUsedSymbol(JKQTPGraphSymbols symbol)
JKQTPLinePlotStyleComboBox(QWidget *parent=nullptr)
JKQTPGraphSymbols getSymbol() const
QList< JKQTPGraphSymbols > symbols
Definition jkqtpcomboboxes.h:200
void setDefaultSymbol(JKQTPGraphSymbols symbol)
void addSymbol(JKQTPGraphSymbols symbol, bool line, const QString &name=QString(""), const QVariant &data=QVariant())
a QComboBox to select whether a line, symbols or both should be displayed, in addition to JKQTPLinePl...
Definition jkqtpcomboboxes.h:208
QList< styleData > symbols
Definition jkqtpcomboboxes.h:229
double defaultSize
Definition jkqtpcomboboxes.h:231
JKQTPLinePlotStyleWithSymbolSizeComboBox(QWidget *parent=nullptr)
JKQTPGraphSymbols defaultSymbol
Definition jkqtpcomboboxes.h:230
void addUsedSymbol(JKQTPGraphSymbols symbol, double symbolSize, bool line)
void addSymbol(JKQTPGraphSymbols symbol, bool line, double symbolSize, const QString &name=QString(""), const QVariant &data=QVariant())
JKQTPGraphSymbols getSymbol() const
void setDefaultSymbol(JKQTPGraphSymbols symbol, double size)
class to plot an image from an 2-dimensional array of values
Definition jkqtpcomboboxes.h:39
JKQTPMathImageColorPalette colorPalette() const
void setCurrentColorPalette(JKQTPMathImageColorPalette palette)
JKQTPMathImageColorPalette getColorPalette() const
void setColorPalette(JKQTPMathImageColorPalette palette)
JKQTPMathImageColorPalette currentColorPalette() const
JKQTPMathImageColorPaletteComboBox(QWidget *parent=nullptr)
void currentPaletteChanged(JKQTPMathImageColorPalette palette)
a QComboBox which shows JKQTPSpecialLineType
Definition jkqtpcomboboxes.h:240
void addStep(JKQTPSpecialLineType step, const QString &name, const QIcon &icon=QIcon())
void setSpecialLineType(JKQTPSpecialLineType step)
JKQTPSpecialLineType getSpecialLineType() const
JKQTPSpecialLineTypeComboBox(QWidget *parent=nullptr)
void setCurrentStepType(JKQTPSpecialLineType step)
a QComboBox which shows JKQTPGraphSymbols
Definition jkqtpcomboboxes.h:171
void setCurrentSymbol(JKQTPGraphSymbols symbol)
JKQTPSymbolComboBox(QWidget *parent=nullptr)
void setSymbolType(JKQTPGraphSymbols symbol)
void addSymbol(JKQTPGraphSymbols symbol, const QString &name)
JKQTPGraphSymbols getSymbol() const
QFlags< JKQTPErrorPlotstyleElements > JKQTPErrorPlotstyle
specifies the plot styles for the error information, e.g. error bars, boxes, lines ....
Definition jkqtptools.h:728
QFlags< JKQTPCADrawModeElements > JKQTPCADrawMode
drawing mode for a coordinate axis
Definition jkqtptools.h:430
JKQTPMathImageColorPalette
available palettes for coloring an image
Definition jkqtpbasicimagetools.h:84
JKQTPMathImageModifierMode
describes how to modify a rendered image with a second data array
Definition jkqtpbasicimagetools.h:1445
JKQTPSpecialLineType
plot styles for the error information
Definition jkqtptools.h:750
JKQTPKeyLayout
layout of the key
Definition jkqtptools.h:632
QFlags< JKQTPKeyPositions > JKQTPKeyPosition
position of the key
Definition jkqtptools.h:607
JKQTPLabelPosition
position of the axis labels
Definition jkqtptools.h:508
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
JKQTPCALabelType
display mode for the (axis) labels
Definition jkqtptools.h:449
JKQTPGraphSymbols
symbols that can be used to plot a datapoint for a graph
Definition jkqtpdrawingtools.h:143
JKQTPGraphSymbols symbol
Definition jkqtpcomboboxes.h:223
bool line
Definition jkqtpcomboboxes.h:224
bool operator==(const styleData &other) const
double symbolSize
Definition jkqtpcomboboxes.h:225