[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:37 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=de9671e

The following commit has been merged in the master branch:
commit de9671e26a2268c0251f2cb83a05b29847531298
Author: Aleix Pol <aleixpol at kde.org>
Date:   Sat Jun 13 01:30:38 2015 +0200

    Experimental frontend
---
 CMakeLists.txt                                     |   4 +
 app/CMakeLists.txt                                 |   9 ++
 app/main.cpp                                       |  49 +++++++++
 .../qml/DeviceDelegate.qml                         |  41 +++++--
 app/qml/main.qml                                   | 121 +++++++++++++++++++++
 app/resources.qrc                                  |   6 +
 6 files changed, 221 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05b00e4..df7dd50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,10 @@ add_subdirectory(kio)
 add_subdirectory(icon)
 add_subdirectory(interfaces)
 
+option(EXPERIMENTALAPP_ENABLED OFF)
+if(EXPERIMENTALAPP_ENABLED)
+    add_subdirectory(app)
+endif()
 add_subdirectory(daemon)
 add_subdirectory(plugins)
 add_subdirectory(plasmoid)
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
new file mode 100644
index 0000000..e1c45d8
--- /dev/null
+++ b/app/CMakeLists.txt
@@ -0,0 +1,9 @@
+find_package(KF5 COMPONENTS Declarative)
+
+qt5_add_resources(kcapp_SRCS resources.qrc)
+
+add_executable(kcapp main.cpp ${kcapp_SRCS})
+target_link_libraries(kcapp Qt5::Quick Qt5::Widgets KF5::Declarative KF5::CoreAddons KF5::I18n)
+
+install(TARGETS kcapp ${INSTALL_TARGETS_DEFAULT_ARGS})
+# install(PROGRAMS kcapp.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
diff --git a/app/main.cpp b/app/main.cpp
new file mode 100644
index 0000000..b23bf70
--- /dev/null
+++ b/app/main.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol at blue-systems.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <QApplication>
+#include <QQmlApplicationEngine>
+#include <QCommandLineParser>
+#include <KDeclarative/KDeclarative>
+#include <KAboutData>
+#include <KLocalizedString>
+
+int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
+    KAboutData aboutData("kdeconnect-kde", i18n("Awesome App"), "1.0", i18n("KDE Connect App"), KAboutLicense::GPL, i18n("(c) 2015, Aleix Pol Gonzalez"));
+    aboutData.addAuthor(i18n("Aleix Pol Gonzalez"), i18n("Maintainer"), "aleixpol at kde.org");
+    KAboutData::setApplicationData(aboutData);
+
+    {
+        QCommandLineParser parser;
+        aboutData.setupCommandLine(&parser);
+        parser.addVersionOption();
+        parser.addHelpOption();
+        parser.process(app);
+        aboutData.processCommandLine(&parser);
+    }
+ 
+    QQmlApplicationEngine engine(QUrl("qrc:/qml/main.qml"));
+
+    KDeclarative::KDeclarative kdeclarative;
+    kdeclarative.setDeclarativeEngine(&engine);
+    kdeclarative.setupBindings();
+
+    return app.exec();
+}
diff --git a/plasmoid/package/contents/ui/CompactRepresentation.qml b/app/qml/DeviceDelegate.qml
similarity index 55%
copy from plasmoid/package/contents/ui/CompactRepresentation.qml
copy to app/qml/DeviceDelegate.qml
index c4edb6d..9cf862f 100644
--- a/plasmoid/package/contents/ui/CompactRepresentation.qml
+++ b/app/qml/DeviceDelegate.qml
@@ -1,5 +1,5 @@
-/**
- * Copyright 2013 Albert Vaca <albertvaka at gmail.com>
+/*
+ * Copyright 2015 Aleix Pol Gonzalez <aleixpol at kde.org>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -18,15 +18,38 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-import QtQuick 2.1
-import org.kde.plasma.core 2.0 as PlasmaCore
+import QtQuick 2.2
+import QtQuick.Controls 1.2
+import QtQuick.Layouts 1.2
+import org.kde.kquickcontrolsaddons 2.0
+import org.kde.kdeconnect 1.0
 
-Item {
-    id: view
-
-    PlasmaCore.IconItem {
+Item
+{
+    height: info.height
+    signal clicked
+    QIconItem {
         id: icon
-        source: "kdeconnect"
+        width: 40
+        height: 40
+        icon: iconName
+    }
+    MouseArea {
         anchors.fill: parent
+        onClicked: parent.clicked()
+    }
+    ColumnLayout {
+        id: info
+        anchors {
+            left: icon.right
+            top: parent.top
+            right: parent.right
+        }
+        property bool expand: false
+        Label {
+            Layout.fillWidth: true
+            horizontalAlignment: Text.AlignHCenter
+            text: display + "
" + toolTip
+        }
     }
 }
diff --git a/app/qml/main.qml b/app/qml/main.qml
new file mode 100644
index 0000000..43a0d6d
--- /dev/null
+++ b/app/qml/main.qml
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2015 Aleix Pol Gonzalez <aleixpol at kde.org>
+ *
+ * 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/>.
+ */
+
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
+import org.kde.kdeconnect 1.0
+
+ApplicationWindow
+{
+    id: root
+    visible: true
+    width: 400
+    height: 500
+
+    StackView {
+        id: stack
+        anchors {
+            fill: parent
+            margins: 5
+        }
+        initialItem: ScrollView {
+            Layout.fillHeight: true
+            ListView {
+                id: devicesView
+                spacing: 5
+                model: DevicesSortProxyModel {
+                    sourceModel: DevicesModel {
+                        id: connectDeviceModel
+                        displayFilter: DevicesModel.StatusReachable
+                    }
+                }
+                delegate: DeviceDelegate {
+                    width: parent.width
+                   onClicked: {
+                        var data = {
+                            item: deviceViewComponent,
+                            properties: {currentDevice: device}
+                        };
+                        stack.push(data);
+                    }
+                }
+            }
+        }
+    }
+
+    Component {
+        id: deviceViewComponent
+        ColumnLayout {
+            id: deviceView
+            property QtObject currentDevice
+            Button {
+                text: "<"
+                onClicked: stack.pop()
+            }
+            Loader {
+                Layout.fillHeight: true
+                Layout.fillWidth: true
+
+                sourceComponent: currentDevice.isPaired ? trustedDevice : untrustedDevice
+                Component {
+                    id: trustedDevice
+                    ColumnLayout {
+                        id: trustedView
+                        Layout.fillHeight: true
+                        Layout.fillWidth: true
+
+                        Button {
+                            text: i18n("Un-Pair")
+                            onClicked: deviceView.currentDevice.unpair()
+                        }
+                        Button {
+                            text: i18n("Send Ping")
+                            onClicked: deviceView.currentDevice.pluginCall("ping", "sendPing");
+                        }
+                        Button {
+                            text: i18n("Open Multimedia Remote Control")
+                            enabled: false
+                        }
+                        Button {
+                            text: i18n("Remote touch and keyboard")
+                            enabled: false
+                        }
+
+                        Item { Layout.fillHeight: true }
+                    }
+                }
+                Component {
+                    id: untrustedDevice
+                    ColumnLayout {
+                        id: untrustedView
+                        Layout.fillHeight: true
+                        Layout.fillWidth: true
+
+                        Button {
+                            text: i18n("Pair")
+                            onClicked: deviceView.currentDevice.requestPair()
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/app/resources.qrc b/app/resources.qrc
new file mode 100644
index 0000000..0e02918
--- /dev/null
+++ b/app/resources.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+    <file>qml/main.qml</file>
+    <file>qml/DeviceDelegate.qml</file>
+ </qresource>
+</RCC>

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list