QElectroTech  0.70
inditextpropertieswidget.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 INDITEXTPROPERTIESWIDGET_H
19 #define INDITEXTPROPERTIESWIDGET_H
20 
22 #include <QPointer>
24 
25 namespace Ui {
27 }
28 
34 {
35  Q_OBJECT
36 
37  public:
38  IndiTextPropertiesWidget(IndependentTextItem *text = nullptr, QWidget *parent = nullptr);
39  IndiTextPropertiesWidget(QList <IndependentTextItem *> text_list, QWidget *parent = nullptr);
40  ~IndiTextPropertiesWidget() override;
41  void setText (IndependentTextItem *text);
42  void setText (QList<IndependentTextItem *> text_list);
43 
44  void apply() override;
45  bool setLiveEdit(bool live_edit) override;
46  QUndoCommand* associatedUndo() const override;
47 
48  private slots:
51  void on_m_font_pb_clicked();
52 
53  private:
54  void setUpEditConnection();
55  void updateUi() override;
56 
57  private:
58  Ui::IndiTextPropertiesWidget *ui;
59  QPointer <IndependentTextItem> m_text;
60  QList <QPointer<IndependentTextItem>> m_text_list;
61  QList <QMetaObject::Connection> m_connect_list,
64  bool m_font_is_selected = false;
65 };
66 
67 #endif // INDITEXTPROPERTIESWIDGET_H
QPointer< IndependentTextItem > m_text
void updateUi() override
IndiTextPropertiesWidget::updateUi.
The PropertiesEditorWidget class This class extend QWidget method for have common way to edit propert...
bool setLiveEdit(bool live_edit) override
IndiTextPropertiesWidget::setLiveEdit.
Ui::IndiTextPropertiesWidget * ui
QList< QMetaObject::Connection > m_connect_list
IndiTextPropertiesWidget(IndependentTextItem *text=nullptr, QWidget *parent=nullptr)
IndiTextPropertiesWidget::IndiTextPropertiesWidget.
void setUpEditConnection()
IndiTextPropertiesWidget::setUpEditConnection Disconnect the previous connection, and reconnect the c...
void setText(IndependentTextItem *text)
IndiTextPropertiesWidget::setText.
QList< QPointer< IndependentTextItem > > m_text_list
QList< QMetaObject::Connection > m_edit_connection
void apply() override
IndiTextPropertiesWidget::apply Apply the current edition through a QUndoCommand pushed to the undo s...
~IndiTextPropertiesWidget() override
IndiTextPropertiesWidget::~IndiTextPropertiesWidget.
The IndiTextPropertiesWidget class This widget is used to edit the properties of one or several indep...
QUndoCommand * associatedUndo() const override
IndiTextPropertiesWidget::associatedUndo.
void on_m_advanced_editor_pb_clicked()
IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked.