1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef SEGMENTPROPERTIES_H |
5 | #define SEGMENTPROPERTIES_H |
6 | |
7 | #include <QWidget> |
8 | #include <ui_pane.h> |
9 | |
10 | class SplineEditor; |
11 | |
12 | class SegmentProperties : public QWidget |
13 | { |
14 | Q_OBJECT |
15 | public: |
16 | explicit SegmentProperties(QWidget *parent = nullptr); |
17 | void setSplineEditor(SplineEditor *splineEditor) |
18 | { |
19 | m_splineEditor = splineEditor; |
20 | } |
21 | |
22 | void setSegment(int segment, QVector<QPointF> points, bool smooth, bool last) |
23 | { |
24 | m_segment = segment; |
25 | m_points = points; |
26 | m_smooth = smooth; |
27 | m_last = last; |
28 | invalidate(); |
29 | } |
30 | |
31 | private Q_SLOTS: |
32 | void c1Updated(); |
33 | void c2Updated(); |
34 | void pUpdated(); |
35 | |
36 | private: |
37 | void invalidate(); |
38 | |
39 | Ui_Pane m_ui_pane_c1; |
40 | Ui_Pane m_ui_pane_c2; |
41 | Ui_Pane m_ui_pane_p; |
42 | |
43 | SplineEditor *m_splineEditor; |
44 | QVector<QPointF> m_points; |
45 | int m_segment; |
46 | bool m_smooth; |
47 | bool m_last; |
48 | |
49 | bool m_blockSignals; |
50 | }; |
51 | |
52 | #endif // SEGMENTPROPERTIES_H |
53 | |