QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
polygoneditor.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef POLYGONEDITOR_H
19#define POLYGONEDITOR_H
20
21#include "../elementitemeditor.h"
22
23class StyleEditor;
24class PartPolygon;
25class QTreeWidgetItem;
26
27namespace Ui {
28 class PolygonEditor;
29}
30
32{
33 Q_OBJECT
34
35 public:
36 explicit PolygonEditor(QETElementEditor *editor, PartPolygon *part = nullptr, QWidget *parent = nullptr);
37 ~PolygonEditor() override;
38
39 bool setPart(CustomElementPart *part) override;
40 CustomElementPart *currentPart() const override;
41 QList<CustomElementPart*> currentParts() const override;
42 void updateForm() override;
43 QVector<QPointF> pointsFromTree();
44 bool eventFilter(QObject *watched, QEvent *event) override;
45
46 private slots:
48 void on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, int column);
52
53 private:
61
62 private:
63 Ui::PolygonEditor *ui;
64 StyleEditor *m_style = nullptr;
65 PartPolygon *m_part = nullptr;
66 QList <QMetaObject::Connection> m_change_connections;
67};
68
69#endif // POLYGONEDITOR_H
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition customelementpart.h:40
Definition elementitemeditor.h:34
The PartPolygon class This class represents a polygon primitive which may be used to compose the draw...
Definition partpolygon.h:34
Definition polygoneditor.h:32
void setUpChangeConnections()
setUpChangeConnections Setup the connection from the line(s) to the widget, to update it when the lin...
Definition polygoneditor.cpp:57
void disconnectChangeConnections()
Definition polygoneditor.cpp:77
void on_m_close_polygon_cb_stateChanged(int arg1)
PolygonEditor::on_m_close_polygon_cb_stateChanged.
Definition polygoneditor.cpp:199
QList< CustomElementPart * > currentParts() const override
Definition polygoneditor.cpp:127
void updateForm() override
PolygonEditor::updateForm Update the widget.
Definition polygoneditor.cpp:136
void on_m_remove_point_action_triggered()
Definition polygoneditor.cpp:320
QList< QMetaObject::Connection > m_change_connections
Definition polygoneditor.h:66
bool eventFilter(QObject *watched, QEvent *event) override
Definition polygoneditor.cpp:183
void on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, int column)
PolygonEditor::on_m_points_list_tree_itemChanged Update the polygon according to the current value of...
Definition polygoneditor.cpp:223
Ui::PolygonEditor * ui
Definition polygoneditor.h:63
CustomElementPart * currentPart() const override
PolygonEditor::currentPart.
Definition polygoneditor.cpp:122
QVector< QPointF > pointsFromTree()
PolygonEditor::pointsFromTree.
Definition polygoneditor.cpp:163
void on_m_points_list_tree_itemSelectionChanged()
PolygonEditor::on_m_points_list_tree_itemSelectionChanged Used to change the color of the current sel...
Definition polygoneditor.cpp:260
~PolygonEditor() override
PolygonEditor::~PolygonEditor.
Definition polygoneditor.cpp:52
PartPolygon * m_part
Definition polygoneditor.h:65
StyleEditor * m_style
Definition polygoneditor.h:64
bool setPart(CustomElementPart *part) override
PolygonEditor::setPart.
Definition polygoneditor.cpp:90
void on_m_add_point_action_triggered()
Definition polygoneditor.cpp:285
Definition qetelementeditor.h:39
Definition styleeditor.h:35
Definition autonumberingdockwidget.h:26