QElectroTech  0.70
dynamictextfieldeditor.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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 "partdynamictextfield.h"
23 
24 namespace Ui {
26 }
27 
33 {
34  Q_OBJECT
35 
36  public:
37  explicit DynamicTextFieldEditor(QETElementEditor *editor, PartDynamicTextField *text_field = nullptr, QWidget *parent = nullptr);
38  ~DynamicTextFieldEditor() override;
39 
40  bool setPart(CustomElementPart *part) override;
41  CustomElementPart *currentPart() const override;
42  void updateForm() override;
43 
44  private:
45  void fillInfoComboBox();
46 
47  private slots:
53  void on_m_frame_cb_clicked();
55  void on_m_elmt_info_cb_activated(const QString &arg1);
56  void on_m_text_from_cb_activated(int index);
59  void on_m_font_pb_clicked();
60 
61  void on_m_color_kpb_changed(const QColor &newColor);
62 
63  private:
64  Ui::DynamicTextFieldEditor *ui;
65  QPointer<PartDynamicTextField> m_text_field;
66  QList<QMetaObject::Connection> m_connection_list;
67 };
68 
69 #endif // DYNAMICTEXTFIELDEDITOR_H
void on_m_color_kpb_changed(const QColor &newColor)
void on_m_elmt_info_cb_activated(const QString &arg1)
DynamicTextFieldEditor(QETElementEditor *editor, PartDynamicTextField *text_field=nullptr, QWidget *parent=nullptr)
The DynamicTextFieldEditor class This class provide a widget used to edit the property of a dynamic t...
The PartDynamicTextField class This class represents an editable dynamic text field which may be used...
void fillInfoComboBox()
DynamicTextFieldEditor::fillInfoComboBox Fill the combo box "element information".
Ui::DynamicTextFieldEditor * ui
QList< QMetaObject::Connection > m_connection_list
bool setPart(CustomElementPart *part) override
DynamicTextFieldEditor::setPart Set as current edited part of this widget.
void on_m_text_from_cb_activated(int index)
QPointer< PartDynamicTextField > m_text_field
CustomElementPart * currentPart() const override
DynamicTextFieldEditor::currentPart.