mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
generic: replace QLabel with the new KPixmapWidget class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8f5db4efad
commit
bef4cece61
16 changed files with 107 additions and 234 deletions
|
@ -55,12 +55,14 @@ Module::Module(QWidget *parent, const QVariantList &args) :
|
||||||
KCModule(KcmAboutDistroFactory::componentData(), parent, args),
|
KCModule(KcmAboutDistroFactory::componentData(), parent, args),
|
||||||
ui(new Ui_Module)
|
ui(new Ui_Module)
|
||||||
{
|
{
|
||||||
KAboutData *about = new KAboutData("kcm-about-distro", 0,
|
KAboutData *about = new KAboutData(
|
||||||
|
"kcm-about-distro", 0,
|
||||||
ki18n("About Distribution"),
|
ki18n("About Distribution"),
|
||||||
"1.2.0",
|
"1.2.0",
|
||||||
KLocalizedString(),
|
KLocalizedString(),
|
||||||
KAboutData::License_GPL_V3,
|
KAboutData::License_GPL_V3,
|
||||||
ki18n("Copyright 2012-2014 Harald Sitter\nCopyright 2021 Ivailo Monev"));
|
ki18n("Copyright 2012-2014 Harald Sitter\nCopyright 2021 Ivailo Monev")
|
||||||
|
);
|
||||||
|
|
||||||
about->addAuthor(ki18n("Harald Sitter"), ki18n("Author"), "apachelogger@ubuntu.com");
|
about->addAuthor(ki18n("Harald Sitter"), ki18n("Author"), "apachelogger@ubuntu.com");
|
||||||
about->addAuthor(ki18n("Ivailo Monev"), ki18n("Current maintainer"), "xakepa10@gmail.com");
|
about->addAuthor(ki18n("Ivailo Monev"), ki18n("Current maintainer"), "xakepa10@gmail.com");
|
||||||
|
@ -89,7 +91,7 @@ void Module::load()
|
||||||
OSRelease os;
|
OSRelease os;
|
||||||
|
|
||||||
QPixmap logoPixmap = KIcon(os.logo).pixmap(128, 128);
|
QPixmap logoPixmap = KIcon(os.logo).pixmap(128, 128);
|
||||||
ui->logoLabel->setPixmap(logoPixmap);
|
ui->logoWidget->setPixmap(logoPixmap);
|
||||||
|
|
||||||
ui->nameVersionLabel->setText(os.prettyName);
|
ui->nameVersionLabel->setText(os.prettyName);
|
||||||
|
|
||||||
|
|
|
@ -289,9 +289,24 @@
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="logoLabel">
|
<widget class="KPixmapWidget" name="logoWidget">
|
||||||
<property name="text">
|
<property name="sizePolicy">
|
||||||
<string notr="true">{LogoLabel}</string>
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>128</width>
|
||||||
|
<height>128</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>128</width>
|
||||||
|
<height>128</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -316,5 +331,12 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>KPixmapWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>kpixmapwidget.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include <KPushButton>
|
#include <KPushButton>
|
||||||
#include <KRun>
|
#include <KRun>
|
||||||
#include <KIO/NetAccess>
|
#include <KIO/NetAccess>
|
||||||
|
#include <KPixmapWidget>
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
@ -193,10 +194,10 @@ bool ArkViewer::viewInInternalViewer(const QString& fileName, const KMimeType::P
|
||||||
QFrame *header = new QFrame(m_widget);
|
QFrame *header = new QFrame(m_widget);
|
||||||
QHBoxLayout *headerLayout = new QHBoxLayout(header);
|
QHBoxLayout *headerLayout = new QHBoxLayout(header);
|
||||||
|
|
||||||
QLabel *iconLabel = new QLabel(header);
|
KPixmapWidget *iconWidget = new KPixmapWidget(header);
|
||||||
headerLayout->addWidget(iconLabel);
|
headerLayout->addWidget(iconWidget);
|
||||||
iconLabel->setPixmap(KIconLoader::global()->loadMimeTypeIcon(mimeType->iconName(), KIconLoader::Desktop));
|
iconWidget->setPixmap(KIconLoader::global()->loadMimeTypeIcon(mimeType->iconName(), KIconLoader::Desktop));
|
||||||
iconLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
iconWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
||||||
|
|
||||||
KVBox *headerRight = new KVBox(header);
|
KVBox *headerRight = new KVBox(header);
|
||||||
headerLayout->addWidget(headerRight);
|
headerLayout->addWidget(headerRight);
|
||||||
|
|
|
@ -60,7 +60,7 @@ InfoPanel::~InfoPanel()
|
||||||
|
|
||||||
void InfoPanel::updateWithDefaults()
|
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();
|
const QString currentFileName = prettyFileName();
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ void InfoPanel::setIndex(const QModelIndex& index)
|
||||||
mimeType = KMimeType::findByPath(entry[ FileName ].toString(), 0, true);
|
mimeType = KMimeType::findByPath(entry[ FileName ].toString(), 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
iconLabel->setPixmap(getMimeIcon(mimeType->iconName()));
|
iconWidget->setPixmap(getMimeIcon(mimeType->iconName()));
|
||||||
if (entry[ IsDirectory ].toBool()) {
|
if (entry[ IsDirectory ].toBool()) {
|
||||||
int dirs;
|
int dirs;
|
||||||
int files;
|
int files;
|
||||||
|
@ -140,7 +140,7 @@ void InfoPanel::setIndexes(const QModelIndexList &list)
|
||||||
} else if (list.size() == 1) {
|
} else if (list.size() == 1) {
|
||||||
setIndex(list[ 0 ]);
|
setIndex(list[ 0 ]);
|
||||||
} else {
|
} 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()));
|
fileName->setText(i18np("One file selected", "%1 files selected", list.size()));
|
||||||
quint64 totalSize = 0;
|
quint64 totalSize = 0;
|
||||||
foreach(const QModelIndex& index, list) {
|
foreach(const QModelIndex& index, list) {
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="iconLabel" >
|
<widget class="KPixmapWidget" name="iconWidget" >
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="alignment" >
|
<property name="alignment" >
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
|
@ -120,6 +117,11 @@
|
||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
<header>ksqueezedtextlabel.h</header>
|
<header>ksqueezedtextlabel.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>KPixmapWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>kpixmapwidget.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
// Self
|
// Self
|
||||||
#include "moc_savebar.cpp"
|
#include "moc_savebar.cpp"
|
||||||
|
|
||||||
// Qt
|
// Katie
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include <KIconLoader>
|
#include <KIconLoader>
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
#include <KUrl>
|
#include <KUrl>
|
||||||
|
#include <KPixmapWidget>
|
||||||
|
|
||||||
// Local
|
// Local
|
||||||
#include "lib/document/documentfactory.h"
|
#include "lib/document/documentfactory.h"
|
||||||
|
@ -73,13 +74,13 @@ struct SaveBarPrivate
|
||||||
|
|
||||||
void createTooManyChangesFrame()
|
void createTooManyChangesFrame()
|
||||||
{
|
{
|
||||||
mTooManyChangesFrame = new QFrame;
|
mTooManyChangesFrame = new QFrame();
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
QLabel* iconLabel = new QLabel;
|
KPixmapWidget* iconWidget = new KPixmapWidget();
|
||||||
QPixmap pix = KIconLoader::global()->loadIcon(
|
QPixmap pix = KIconLoader::global()->loadIcon(
|
||||||
"dialog-warning", KIconLoader::Dialog, KIconLoader::SizeSmall);
|
"dialog-warning", KIconLoader::Dialog, KIconLoader::SizeSmall);
|
||||||
iconLabel->setPixmap(pix);
|
iconWidget->setPixmap(pix);
|
||||||
|
|
||||||
// Text label
|
// Text label
|
||||||
QLabel* textLabel = new QLabel;
|
QLabel* textLabel = new QLabel;
|
||||||
|
@ -92,7 +93,7 @@ struct SaveBarPrivate
|
||||||
// Layout
|
// Layout
|
||||||
QHBoxLayout* layout = new QHBoxLayout(mTooManyChangesFrame);
|
QHBoxLayout* layout = new QHBoxLayout(mTooManyChangesFrame);
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->addWidget(iconLabel);
|
layout->addWidget(iconWidget);
|
||||||
layout->addWidget(textLabel);
|
layout->addWidget(textLabel);
|
||||||
layout->addWidget(mSaveAllFullScreenButton);
|
layout->addWidget(mSaveAllFullScreenButton);
|
||||||
mTooManyChangesFrame->hide();
|
mTooManyChangesFrame->hide();
|
||||||
|
@ -237,7 +238,7 @@ SaveBar::SaveBar(QWidget* parent, KActionCollection* actionCollection)
|
||||||
d->mSaveBarWidget->setObjectName(QLatin1String("saveBarWidget"));
|
d->mSaveBarWidget->setObjectName(QLatin1String("saveBarWidget"));
|
||||||
d->applyNormalStyleSheet();
|
d->applyNormalStyleSheet();
|
||||||
|
|
||||||
d->mMessageLabel = new QLabel;
|
d->mMessageLabel = new QLabel();
|
||||||
d->mMessageLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
d->mMessageLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||||
|
|
||||||
d->mUndoButton = createToolButton();
|
d->mUndoButton = createToolButton();
|
||||||
|
@ -246,14 +247,14 @@ SaveBar::SaveBar(QWidget* parent, KActionCollection* actionCollection)
|
||||||
d->mSaveAsButton = createToolButton();
|
d->mSaveAsButton = createToolButton();
|
||||||
d->mSaveAllButton = createToolButton();
|
d->mSaveAllButton = createToolButton();
|
||||||
|
|
||||||
d->mActionsLabel = new QLabel;
|
d->mActionsLabel = new QLabel();
|
||||||
d->mActionsLabel->setAlignment(Qt::AlignCenter);
|
d->mActionsLabel->setAlignment(Qt::AlignCenter);
|
||||||
d->mActionsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
d->mActionsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
d->createTooManyChangesFrame();
|
d->createTooManyChangesFrame();
|
||||||
|
|
||||||
// Setup top row
|
// Setup top row
|
||||||
d->mTopRowWidget = new QWidget;
|
d->mTopRowWidget = new QWidget();
|
||||||
QHBoxLayout* rowLayout = new QHBoxLayout(d->mTopRowWidget);
|
QHBoxLayout* rowLayout = new QHBoxLayout(d->mTopRowWidget);
|
||||||
rowLayout->addWidget(d->mMessageLabel);
|
rowLayout->addWidget(d->mMessageLabel);
|
||||||
rowLayout->addWidget(d->mUndoButton);
|
rowLayout->addWidget(d->mUndoButton);
|
||||||
|
@ -265,7 +266,7 @@ SaveBar::SaveBar(QWidget* parent, KActionCollection* actionCollection)
|
||||||
rowLayout->setMargin(0);
|
rowLayout->setMargin(0);
|
||||||
|
|
||||||
// Setup bottom row
|
// Setup bottom row
|
||||||
QHBoxLayout* bottomRowLayout = new QHBoxLayout;
|
QHBoxLayout* bottomRowLayout = new QHBoxLayout();
|
||||||
bottomRowLayout->addStretch();
|
bottomRowLayout->addStretch();
|
||||||
bottomRowLayout->addWidget(d->mTooManyChangesFrame);
|
bottomRowLayout->addWidget(d->mTooManyChangesFrame);
|
||||||
bottomRowLayout->addStretch();
|
bottomRowLayout->addStretch();
|
||||||
|
|
|
@ -26,26 +26,25 @@
|
||||||
#include <QBitmap>
|
#include <QBitmap>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QtGui/qevent.h>
|
#include <QPaintEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QtGui/qtextobject.h>
|
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
#include <QX11Info>
|
#include <QX11Info>
|
||||||
#include <netwm.h>
|
#include <netwm.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <KDebug>
|
||||||
#include <kglobal.h>
|
#include <KGlobal>
|
||||||
#include <kglobalsettings.h>
|
#include <KGlobalSettings>
|
||||||
#include <kwindowsystem.h>
|
#include <KWindowSystem>
|
||||||
#include <KIcon>
|
#include <KIcon>
|
||||||
#include <KIconLoader>
|
#include <KIconLoader>
|
||||||
#include <KIconEffect>
|
#include <KIconEffect>
|
||||||
|
#include <KPixmapWidget>
|
||||||
#include <plasma/plasma.h>
|
#include <plasma/plasma.h>
|
||||||
#include <plasma/paintutils.h>
|
#include <plasma/paintutils.h>
|
||||||
#include <plasma/theme.h>
|
#include <plasma/theme.h>
|
||||||
|
@ -213,7 +212,7 @@ class ToolTipPrivate
|
||||||
public:
|
public:
|
||||||
ToolTipPrivate()
|
ToolTipPrivate()
|
||||||
: text(0),
|
: text(0),
|
||||||
imageLabel(0),
|
imageWidget(0),
|
||||||
preview(0),
|
preview(0),
|
||||||
direction(Plasma::Up),
|
direction(Plasma::Up),
|
||||||
autohide(true),
|
autohide(true),
|
||||||
|
@ -221,7 +220,7 @@ public:
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
TipTextWidget *text;
|
TipTextWidget *text;
|
||||||
QLabel *imageLabel;
|
KPixmapWidget *imageWidget;
|
||||||
WindowPreview *preview;
|
WindowPreview *preview;
|
||||||
FrameSvg *background;
|
FrameSvg *background;
|
||||||
QWeakPointer<QObject> source;
|
QWeakPointer<QObject> source;
|
||||||
|
@ -246,8 +245,8 @@ ToolTip::ToolTip(QWidget *parent)
|
||||||
setWindowFlags(Qt::ToolTip);
|
setWindowFlags(Qt::ToolTip);
|
||||||
d->preview = new WindowPreview(this);
|
d->preview = new WindowPreview(this);
|
||||||
d->text = new TipTextWidget(this);
|
d->text = new TipTextWidget(this);
|
||||||
d->imageLabel = new QLabel(this);
|
d->imageWidget = new KPixmapWidget(this);
|
||||||
d->imageLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
d->imageWidget->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
||||||
|
|
||||||
d->animation = new QPropertyAnimation(this, "pos", this);
|
d->animation = new QPropertyAnimation(this, "pos", this);
|
||||||
d->animation->setEasingCurve(QEasingCurve::InOutQuad);
|
d->animation->setEasingCurve(QEasingCurve::InOutQuad);
|
||||||
|
@ -266,8 +265,8 @@ ToolTip::ToolTip(QWidget *parent)
|
||||||
previewHBoxLayout->addWidget(d->preview);
|
previewHBoxLayout->addWidget(d->preview);
|
||||||
|
|
||||||
QHBoxLayout *iconTextHBoxLayout = new QHBoxLayout;
|
QHBoxLayout *iconTextHBoxLayout = new QHBoxLayout;
|
||||||
iconTextHBoxLayout->addWidget(d->imageLabel);
|
iconTextHBoxLayout->addWidget(d->imageWidget);
|
||||||
iconTextHBoxLayout->setAlignment(d->imageLabel, Qt::AlignCenter);
|
iconTextHBoxLayout->setAlignment(d->imageWidget, Qt::AlignCenter);
|
||||||
iconTextHBoxLayout->addWidget(d->text);
|
iconTextHBoxLayout->addWidget(d->text);
|
||||||
iconTextHBoxLayout->setAlignment(d->text, Qt::AlignLeft | Qt::AlignVCenter);
|
iconTextHBoxLayout->setAlignment(d->text, Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
iconTextHBoxLayout->setStretchFactor(d->text, 1);
|
iconTextHBoxLayout->setStretchFactor(d->text, 1);
|
||||||
|
@ -394,12 +393,12 @@ void ToolTip::setContent(QObject *tipper, const ToolTipContent &data)
|
||||||
|
|
||||||
if (data.windowsToPreview().size()) {
|
if (data.windowsToPreview().size()) {
|
||||||
d->text->setVisible(false);
|
d->text->setVisible(false);
|
||||||
d->imageLabel->setVisible(false);
|
d->imageWidget->setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
d->text->setVisible(true);
|
d->text->setVisible(true);
|
||||||
d->imageLabel->setVisible(true);
|
d->imageWidget->setVisible(true);
|
||||||
d->text->setContent(data);
|
d->text->setContent(data);
|
||||||
d->imageLabel->setPixmap(data.image());
|
d->imageWidget->setPixmap(data.image());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data.playState().isEmpty()) {
|
if (!data.playState().isEmpty()) {
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include <KToggleAction>
|
#include <KToggleAction>
|
||||||
#include <KToggleFullScreenAction>
|
#include <KToggleFullScreenAction>
|
||||||
#include <KServiceTypeTrader>
|
#include <KServiceTypeTrader>
|
||||||
|
#include <KPixmapWidget>
|
||||||
|
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
|
@ -1036,12 +1037,12 @@ QWidget* MainWindow::newConnectionWidget()
|
||||||
QLabel *headerLabel = new QLabel(m_newConnectionWidget);
|
QLabel *headerLabel = new QLabel(m_newConnectionWidget);
|
||||||
headerLabel->setText(i18n("<h1>KDE Remote Desktop Client</h1><br />Enter or select the address of the desktop you would like to connect to."));
|
headerLabel->setText(i18n("<h1>KDE Remote Desktop Client</h1><br />Enter or select the address of the desktop you would like to connect to."));
|
||||||
|
|
||||||
QLabel *headerIconLabel = new QLabel(m_newConnectionWidget);
|
KPixmapWidget *headerIconWidget = new KPixmapWidget(m_newConnectionWidget);
|
||||||
headerIconLabel->setPixmap(KIcon("krdc").pixmap(80));
|
headerIconWidget->setPixmap(KIcon("krdc").pixmap(80));
|
||||||
|
|
||||||
QHBoxLayout *headerLayout = new QHBoxLayout;
|
QHBoxLayout *headerLayout = new QHBoxLayout;
|
||||||
headerLayout->addWidget(headerLabel, 1, Qt::AlignTop);
|
headerLayout->addWidget(headerLabel, 1, Qt::AlignTop);
|
||||||
headerLayout->addWidget(headerIconLabel);
|
headerLayout->addWidget(headerIconWidget);
|
||||||
startLayout->addLayout(headerLayout);
|
startLayout->addLayout(headerLayout);
|
||||||
|
|
||||||
QSortFilterProxyModel *remoteDesktopsModelProxy = new QSortFilterProxyModel(this);
|
QSortFilterProxyModel *remoteDesktopsModelProxy = new QSortFilterProxyModel(this);
|
||||||
|
|
|
@ -42,7 +42,7 @@ ConnectionDialog<UI>::ConnectionDialog(QWidget *parent)
|
||||||
m_connectWidget = new QWidget(this);
|
m_connectWidget = new QWidget(this);
|
||||||
m_ui.setupUi(m_connectWidget);
|
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();
|
KGuiItem accept = KStandardGuiItem::ok();
|
||||||
accept.setText(i18n("Accept Connection"));
|
accept.setText(i18n("Accept Connection"));
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="pixmapLabel" >
|
<widget class="KPixmapWidget" name="pixmapWidget" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -144,5 +144,12 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>KPixmapWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>kpixmapwidget.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -1,170 +0,0 @@
|
||||||
<ui version="4.0" >
|
|
||||||
<class>InviteWidget</class>
|
|
||||||
<widget class="QWidget" name="InviteWidget" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>603</width>
|
|
||||||
<height>364</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="pixmapLabel" >
|
|
||||||
<property name="sizePolicy" >
|
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>128</width>
|
|
||||||
<height>128</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="TextLabel2" >
|
|
||||||
<property name="font" >
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Welcome to KDE Desktop Sharing</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="helpLabel" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>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></string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat" >
|
|
||||||
<enum>Qt::RichText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap" >
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags" >
|
|
||||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>215</width>
|
|
||||||
<height>101</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>90</width>
|
|
||||||
<height>26</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnCreateInvite" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis" >
|
|
||||||
<string>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.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Create &Personal Invitation...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnEmailInvite" >
|
|
||||||
<property name="whatsThis" >
|
|
||||||
<string>This button will start your email application with a pre-configured text that explains to the recipient how to connect to your computer. </string>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Invite via &Email...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnManageInvite" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>&Manage Invitations (%1)...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>90</width>
|
|
||||||
<height>26</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>24</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
|
@ -30,7 +30,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="krfbIconLabel">
|
<widget class="KPixmapWidget" name="krfbIconWidget">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>128</width>
|
<width>128</width>
|
||||||
|
@ -43,9 +43,6 @@
|
||||||
<height>128</height>
|
<height>128</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -491,6 +488,11 @@
|
||||||
<extends>QPushButton</extends>
|
<extends>QPushButton</extends>
|
||||||
<header>kpushbutton.h</header>
|
<header>kpushbutton.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>KPixmapWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>kpixmapwidget.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>enableSharingCheckBox</tabstop>
|
<tabstop>enableSharingCheckBox</tabstop>
|
||||||
|
|
|
@ -58,7 +58,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
QWidget *mainWidget = new QWidget;
|
QWidget *mainWidget = new QWidget;
|
||||||
m_ui.setupUi(mainWidget);
|
m_ui.setupUi(mainWidget);
|
||||||
m_ui.krfbIconLabel->setPixmap(KIcon("krfb").pixmap(128));
|
m_ui.krfbIconWidget->setPixmap(KIcon("krfb").pixmap(128));
|
||||||
m_ui.enableUnattendedCheckBox->setChecked(
|
m_ui.enableUnattendedCheckBox->setChecked(
|
||||||
InvitationsRfbServer::instance->allowUnattendedAccess());
|
InvitationsRfbServer::instance->allowUnattendedAccess());
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ DlgPerformance::DlgPerformance( QWidget * parent )
|
||||||
labelFont.setBold( true );
|
labelFont.setBold( true );
|
||||||
m_dlg->descLabel->setFont( labelFont );
|
m_dlg->descLabel->setFont( labelFont );
|
||||||
|
|
||||||
m_dlg->cpuLabel->setPixmap( BarIcon( "cpu", 32 ) );
|
m_dlg->cpuWidget->setPixmap( BarIcon( "cpu", 32 ) );
|
||||||
// m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available
|
// 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)) );
|
connect( m_dlg->kcfg_MemoryLevel, SIGNAL(changed(int)), this, SLOT(radioGroup_changed(int)) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="cpuLabel">
|
<widget class="KPixmapWidget" name="cpuWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="memoryLabel">
|
<widget class="KPixmapWidget" name="memoryWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -265,6 +265,11 @@
|
||||||
<header>kbuttongroup.h</header>
|
<header>kbuttongroup.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>KPixmapWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>kpixmapwidget.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<includes>
|
<includes>
|
||||||
<include location="global">kiconloader.h</include>
|
<include location="global">kiconloader.h</include>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "propertiesdialog.h"
|
#include "propertiesdialog.h"
|
||||||
|
|
||||||
// qt/kde includes
|
// Katie/KDE includes
|
||||||
#include <qfile.h>
|
#include <qfile.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <qformlayout.h>
|
#include <qformlayout.h>
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
#include <kmessagebox.h>
|
#include <kmessagebox.h>
|
||||||
#include <ksqueezedtextlabel.h>
|
#include <ksqueezedtextlabel.h>
|
||||||
#include <kurl.h>
|
#include <kurl.h>
|
||||||
|
#include <kpixmapwidget.h>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
#include "core/document.h"
|
#include "core/document.h"
|
||||||
|
@ -118,9 +119,9 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc)
|
||||||
KSqueezedTextLabel *squeezed;
|
KSqueezedTextLabel *squeezed;
|
||||||
if (!mimeType.isNull()) {
|
if (!mimeType.isNull()) {
|
||||||
/// retrieve icon and place it in a QLabel
|
/// retrieve icon and place it in a QLabel
|
||||||
QLabel *pixmapLabel = new QLabel( value );
|
KPixmapWidget *pixmapWidget = new KPixmapWidget( value );
|
||||||
hboxLayout->addWidget( pixmapLabel, 0 );
|
hboxLayout->addWidget( pixmapWidget, 0 );
|
||||||
pixmapLabel->setPixmap( KIconLoader::global()->loadMimeTypeIcon( mimeType->iconName(), KIconLoader::Small ) );
|
pixmapWidget->setPixmap( KIconLoader::global()->loadMimeTypeIcon( mimeType->iconName(), KIconLoader::Small ) );
|
||||||
/// mime type's name and label
|
/// mime type's name and label
|
||||||
squeezed = new KSqueezedTextLabel( i18nc( "mimetype information, example: \"PDF Document (application/pdf)\"", "%1 (%2)", mimeType->comment(), valueString ), value );
|
squeezed = new KSqueezedTextLabel( i18nc( "mimetype information, example: \"PDF Document (application/pdf)\"", "%1 (%2)", mimeType->comment(), valueString ), value );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue