QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
terminaleditor.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 TERMINALEDITOR_H
19#define TERMINALEDITOR_H
20
21#include <QWidget>
22#include "../elementitemeditor.h"
23
24namespace Ui {
25 class TerminalEditor;
26}
27
28class PartTerminal;
29
35{
36 Q_OBJECT
37
38 public:
39 TerminalEditor(QETElementEditor *editor, QWidget *parent = nullptr);
40 ~TerminalEditor() override;
41
42 void updateForm() override;
43 bool setPart(CustomElementPart *new_part) override;
44 CustomElementPart *currentPart() const override;
45 QList<CustomElementPart *> currentParts() const override {return QList<CustomElementPart *>();}
46
47 private:
48 void init();
49 void posEdited();
50 void orientationEdited();
51 void nameEdited();
52 void typeEdited();
53 void activeConnections(bool active);
54 void activeChangeConnections(bool active);
55
56 private:
57 Ui::TerminalEditor *ui;
58 QVector<QMetaObject::Connection> m_editor_connections,
60 PartTerminal *m_part = nullptr;
61 bool m_locked = false;
62};
63
64#endif // TERMINALEDITOR_H
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition customelementpart.h:40
Definition elementitemeditor.h:34
Definition partterminal.h:31
Definition qetelementeditor.h:39
The TerminalEditor class Provide a widget used to edit the properties of a PartTerminal.
Definition terminaleditor.h:35
void updateForm() override
TerminalEditor::updateForm Reimplemented from ElementItemEditor Update the content of this widget.
Definition terminaleditor.cpp:53
bool setPart(CustomElementPart *new_part) override
TerminalEditor::setPart Set the part to edit. The part must be a PartTerminal, in other case return f...
Definition terminaleditor.cpp:76
void typeEdited()
TerminalEditor::typeEdited.
Definition terminaleditor.cpp:196
PartTerminal * m_part
Definition terminaleditor.h:60
bool m_locked
Definition terminaleditor.h:61
void orientationEdited()
TerminalEditor::orientationEdited.
Definition terminaleditor.cpp:154
QVector< QMetaObject::Connection > m_change_connections
Definition terminaleditor.h:59
QList< CustomElementPart * > currentParts() const override
Definition terminaleditor.h:45
void nameEdited()
TerminalEditor::nameEdited.
Definition terminaleditor.cpp:175
~TerminalEditor() override
TerminalEditor::~TerminalEditor Destructor.
Definition terminaleditor.cpp:43
CustomElementPart * currentPart() const override
TerminalEditor::currentPart.
Definition terminaleditor.cpp:106
void activeChangeConnections(bool active)
Definition terminaleditor.cpp:239
void activeConnections(bool active)
TerminalEditor::activeConnections Active connection between the widgets used in this editor and metho...
Definition terminaleditor.cpp:218
Ui::TerminalEditor * ui
Definition terminaleditor.h:57
void posEdited()
TerminalEditor::posEdited.
Definition terminaleditor.cpp:130
QVector< QMetaObject::Connection > m_editor_connections
Definition terminaleditor.h:58
void init()
TerminalEditor::init Some init about this class.
Definition terminaleditor.cpp:115
Definition autonumberingdockwidget.h:26