QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
lineeditor.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 LINEEDITOR_H
19#define LINEEDITOR_H
20
21#include "../elementitemeditor.h"
22
23namespace Ui {
24 class LineEditor;
25}
26
27class PartLine;
28class StyleEditor;
29
35{
36 Q_OBJECT
37
38 public:
39 explicit LineEditor(QETElementEditor *editor, PartLine *part = nullptr, QWidget *parent = nullptr);
40 ~LineEditor() override;
41
42 bool setPart(CustomElementPart *part) override;
43 bool setParts(QList <CustomElementPart *> parts) override;
44 CustomElementPart *currentPart() const override;
45 QList<CustomElementPart *> currentParts() const override;
46 void updateForm() override;
47
48 private:
51 void activeConnection(bool active);
52
53 void lineEdited();
54 void firstEndEdited();
56 void secondEndEdited();
58
59 private:
60 PartLine *m_part = nullptr;
61 Ui::LineEditor *ui;
62 StyleEditor *m_style = nullptr;
63 QList <QMetaObject::Connection> m_change_connections;
64 bool m_locked = false;
65};
66
67#endif // LINEEDITOR_H
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition customelementpart.h:40
Definition elementitemeditor.h:34
The LineEditor class Provide a widget editor used to edit the properties of a PartLine.
Definition lineeditor.h:35
void activeConnection(bool active)
LineEditor::activeConnection Active or not the connection between the signals from widgets of this ed...
Definition lineeditor.cpp:238
bool m_locked
Definition lineeditor.h:64
void lineEdited()
LineEditor::lineEdited slot.
Definition lineeditor.cpp:268
void firstEndLenghtEdited()
LineEditor::firstEndLenghtEdited slot.
Definition lineeditor.cpp:320
void disconnectChangeConnections()
LineEditor::disconnectChangeConnections disconnect the connection use for update the form when line i...
Definition lineeditor.cpp:224
bool setParts(QList< CustomElementPart * > parts) override
LineEditor::setParts Reimplemented from ElementItemEditor.
Definition lineeditor.cpp:149
void updateForm() override
LineEditor::updateForm Reimplemented from ElementItemEditor.
Definition lineeditor.cpp:182
void secondEndLenghtEdited()
LineEditor::secondEndLenghtEdited slot.
Definition lineeditor.cpp:368
bool setPart(CustomElementPart *part) override
LineEditor::setPart Reimplemented from ElementItemEditor.
Definition lineeditor.cpp:113
~LineEditor() override
LineEditor::~LineEditor.
Definition lineeditor.cpp:102
QList< CustomElementPart * > currentParts() const override
LineEditor::currentParts.
Definition lineeditor.cpp:174
CustomElementPart * currentPart() const override
LineEditor::currentPart.
Definition lineeditor.cpp:166
void firstEndEdited()
LineEditor::firstEndEdited slot.
Definition lineeditor.cpp:292
QList< QMetaObject::Connection > m_change_connections
Definition lineeditor.h:63
PartLine * m_part
Definition lineeditor.h:60
void setUpChangeConnections()
LineEditor::setUpChangeConnections Make the connection use for update the form when line is edited ou...
Definition lineeditor.cpp:208
Ui::LineEditor * ui
Definition lineeditor.h:61
void secondEndEdited()
LineEditor::secondEndEdited slot.
Definition lineeditor.cpp:340
StyleEditor * m_style
Definition lineeditor.h:62
Definition partline.h:37
Definition qetelementeditor.h:39
Definition styleeditor.h:35
Definition autonumberingdockwidget.h:26