[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:26:38 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=800de88
The following commit has been merged in the master branch:
commit 800de8836f5bccf9fb274b78006ed3c4e8eeac7e
Author: Albert Vaca <albertvaka at gmail.com>
Date: Tue Jun 25 21:19:17 2013 +0200
DBus communication working
---
daemon/daemon.cpp | 11 +++++++----
kcm/CMakeLists.txt | 1 +
kcm/kcm.cpp | 22 +++++++++------------
kcm/kcm.h | 2 ++
.../packagereceiver.cpp => kcm/wizard.cpp | 23 ++++++++++++++++++----
.../packagereceiver.cpp => kcm/wizard.h | 22 +++++++++++++++++----
6 files changed, 56 insertions(+), 25 deletions(-)
diff --git a/daemon/daemon.cpp b/daemon/daemon.cpp
index f2c1215..f443f6e 100644
--- a/daemon/daemon.cpp
+++ b/daemon/daemon.cpp
@@ -24,6 +24,7 @@
#include "packagereceivers/pausemusicpackagereceiver.h"
#include "announcers/avahiannouncer.h"
#include "announcers/fakeannouncer.h"
+#include "devicelinks/echodevicelink.h"
#include <QtNetwork/QUdpSocket>
#include <QFile>
@@ -38,7 +39,8 @@
K_PLUGIN_FACTORY(AndroidShineFactory, registerPlugin<Daemon>();)
K_EXPORT_PLUGIN(AndroidShineFactory("androidshine", "androidshine"))
-void Daemon::linkTo(DeviceLink* dl) {
+void Daemon::linkTo(DeviceLink* dl)
+{
linkedDevices.append(dl);
@@ -86,8 +88,6 @@ QString Daemon::listVisibleDevices()
ret << std::setw(20) << "Name";
ret << std::endl;
- emit deviceAdded("hola","hola");
-
Q_FOREACH (Device* d, visibleDevices) {
ret << std::setw(20) << d->id().toStdString();
ret << std::setw(20) << d->name().toStdString();
@@ -101,6 +101,7 @@ QString Daemon::listVisibleDevices()
bool Daemon::pairDevice(QString id)
{
//TODO
+ linkedDevices.append(new EchoDeviceLink(new Device(id,"fake-to-the-max")));
return true;
}
@@ -109,7 +110,9 @@ QString Daemon::listLinkedDevices()
QString ret;
Q_FOREACH (DeviceLink* dl, linkedDevices) {
- ret += dl->device()->name() + "(" + dl->device()->id() + ")";
+ if (!ret.isEmpty()) ret += "
";
+ //ret += dl->device()->name() + "(" + dl->device()->id() + ")";
+ ret += dl->device()->id();
}
return ret;
diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt
index ceaa396..58c02c6 100644
--- a/kcm/CMakeLists.txt
+++ b/kcm/CMakeLists.txt
@@ -1,6 +1,7 @@
set(kcm_SRCS
kcm.cpp
+ wizard.cpp
)
qt4_add_dbus_interface(
diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
index 01f8ccf..3931070 100644
--- a/kcm/kcm.cpp
+++ b/kcm/kcm.cpp
@@ -20,6 +20,7 @@
#include "kcm.h"
#include "ui_kcm.h"
+#include "ui_wizard.h"
#include <QtGui/QLabel>
#include <QtGui/QMenu>
@@ -39,7 +40,8 @@ K_EXPORT_PLUGIN(KdeConnectKcmFactory("kdeconnect-kcm", "kdeconnect-kcm"))
KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
: KCModule(KdeConnectKcmFactory::componentData(), parent)
- , dbusInterface("org.kde.kded", "/modules/androidshine", QDBusConnection::sessionBus(), this)
+ , dbusInterface("org.kde.kdeconnect", "/modules/androidshine", QDBusConnection::sessionBus(), this)
+ , wizard(this)
{
m_ui = new Ui::KdeConnectKcmUi();
@@ -48,18 +50,11 @@ KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
m_model = new QStandardItemModel(this);
m_ui->deviceList->setIconSize(QSize(32,32));
m_ui->deviceList->setModel(m_model);
- //m_ui->deviceList->setSelectionModel(m_selectionModel);
- connect(&dbusInterface, SIGNAL(deviceAdded(QString, QString)), this, SLOT(deviceAdded(QString)));
- connect(&dbusInterface, SIGNAL(deviceRemoved(QString, QString)), this, SLOT(deviceRemoved(QString)));
+// dbusInterface.pairDevice("holalala");
- //TODO: Listen to the objectManager signals objectAdded and objectRemoved, que el daemon exportara
- //dbusInterface = new QDBusInterface("com.hal.wlan", "/com/hal/wlan/com/hal/wlan", "com.hal.wlan", QDBusConnection::SessionBus(), this);
- //dbusInterface->connection().connect("com.hal.wlan", "/com/hal/wlan/com/hal/wlan", "com.hal.wlan", "status_changed", this, SLOT(deviceAdded())
-
- //m_selectionModel = new QItemSelectionModel(m_model);
- //connect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(currentChanged(QModelIndex,QModelIndex)));
- //m_selectionModel->setCurrentIndex(m_model->index(0), QItemSelectionModel::SelectCurrent);
+ connect(&dbusInterface, SIGNAL(deviceAdded(QString, QString)), this, SLOT(deviceAdded(QString, QString)));
+ connect(&dbusInterface, SIGNAL(deviceRemoved(QString)), this, SLOT(deviceRemoved(QString)));
connect(m_ui->removeButton, SIGNAL(clicked(bool)), this, SLOT(removeButtonClicked()));
connect(m_ui->addButton, SIGNAL(clicked(bool)), this, SLOT(addButtonClicked()));
@@ -73,7 +68,7 @@ KdeConnectKcm::~KdeConnectKcm()
void KdeConnectKcm::addButtonClicked()
{
- m_model->appendRow(new QStandardItem("lalal"));
+
}
void KdeConnectKcm::removeButtonClicked()
@@ -88,7 +83,8 @@ void KdeConnectKcm::currentChanged(const QModelIndex& current, const QModelIndex
void KdeConnectKcm::deviceAdded(QString id, QString name) //TODO: Rebre mes coses...
{
- m_model->appendRow(new QStandardItem("hola"));
+ //m_model->appendRow(new QStandardItem(id));
+ wizard.show();
}
void KdeConnectKcm::deviceRemoved(QString id)
diff --git a/kcm/kcm.h b/kcm/kcm.h
index c99b008..85818b4 100644
--- a/kcm/kcm.h
+++ b/kcm/kcm.h
@@ -26,6 +26,7 @@
#include <kcmodule.h>
+#include "wizard.h"
#include "daemoninterface.h"
class Create;
@@ -59,6 +60,7 @@ private:
OrgKdeKdeconnectInterface dbusInterface;
Ui::KdeConnectKcmUi* m_ui;
QStandardItemModel* m_model;
+ AddDeviceWizard wizard;
};
diff --git a/daemon/packagereceivers/packagereceiver.cpp b/kcm/wizard.cpp
similarity index 75%
copy from daemon/packagereceivers/packagereceiver.cpp
copy to kcm/wizard.cpp
index 082460f..ef222c9 100644
--- a/daemon/packagereceivers/packagereceiver.cpp
+++ b/kcm/wizard.cpp
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright 2013 Albert Vaca <albertvaka at gmail.com>
*
* This program is free software; you can redistribute it and/or
@@ -18,8 +18,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "packagereceiver.h"
+#include "wizard.h"
-PackageReceiver::PackageReceiver() {
- //gcc complains if we don't add something to compile on a class with virtual functions
+#include <QDebug>
+
+#include "ui_wizard.h"
+
+AddDeviceWizard::AddDeviceWizard(QWidget* parent)
+ : QWizard(parent)
+{
+ qDebug() << "HA";
+
+ m_wizard = new Ui::Wizard();
+ m_wizard->setupUi(this);
+
+}
+
+AddDeviceWizard::~AddDeviceWizard()
+{
+ delete m_wizard;
}
diff --git a/daemon/packagereceivers/packagereceiver.cpp b/kcm/wizard.h
similarity index 77%
copy from daemon/packagereceivers/packagereceiver.cpp
copy to kcm/wizard.h
index 082460f..ccd44aa 100644
--- a/daemon/packagereceivers/packagereceiver.cpp
+++ b/kcm/wizard.h
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright 2013 Albert Vaca <albertvaka at gmail.com>
*
* This program is free software; you can redistribute it and/or
@@ -18,8 +18,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "packagereceiver.h"
+#ifndef WIZARD_H
+#define WIZARD_H
-PackageReceiver::PackageReceiver() {
- //gcc complains if we don't add something to compile on a class with virtual functions
+#include <QWizard>
+
+namespace Ui {
+ class Wizard;
}
+
+class AddDeviceWizard : public QWizard
+{
+public:
+ AddDeviceWizard(QWidget* parent);
+ ~AddDeviceWizard();
+private:
+ Ui::Wizard* m_wizard;
+};
+
+#endif // WIZARD_H
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list