QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
dynamicelementtextitemeditor.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 DYNAMICELEMENTTEXTITEMEDITOR_H
19#define DYNAMICELEMENTTEXTITEMEDITOR_H
20
22
25class QStandardItem;
27
28namespace Ui {
30}
31
33{
34 Q_OBJECT
35
36 public:
38 Element *element,
39 QWidget *parent = nullptr);
41
42 void setElement(Element *element) override;
43 QString title() const override {return tr("Textes");}
44 bool setLiveEdit(bool live_edit) override;
45 void apply() override;
48 QUndoCommand *associatedUndo() const override;
49
50 private:
51 void dataEdited();
52
53 private slots:
57 void on_m_tree_view_clicked(const QModelIndex &index);
60
61 private:
62 Ui::DynamicElementTextItemEditor *ui;
64};
65
66#endif // DYNAMICELEMENTTEXTITEMEDITOR_H
The AbstractElementPropertiesEditorWidget class This class provide common method for all widget used ...
Definition abstractelementpropertieseditorwidget.h:32
Definition dynamicelementtextitemeditor.h:33
DynamicElementTextModel * m_model
Definition dynamicelementtextitemeditor.h:63
void apply() override
Definition dynamicelementtextitemeditor.cpp:73
bool setLiveEdit(bool live_edit) override
PropertiesEditorWidget::setLiveEdit Set the editor in live edit mode. When an editor is in live edit ...
Definition dynamicelementtextitemeditor.cpp:67
void on_m_add_text_clicked()
DynamicElementTextItemEditor::on_m_add_text_clicked Add a new dynamic text.
Definition dynamicelementtextitemeditor.cpp:199
void dataEdited()
Definition dynamicelementtextitemeditor.cpp:189
void on_m_tree_view_clicked(const QModelIndex &index)
Definition dynamicelementtextitemeditor.cpp:252
void on_m_remove_selection_clicked()
DynamicElementTextItemEditor::on_m_remove_selection_clicked Remove the selected item.
Definition dynamicelementtextitemeditor.cpp:220
QString title() const override
PropertiesEditorWidget::title.
Definition dynamicelementtextitemeditor.h:43
void setCurrentText(DynamicElementTextItem *text)
DynamicElementTextItemEditor::setCurrentText Expand and select the item for text text.
Definition dynamicelementtextitemeditor.cpp:142
~DynamicElementTextItemEditor() override
Definition dynamicelementtextitemeditor.cpp:46
QUndoCommand * associatedUndo() const override
PropertiesEditorWidget::associatedUndo By default, return a nullptr.
Definition dynamicelementtextitemeditor.cpp:170
Ui::DynamicElementTextItemEditor * ui
Definition dynamicelementtextitemeditor.h:62
void setCurrentGroup(ElementTextItemGroup *group)
DynamicElementTextItemEditor::setCurrentGroup Expand and select the item for group group.
Definition dynamicelementtextitemeditor.cpp:159
void on_m_export_pb_clicked()
Definition dynamicelementtextitemeditor.cpp:260
void on_m_import_pb_clicked()
Definition dynamicelementtextitemeditor.cpp:265
void on_m_add_group_clicked()
DynamicElementTextItemEditor::on_m_add_group_clicked Add a new group.
Definition dynamicelementtextitemeditor.cpp:242
void setElement(Element *element) override
Definition dynamicelementtextitemeditor.cpp:51
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition dynamicelementtextitem.h:40
The DynamicElementTextModel class A model to use with QtView. This model display and can edit the val...
Definition dynamicelementtextmodel.h:38
Definition element.h:43
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition elementtextitemgroup.h:36
Definition autonumberingdockwidget.h:26