QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
dynamictextfieldeditor.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 DYNAMICTEXTFIELDEDITOR_H
19#define DYNAMICTEXTFIELDEDITOR_H
20
21#include "../elementitemeditor.h"
22#include "../graphicspart/partdynamictextfield.h"
23
24#ifdef BUILD_WITHOUT_KF5
25#else
26# include <KColorButton>
27#endif
28
29namespace Ui {
31}
32
38 Q_OBJECT
39
40 public:
41 explicit DynamicTextFieldEditor(QETElementEditor *editor, PartDynamicTextField *text_field = nullptr, QWidget *parent = nullptr);
42 ~DynamicTextFieldEditor() override;
43
44 bool setPart(CustomElementPart *part) override;
45 bool setParts(QList <CustomElementPart *>) override;
46 CustomElementPart *currentPart() const override;
47 QList<CustomElementPart*> currentParts() const override;
48 void updateForm() override;
49
50 private:
51 void setupWidget();
52 void fillInfoComboBox();
53 void setUpConnections();
55
56 private slots:
64 void on_m_elmt_info_cb_activated(const QString &arg1);
65 void on_m_text_from_cb_activated(int index);
69
70 void on_m_color_kpb_changed(const QColor &newColor);
71
73
74 private:
75 Ui::DynamicTextFieldEditor *ui;
76 QPointer<PartDynamicTextField> m_text_field;
77 QList<PartDynamicTextField*> m_parts;
78 QList<QMetaObject::Connection> m_connection_list;
79
80 #ifdef BUILD_WITHOUT_KF5
81 #else
82 KColorButton* m_color_kpb = nullptr;
83 #endif
84};
85
86#endif // DYNAMICTEXTFIELDEDITOR_H
The CustomElementPart class This abstract class represents a primitive of the visual representation o...
Definition customelementpart.h:40
The DynamicTextFieldEditor class This class provide a widget used to edit the property of a dynamic t...
Definition dynamictextfieldeditor.h:37
KColorButton * m_color_kpb
Definition dynamictextfieldeditor.h:82
void on_m_y_sb_editingFinished()
Definition dynamictextfieldeditor.cpp:251
void on_m_font_pb_clicked()
Definition dynamictextfieldeditor.cpp:401
QList< QMetaObject::Connection > m_connection_list
Definition dynamictextfieldeditor.h:78
void on_m_frame_cb_clicked()
Definition dynamictextfieldeditor.cpp:294
CustomElementPart * currentPart() const override
DynamicTextFieldEditor::currentPart.
Definition dynamictextfieldeditor.cpp:119
QList< PartDynamicTextField * > m_parts
Definition dynamictextfieldeditor.h:77
void disconnectConnections()
Definition dynamictextfieldeditor.cpp:202
QPointer< PartDynamicTextField > m_text_field
Definition dynamictextfieldeditor.h:76
bool setPart(CustomElementPart *part) override
DynamicTextFieldEditor::setPart Set part as current edited part of this widget.
Definition dynamictextfieldeditor.cpp:66
void on_m_rotation_sb_editingFinished()
Definition dynamictextfieldeditor.cpp:262
void on_m_alignment_pb_clicked()
Definition dynamictextfieldeditor.cpp:385
~DynamicTextFieldEditor() override
Definition dynamictextfieldeditor.cpp:50
void on_m_size_sb_editingFinished()
Definition dynamictextfieldeditor.cpp:283
void on_m_keep_visual_rotation_cb_clicked()
Definition dynamictextfieldeditor.cpp:431
void on_m_composite_text_pb_clicked()
Definition dynamictextfieldeditor.cpp:370
void on_m_user_text_le_editingFinished()
Definition dynamictextfieldeditor.cpp:273
Ui::DynamicTextFieldEditor * ui
Definition dynamictextfieldeditor.h:75
void on_m_width_sb_editingFinished()
Definition dynamictextfieldeditor.cpp:307
void setUpConnections()
Definition dynamictextfieldeditor.cpp:184
void on_m_elmt_info_cb_activated(const QString &arg1)
Definition dynamictextfieldeditor.cpp:320
void on_m_text_from_cb_activated(int index)
Definition dynamictextfieldeditor.cpp:335
void on_m_color_kpb_changed(const QColor &newColor)
Definition dynamictextfieldeditor.cpp:417
void updateForm() override
Definition dynamictextfieldeditor.cpp:133
void setupWidget()
Definition dynamictextfieldeditor.cpp:170
void fillInfoComboBox()
DynamicTextFieldEditor::fillInfoComboBox Fill the combo box "element information".
Definition dynamictextfieldeditor.cpp:216
void on_m_x_sb_editingFinished()
Definition dynamictextfieldeditor.cpp:240
bool setParts(QList< CustomElementPart * >) override
Definition dynamictextfieldeditor.cpp:85
QList< CustomElementPart * > currentParts() const override
Definition dynamictextfieldeditor.cpp:124
Definition elementitemeditor.h:34
The PartDynamicTextField class This class represents an editable dynamic text field which may be used...
Definition partdynamictextfield.h:34
Definition qetelementeditor.h:39
Definition autonumberingdockwidget.h:26