[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:05:44 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=0411039
The following commit has been merged in the master branch:
commit 041103916bde68204a626686e46c694565da8c09
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Fri Apr 1 17:29:21 2011 +0200
Improve pixmap handling by using cache
---
account-button.cpp | 11 ++++++++++-
account-button.h | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/account-button.cpp b/account-button.cpp
index 296802b..7a5f27d 100644
--- a/account-button.cpp
+++ b/account-button.cpp
@@ -26,6 +26,7 @@
#include <KLocale>
#include <KPixmapSequenceOverlayPainter>
#include <KPixmapSequence>
+#include <KIconLoader>
#include <TelepathyQt4/Account>
#include <TelepathyQt4/PendingOperation>
@@ -41,6 +42,14 @@ AccountButton::AccountButton(const Tp::AccountPtr &account, QWidget* parent)
m_busyOverlay->setWidget(this);
m_busyOverlay->setSequence(KPixmapSequence(QString("process-working")));
+ m_errorPixmap = KIconLoader::global()->loadIcon("dialog-error", KIconLoader::NoGroup, 16);
+ m_onlinePixmap = KIconLoader::global()->loadIcon("user-online", KIconLoader::NoGroup, 16);
+ m_awayPixmap = KIconLoader::global()->loadIcon("user-away", KIconLoader::NoGroup, 16);
+ m_awayExPixmap = KIconLoader::global()->loadIcon("user-away-extended", KIconLoader::NoGroup, 16);
+ m_busyPixmap = KIconLoader::global()->loadIcon("user-busy", KIconLoader::NoGroup, 16);
+ m_hiddenPixmap = KIconLoader::global()->loadIcon("user-invisible", KIconLoader::NoGroup, 16);
+ m_offlinePixmap = KIconLoader::global()->loadIcon("user-offline", KIconLoader::NoGroup, 16);
+
QString iconPath = account->iconName();
setIcon(KIcon(iconPath));
@@ -49,7 +58,7 @@ AccountButton::AccountButton(const Tp::AccountPtr &account, QWidget* parent)
//we paint a warning symbol in the right-bottom corner
QPixmap pixmap = icon().pixmap(32, 32);
QPainter painter(&pixmap);
- KIcon("dialog-error").paint(&painter, 15, 15, 16, 16);
+ painter.drawPixmap(15, 15, 16, 16, m_errorPixmap);
setIcon(KIcon(pixmap));
}
diff --git a/account-button.h b/account-button.h
index b48fcae..c5ac84a 100644
--- a/account-button.h
+++ b/account-button.h
@@ -73,6 +73,14 @@ private:
///The busy icon which is painted when connecting
KPixmapSequenceOverlayPainter *m_busyOverlay;
+
+ QPixmap m_errorPixmap;
+ QPixmap m_onlinePixmap;
+ QPixmap m_awayPixmap;
+ QPixmap m_busyPixmap;
+ QPixmap m_awayExPixmap;
+ QPixmap m_hiddenPixmap;
+ QPixmap m_offlinePixmap;
};
#endif // TELEPATHY_ACCOUNTBUTTON_H
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list