[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=6e53c5b
The following commit has been merged in the master branch:
commit 6e53c5b9c78422564dd783bd3741a0a83f853dee
Author: Albert Vaca <albertvaka at gmail.com>
Date: Wed Jun 19 16:15:25 2013 +0200
KCM skeleton
---
daemon/CMakeLists.txt | 2 +
kcm/CMakeLists.txt | 21 +++++
kcm/kcm.cpp | 78 +++++++++++++++++
daemon/announcers/avahiannouncer.h => kcm/kcm.h | 57 ++++++------
kcm/kcm.ui | 111 ++++++++++++++++++++++++
kcm/kdeconnect-kcm.desktop | 20 +++++
kcm/wizzard.ui | 54 ++++++++++++
test/CMakeLists.txt | 1 -
8 files changed, 311 insertions(+), 33 deletions(-)
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
index 41d21ab..0317020 100644
--- a/daemon/CMakeLists.txt
+++ b/daemon/CMakeLists.txt
@@ -24,6 +24,8 @@ target_link_libraries(kded_androidshine
${KDE4_KDEUI_LIBS}
kdnssd
${QT_QTNETWORK_LIBRARY}
+ ${QJSON_LIBRARIES}
+ ${QJSON_LIBRARY}
)
install(TARGETS kded_androidshine DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt
new file mode 100644
index 0000000..a27b505
--- /dev/null
+++ b/kcm/CMakeLists.txt
@@ -0,0 +1,21 @@
+
+set(kcm_SRCS
+ kcm.cpp
+)
+
+qt4_automoc(${kcm_SRCS})
+
+kde4_add_ui_files(kcm_SRCS kcm.ui wizzard.ui)
+
+kde4_add_plugin(kdeconnect-kcm ${kcm_SRCS})
+
+target_link_libraries(kdeconnect-kcm
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${KDE4_KDEUI_LIBRARY}
+ ${KDE4_KIO_LIBRARY}
+)
+
+install(TARGETS kdeconnect-kcm DESTINATION ${PLUGIN_INSTALL_DIR})
+
+install(FILES kdeconnect-kcm.desktop DESTINATION ${SERVICES_INSTALL_DIR})
diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
new file mode 100644
index 0000000..46b6db1
--- /dev/null
+++ b/kcm/kcm.cpp
@@ -0,0 +1,78 @@
+/**
+ * Copyright 2013 Albert Vaca <albertvaka at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License or (at your option) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "kcm.h"
+#include "ui_kcm.h"
+
+#include <QtGui/QLabel>
+#include <QtGui/QMenu>
+#include <QtGui/QMenuBar>
+#include <QtGui/QAction>
+#include <QtGui/QStackedLayout>
+#include <QtGui/QListView>
+
+#include <KDebug>
+#include <kpluginfactory.h>
+#include <kstandarddirs.h>
+
+K_PLUGIN_FACTORY(KdeConnectKcmFactory, registerPlugin<KdeConnectKcm>();)
+K_EXPORT_PLUGIN(KdeConnectKcmFactory("kdeconnect-kcm", "kdeconnect-kcm"))
+
+KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&)
+ : KCModule(KdeConnectKcmFactory::componentData(), parent)
+{
+ m_ui = new Ui::KdeConnectKcmUi();
+ m_ui->setupUi(this);
+
+ m_model = new QStandardItemModel(this);
+ //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);
+
+ m_ui->deviceList->setIconSize(QSize(32,32));
+ m_ui->deviceList->setModel(m_model);
+ //m_ui->deviceList->setSelectionModel(m_selectionModel);
+
+ connect(m_ui->removeButton, SIGNAL(clicked(bool)), this, SLOT(removeButtonClicked()));
+ connect(m_ui->addButton, SIGNAL(clicked(bool)), this, SLOT(addButtonClicked()));
+}
+
+KdeConnectKcm::~KdeConnectKcm()
+{
+
+}
+
+void KdeConnectKcm::addButtonClicked()
+{
+
+}
+
+void KdeConnectKcm::removeButtonClicked()
+{
+
+}
+
+void KdeConnectKcm::currentChanged(const QModelIndex& current, const QModelIndex& previous)
+{
+
+}
+
+#include "kcm.moc"
diff --git a/daemon/announcers/avahiannouncer.h b/kcm/kcm.h
similarity index 61%
copy from daemon/announcers/avahiannouncer.h
copy to kcm/kcm.h
index 4562a5c..ee76743 100644
--- a/daemon/announcers/avahiannouncer.h
+++ b/kcm/kcm.h
@@ -18,44 +18,37 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AVAHIANNOUNCER_H
-#define AVAHIANNOUNCER_H
-
-#include <QObject>
-
-#include <QUdpSocket>
-
-#include <KDE/DNSSD/PublicService>
-
-#include "announcer.h"
-
-class AvahiAnnouncer
- : public Announcer
+#ifndef KDECONNECTKCM_H
+#define KDECONNECTKCM_H
+
+#include <kcmodule.h>
+#include <qstandarditemmodel.h>
+
+class Create;
+class QModelIndex;
+class AccountsModel;
+class AccountWidget;
+class QStackedLayout;
+class QItemSelectionModel;
+namespace Ui {
+ class KdeConnectKcmUi;
+}
+
+class KdeConnectKcm : public KCModule
{
- Q_OBJECT
-
+Q_OBJECT
public:
- AvahiAnnouncer();
- ~AvahiAnnouncer();
-
- QString getName() { return "Avahi"; }
- Priority getPriority() { return PRIORITY_HIGH; }
-
- void setDiscoverable(bool b);
-
-
+ KdeConnectKcm(QWidget *parent, const QVariantList&);
+ virtual ~KdeConnectKcm();
private Q_SLOTS:
- void readPendingNotifications();
+ void addButtonClicked();
+ void removeButtonClicked();
+ void currentChanged(const QModelIndex& current, const QModelIndex& previous);
private:
- DNSSD::PublicService* service;
- QUdpSocket* mUdpSocket;
-
- QVector<DeviceLink*> links;
-
- QHostAddress mIp;
- quint16 mPort;
+ Ui::KdeConnectKcmUi* m_ui;
+ QStandardItemModel* m_model;
};
diff --git a/kcm/kcm.ui b/kcm/kcm.ui
new file mode 100644
index 0000000..e8b0261
--- /dev/null
+++ b/kcm/kcm.ui
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>KdeConnectKcmUi</class>
+ <widget class="QWidget" name="KdeConnectKcmUi">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>949</width>
+ <height>528</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QListView" name="deviceList"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="addButton">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset theme="list-add">
+ <normaloff/>
+ </iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="removeButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset theme="list-remove">
+ <normaloff/>
+ </iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="deviceInfo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/kcm/kdeconnect-kcm.desktop b/kcm/kdeconnect-kcm.desktop
new file mode 100755
index 0000000..152532b
--- /dev/null
+++ b/kcm/kdeconnect-kcm.desktop
@@ -0,0 +1,20 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Exec=kcmshell4 kdeconnect-kcm
+Icon=applications-internet
+Type=Service
+
+X-KDE-ServiceTypes=KCModule
+
+X-KDE-Library=kdeconnect-kcm
+X-KDE-ParentApp=kcontrol
+
+X-KDE-System-Settings-Parent-Category=hardware
+
+Name=KdeConnect
+
+Comment=Connect your smartphone and your desktop
+
+X-KDE-Keywords=Network,Android,Devices
+
+Categories=Qt;KDE;X-KDE-settings-kdeconnect-kcm;
diff --git a/kcm/wizzard.ui b/kcm/wizzard.ui
new file mode 100644
index 0000000..b3173b8
--- /dev/null
+++ b/kcm/wizzard.ui
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Wizard</class>
+ <widget class="QWizard" name="Wizard">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>361</width>
+ <height>293</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Wizard</string>
+ </property>
+ <widget class="QWizardPage" name="wizardPage1">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string><html><head/><body><p>Bla bla bla blo blo blo<br/><br/><br/><br/><a href="https://accounts.google.com/ServiceLogin?service=googleplay&passive=86400&continue=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.melloware.zeroconf%26hl%3Den%26rdid%3Dcom.melloware.zeroconf%26rdot%"><span style=" text-decoration: underline; color:#0057ae;">Click Here!</span></a></p></body></html></string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::TextBrowserInteraction</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWizardPage" name="wizardPage2">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Select your device</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QListView" name="listView"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWizardPage" name="wizardPage3"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a44a4e3..92851e5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -14,4 +14,3 @@ target_link_libraries(kded_androidshine_tests
add_test(kded_androidshine_tests ${CMAKE_CURRENT_BINARY_DIR}/kded_androidshine_tests)
-
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list