[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:12:02 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=26985cc
The following commit has been merged in the master branch:
commit 26985cc932934939b5e695e579fe81f1bde85988
Author: Francesco Nwokeka <francesco.nwokeka at gmail.com>
Date: Wed Dec 7 17:37:49 2011 +0100
added wrapper to be used to communicate with QML plasmoid
---
presence/CMakeLists.txt | 1 +
presence/src/presence-applet.cpp | 14 +++++---------
presence/src/presence-applet.h | 10 ++--------
3 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/presence/CMakeLists.txt b/presence/CMakeLists.txt
index 1d0a376..f290a08 100644
--- a/presence/CMakeLists.txt
+++ b/presence/CMakeLists.txt
@@ -30,6 +30,7 @@ include_directories(${CMAKE_SOURCE_DIR}
set(telepathy-kde-presence-applet_SRCS
+ src/globalpresencewrapper.cpp
src/presenceapplet.cpp
)
#
diff --git a/presence/src/presence-applet.cpp b/presence/src/presence-applet.cpp
index 61c0865..ce73e2d 100644
--- a/presence/src/presence-applet.cpp
+++ b/presence/src/presence-applet.cpp
@@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
+#include "globalpresencewrapper.h"
#include "presenceapplet.h"
#include <KStandardDirs>
@@ -30,13 +31,11 @@ TelepathyPresenceApplet::TelepathyPresenceApplet(QObject* parent, const QVariant
: Plasma::Applet(parent, args)
, m_declarative(new Plasma::DeclarativeWidget(this))
, m_qmlObject(0)
- , m_globalPresence(new KTp::GlobalPresence(this))
- , m_presenceAppletWrapper(new PresenceAppletWrapper(this))
+ , m_globalPresenceWrapper(new GlobalPresenceWrapper(this))
{
// setup plasmoid size
resize(250, 250);
// setBackgroundHints(NoBackground);
-
setAspectRatioMode(Plasma::FixedSize);
}
@@ -51,20 +50,17 @@ void TelepathyPresenceApplet::init()
Plasma::Applet::init();
if (m_declarative) {
- // sort this path out
+ /// TODO sort this path out
QString qmlFile = KGlobal::dirs()->findResource("data", "plasma/plasmoids/org.kde.telepathy-contact/contents/ui/main.qml");
qDebug() << "LOADING: " << qmlFile;
m_declarative->setQmlPath(qmlFile);
-// m_declarative->engine()->rootContext()->setContextProperty("TelepathyKDEPresenceApplet", /* make presenceWrapper object to interact with QML */);
+ m_declarative->engine()->rootContext()->setContextProperty("GlobalPresence", m_globalPresenceWrapper);
// setup qml object so that we can talk to the declarative part
m_qmlObject = dynamic_cast<QObject*>(m_declarative->rootObject());
// connect the qml object to recieve signals from KTP::GlobalPresece
-// connect(m_contact, SIGNAL(newContactSet()), m_qmlObject, SLOT(updateContact()));
-// connect(m_contact, SIGNAL(avatarChanged()), m_qmlObject, SLOT(updateContact()));
-// connect(m_contact, SIGNAL(presenceChanged()), m_qmlObject, SLOT(updateContact()));
-// connect(m_contact, SIGNAL(accountPresenceChanged()), m_qmlObject, SLOT(accountPresenceChanged()));
+// connect(m_globalPresenceWrapper, SIGNAL(presenceChanged()), m_qmlObject, SLOT(/*updatePresence*/));
}
}
diff --git a/presence/src/presence-applet.h b/presence/src/presence-applet.h
index 7406104..803bbe4 100644
--- a/presence/src/presence-applet.h
+++ b/presence/src/presence-applet.h
@@ -23,12 +23,7 @@
#include <Plasma/Applet>
#include <Plasma/DeclarativeWidget>
-namespace KTp
-{
- class GlobalPresence;
-}
-
-class PresenceAppletWrapper;
+class GlobalPresenceWrapper;
class TelepathyPresenceApplet: public Plasma::Applet
{
@@ -49,8 +44,7 @@ private:
Plasma::DeclarativeWidget *m_declarative;
QObject *m_qmlObject;
- KTp::GlobalPresence *m_globalPresence;
- PresenceAppletWrapper *m_presenceAppletWrapper;
+ GlobalPresenceWrapper *m_globalPresenceWrapper;
};
#endif // TELEPATHY_KDE_PRESENCE_APPLET_H
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list