diff --git a/about-distro/src/Module.cpp b/about-distro/src/Module.cpp index cc3714dd..c39f4281 100644 --- a/about-distro/src/Module.cpp +++ b/about-distro/src/Module.cpp @@ -55,12 +55,14 @@ Module::Module(QWidget *parent, const QVariantList &args) : KCModule(KcmAboutDistroFactory::componentData(), parent, args), ui(new Ui_Module) { - KAboutData *about = new KAboutData("kcm-about-distro", 0, - ki18n("About Distribution"), - "1.2.0", - KLocalizedString(), - KAboutData::License_GPL_V3, - ki18n("Copyright 2012-2014 Harald Sitter\nCopyright 2021 Ivailo Monev")); + KAboutData *about = new KAboutData( + "kcm-about-distro", 0, + ki18n("About Distribution"), + "1.2.0", + KLocalizedString(), + KAboutData::License_GPL_V3, + ki18n("Copyright 2012-2014 Harald Sitter\nCopyright 2021 Ivailo Monev") + ); about->addAuthor(ki18n("Harald Sitter"), ki18n("Author"), "apachelogger@ubuntu.com"); about->addAuthor(ki18n("Ivailo Monev"), ki18n("Current maintainer"), "xakepa10@gmail.com"); @@ -89,7 +91,7 @@ void Module::load() OSRelease os; QPixmap logoPixmap = KIcon(os.logo).pixmap(128, 128); - ui->logoLabel->setPixmap(logoPixmap); + ui->logoWidget->setPixmap(logoPixmap); ui->nameVersionLabel->setText(os.prettyName); diff --git a/about-distro/src/Module.ui b/about-distro/src/Module.ui index 032f6007..c3e5e253 100644 --- a/about-distro/src/Module.ui +++ b/about-distro/src/Module.ui @@ -289,9 +289,24 @@ - - - {LogoLabel} + + + + 0 + 0 + + + + + 128 + 128 + + + + + 128 + 128 + @@ -316,5 +331,12 @@ + + + KPixmapWidget + QWidget +
kpixmapwidget.h
+
+
diff --git a/ark/part/arkviewer.cpp b/ark/part/arkviewer.cpp index 1490da8f..f47adbee 100644 --- a/ark/part/arkviewer.cpp +++ b/ark/part/arkviewer.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -193,10 +194,10 @@ bool ArkViewer::viewInInternalViewer(const QString& fileName, const KMimeType::P QFrame *header = new QFrame(m_widget); QHBoxLayout *headerLayout = new QHBoxLayout(header); - QLabel *iconLabel = new QLabel(header); - headerLayout->addWidget(iconLabel); - iconLabel->setPixmap(KIconLoader::global()->loadMimeTypeIcon(mimeType->iconName(), KIconLoader::Desktop)); - iconLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); + KPixmapWidget *iconWidget = new KPixmapWidget(header); + headerLayout->addWidget(iconWidget); + iconWidget->setPixmap(KIconLoader::global()->loadMimeTypeIcon(mimeType->iconName(), KIconLoader::Desktop)); + iconWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); KVBox *headerRight = new KVBox(header); headerLayout->addWidget(headerRight); diff --git a/ark/part/infopanel.cpp b/ark/part/infopanel.cpp index 95068f33..c69505bb 100644 --- a/ark/part/infopanel.cpp +++ b/ark/part/infopanel.cpp @@ -60,7 +60,7 @@ InfoPanel::~InfoPanel() void InfoPanel::updateWithDefaults() { - iconLabel->setPixmap(KIconLoader::global()->loadIcon(QLatin1String( "utilities-file-archiver" ), KIconLoader::Desktop, KIconLoader::SizeHuge)); + iconWidget->setPixmap(KIconLoader::global()->loadIcon(QLatin1String( "utilities-file-archiver" ), KIconLoader::Desktop, KIconLoader::SizeHuge)); const QString currentFileName = prettyFileName(); @@ -107,7 +107,7 @@ void InfoPanel::setIndex(const QModelIndex& index) mimeType = KMimeType::findByPath(entry[ FileName ].toString(), 0, true); } - iconLabel->setPixmap(getMimeIcon(mimeType->iconName())); + iconWidget->setPixmap(getMimeIcon(mimeType->iconName())); if (entry[ IsDirectory ].toBool()) { int dirs; int files; @@ -140,7 +140,7 @@ void InfoPanel::setIndexes(const QModelIndexList &list) } else if (list.size() == 1) { setIndex(list[ 0 ]); } else { - iconLabel->setPixmap(KIconLoader::global()->loadIcon(QLatin1String( "utilities-file-archiver" ), KIconLoader::Desktop, KIconLoader::SizeHuge)); + iconWidget->setPixmap(KIconLoader::global()->loadIcon(QLatin1String( "utilities-file-archiver" ), KIconLoader::Desktop, KIconLoader::SizeHuge)); fileName->setText(i18np("One file selected", "%1 files selected", list.size())); quint64 totalSize = 0; foreach(const QModelIndex& index, list) { diff --git a/ark/part/infopanel.ui b/ark/part/infopanel.ui index 03393f4f..70e53d07 100644 --- a/ark/part/infopanel.ui +++ b/ark/part/infopanel.ui @@ -21,10 +21,7 @@ - - - - + Qt::AlignCenter @@ -120,6 +117,11 @@ QLabel
ksqueezedtextlabel.h
+ + KPixmapWidget + QWidget +
kpixmapwidget.h
+
diff --git a/gwenview/app/savebar.cpp b/gwenview/app/savebar.cpp index f03eeb82..97b19ef1 100644 --- a/gwenview/app/savebar.cpp +++ b/gwenview/app/savebar.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Self #include "moc_savebar.cpp" -// Qt +// Katie #include #include #include @@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include #include +#include // Local #include "lib/document/documentfactory.h" @@ -73,13 +74,13 @@ struct SaveBarPrivate void createTooManyChangesFrame() { - mTooManyChangesFrame = new QFrame; + mTooManyChangesFrame = new QFrame(); // Icon - QLabel* iconLabel = new QLabel; + KPixmapWidget* iconWidget = new KPixmapWidget(); QPixmap pix = KIconLoader::global()->loadIcon( "dialog-warning", KIconLoader::Dialog, KIconLoader::SizeSmall); - iconLabel->setPixmap(pix); + iconWidget->setPixmap(pix); // Text label QLabel* textLabel = new QLabel; @@ -92,7 +93,7 @@ struct SaveBarPrivate // Layout QHBoxLayout* layout = new QHBoxLayout(mTooManyChangesFrame); layout->setMargin(0); - layout->addWidget(iconLabel); + layout->addWidget(iconWidget); layout->addWidget(textLabel); layout->addWidget(mSaveAllFullScreenButton); mTooManyChangesFrame->hide(); @@ -237,7 +238,7 @@ SaveBar::SaveBar(QWidget* parent, KActionCollection* actionCollection) d->mSaveBarWidget->setObjectName(QLatin1String("saveBarWidget")); d->applyNormalStyleSheet(); - d->mMessageLabel = new QLabel; + d->mMessageLabel = new QLabel(); d->mMessageLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); d->mUndoButton = createToolButton(); @@ -246,14 +247,14 @@ SaveBar::SaveBar(QWidget* parent, KActionCollection* actionCollection) d->mSaveAsButton = createToolButton(); d->mSaveAllButton = createToolButton(); - d->mActionsLabel = new QLabel; + d->mActionsLabel = new QLabel(); d->mActionsLabel->setAlignment(Qt::AlignCenter); d->mActionsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); d->createTooManyChangesFrame(); // Setup top row - d->mTopRowWidget = new QWidget; + d->mTopRowWidget = new QWidget(); QHBoxLayout* rowLayout = new QHBoxLayout(d->mTopRowWidget); rowLayout->addWidget(d->mMessageLabel); rowLayout->addWidget(d->mUndoButton); @@ -265,7 +266,7 @@ SaveBar::SaveBar(QWidget* parent, KActionCollection* actionCollection) rowLayout->setMargin(0); // Setup bottom row - QHBoxLayout* bottomRowLayout = new QHBoxLayout; + QHBoxLayout* bottomRowLayout = new QHBoxLayout(); bottomRowLayout->addStretch(); bottomRowLayout->addWidget(d->mTooManyChangesFrame); bottomRowLayout->addStretch(); diff --git a/kdeplasma-addons/applets/icontasks/tooltips/tooltip.cpp b/kdeplasma-addons/applets/icontasks/tooltips/tooltip.cpp index cd7b5689..0992cef2 100644 --- a/kdeplasma-addons/applets/icontasks/tooltips/tooltip.cpp +++ b/kdeplasma-addons/applets/icontasks/tooltips/tooltip.cpp @@ -26,26 +26,25 @@ #include #include #include -#include +#include #include #include #include #include -#include #include #ifdef Q_WS_X11 #include #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include - +#include #include #include #include @@ -213,7 +212,7 @@ class ToolTipPrivate public: ToolTipPrivate() : text(0), - imageLabel(0), + imageWidget(0), preview(0), direction(Plasma::Up), autohide(true), @@ -221,7 +220,7 @@ public: { } TipTextWidget *text; - QLabel *imageLabel; + KPixmapWidget *imageWidget; WindowPreview *preview; FrameSvg *background; QWeakPointer source; @@ -246,8 +245,8 @@ ToolTip::ToolTip(QWidget *parent) setWindowFlags(Qt::ToolTip); d->preview = new WindowPreview(this); d->text = new TipTextWidget(this); - d->imageLabel = new QLabel(this); - d->imageLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft); + d->imageWidget = new KPixmapWidget(this); + d->imageWidget->setAlignment(Qt::AlignTop | Qt::AlignLeft); d->animation = new QPropertyAnimation(this, "pos", this); d->animation->setEasingCurve(QEasingCurve::InOutQuad); @@ -266,8 +265,8 @@ ToolTip::ToolTip(QWidget *parent) previewHBoxLayout->addWidget(d->preview); QHBoxLayout *iconTextHBoxLayout = new QHBoxLayout; - iconTextHBoxLayout->addWidget(d->imageLabel); - iconTextHBoxLayout->setAlignment(d->imageLabel, Qt::AlignCenter); + iconTextHBoxLayout->addWidget(d->imageWidget); + iconTextHBoxLayout->setAlignment(d->imageWidget, Qt::AlignCenter); iconTextHBoxLayout->addWidget(d->text); iconTextHBoxLayout->setAlignment(d->text, Qt::AlignLeft | Qt::AlignVCenter); iconTextHBoxLayout->setStretchFactor(d->text, 1); @@ -394,12 +393,12 @@ void ToolTip::setContent(QObject *tipper, const ToolTipContent &data) if (data.windowsToPreview().size()) { d->text->setVisible(false); - d->imageLabel->setVisible(false); + d->imageWidget->setVisible(false); } else { d->text->setVisible(true); - d->imageLabel->setVisible(true); + d->imageWidget->setVisible(true); d->text->setContent(data); - d->imageLabel->setPixmap(data.image()); + d->imageWidget->setPixmap(data.image()); } if (!data.playState().isEmpty()) { diff --git a/krdc/mainwindow.cpp b/krdc/mainwindow.cpp index 5f535c08..f9323315 100644 --- a/krdc/mainwindow.cpp +++ b/krdc/mainwindow.cpp @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -1036,12 +1037,12 @@ QWidget* MainWindow::newConnectionWidget() QLabel *headerLabel = new QLabel(m_newConnectionWidget); headerLabel->setText(i18n("

KDE Remote Desktop Client


Enter or select the address of the desktop you would like to connect to.")); - QLabel *headerIconLabel = new QLabel(m_newConnectionWidget); - headerIconLabel->setPixmap(KIcon("krdc").pixmap(80)); + KPixmapWidget *headerIconWidget = new KPixmapWidget(m_newConnectionWidget); + headerIconWidget->setPixmap(KIcon("krdc").pixmap(80)); QHBoxLayout *headerLayout = new QHBoxLayout; headerLayout->addWidget(headerLabel, 1, Qt::AlignTop); - headerLayout->addWidget(headerIconLabel); + headerLayout->addWidget(headerIconWidget); startLayout->addLayout(headerLayout); QSortFilterProxyModel *remoteDesktopsModelProxy = new QSortFilterProxyModel(this); diff --git a/krfb/krfb/connectiondialog.cpp b/krfb/krfb/connectiondialog.cpp index 7f7ae022..277c7e5e 100644 --- a/krfb/krfb/connectiondialog.cpp +++ b/krfb/krfb/connectiondialog.cpp @@ -42,7 +42,7 @@ ConnectionDialog::ConnectionDialog(QWidget *parent) m_connectWidget = new QWidget(this); m_ui.setupUi(m_connectWidget); - m_ui.pixmapLabel->setPixmap(KIcon("krfb").pixmap(128)); + m_ui.pixmapWidget->setPixmap(KIcon("krfb").pixmap(128)); KGuiItem accept = KStandardGuiItem::ok(); accept.setText(i18n("Accept Connection")); diff --git a/krfb/krfb/connectionwidget.ui b/krfb/krfb/connectionwidget.ui index c2718523..63fa90dc 100644 --- a/krfb/krfb/connectionwidget.ui +++ b/krfb/krfb/connectionwidget.ui @@ -11,7 +11,7 @@ - + 0 @@ -144,5 +144,12 @@
+ + + KPixmapWidget + QWidget +
kpixmapwidget.h
+
+
diff --git a/krfb/krfb/invitewidget.ui b/krfb/krfb/invitewidget.ui deleted file mode 100644 index 874aac8a..00000000 --- a/krfb/krfb/invitewidget.ui +++ /dev/null @@ -1,170 +0,0 @@ - - InviteWidget - - - - 0 - 0 - 603 - 364 - - - - - - - - 0 - 0 - - - - - 128 - 128 - - - - - - - - - - - 75 - true - - - - Welcome to KDE Desktop Sharing - - - false - - - - - - - KDE Desktop Sharing allows you to invite somebody at a remote location to watch and possibly control your desktop. <a href="whatsthis">More about invitations...</a> - - - Qt::RichText - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 215 - 101 - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 90 - 26 - - - - - - - - - - - - - Create a new invitation and display the connection data. Use this option if you want to invite somebody personally, for example, to give the connection data over the phone. - - - Create &Personal Invitation... - - - - - - - This button will start your email application with a pre-configured text that explains to the recipient how to connect to your computer. - - - Invite via &Email... - - - - - - - &Manage Invitations (%1)... - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 90 - 26 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 24 - - - - - - - - - - diff --git a/krfb/krfb/mainwidget.ui b/krfb/krfb/mainwidget.ui index 52eac7e1..0f2cc7e2 100644 --- a/krfb/krfb/mainwidget.ui +++ b/krfb/krfb/mainwidget.ui @@ -30,7 +30,7 @@ - + 128 @@ -43,9 +43,6 @@ 128 - - - @@ -491,6 +488,11 @@ QPushButton
kpushbutton.h
+ + KPixmapWidget + QWidget +
kpixmapwidget.h
+
enableSharingCheckBox diff --git a/krfb/krfb/mainwindow.cpp b/krfb/krfb/mainwindow.cpp index 112350b2..e0786bb9 100644 --- a/krfb/krfb/mainwindow.cpp +++ b/krfb/krfb/mainwindow.cpp @@ -58,7 +58,7 @@ MainWindow::MainWindow(QWidget *parent) QWidget *mainWidget = new QWidget; m_ui.setupUi(mainWidget); - m_ui.krfbIconLabel->setPixmap(KIcon("krfb").pixmap(128)); + m_ui.krfbIconWidget->setPixmap(KIcon("krfb").pixmap(128)); m_ui.enableUnattendedCheckBox->setChecked( InvitationsRfbServer::instance->allowUnattendedAccess()); diff --git a/okular/conf/dlgperformance.cpp b/okular/conf/dlgperformance.cpp index 7ab0307a..47643505 100644 --- a/okular/conf/dlgperformance.cpp +++ b/okular/conf/dlgperformance.cpp @@ -25,8 +25,8 @@ DlgPerformance::DlgPerformance( QWidget * parent ) labelFont.setBold( true ); m_dlg->descLabel->setFont( labelFont ); - m_dlg->cpuLabel->setPixmap( BarIcon( "cpu", 32 ) ); -// m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available + m_dlg->cpuWidget->setPixmap( BarIcon( "cpu", 32 ) ); + // m_dlg->memoryWidget->setPixmap( BarIcon( "memory", 32 ) ); // TODO: enable again when proper icon is available connect( m_dlg->kcfg_MemoryLevel, SIGNAL(changed(int)), this, SLOT(radioGroup_changed(int)) ); } diff --git a/okular/conf/dlgperformancebase.ui b/okular/conf/dlgperformancebase.ui index 8db75e90..18c438e1 100644 --- a/okular/conf/dlgperformancebase.ui +++ b/okular/conf/dlgperformancebase.ui @@ -63,7 +63,7 @@ 0 - + 0 @@ -162,7 +162,7 @@ 0 - + 0 @@ -265,6 +265,11 @@
kbuttongroup.h
1 + + KPixmapWidget + QWidget +
kpixmapwidget.h
+
kiconloader.h diff --git a/okular/ui/propertiesdialog.cpp b/okular/ui/propertiesdialog.cpp index c76f80d5..329e18c2 100644 --- a/okular/ui/propertiesdialog.cpp +++ b/okular/ui/propertiesdialog.cpp @@ -9,7 +9,7 @@ #include "propertiesdialog.h" -// qt/kde includes +// Katie/KDE includes #include #include #include @@ -30,6 +30,7 @@ #include #include #include +#include // local includes #include "core/document.h" @@ -118,9 +119,9 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc) KSqueezedTextLabel *squeezed; if (!mimeType.isNull()) { /// retrieve icon and place it in a QLabel - QLabel *pixmapLabel = new QLabel( value ); - hboxLayout->addWidget( pixmapLabel, 0 ); - pixmapLabel->setPixmap( KIconLoader::global()->loadMimeTypeIcon( mimeType->iconName(), KIconLoader::Small ) ); + KPixmapWidget *pixmapWidget = new KPixmapWidget( value ); + hboxLayout->addWidget( pixmapWidget, 0 ); + pixmapWidget->setPixmap( KIconLoader::global()->loadMimeTypeIcon( mimeType->iconName(), KIconLoader::Small ) ); /// mime type's name and label squeezed = new KSqueezedTextLabel( i18nc( "mimetype information, example: \"PDF Document (application/pdf)\"", "%1 (%2)", mimeType->comment(), valueString ), value ); } else {