QElectroTech  0.70
rectangleeditor.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 RECTANGLEEDITOR_H
19 #define RECTANGLEEDITOR_H
20 
21 #include "elementitemeditor.h"
22 #include <QWidget>
23 
24 class StyleEditor;
25 class PartRectangle;
26 
27 namespace Ui {
28  class RectangleEditor;
29 }
30 
36 {
37  Q_OBJECT
38 
39  public:
40  explicit RectangleEditor(QETElementEditor *editor, PartRectangle *rect = nullptr, QWidget *parent = nullptr);
42 
43  bool setPart(CustomElementPart *part) override;
44  CustomElementPart *currentPart() const override;
45  QPointF editedTopLeft () const;
46 
47  public slots:
48  void updateForm() override;
49  private:
50  void editingFinished();
51  void activeConnections(bool active);
52 
53  private:
54  bool m_locked = false;
57  Ui::RectangleEditor *ui;
58 };
59 
60 #endif // RECTANGLEEDITOR_H
~RectangleEditor()
RectangleEditor::~RectangleEditor.
The RectangleEditor class This class provides a widget to edit rectangles within the element editor...
CustomElementPart * currentPart() const override
RectangleEditor::currentPart.
RectangleEditor(QETElementEditor *editor, PartRectangle *rect=nullptr, QWidget *parent=nullptr)
RectangleEditor::RectangleEditor.
PartRectangle * m_part
QPointF editedTopLeft() const
RectangleEditor::topLeft.
StyleEditor * m_style
void editingFinished()
RectangleEditor::editingFinished Slot called when a editor widget is finish to be edited Update the g...
void updateForm() override
RectangleEditor::updateForm.
Ui::RectangleEditor * ui
bool setPart(CustomElementPart *part) override
RectangleEditor::setPart.
void activeConnections(bool active)
RectangleEditor::activeConnections Enable/disable connection between editor widget and slot editingFi...