QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
rectangleeditor.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 RECTANGLEEDITOR_H
19#define RECTANGLEEDITOR_H
20
21#include "../elementitemeditor.h"
22
23#include <QWidget>
24
25class StyleEditor;
26class PartRectangle;
27
28namespace Ui {
29 class RectangleEditor;
30}
31
37{
38 Q_OBJECT
39
40 public:
41 explicit RectangleEditor(QETElementEditor *editor, PartRectangle *rect = nullptr, QWidget *parent = nullptr);
42 ~RectangleEditor() override;
43
44 bool setPart(CustomElementPart *part) override;
45 bool setParts(QList <CustomElementPart *> parts) override;
46 CustomElementPart *currentPart() const override;
47 QList<CustomElementPart*> currentParts() const override;
48 QPointF editedTopLeft () const;
49
50 public slots:
51 void updateForm() override;
52 private:
53 void editingFinished();
54 void activeConnections(bool active);
55 void xPosChanged();
56 void yPosChanged();
57 void widthChanged();
58 void heightChanged();
59 void xRadiusChanged();
60 void yRadiusChanged();
67
68 private:
69 bool m_locked = false;
72 Ui::RectangleEditor *ui;
73 QList <QMetaObject::Connection> m_change_connections;
74};
75
76#endif // RECTANGLEEDITOR_H
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition customelementpart.h:40
Definition elementitemeditor.h:34
Definition partrectangle.h:31
Definition qetelementeditor.h:39
The RectangleEditor class This class provides a widget to edit rectangles within the element editor.
Definition rectangleeditor.h:37
void xPosChanged()
Definition rectangleeditor.cpp:196
void editingFinished()
RectangleEditor::editingFinished Slot called when a editor widget is finish to be edited Update the g...
Definition rectangleeditor.cpp:165
PartRectangle * m_part
Definition rectangleeditor.h:71
bool setParts(QList< CustomElementPart * > parts) override
Definition rectangleeditor.cpp:103
void activeConnections(bool active)
RectangleEditor::activeConnections Enable/disable connection between editor widget and slot editingFi...
Definition rectangleeditor.cpp:353
void yPosChanged()
Definition rectangleeditor.cpp:222
void xRadiusChanged()
Definition rectangleeditor.cpp:300
bool setPart(CustomElementPart *part) override
RectangleEditor::setPart.
Definition rectangleeditor.cpp:73
QList< QMetaObject::Connection > m_change_connections
Definition rectangleeditor.h:73
CustomElementPart * currentPart() const override
RectangleEditor::currentPart.
Definition rectangleeditor.cpp:117
bool m_locked
Definition rectangleeditor.h:69
void heightChanged()
Definition rectangleeditor.cpp:274
QPointF editedTopLeft() const
RectangleEditor::topLeft.
Definition rectangleeditor.cpp:131
StyleEditor * m_style
Definition rectangleeditor.h:70
void updateForm() override
RectangleEditor::updateForm.
Definition rectangleeditor.cpp:139
void setUpChangeConnections()
setUpChangeConnections Setup the connection from the rectangles(s) to the widget, to update it when t...
Definition rectangleeditor.cpp:51
QList< CustomElementPart * > currentParts() const override
Definition rectangleeditor.cpp:122
void yRadiusChanged()
Definition rectangleeditor.cpp:323
~RectangleEditor() override
RectangleEditor::~RectangleEditor.
Definition rectangleeditor.cpp:46
void disconnectChangeConnections()
Definition rectangleeditor.cpp:60
Ui::RectangleEditor * ui
Definition rectangleeditor.h:72
void widthChanged()
Definition rectangleeditor.cpp:248
Definition styleeditor.h:35
Definition autonumberingdockwidget.h:26