mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 09:40:52 +01:00
ElementEditor: texteditor.h improve code style
This commit is contained in:
committed by
Laurent Trinques
parent
b53c083d0a
commit
23c43e72b5
@@ -29,9 +29,8 @@ namespace Ui {
|
|||||||
class TextEditor;
|
class TextEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TextEditor : public ElementItemEditor
|
class TextEditor : public ElementItemEditor {
|
||||||
{
|
Q_OBJECT
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TextEditor(QETElementEditor *editor, PartText *text = nullptr, QWidget *parent = nullptr);
|
explicit TextEditor(QETElementEditor *editor, PartText *text = nullptr, QWidget *parent = nullptr);
|
||||||
@@ -39,26 +38,26 @@ class TextEditor : public ElementItemEditor
|
|||||||
|
|
||||||
void updateForm() override;
|
void updateForm() override;
|
||||||
bool setPart(CustomElementPart *part) override;
|
bool setPart(CustomElementPart *part) override;
|
||||||
bool setParts(QList <CustomElementPart *>) override;
|
bool setParts(QList <CustomElementPart *>) override;
|
||||||
CustomElementPart *currentPart() const override;
|
CustomElementPart *currentPart() const override;
|
||||||
QList<CustomElementPart*> currentParts() const override;
|
QList<CustomElementPart*> currentParts() const override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_m_font_pb_clicked();
|
void on_m_font_pb_clicked();
|
||||||
void on_m_color_pb_changed(const QColor &newColor);
|
void on_m_color_pb_changed(const QColor &newColor);
|
||||||
private:
|
private:
|
||||||
void setUpEditConnection();
|
void setUpEditConnection();
|
||||||
void setUpChangeConnection(QPointer<PartText> part);
|
void setUpChangeConnection(QPointer<PartText> part);
|
||||||
void disconnectChangeConnection();
|
void disconnectChangeConnection();
|
||||||
void disconnectEditConnection();
|
void disconnectEditConnection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::TextEditor *ui;
|
Ui::TextEditor *ui;
|
||||||
|
|
||||||
QPointer <PartText> m_text;
|
QPointer <PartText> m_text;
|
||||||
QList<PartText*> m_parts;
|
QList<PartText*> m_parts;
|
||||||
QList <QMetaObject::Connection> m_edit_connection;
|
QList <QMetaObject::Connection> m_edit_connection;
|
||||||
QList <QMetaObject::Connection> m_change_connection;
|
QList <QMetaObject::Connection> m_change_connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TEXTEDITOR_H
|
#endif // TEXTEDITOR_H
|
||||||
|
|||||||
Reference in New Issue
Block a user