QElectroTech  0.8-dev
elementpropertieseditorwidget.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 ELEMENTPROPERTIESEDITORWIDGET_H
19 #define ELEMENTPROPERTIESEDITORWIDGET_H
20 
21 #include <QDialog>
22 #include <QAbstractButton>
23 #include "diagramcontext.h"
24 
25 namespace Ui {
27 }
28 
34 class ElementPropertiesEditorWidget : public QDialog
35 {
36  Q_OBJECT
37 
38  //METHODS
39  public:
40  explicit ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &kind_info, DiagramContext &elmt_info, QWidget *parent = nullptr);
42 
43  void upDateInterface();
44 
45  private:
46  void setUpInterface();
47  void updateTree();
48  void populateTree();
49 
50  //SLOTS
51  private slots:
54 
55  //ATTRIBUTES
56  private:
57  Ui::ElementPropertiesEditorWidget *ui;
58  QString &m_basic_type;
61 };
62 
63 #endif // ELEMENTPROPERTIESEDITORWIDGET_H
ElementPropertiesEditorWidget::populateTree
void populateTree()
ElementPropertiesEditorWidget::populateTree Create QTreeWidgetItem of the tree widget and populate it...
Definition: elementpropertieseditorwidget.cpp:175
ElementPropertiesEditorWidget::ui
Ui::ElementPropertiesEditorWidget * ui
Definition: elementpropertieseditorwidget.h:57
EditorDelegate::createEditor
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: elementpropertieseditorwidget.cpp:36
ElementPropertiesEditorWidget::updateTree
void updateTree()
Definition: elementpropertieseditorwidget.cpp:152
elementpropertieseditorwidget.h
qetapp.h
EditorDelegate
The EditorDelegate class This delegate is only use for disable the edition of the first column of the...
Definition: elementpropertieseditorwidget.cpp:30
ElementPropertiesEditorWidget::upDateInterface
void upDateInterface()
ElementPropertiesEditorWidget::upDateInterface Update the interface with the curent value.
Definition: elementpropertieseditorwidget.cpp:87
QETApp::elementTranslatedInfoKey
static QString elementTranslatedInfoKey(const QString &)
ElementsProperties::translatedInfo Return the translated information key given by info If info don't ...
Definition: qetapp.cpp:400
ElementPropertiesEditorWidget::m_elmt_info
DiagramContext & m_elmt_info
Definition: elementpropertieseditorwidget.h:60
EditorDelegate::EditorDelegate
EditorDelegate(QObject *parent)
Definition: elementpropertieseditorwidget.cpp:32
ElementPropertiesEditorWidget::on_m_base_type_cb_currentIndexChanged
void on_m_base_type_cb_currentIndexChanged(int index)
ElementPropertiesEditorWidget::on_m_base_type_cb_currentIndexChanged.
Definition: elementpropertieseditorwidget.cpp:236
DiagramContext::value
QVariant value(const QString &key) const
Definition: diagramcontext.cpp:100
ElementPropertiesEditorWidget::on_m_buttonBox_accepted
void on_m_buttonBox_accepted()
ElementPropertiesEditorWidget::on_m_buttonBox_accepted Action on button accepted : the new informatio...
Definition: elementpropertieseditorwidget.cpp:197
Ui
Definition: autonumberingdockwidget.h:25
ElementPropertiesEditorWidget::m_basic_type
QString & m_basic_type
Definition: elementpropertieseditorwidget.h:58
ElementPropertiesEditorWidget
The ElementPropertiesEditorWidget class This class provide a dialog for edit various property of elem...
Definition: elementpropertieseditorwidget.h:35
ElementPropertiesEditorWidget::setUpInterface
void setUpInterface()
ElementPropertiesEditorWidget::setUpInterface.
Definition: elementpropertieseditorwidget.cpp:115
diagramcontext.h
ElementPropertiesEditorWidget::m_kind_info
DiagramContext & m_kind_info
Definition: elementpropertieseditorwidget.h:59
ElementPropertiesEditorWidget::ElementPropertiesEditorWidget
ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &kind_info, DiagramContext &elmt_info, QWidget *parent=nullptr)
ElementPropertiesEditorWidget::ElementPropertiesEditorWidget Default constructor.
Definition: elementpropertieseditorwidget.cpp:58
DiagramContext::addValue
bool addValue(const QString &, const QVariant &, bool show=true)
Definition: diagramcontext.cpp:91
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
DiagramContext
Definition: diagramcontext.h:56
ElementPropertiesEditorWidget::~ElementPropertiesEditorWidget
~ElementPropertiesEditorWidget() override
ElementPropertiesEditorWidget::~ElementPropertiesEditorWidget Default destructor.
Definition: elementpropertieseditorwidget.cpp:78