From 550d2a0a15c9403894448ab83863e71bbac2d349 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Aug 2018 14:24:58 +0200 Subject: uic: Fix pixmap functions for QIcon Task-number: QTBUG-8563 Change-Id: I69b16ac2327fee6dd6f26845bdda60ad4dde56fa Reviewed-by: Jarek Kobus --- tests/auto/tools/uic/baseline/pixmapfunction.ui | 47 ++++++++++++++ tests/auto/tools/uic/baseline/pixmapfunction.ui.h | 74 +++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 tests/auto/tools/uic/baseline/pixmapfunction.ui create mode 100644 tests/auto/tools/uic/baseline/pixmapfunction.ui.h (limited to 'tests/auto/tools/uic') diff --git a/tests/auto/tools/uic/baseline/pixmapfunction.ui b/tests/auto/tools/uic/baseline/pixmapfunction.ui new file mode 100644 index 0000000000..8edafc7248 --- /dev/null +++ b/tests/auto/tools/uic/baseline/pixmapfunction.ui @@ -0,0 +1,47 @@ + + + Form + + + + 0 + 0 + 149 + 112 + + + + Form + + + + + + + + + labelPixmap + + + + + + + PushButton + + + + buttonIconNormalOff + buttonIconNormalOn + buttonIconDisabledOff + buttonIconDisabledOn + + + + + + + pixmapFunction + + + diff --git a/tests/auto/tools/uic/baseline/pixmapfunction.ui.h b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h new file mode 100644 index 0000000000..1644380c15 --- /dev/null +++ b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h @@ -0,0 +1,74 @@ +/******************************************************************************** +** Form generated from reading UI file 'pixmapfunction.ui' +** +** Created by: Qt User Interface Compiler version 5.12.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef PIXMAPFUNCTION_H +#define PIXMAPFUNCTION_H + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Form +{ +public: + QVBoxLayout *verticalLayout; + QLabel *label; + QPushButton *pushButton; + + void setupUi(QWidget *Form) + { + if (Form->objectName().isEmpty()) + Form->setObjectName(QString::fromUtf8("Form")); + Form->resize(149, 112); + verticalLayout = new QVBoxLayout(Form); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + label = new QLabel(Form); + label->setObjectName(QString::fromUtf8("label")); + label->setPixmap(QPixmap(pixmapFunction("labelPixmap"))); + + verticalLayout->addWidget(label); + + pushButton = new QPushButton(Form); + pushButton->setObjectName(QString::fromUtf8("pushButton")); + QIcon icon; + icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOff")), QIcon::Normal, QIcon::Off); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOn")), QIcon::Normal, QIcon::On); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOff")), QIcon::Disabled, QIcon::Off); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOn")), QIcon::Disabled, QIcon::On); + pushButton->setIcon(icon); + + verticalLayout->addWidget(pushButton); + + + retranslateUi(Form); + + QMetaObject::connectSlotsByName(Form); + } // setupUi + + void retranslateUi(QWidget *Form) + { + Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); + label->setText(QString()); + pushButton->setText(QApplication::translate("Form", "PushButton", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class Form: public Ui_Form {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // PIXMAPFUNCTION_H -- cgit v1.2.3