mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-16 11:44:13 +02:00
In order to migrate to Qt6 all options for KF6 were added:
a) using a system provided KF6 b) downloading and compiling KF6 c) using the vendored-in re-creation of the functionality The behaviour for both Qt5 and Qt6 is steered with the same two variables which were renamed to become version agnostic: a) BUILD_WITH_KF=ON BUILD_KF=OFF b) BUILD_WITH_KF=ON BUILD_KF=ON c) BUILD_WITH_KF=OFF The version is automatically derived from the chosen Qt major version.
This commit is contained in:
@@ -141,7 +141,7 @@ void DynamicTextFieldEditor::updateForm()
|
||||
ui -> m_size_sb -> setValue(m_text_field.data() -> font().pointSize());
|
||||
ui->m_keep_visual_rotation_cb->setChecked(m_text_field.data()->keepVisualRotation());
|
||||
ui->m_rotation_point_center_cb->setChecked(m_text_field.data()->rotationPointCenter());
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
m_color_kpb -> setColor(m_text_field.data() -> color());
|
||||
#endif
|
||||
@@ -170,7 +170,7 @@ void DynamicTextFieldEditor::updateForm()
|
||||
|
||||
void DynamicTextFieldEditor::setupWidget()
|
||||
{
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
m_color_kpb = new KColorButton(this);
|
||||
m_color_kpb->setObjectName(QString::fromUtf8("m_color_kpb"));
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "../elementitemeditor.h"
|
||||
#include "../graphicspart/partdynamictextfield.h"
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
# include <KColorButton>
|
||||
#endif
|
||||
@@ -79,7 +79,7 @@ class DynamicTextFieldEditor : public ElementItemEditor {
|
||||
QList<PartDynamicTextField*> m_parts;
|
||||
QList<QMetaObject::Connection> m_connection_list;
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
KColorButton* m_color_kpb = nullptr;
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ TerminalEditor::TerminalEditor(QETElementEditor *editor, QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
m_color_pb = new QPushButton(this);
|
||||
m_color_pb->setMinimumSize(40, 24);
|
||||
connect(m_color_pb, &QPushButton::clicked, this, &TerminalEditor::labelColorClicked);
|
||||
@@ -93,7 +93,7 @@ void TerminalEditor::updateForm()
|
||||
ui->m_label_rotation_sb->setValue(static_cast<int>(m_part->labelRotation()));
|
||||
ui->m_label_frame_cb->setChecked(m_part->labelFrame());
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
QPixmap px(16, 16);
|
||||
px.fill(m_part->labelColor());
|
||||
m_color_pb->setIcon(QIcon(px));
|
||||
@@ -410,7 +410,7 @@ void TerminalEditor::labelColorClicked()
|
||||
if (m_locked) return;
|
||||
m_locked = true;
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
QColor new_color = QColorDialog::getColor(m_part->labelColor(), this);
|
||||
if (new_color.isValid() && m_part->labelColor() != new_color) {
|
||||
auto undo = new QPropertyUndoCommand(m_part, "label_color", m_part->labelColor(), new_color);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <QWidget>
|
||||
#include "../elementitemeditor.h"
|
||||
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#include <QPushButton>
|
||||
#else
|
||||
#include <KColorButton>
|
||||
@@ -78,7 +78,7 @@ class TerminalEditor : public ElementItemEditor
|
||||
m_change_connections;
|
||||
PartTerminal *m_part = nullptr;
|
||||
bool m_locked = false;
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
QPushButton *m_color_pb;
|
||||
#else
|
||||
KColorButton *m_color_pb;
|
||||
|
||||
@@ -63,7 +63,7 @@ void TextEditor::updateForm()
|
||||
m_rotation_sb -> setValue(m_text -> rotation());
|
||||
m_size_sb -> setValue(m_text -> font().pointSize());
|
||||
m_font_pb -> setText(m_text -> font().family());
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
m_color_pb -> setColor(m_text -> defaultTextColor());
|
||||
#endif
|
||||
@@ -346,7 +346,7 @@ void TextEditor::setUpWidget(QWidget *parent)
|
||||
m_line_edit->setPlaceholderText(tr("Entrer votre texte ici"));
|
||||
|
||||
gridLayout->addWidget(m_line_edit, 0, 0, 1, 6);
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
m_color_pb = new KColorButton(parent);
|
||||
m_color_pb->setObjectName(QString::fromUtf8("m_color_pb"));
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QSpinBox>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
#include <KColorButton>
|
||||
#endif
|
||||
@@ -65,7 +65,7 @@ class TextEditor : public ElementItemEditor {
|
||||
QSpinBox *m_size_sb;
|
||||
QLineEdit *m_line_edit;
|
||||
QPushButton *m_font_pb;
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#ifdef BUILD_WITHOUT_KF
|
||||
#else
|
||||
KColorButton *m_color_pb;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user