QElectroTech  0.8-dev
ellipseeditor.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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 ELLIPSE_EDITOR_H
19 #define ELLIPSE_EDITOR_H
20 
21 #include "elementitemeditor.h"
22 
23 class PartEllipse;
24 class StyleEditor;
25 class QDoubleSpinBox;
26 
31 {
32  Q_OBJECT
33 
34  // constructors, destructor
35  public:
36  EllipseEditor(QETElementEditor *, PartEllipse * = nullptr, QWidget * = nullptr);
37  ~EllipseEditor() override;
38  private:
40 
41  // attributes
42  private:
45  QDoubleSpinBox *x, *y, *h, *v;
46  bool m_locked;
47  QList <QMetaObject::Connection> m_change_connections;
48 
49  // methods
50  public:
51  bool setPart(CustomElementPart *) override;
52  bool setParts(QList <CustomElementPart *> parts) override;
53  CustomElementPart *currentPart() const override;
54  QList<CustomElementPart*> currentParts() const override;
55 
56  public slots:
57  void editingFinishedX();
58  void editingFinishedY();
59  void editingFinishedH();
60  void editingFinishedV();
61  void updateForm() override;
62 
63  private:
64  void activeConnections(bool);
71 };
72 #endif
elementitemeditor.h
styleeditor.h
StyleEditor::currentParts
QList< CustomElementPart * > currentParts() const override
Definition: styleeditor.cpp:543
EllipseEditor::currentParts
QList< CustomElementPart * > currentParts() const override
Definition: ellipseeditor.cpp:133
EllipseEditor::activeConnections
void activeConnections(bool)
Definition: ellipseeditor.cpp:252
ElementScene::undoStack
QUndoStack & undoStack()
ElementScene::undoStack.
Definition: elementscene.cpp:603
EllipseEditor::m_locked
bool m_locked
Definition: ellipseeditor.h:46
EllipseEditor::editingFinishedV
void editingFinishedV()
Definition: ellipseeditor.cpp:210
partellipse.h
EllipseEditor::EllipseEditor
EllipseEditor(QETElementEditor *, PartEllipse *=nullptr, QWidget *=nullptr)
Definition: ellipseeditor.cpp:30
EllipseEditor::part
PartEllipse * part
Definition: ellipseeditor.h:43
EllipseEditor::EllipseEditor
EllipseEditor(const EllipseEditor &)
EllipseEditor::v
QDoubleSpinBox * v
Definition: ellipseeditor.h:45
EllipseEditor::editingFinishedH
void editingFinishedH()
Definition: ellipseeditor.cpp:187
EllipseEditor::updateForm
void updateForm() override
Definition: ellipseeditor.cpp:236
ellipseeditor.h
EllipseEditor::setUpChangeConnections
void setUpChangeConnections()
setUpChangeConnections Setup the connection from the ellipse(s) to the widget, to update it when the ...
Definition: ellipseeditor.cpp:73
StyleEditor
Definition: styleeditor.h:35
EllipseEditor::~EllipseEditor
~EllipseEditor() override
Destructeur.
Definition: ellipseeditor.cpp:70
ElementItemEditor
Definition: elementitemeditor.h:34
ElementItemEditor::elementScene
virtual ElementScene * elementScene() const
Definition: elementitemeditor.cpp:39
PartEllipse
The PartEllipse class This class represents an ellipse primitive which may be used to compose the dra...
Definition: partellipse.h:31
PastePartsCommand::undo
void undo() override
PastePartsCommand::undo.
Definition: pastepartscommand.cpp:60
elementscene.h
qpropertyundocommand.h
EllipseEditor::x
QDoubleSpinBox * x
Definition: ellipseeditor.h:45
EllipseEditor::setParts
bool setParts(QList< CustomElementPart * > parts) override
Definition: ellipseeditor.cpp:116
EllipseEditor::m_change_connections
QList< QMetaObject::Connection > m_change_connections
Definition: ellipseeditor.h:47
EllipseEditor::style_
StyleEditor * style_
Definition: ellipseeditor.h:44
StyleEditor::setParts
bool setParts(QList< CustomElementPart * >) override
StyleEditor::setParts Set several parts to edit by this editor. Note : editor can accept or refuse to...
Definition: styleeditor.cpp:510
EllipseEditor::y
QDoubleSpinBox * y
Definition: ellipseeditor.h:45
AbstractPartEllipse::rectChanged
void rectChanged()
EllipseEditor::currentPart
CustomElementPart * currentPart() const override
Definition: ellipseeditor.cpp:129
CustomElementPart
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition: customelementpart.h:40
EllipseEditor::editingFinishedY
void editingFinishedY()
Definition: ellipseeditor.cpp:161
QPropertyUndoCommand
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
Definition: qpropertyundocommand.h:34
EllipseEditor
Definition: ellipseeditor.h:31
EllipseEditor::h
QDoubleSpinBox * h
Definition: ellipseeditor.h:45
EllipseEditor::editingFinishedX
void editingFinishedX()
Definition: ellipseeditor.cpp:137
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
EllipseEditor::disconnectChangeConnections
void disconnectChangeConnections()
Definition: ellipseeditor.cpp:78
QETElementEditor
Definition: qetelementeditor.h:33
EllipseEditor::setPart
bool setPart(CustomElementPart *) override
Definition: ellipseeditor.cpp:94
CustomElementGraphicPart::property
QVariant property(const char *name) const override
Definition: customelementgraphicpart.h:297