[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:11:24 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=050db3f
The following commit has been merged in the master branch:
commit 050db3f2f19151c732af3f9961a3d2ed066961c8
Author: Francesco Nwokeka <francesco.nwokeka at gmail.com>
Date: Thu Aug 18 11:14:57 2011 +0200
Config list shows contacts from ktelepathy nepomuk
---
src/config.cpp | 20 +++++++++++++++++---
src/config.h | 6 ++++++
src/config.ui | 2 +-
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/config.cpp b/src/config.cpp
index 7a57619..9047452 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -19,6 +19,7 @@
#include "config.h"
+#include <KPushButton>
#include <KTelepathy/PeopleManager>
#include <KTelepathy/PersonSetModel>
#include <KTelepathy/PersonSet>
@@ -27,14 +28,27 @@ Config::Config(QWidget* parent)
: KDialog(parent)
{
QWidget *widget = new QWidget(this);
+
ui.setupUi(widget);
setMainWidget(widget);
-
- // populate telepathy contact list
-// ui.contactListView->setModel(new KTelepathy::PersonSetModel(KTelepathy::PeopleManager::instance()->everyone()));
+ setupContactsList();
}
Config::~Config()
{
}
+void Config::activateOkButton()
+{
+ button(Ok)->setEnabled(true);
+}
+
+void Config::setupContactsList()
+{
+ // set list to show nepomuk model
+ ui.contactsList->setModel(new KTelepathy::PersonSetModel(KTelepathy::PeopleManager::instance()->everyone()));
+
+ // disable ok button until a list item is selected
+ button(Ok)->setEnabled(false);
+ connect(ui.contactsList, SIGNAL(clicked(QModelIndex)), this, SLOT(activateOkButton()));
+}
diff --git a/src/config.h b/src/config.h
index aa51c7d..2d2c831 100644
--- a/src/config.h
+++ b/src/config.h
@@ -36,7 +36,13 @@ public:
Config(QWidget *parent = 0);
~Config();
+private slots:
+ void activateOkButton();
+
private:
+ /** prepare the contacts to be show in the list */
+ void setupContactsList();
+
Ui::Config ui;
};
diff --git a/src/config.ui b/src/config.ui
index 2def05e..3c74fcf 100644
--- a/src/config.ui
+++ b/src/config.ui
@@ -49,7 +49,7 @@
</layout>
</item>
<item>
- <widget class="QListView" name="contactListView"/>
+ <widget class="QListView" name="contactsList"/>
</item>
</layout>
</widget>
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list