QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
elementpropertieswidget.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 ELEMENTPROPERTIESWIDGET_H
19#define ELEMENTPROPERTIESWIDGET_H
20
22
23class Element;
24class Diagram;
25class QTabWidget;
29
30
32{
33 Q_OBJECT
34
35 public:
36 explicit ElementPropertiesWidget(Element *elmt, QWidget *parent = nullptr);
37 explicit ElementPropertiesWidget(DynamicElementTextItem *text, QWidget *parent = nullptr);
38 explicit ElementPropertiesWidget(ElementTextItemGroup *group, QWidget *parent = nullptr);
39 void setElement(Element *element) override;
42 void apply() override;
43 void reset() override;
44 bool setLiveEdit(bool live_edit) override;
45
46 public slots:
47 void findInPanel ();
48 void editElement ();
49
50 private:
51 void buildGui();
52 void updateUi() override;
53 void addGeneralWidget();
54 QWidget *generalWidget();
55
56 signals:
58
59 private:
61 QTabWidget *m_tab;
62 QList <AbstractElementPropertiesEditorWidget *> m_list_editor;
64};
65
66#endif // ELEMENTPROPERTIESWIDGET_H
The AbstractElementPropertiesEditorWidget class This class provide common method for all widget used ...
Definition abstractelementpropertieseditorwidget.h:32
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:56
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition dynamicelementtextitem.h:40
Definition element.h:43
Definition elementpropertieswidget.h:32
void apply() override
ElementPropertiesWidget::apply Apply the new properties by pushing an undo command to the parent proj...
Definition elementpropertieswidget.cpp:186
void setTextsGroup(ElementTextItemGroup *group)
ElementPropertiesWidget::setTextsGroup Convenience function : same as call : ElementPropertiesWidget:...
Definition elementpropertieswidget.cpp:164
void findInPanel()
ElementPropertiesWidget::findInPanel If m_element is a custom element, emit findElementRequired.
Definition elementpropertieswidget.cpp:232
void editElement()
ElementPropertiesWidget::editElement If m_element is a custom element, emit findElementRequired and e...
Definition elementpropertieswidget.cpp:245
QWidget * generalWidget()
ElementPropertiesWidget::generalWidget.
Definition elementpropertieswidget.cpp:359
void reset() override
ElementPropertiesWidget::reset Reset the edited properties.
Definition elementpropertieswidget.cpp:212
QTabWidget * m_tab
Definition elementpropertieswidget.h:61
bool setLiveEdit(bool live_edit) override
PropertiesEditorWidget::setLiveEdit Set the editor in live edit mode. When an editor is in live edit ...
Definition elementpropertieswidget.cpp:217
void updateUi() override
ElementPropertiesWidget::updateUi Update the content of this widget.
Definition elementpropertieswidget.cpp:271
QWidget * m_general_widget
Definition elementpropertieswidget.h:63
void buildGui()
ElementPropertiesWidget::build Build the content of this widget.
Definition elementpropertieswidget.cpp:259
void addGeneralWidget()
ElementPropertiesWidget::addGeneralWidget Add or update the general widget on this tab widget.
Definition elementpropertieswidget.cpp:342
void setDynamicText(DynamicElementTextItem *text)
ElementPropertiesWidget::setDynamicText convenience function: same as call : ElementPropertiesWidget:...
Definition elementpropertieswidget.cpp:138
QList< AbstractElementPropertiesEditorWidget * > m_list_editor
Definition elementpropertieswidget.h:62
Diagram * m_diagram
Definition elementpropertieswidget.h:60
void setElement(Element *element) override
ElementPropertiesWidget::setElement Set element to be the edited element.
Definition elementpropertieswidget.cpp:107
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition elementtextitemgroup.h:36
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47