QElectroTech  0.70
polygoneditor.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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 POLYGON_EDITOR_H
19 #define POLYGON_EDITOR_H
20 
21 #include "elementitemeditor.h"
22 #include <QTreeWidget>
23 #include <QCheckBox>
24 
25 class PartPolygon;
26 class StyleEditor;
27 class QTreeWidget;
28 
33 
34  Q_OBJECT
35 
36  // constructors, destructor
37  public:
38  PolygonEditor(QETElementEditor *, PartPolygon * = nullptr, QWidget * = nullptr);
39  ~PolygonEditor() override;
40 
41  private:
43 
44  // attributes
45  private:
48  QTreeWidget points_list;
49  QCheckBox close_polygon;
50 
51  // methods
52  public:
53  bool setPart(CustomElementPart *) override;
54  CustomElementPart *currentPart() const override;
55 
56  private:
57  QVector<QPointF> getPointsFromTree();
58 
59  public slots:
60  void updatePolygonPoints();
62  void updateForm() override;
63  void validColumn(QTreeWidgetItem *qtwi, int column);
64 
65  private:
66  void activeConnections(bool);
67 };
68 #endif
void updateForm() override
StyleEditor * style_
Definition: polygoneditor.h:47
void validColumn(QTreeWidgetItem *qtwi, int column)
QTreeWidget points_list
Definition: polygoneditor.h:48
void updatePolygonPoints()
~PolygonEditor() override
Destructeur.
PartPolygon * part
Definition: polygoneditor.h:46
void activeConnections(bool)
void updatePolygonClosedState()
bool setPart(CustomElementPart *) override
QCheckBox close_polygon
Definition: polygoneditor.h:49
The PartPolygon class This class represents a polygon primitive which may be used to compose the draw...
Definition: partpolygon.h:33
CustomElementPart * currentPart() const override
QVector< QPointF > getPointsFromTree()
PolygonEditor(QETElementEditor *, PartPolygon *=nullptr, QWidget *=nullptr)