-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPropertyPanel.h
More file actions
75 lines (62 loc) · 1.87 KB
/
Copy pathPropertyPanel.h
File metadata and controls
75 lines (62 loc) · 1.87 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef PROPERTYPANEL_H
#define PROPERTYPANEL_H
#include <QWidget>
class QLabel;
class QLineEdit;
class QDoubleSpinBox;
class QSpinBox;
class QCheckBox;
class QGroupBox;
class QFontComboBox;
class QPushButton;
class Shape;
class DocumentController;
class PropertyPanel : public QWidget
{
Q_OBJECT
public:
explicit PropertyPanel(DocumentController *controller,
QWidget *parent = nullptr);
void setShape(Shape *shape);
void setMultiSelection(int count);
void clearShape();
private slots:
void commitChanges();
void commitTextChanges();
private:
void buildUI();
void populateFromShape();
void setInputsEnabled(bool enabled);
void setContentVisible(bool visible);
void connectEditors();
void updateTextColorButton();
void updateFillColorButton();
void updateStrokeColorButton();
DocumentController *m_controller = nullptr;
Shape *m_shape = nullptr;
bool m_populating = false;
QWidget *m_contentWidget = nullptr;
QLabel *m_emptyLabel = nullptr;
QLabel *m_emptySubLabel = nullptr;
QLabel *m_multiLabel = nullptr;
QLabel *m_objectTitleLabel = nullptr;
QLabel *m_codeLabel = nullptr;
QDoubleSpinBox *m_xSpin = nullptr;
QDoubleSpinBox *m_ySpin = nullptr;
QDoubleSpinBox *m_wSpin = nullptr;
QDoubleSpinBox *m_hSpin = nullptr;
QDoubleSpinBox *m_rotSpin = nullptr;
QLineEdit *m_fillEdit = nullptr;
QLineEdit *m_strokeEdit = nullptr;
QDoubleSpinBox *m_strokeWSpin = nullptr;
QCheckBox *m_visibleCb = nullptr;
QPushButton *m_fillColorBtn = nullptr;
QPushButton *m_strokeColorBtn = nullptr;
QGroupBox *m_textGroup = nullptr;
QLineEdit *m_textEdit = nullptr;
QFontComboBox *m_fontCombo = nullptr;
QSpinBox *m_fontSizeSpin = nullptr;
QPushButton *m_textColorBtn = nullptr;
QString m_textColor;
};
#endif // PROPERTYPANEL_H