mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-29 14:19:59 +01:00
Mod TextEditor
the ui file is written in the TextEditor class
Add switch for KF5 (QT6)
This commit is contained in:
@@ -22,13 +22,15 @@
|
||||
|
||||
#include <QPointer>
|
||||
#include <QWidget>
|
||||
|
||||
#include <QSpinBox>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
#include <KColorButton>
|
||||
#endif
|
||||
class PartText;
|
||||
|
||||
namespace Ui {
|
||||
class TextEditor;
|
||||
}
|
||||
|
||||
class TextEditor : public ElementItemEditor {
|
||||
Q_OBJECT
|
||||
|
||||
@@ -46,18 +48,27 @@ class TextEditor : public ElementItemEditor {
|
||||
void on_m_font_pb_clicked();
|
||||
void on_m_color_pb_changed(const QColor &newColor);
|
||||
private:
|
||||
void setUpWidget(QWidget* parent = nullptr);
|
||||
void setUpEditConnection();
|
||||
void setUpChangeConnection(QPointer<PartText> part);
|
||||
void disconnectChangeConnection();
|
||||
void disconnectEditConnection();
|
||||
|
||||
private:
|
||||
Ui::TextEditor *ui;
|
||||
|
||||
QPointer <PartText> m_text;
|
||||
QList<PartText*> m_parts;
|
||||
QList <QMetaObject::Connection> m_edit_connection;
|
||||
QList <QMetaObject::Connection> m_change_connection;
|
||||
QSpinBox *m_y_sb;
|
||||
QSpinBox *m_rotation_sb;
|
||||
QSpinBox *m_x_sb;
|
||||
QSpinBox *m_size_sb;
|
||||
QLineEdit *m_line_edit;
|
||||
QPushButton *m_font_pb;
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
KColorButton *m_color_pb;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // TEXTEDITOR_H
|
||||
|
||||
Reference in New Issue
Block a user