-
Notifications
You must be signed in to change notification settings - Fork 3
/
qcpl_format_legend.h
57 lines (43 loc) · 1.11 KB
/
qcpl_format_legend.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef QCPL_FORMAT_LEGEND_H
#define QCPL_FORMAT_LEGEND_H
#include <QWidget>
#include <QJsonObject>
class QCPLegend;
namespace Ori {
namespace Widgets {
class SelectableTileRadioGroup;
}}
QT_BEGIN_NAMESPACE
class QCheckBox;
class QGridLayout;
class QSpinBox;
QT_END_NAMESPACE
namespace QCPL {
class PenEditorWidget;
class TextEditorWidget;
class MarginsEditorWidget;
struct LegendFormatDlgProps;
class LegendFormatWidget : public QWidget
{
Q_OBJECT
public:
explicit LegendFormatWidget(QCPLegend *legend, const LegendFormatDlgProps& props);
bool needSaveDefault() const;
void populate();
public slots:
void apply();
void restore();
private:
QCPLegend *_legend;
QJsonObject _backup;
Ori::Widgets::SelectableTileRadioGroup *_locationGroup;
QGridLayout *_locationLayout;
TextEditorWidget *_textProps;
QSpinBox *_iconW, *_iconH, *_iconMargin;
MarginsEditorWidget *_margins, *_paddings;
QCheckBox *_visible, *_saveDefault;
PenEditorWidget *_borderPen;
void makeLocationTile(Qt::Alignment align, int row, int col);
};
} // namespace QCPL
#endif // QCPL_FORMAT_LEGEND_H