diff --git a/plasmoid/declarativeplugin/CMakeLists.txt b/plasmoid/declarativeplugin/CMakeLists.txt
index 54c6bf06e..b9e827cc6 100644
--- a/plasmoid/declarativeplugin/CMakeLists.txt
+++ b/plasmoid/declarativeplugin/CMakeLists.txt
@@ -17,8 +17,7 @@ qt5_wrap_cpp(kdeconnectdeclarativeplugin_SRC ${kdeconnectdeclarativeplugin_MOC})
add_library(kdeconnectdeclarativeplugin SHARED ${kdeconnectdeclarativeplugin_SRC})
target_link_libraries(kdeconnectdeclarativeplugin
Qt5::Qml
- Qt5::Gui
kdeconnectinterfaces
)
-install(TARGETS kdeconnectdeclarativeplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kdeconnect)
-install(FILES qmldir DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kdeconnect)
+install(TARGETS kdeconnectdeclarativeplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kdeconnect)
+install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kdeconnect)
diff --git a/plasmoid/package/contents/ui/Battery.qml b/plasmoid/package/contents/ui/Battery.qml
index 6fcb7c456..fa78c28f7 100644
--- a/plasmoid/package/contents/ui/Battery.qml
+++ b/plasmoid/package/contents/ui/Battery.qml
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-import QtQuick 1.1
-import org.kde.plasma.core 0.1 as PlasmaCore
-import org.kde.plasma.components 0.1 as PlasmaComponents
+import QtQuick 2.1
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kdeconnect 1.0
QtObject {
diff --git a/plasmoid/package/contents/ui/CompactRepresentation.qml b/plasmoid/package/contents/ui/CompactRepresentation.qml
index 7614893d8..c814f7d0b 100644
--- a/plasmoid/package/contents/ui/CompactRepresentation.qml
+++ b/plasmoid/package/contents/ui/CompactRepresentation.qml
@@ -18,12 +18,11 @@
* along with this program. If not, see .
*/
-import QtQuick 1.1
-import org.kde.plasma.core 0.1 as PlasmaCore
+import QtQuick 2.1
+import org.kde.plasma.core 2.0 as PlasmaCore
Item {
id: view
- anchors.fill: parent
//TODO: Use this to detect if we should be iconized or full size
function isConstrained() {
@@ -35,18 +34,4 @@ Item {
source: "kdeconnect"
anchors.fill: parent
}
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: plasmoid.togglePopup()
-
- PlasmaCore.ToolTip {
- id: tooltip
- target: mouseArea
- image: QIcon("kdeconnect")
- subText: i18n("KDE Connect device notifications")
- }
- }
-
}
diff --git a/plasmoid/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml
index 372a1b63e..d774f66ba 100644
--- a/plasmoid/package/contents/ui/DeviceDelegate.qml
+++ b/plasmoid/package/contents/ui/DeviceDelegate.qml
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-import QtQuick 1.1
-import org.kde.plasma.core 0.1 as PlasmaCore
-import org.kde.plasma.components 0.1 as PlasmaComponents
+import QtQuick 2.1
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kdeconnect 1.0
PlasmaComponents.ListItem
diff --git a/plasmoid/package/contents/ui/kdeconnect.qml b/plasmoid/package/contents/ui/FullRepresentation.qml
similarity index 84%
rename from plasmoid/package/contents/ui/kdeconnect.qml
rename to plasmoid/package/contents/ui/FullRepresentation.qml
index e58cc4ebc..20baa139d 100644
--- a/plasmoid/package/contents/ui/kdeconnect.qml
+++ b/plasmoid/package/contents/ui/FullRepresentation.qml
@@ -18,21 +18,17 @@
* along with this program. If not, see .
*/
-import QtQuick 1.1
-import org.kde.plasma.core 0.1 as PlasmaCore
-import org.kde.plasma.components 0.1 as PlasmaComponents
-import org.kde.plasma.extras 0.1 as PlasmaExtras
-import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
+import QtQuick 2.1
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
+import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kdeconnect 1.0 as KdeConnect
Item {
id: kdeconnect
- property int minimumWidth: 290
- property int minimumHeight: 340
-
- //TODO: Show the full widget when it is not docked
- property Component compactRepresentation: CompactRepresentation { }
+ implicitWidth: 290
+ implicitHeight: 340
PlasmaComponents.Label {
visible: devicesView.count==0
diff --git a/plasmoid/package/contents/ui/Sftp.qml b/plasmoid/package/contents/ui/Sftp.qml
index 5a2437b92..9ef4f4176 100644
--- a/plasmoid/package/contents/ui/Sftp.qml
+++ b/plasmoid/package/contents/ui/Sftp.qml
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-import QtQuick 1.1
-import org.kde.plasma.core 0.1 as PlasmaCore
-import org.kde.plasma.components 0.1 as PlasmaComponents
+import QtQuick 2.1
+import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kdeconnect 1.0
QtObject {
diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml
new file mode 100644
index 000000000..5cb1fbbdf
--- /dev/null
+++ b/plasmoid/package/contents/ui/main.qml
@@ -0,0 +1,30 @@
+/**
+ * Copyright 2014 Aleix Pol Gonzalez
+ *
+ * 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 .
+ */
+
+import QtQuick 2.1
+import org.kde.plasma.plasmoid 2.0
+
+Item
+{
+ Plasmoid.compactRepresentation: CompactRepresentation { }
+ Plasmoid.fullRepresentation: FullRepresentation {}
+
+ Plasmoid.preferredRepresentation: fullRepresentation
+}
diff --git a/plasmoid/package/metadata.desktop b/plasmoid/package/metadata.desktop
index 8fd4ee7ae..29d67c029 100644
--- a/plasmoid/package/metadata.desktop
+++ b/plasmoid/package/metadata.desktop
@@ -50,7 +50,7 @@ Type=Service
X-KDE-ServiceTypes=Plasma/Applet,Plasma/PopupApplet
X-Plasma-API=declarativeappletscript
-X-Plasma-MainScript=ui/kdeconnect.qml
+X-Plasma-MainScript=ui/main.qml
X-Plasma-NotificationArea=true
X-Plasma-ConfigPlugins=kcm_kdeconnect