diff --git a/ATTRIBUTION b/ATTRIBUTION
new file mode 100644
index 0000000..5a9ecf9
--- /dev/null
+++ b/ATTRIBUTION
@@ -0,0 +1,5 @@
+Wikipedia, CC BY-SA 3.0
+
+Images included in this subset of data were retrieved from the Wikipedia website (http://www.wikipedia.org).
+
+The Image content was collected from their website, and annotated for entities and relations by Aditya Mehra. Only minor formatting changes were made to the content in order to get it into a suitable format for presentation (e.g. resize, scale and crop).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22de83a..9c41cf6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,41 +1,37 @@
# Set minimum CMake version (required for CMake 3.0 or later)
cmake_minimum_required(VERSION 2.8.12)
set(QT_MIN_VERSION "5.9.0")
set(KF5_MIN_VERSION "5.0.0")
# Use Extra CMake Modules (ECM) for common functionality.
# See http://api.kde.org/ecm/manual/ecm.7.html
# and http://api.kde.org/ecm/manual/ecm-kde-modules.7.html
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH})
set(VERSION 2.1.0)
-set(AUTHOR "Aditya Mehra")
-set(EMAIL "aix.m@outlook.com")
-set(BUG_ADDRESS "https://bugs.kde.org/describecomponents.cgi?product=plasma-mycroft")
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
+include(ECMInstallIcons)
# Locate plasma_install_package macro.
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Plasma
I18n
Notifications
)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Quick
Core
Qml
DBus
)
add_subdirectory(plugin)
-
+add_subdirectory(icons)
plasma_install_package(plasmoid org.kde.plasma.mycroftplasmoid)
-install( DIRECTORY image/breeze DESTINATION ${ICON_INSTALL_DIR})
-install( DIRECTORY image/breeze-dark DESTINATION ${ICON_INSTALL_DIR})
-install( DIRECTORY mycroft DESTINATION /etc )
+install( DIRECTORY mycroft DESTINATION ${SYSCONF_INSTALL_DIR})
diff --git a/COPYING.APACHE2 b/COPYING.APACHE2
new file mode 100644
index 0000000..c07bdab
--- /dev/null
+++ b/COPYING.APACHE2
@@ -0,0 +1,14 @@
+MSM.sh part of this software is licensed under Apache License, Version 2.0 and Copyright 2017 Mycroft AI Inc.
+-------------------------------------------------------------------------------------------------------------
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/PACKAGING.readme b/PACKAGING.readme
deleted file mode 100644
index 0604fe3..0000000
--- a/PACKAGING.readme
+++ /dev/null
@@ -1,31 +0,0 @@
-(Plasmoid) Debian Packaging Requirements:
-
-libkf5notifications-data
-libkf5notifications-dev
-qml-module-qtquick2
-qml-module-qtquick-controls2
-qml-module-qtquick-controls
-qml-module-qtwebsockets
-qml-module-qt-websockets
-qtdeclarative5-qtquick2-plugin
-qtdeclarative5-models-plugin
-cmake
-cmake-extras
-cmake-data
-qml-module-qtquick-layouts
-libkf5plasma-dev
-extra-cmake-modules
-qtdeclarative5-dev
-build-essential
-g++ gettext
-libqt5webkit5
-libqt5webkit5-dev
-libkf5i18n-data
-libkf5i18n-dev
-libkf5i18n5
-qml-module-qtgraphicaleffects
-libqt5dbus5
-libkf5dbusaddons-dev
-libdbus-1-dev
-libdbus-glib-1-dev
-
diff --git a/image/breeze-dark/apps/16/mycroft-plasma-appicon.svg b/icons/16-apps-mycroft-plasma-appicon.svg
old mode 100644
new mode 100755
similarity index 100%
rename from image/breeze-dark/apps/16/mycroft-plasma-appicon.svg
rename to icons/16-apps-mycroft-plasma-appicon.svg
diff --git a/image/breeze-dark/apps/32/mycroft-plasma-appicon.svg b/icons/32-apps-mycroft-plasma-appicon.svg
old mode 100644
new mode 100755
similarity index 100%
rename from image/breeze-dark/apps/32/mycroft-plasma-appicon.svg
rename to icons/32-apps-mycroft-plasma-appicon.svg
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
new file mode 100644
index 0000000..bfbd704
--- /dev/null
+++ b/icons/CMakeLists.txt
@@ -0,0 +1,7 @@
+ecm_install_icons(
+ ICONS
+ 16-apps-mycroft-plasma-appicon.svg
+ 32-apps-mycroft-plasma-appicon.svg
+ DESTINATION ${ICON_INSTALL_DIR}
+ THEME hicolor
+)
diff --git a/image/breeze/apps/16/mycroft-plasma-appicon.svg b/image/breeze/apps/16/mycroft-plasma-appicon.svg
deleted file mode 100644
index 1d5ea13..0000000
--- a/image/breeze/apps/16/mycroft-plasma-appicon.svg
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
diff --git a/image/breeze/apps/32/mycroft-plasma-appicon.svg b/image/breeze/apps/32/mycroft-plasma-appicon.svg
deleted file mode 100644
index 1d5ea13..0000000
--- a/image/breeze/apps/32/mycroft-plasma-appicon.svg
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
diff --git a/plasmoid/contents/images/.directory b/plasmoid/contents/images/.directory
deleted file mode 100644
index 3e38246..0000000
--- a/plasmoid/contents/images/.directory
+++ /dev/null
@@ -1,4 +0,0 @@
-[Dolphin]
-PreviewsShown=true
-Timestamp=2017,11,6,14,44,20
-Version=4
diff --git a/plasmoid/contents/ui/AutocompleteBox.qml b/plasmoid/contents/ui/AutocompleteBox.qml
index 3b4d9ee..3b8af6c 100644
--- a/plasmoid/contents/ui/AutocompleteBox.qml
+++ b/plasmoid/contents/ui/AutocompleteBox.qml
@@ -1,134 +1,153 @@
+/* Copyright 2016 Aditya Mehra
+
+ 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) 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 6 of version 3 of the license.
+
+ 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, see .
+*/
+
import QtQuick 2.7
import QtQuick.Controls 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import QtGraphicalEffects 1.0
Rectangle {
id: container
implicitHeight: units.gridUnit * 4
color: theme.backgroundColor
border.width: 1
border.color: Qt.lighter(theme.backgroundColor, 1.2);
property QtObject model: undefined
property int count: filterItem.model.count
property alias suggestionsModel: filterItem.model
property alias filter: filterItem.filter
property alias property: filterItem.property
property alias navView: autoCompListView
signal itemSelected(variant item)
function filterMatchesLastSuggestion() {
return suggestionsModel.count == 1 && suggestionsModel.get(0).name === filter
}
visible: filter.length > 0 && suggestionsModel.count > 0 && !filterMatchesLastSuggestion()
Logic {
id: filterItem
sourceModel: container.model
}
ListView{
id: autoCompListView
anchors.fill: parent
model: container.suggestionsModel
verticalLayoutDirection: ListView.BottomToTop
keyNavigationEnabled: true
keyNavigationWraps: true
clip: true
delegate: Item {
id: delegateItem
property bool keyboardSelected: autoCompListView.selectedIndex === suggestion.index
property bool selected: itemMouseArea.containsMouse
property variant suggestion: model
height: textComponent.height + 5
width: container.width
FocusScope{
anchors.fill:parent
focus: true
Rectangle{
id: autdelRect
color: delegateItem.selected ? Qt.darker(theme.textColor, 1.2) : Qt.darker(theme.backgroundColor, 1.2)
width: parent.width
height: textComponent.height + 10
Image {
id : smallIconV
source: "../images/mycroftsmaller2.png"
width: units.gridUnit * 2
height: units.gridUnit * 2
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: units.gridUnit * 0.35
ColorOverlay {
anchors.fill: smallIconV
source: smallIconV
color: Qt.darker(theme.textColor, 1.2);
}
}
PlasmaCore.SvgItem {
id: innerDelegateRectDividerLine
anchors {
left: smallIconV.right
leftMargin: units.gridUnit * 0.35
top: parent.top
topMargin: 0
bottom: parent.bottom
bottomMargin: 0
}
width: lineitemdividerSvg.elementSize("vertical-line").width
z: 110
elementId: "vertical-line"
svg: PlasmaCore.Svg {
id: lineitemdividerSvg;
imagePath: "widgets/line"
}
}
Text {
id: textComponent
anchors.left: innerDelegateRectDividerLine.right
anchors.leftMargin: units.gridUnit * 0.35
color: delegateItem.selected ? Qt.darker(theme.backgroundColor, 1.2) : Qt.darker(theme.textColor, 1.2)
text: model.name;
width: parent.width - 4
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
MouseArea {
id: itemMouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: container.itemSelected(delegateItem.suggestion)
}
PlasmaCore.SvgItem {
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
width: 1
height: horlineAutoCSvg.elementSize("horizontal-line").height
elementId: "horizontal-line"
z: 110
svg: PlasmaCore.Svg {
id: horlineAutoCSvg;
imagePath: "widgets/line"
}
}
}
}
}
ScrollBar.vertical: ScrollBar { }
}
}
diff --git a/plasmoid/contents/ui/CustomIndicator.qml b/plasmoid/contents/ui/CustomIndicator.qml
index 803eed1..cfa1d23 100644
--- a/plasmoid/contents/ui/CustomIndicator.qml
+++ b/plasmoid/contents/ui/CustomIndicator.qml
@@ -1,152 +1,151 @@
-
/* Copyright 2016 Aditya Mehra
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) 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 6 of version 3 of the license.
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, see .
*/
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
Item{
id: customIndicatorBusy
anchors.centerIn: parent
property alias cstanim: customIndicatorBusy
property bool running: false
visible: false
Item {
implicitWidth: units.gridUnit * 3
implicitHeight: units.gridUnit * 3
Rectangle {
id: antiinnerCircleOutVert
anchors.centerIn: parent
color: "skyblue"
radius: 8
implicitWidth: units.gridUnit * 1.2
implicitHeight: units.gridUnit * 1.2
}
Rectangle {
id: innerCircleOutHoriz
anchors.centerIn: parent
color: "steelblue"
radius: 5
implicitWidth: units.gridUnit * 2.2
implicitHeight: units.gridUnit * 1.2
}
Rectangle {
id: innerCircleOutVert
anchors.centerIn: parent
color: "steelblue"
radius: 5
implicitWidth: units.gridUnit * 1.2
implicitHeight: units.gridUnit * 2.2
}
Rectangle {
id: innerCircleIn
anchors.centerIn: parent
color: "lightblue"
border.color: "steelblue"
border.width: units.gridUnit * 0.2
radius: 100
implicitWidth: units.gridUnit * 1.7
implicitHeight: units.gridUnit * 1.7
Image {
id: innerPulser
source: "../images/midanim.png"
anchors.centerIn: parent
height: units.gridUnit * 3.0
width: units.gridUnit * 3.0
}
ColorOverlay {
anchors.fill: innerPulser
source: innerPulser
color: "steelblue"
}
}
RotationAnimator {
target: innerCircleOutHoriz
running: customIndicatorBusy.running
from: 0
to: 360
loops: Animation.Infinite
duration: 6000
}
ScaleAnimator {
target: innerCircleOutHoriz
running: customIndicatorBusy.running
from: 1.1
to: 0.5
duration: 1200
loops: Animation.Infinite
}
RotationAnimator {
target: innerCircleOutVert
running: customIndicatorBusy.running
from: 0
to: 360
loops: Animation.Infinite
duration: 6000
}
RotationAnimator {
target: antiinnerCircleOutVert
running: customIndicatorBusy.running
from: 360
to: 0
loops: Animation.Infinite
duration: 6000
}
ScaleAnimator {
target: innerCircleOutVert
running: customIndicatorBusy.running
from: 1.1
to: 0.5
duration: 1200
loops: Animation.Infinite
}
ScaleAnimator {
target: antiinnerCircleOutVert
running: customIndicatorBusy.running
from: 0.5
to: 1.3
duration: 1200
loops: Animation.Infinite
}
ScaleAnimator {
target: innerCircleIn
running: customIndicatorBusy.running
from: 1
to: 0.7
duration: 1200
loops: Animation.Infinite
}
}
}
diff --git a/plasmoid/contents/ui/CustomMicIndicator.qml b/plasmoid/contents/ui/CustomMicIndicator.qml
index 397222f..a43ea46 100644
--- a/plasmoid/contents/ui/CustomMicIndicator.qml
+++ b/plasmoid/contents/ui/CustomMicIndicator.qml
@@ -1,93 +1,112 @@
+/* Copyright 2016 Aditya Mehra
+
+ 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) 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 6 of version 3 of the license.
+
+ 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, see .
+*/
+
import QtQuick 2.9
import org.kde.plasma.components 2.0 as PlasmaComponents
Item {
anchors.fill: parent
Rectangle {
id: innerCircleSurround
anchors.centerIn: parent
color: "#404682b4"
border.color: "#00000000"
border.width: units.gridUnit * 0.2
radius: 100
implicitWidth: units.gridUnit * 2.7
implicitHeight: units.gridUnit * 2.7
}
Rectangle {
id: innerCircleSurroundOutterRing
anchors.centerIn: parent
color: "#00000000"
border.color: "lightblue"
border.width: units.gridUnit * 0.2
radius: 100
implicitWidth: units.gridUnit * 2.7
implicitHeight: units.gridUnit * 2.7
}
Rectangle {
id: innerCircleIn
anchors.centerIn: parent
color: "lightblue"
border.color: "steelblue"
border.width: units.gridUnit * 0.1
radius: 100
implicitWidth: units.gridUnit * 1.7
implicitHeight: units.gridUnit * 1.7
}
Rectangle {
id: innerCircleInMic
anchors.centerIn: parent
color: "#00000000"
border.color: "#00000000"
border.width: units.gridUnit * 0.1
radius: 100
implicitWidth: units.gridUnit * 1.7
implicitHeight: units.gridUnit * 1.7
PlasmaComponents.ToolButton {
id: innerImgInnerCirc
anchors.centerIn: parent
iconSource: "audio-input-microphone"
width: units.gridUnit * 2
height: units.gridUnit * 2
onClicked: {
var socketmessage = {};
socketmessage.type = "mycroft.mic.listen";
socketmessage.data = {};
socketmessage.data.utterances = [];
socket.sendTextMessage(JSON.stringify(socketmessage));
}
}
}
ScaleAnimator {
target: innerCircleSurround
running: true
from: 1.2
to: 0.8
duration: 3600
loops: Animation.Infinite
}
ScaleAnimator {
target: innerCircleSurroundOutterRing
running: true
from: 1
to: 0.9
duration: 3600
loops: Animation.Infinite
}
ScaleAnimator {
target: innerCircleIn
running: true
from: 0.8
to: 1
duration: 3600
loops: Animation.Infinite
}
}
diff --git a/plasmoid/contents/ui/Logic.qml b/plasmoid/contents/ui/Logic.qml
index 128184e..a628ef1 100644
--- a/plasmoid/contents/ui/Logic.qml
+++ b/plasmoid/contents/ui/Logic.qml
@@ -1,59 +1,78 @@
+/* Copyright 2016 Aditya Mehra
+
+ 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) 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 6 of version 3 of the license.
+
+ 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, see .
+*/
+
import QtQuick 2.7
Item {
id: component
property alias model: filterModel
property QtObject sourceModel: undefined
property string filter: ""
property string property: ""
Connections {
onFilterChanged: invalidateFilter()
onPropertyChanged: invalidateFilter()
onSourceModelChanged: invalidateFilter()
}
Component.onCompleted: invalidateFilter()
ListModel {
id: filterModel
}
function invalidateFilter() {
if (sourceModel === undefined)
return;
filterModel.clear();
if (!isFilteringPropertyOk())
return
var length = sourceModel.count
for (var i = 0; i < length; ++i) {
var item = sourceModel.get(i);
if (isAcceptedItem(item)) {
filterModel.append(item)
}
}
}
function isAcceptedItem(item) {
if (item[this.property] === undefined)
return false
if (item[this.property].match(this.filter) === null) {
return false
}
return true
}
function isFilteringPropertyOk() {
if(this.property === undefined || this.property === "") {
return false
}
return true
}
}
diff --git a/plasmoid/contents/ui/StockPriceWidget.qml b/plasmoid/contents/ui/StockPriceWidget.qml
index c5495d3..e9ea291 100644
--- a/plasmoid/contents/ui/StockPriceWidget.qml
+++ b/plasmoid/contents/ui/StockPriceWidget.qml
@@ -1,108 +1,127 @@
+/* Copyright 2016 Aditya Mehra
+
+ 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) 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 6 of version 3 of the license.
+
+ 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, see .
+*/
+
import QtQuick 2.0
import QtQuick.Window 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.0
import QtQml.Models 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
Column {
spacing: 6
//anchors.right: parent.right
//anchors.left: parent.left
//readonly property bool sentByMe: model.recipient !== "Me"
// property alias mssg: messageText.text
property alias currentstockprice: stockWidgetPrice.text
property alias currentstocksymbol: stockWidgetSymbol.text
Row {
id: messageRow
spacing: 6
Rectangle{
id: messageWrapper
width: cbwidth
height: messageRect.height
color: theme.backgroundColor
Rectangle {
id: messageRect
width: cbwidth / 1.1
height: messageText.implicitHeight + 24
//anchors.right: avatar.right
color: theme.backgroundColor
PlasmaComponents.Label {
id: stockWidgetHeader
color: "#ffffff"
text: qsTr("Stock Price Info")
style: Text.Raised
font.italic: false
textFormat: Text.AutoText
anchors.top: parent.top
anchors.topMargin: 30
wrapMode: Text.NoWrap
font.bold: true
font.family: "Times New Roman"
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 10
font.pixelSize: 30
}
PlasmaComponents.Label {
id: stockWidgetSymbol
color: "#ffffff"
text: qsTr("Text")
font.bold: true
anchors.top: stockWidgetHeader.bottom
anchors.topMargin: 15
anchors.right: parent.right
style: Text.Raised
font.family: "Times New Roman"
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 40
font.pixelSize: 35
PlasmaComponents.Label {
id: stockWidgetPriceLabel
color: "#ffffff"
text: qsTr("Stock Price:")
font.italic: true
font.family: "Times New Roman"
style: Text.Raised
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 150
font.pixelSize: 24
PlasmaComponents.Label {
id: stockWidgetPrice
color: "#ffffff"
text: qsTr("128.89")
font.italic: true
style: Text.Raised
font.family: "Times New Roman"
font.bold: true
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 124
anchors.right: parent.right
anchors.rightMargin: 0
font.pixelSize: 27
}
}
}
}
}
}
}
diff --git a/plasmoid/contents/ui/TomorrowWeatherType.qml b/plasmoid/contents/ui/TomorrowWeatherType.qml
index e18a710..1e08fa4 100644
--- a/plasmoid/contents/ui/TomorrowWeatherType.qml
+++ b/plasmoid/contents/ui/TomorrowWeatherType.qml
@@ -1,149 +1,162 @@
-import QtQuick 2.0
+/* Copyright 2016 Aditya Mehra
+
+ 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) 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 6 of version 3 of the license.
+
+ 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, see .
+*/
+
+import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Layouts 1.3
-import QtQuick.Controls 2.0
+import QtQuick.Controls 2.2
import QtQml.Models 2.2
-import org.kde.plasma.components 2.0 as PlasmaComponents
-import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0
-
+import org.kde.plasma.components 2.0 as PlasmaComponents
+import org.kde.plasma.extras 2.0 as PlasmaExtras
Column {
spacing: 6
- //anchors.right: parent.right
- //anchors.left: parent.left
-
- //readonly property bool sentByMe: model.recipient !== "Me"
- //property alias cttemp: currenttempitem.text
property alias lttemp: lowtempitem.text
property alias httemp: hightempitem.text
Row {
id: messageRow
spacing: 6
Rectangle{
id: messageWrapper
width: cbwidth
height: messageRect.height
color: theme.backgroundColor
Rectangle {
id: messageRect
width: cbwidth / 1.1
height: 100
//anchors.right: avatar.right
color: theme.backgroundColor
Rectangle {
id: rectangleltt
width: 100
height: 60
color: "#00000000"
anchors.top: todayweather.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 0
PlasmaComponents.Label {
id: lowtemplable
anchors.left: parent.left
anchors.verticalCenter: lowtempaniimage.verticalCenter
text: "Low"
// font.family: "Courier"
font.pointSize: 12
font.bold: true
anchors.top: parent.top
anchors.topMargin: 8
anchors.leftMargin: 30
}
PlasmaComponents.Label {
id: lowtempitem
x: 63
y: 33
anchors.top: lowtemplable.bottom
text: "100"
anchors.horizontalCenter: lowtemplable.horizontalCenter
anchors.topMargin: 10
}
PlasmaComponents.Label {
id: weatherwidgetlowtempdegree
text: qsTr("°")
anchors.verticalCenterOffset: -5
anchors.verticalCenter: lowtempitem.verticalCenter
anchors.left: lowtempitem.right
anchors.leftMargin: 5
font.pixelSize: 12
}
}
Rectangle {
id: rectanglehtt
width: 100
height: 60
color: "#00000000"
anchors.top: todayweather.bottom
anchors.topMargin: 5
anchors.left: rectangleltt.right
anchors.leftMargin: 0
PlasmaComponents.Label {
id: hightempitem
x: 65
y: 70
anchors.top: hightemplable.bottom
text: "100"
anchors.topMargin: 10
anchors.horizontalCenter: hightemplable.horizontalCenter
}
PlasmaComponents.Label {
id: hightemplable
anchors.left: parent.left
text: "High"
font.pointSize: 12
font.bold: true
// font.family: "Courier"
anchors.top: parent.top
anchors.topMargin: 8
anchors.verticalCenter: hightempaniimage.verticalCenter
anchors.leftMargin: 30
}
PlasmaComponents.Label {
id: weatherwidgethightempdegree
text: qsTr("°")
anchors.verticalCenterOffset: -5
anchors.verticalCenter: hightempitem.verticalCenter
anchors.left: hightempitem.right
anchors.leftMargin: 5
font.pixelSize: 12
}
}
PlasmaComponents.Label {
id: todayweather
text: qsTr("Tomorrow's Weather")
anchors.left: parent.left
anchors.leftMargin: 9
// font.family: "Courier"
font.italic: false
font.bold: true
font.pixelSize: 17
}
}
}
}
}
diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt
index b704afb..99e6b65 100644
--- a/plugin/CMakeLists.txt
+++ b/plugin/CMakeLists.txt
@@ -1,15 +1,13 @@
-find_package(PkgConfig)
-
kde_enable_exceptions()
set(mycroftplasmoidplugin_SRCS mycroftplasmoidplugin.cpp launchapp.cpp notify.cpp filereader.cpp msmapp.cpp mycroftplasmoid_dbus.cpp)
add_library(mycroftplasmoidplugin SHARED ${mycroftplasmoidplugin_SRCS})
target_link_libraries(mycroftplasmoidplugin Qt5::Gui Qt5::Core Qt5::Qml Qt5::DBus KF5::Plasma KF5::I18n KF5::Notifications)
install(TARGETS mycroftplasmoidplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/private/mycroftplasmoid)
install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/private/mycroftplasmoid)
install(FILES mycroftPlasmoid.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})