Service test
This commit is contained in:
parent
430eb1c13f
commit
a7670ecee2
24 changed files with 399 additions and 70 deletions
3
config/ba.dysko.harbour.tooter.service
Normal file
3
config/ba.dysko.harbour.tooter.service
Normal file
|
@ -0,0 +1,3 @@
|
|||
[D-BUS Service]
|
||||
Name=ba.dysko.harbour.tooter
|
||||
Exec=/usr/bin/invoker --type=silica-qt5 --desktop-file=harbour-tooter.desktop -s -n /usr/bin/harbour-tooter
|
10
config/ba.dysko.harbour.tooter.xml
Normal file
10
config/ba.dysko.harbour.tooter.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="ba.dysko.harbour.tooter">
|
||||
<method name="showtoot">
|
||||
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true" />
|
||||
<arg name="key" type="as" direction="in" />
|
||||
</method>
|
||||
<method name="openapp" />
|
||||
</interface>
|
||||
</node>
|
BIN
config/icon-lock-harbour-tooter.png
Normal file
BIN
config/icon-lock-harbour-tooter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
5
config/x-harbour.tooter.activity.conf
Normal file
5
config/x-harbour.tooter.activity.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
appIcon=/usr/share/harbour-tooter/config/icon-lock-harbour-tooter.png
|
||||
x-nemo-icon=/usr/share/harbour-tooter/config/icon-lock-harbour-tooter.png
|
||||
x-nemo-priority=120
|
||||
x-nemo-feedback=sms_exists
|
||||
x-nemo-led-disabled-without-body-and-summary=false
|
|
@ -13,13 +13,36 @@
|
|||
TARGET = harbour-tooter
|
||||
|
||||
QT += network dbus sql
|
||||
CONFIG += sailfishapp link_pkgconfig
|
||||
PKGCONFIG += sailfishapp nemonotifications-qt5 Qt5SystemInfo
|
||||
|
||||
DEFINES += "APPVERSION=\\\"$${SPECVERSION}\\\""
|
||||
DEFINES += "APPNAME=\\\"$${TARGET}\\\""
|
||||
|
||||
!exists( src/dbusAdaptor.h ) {
|
||||
system(qdbusxml2cpp config/ba.dysko.harbour.tooter.xml -i dbus.h -a src/dbusAdaptor)
|
||||
}
|
||||
|
||||
config.path = /usr/share/$${TARGET}/config/
|
||||
config.files = config/icon-lock-harbour-maira.png
|
||||
|
||||
notification_categories.path = /usr/share/lipstick/notificationcategories
|
||||
notification_categories.files = config/x-harbour.maira.activity.*
|
||||
|
||||
dbus_services.path = /usr/share/dbus-1/services/
|
||||
dbus_services.files = config/ba.dysko.harbour.tooter.service
|
||||
|
||||
interfaces.path = /usr/share/dbus-1/interfaces/
|
||||
interfaces.files = config/ba.dysko.harbour.tooter.xml
|
||||
|
||||
CONFIG += sailfishapp
|
||||
|
||||
SOURCES += src/harbour-tooter.cpp \
|
||||
src/imageuploader.cpp
|
||||
src/imageuploader.cpp \
|
||||
src/dbusAdaptor.cpp \
|
||||
src/dbus.cpp
|
||||
|
||||
OTHER_FILES += qml/harbour-tooter.qml \
|
||||
config/* \
|
||||
qml/cover/CoverPage.qml \
|
||||
qml/pages/MainPage.qml \
|
||||
qml/pages/LoginPage.qml \
|
||||
|
@ -73,7 +96,11 @@ DISTFILES += \
|
|||
qml/pages/Settings.qml \
|
||||
qml/pages/components/MediaBlock.qml \
|
||||
qml/pages/components/MyImage.qml \
|
||||
qml/pages/components/ImageFullScreen.qml
|
||||
qml/pages/components/ImageFullScreen.qml \
|
||||
config/icon-lock-harbour-tooter.png \
|
||||
config/x-harbour.tooter.activity.conf
|
||||
|
||||
HEADERS += \
|
||||
src/imageuploader.h
|
||||
src/imageuploader.h \
|
||||
src/dbusAdaptor.h \
|
||||
src/dbus.h
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.0.1, 2017-10-12T14:57:03. -->
|
||||
<!-- Written by QtCreator 4.0.1, 2017-10-25T00:36:59. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{25497605-1bff-4134-a878-76c1475dd8e3}</value>
|
||||
<value type="QByteArray">{41ec03ca-9430-48f3-b421-990d428b2838}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
|
@ -59,18 +59,18 @@
|
|||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">MerSDK-SailfishOS-i486</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">MerSDK-SailfishOS-i486</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{f49c1b5a-d715-401a-9a10-0e5fe9e5b72a}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">SailfishOS-i486 (in Sailfish OS Build Engine)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SailfishOS-i486 (in Sailfish OS Build Engine)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{2b6dd414-d640-472a-9475-472ab2c5e22e}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">2</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/dysko/SF/build-harbour-tooter-MerSDK_SailfishOS_i486-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dysko/GIT/build-harbour-tooter-SailfishOS_i486_in_Sailfish_OS_Build_Engine-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -138,11 +138,11 @@
|
|||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/dysko/SF/build-harbour-tooter-MerSDK_SailfishOS_i486-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dysko/GIT/build-harbour-tooter-SailfishOS_i486_in_Sailfish_OS_Build_Engine-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -178,7 +178,7 @@
|
|||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -210,11 +210,11 @@
|
|||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/dysko/SF/build-harbour-tooter-MerSDK_SailfishOS_i486-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dysko/GIT/build-harbour-tooter-SailfishOS_i486_in_Sailfish_OS_Build_Engine-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -250,7 +250,7 @@
|
|||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -396,7 +396,7 @@
|
|||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="MerRunConfiguration.QmlLiveBenchWorkspace">C:/Users/dysko/SF/harbour-tooter</value>
|
||||
<value type="QString" key="MerRunConfiguration.QmlLiveBenchWorkspace">/Users/dysko/GIT/harbour-tooter</value>
|
||||
<value type="bool" key="MerRunConfiguration.QmlLiveEnabled">false</value>
|
||||
<value type="int" key="MerRunConfiguration.QmlLiveIpcPort">10234</value>
|
||||
<value type="int" key="MerRunConfiguration.QmlLiveOptions">3</value>
|
||||
|
@ -424,18 +424,18 @@
|
|||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">MerSDK-SailfishOS-armv7hl</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">MerSDK-SailfishOS-armv7hl</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{588087e2-ecc1-41aa-b652-86f16cba9351}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">SailfishOS-armv7hl (in Sailfish OS Build Engine)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SailfishOS-armv7hl (in Sailfish OS Build Engine)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e475a8ea-d9f2-4d35-b4f0-1f1076cd8d23}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">2</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/dysko/SF/build-harbour-tooter-MerSDK_SailfishOS_armv7hl-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dysko/GIT/build-harbour-tooter-SailfishOS_armv7hl_in_Sailfish_OS_Build_Engine-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -471,7 +471,7 @@
|
|||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -503,11 +503,11 @@
|
|||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/dysko/SF/build-harbour-tooter-MerSDK_SailfishOS_armv7hl-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dysko/GIT/build-harbour-tooter-SailfishOS_armv7hl_in_Sailfish_OS_Build_Engine-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -543,7 +543,7 @@
|
|||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -575,11 +575,11 @@
|
|||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/dysko/SF/build-harbour-tooter-MerSDK_SailfishOS_armv7hl-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/dysko/GIT/build-harbour-tooter-SailfishOS_armv7hl_in_Sailfish_OS_Build_Engine-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -615,7 +615,7 @@
|
|||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start SDK</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
|
||||
</valuemap>
|
||||
|
@ -761,7 +761,7 @@
|
|||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="MerRunConfiguration.QmlLiveBenchWorkspace">C:/Users/dysko/SF/harbour-tooter</value>
|
||||
<value type="QString" key="MerRunConfiguration.QmlLiveBenchWorkspace">/Users/dysko/GIT/harbour-tooter</value>
|
||||
<value type="bool" key="MerRunConfiguration.QmlLiveEnabled">false</value>
|
||||
<value type="int" key="MerRunConfiguration.QmlLiveIpcPort">10234</value>
|
||||
<value type="int" key="MerRunConfiguration.QmlLiveOptions">3</value>
|
||||
|
|
|
@ -67,5 +67,20 @@ ApplicationWindow
|
|||
Component.onDestruction: {
|
||||
Logic.saveData()
|
||||
}
|
||||
Connections
|
||||
{
|
||||
target: Dbus
|
||||
onViewtoot:
|
||||
{
|
||||
console.log(key, "dbus show issue")
|
||||
|
||||
}
|
||||
onActivateapp:
|
||||
{
|
||||
console.log ("dbus activate app")
|
||||
pageStack.pop(pageStack.find( function(page){ return (page._depth === 0) }))
|
||||
activate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,14 +116,15 @@ var notificationGenerator = function(item){
|
|||
var notification;
|
||||
switch (item.urgency){
|
||||
case "normal":
|
||||
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-nemo.example"; urgency: Notification.Normal; }', Qt.application, 'InternalQmlObject');
|
||||
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { appName: "Tooter"; itemCount: 1; category: "x-harbour.tooter.activity"; urgency: Notification.Normal; }', Qt.application, 'InternalQmlObject');
|
||||
break;
|
||||
case "critical":
|
||||
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-nemo.example"; urgency: Notification.Critical; }', Qt.application, 'InternalQmlObject');
|
||||
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { appName: "Tooter"; itemCount: 1; category: "x-harbour.tooter.activity"; urgency: Notification.Critical; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-do-it", "service": "org.nemomobile.example", "path": "/example", "iface": "org.nemomobile.example", "method": "doSomething", "arguments": [ "argument", 1 ] },{ "name": "ignore", "displayName": "Ignore the problem", "icon": "icon-s-ignore", "service": "org.nemomobile.example", "path": "/example", "iface": "org.nemomobile.example", "method": "ignore", "arguments": [ "argument", 1 ] } ]; onClicked: console.log("Clicked"); onClosed: console.log("Closed, reason: " + reason); }', Qt.application, 'InternalQmlObject');
|
||||
break;
|
||||
default:
|
||||
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-nemo.example"; urgency: Notification.Low; }', Qt.application, 'InternalQmlObject');
|
||||
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { appName: "Tooter"; itemCount: 1; category: "x-harbour.tooter.activity"; urgency: Notification.Low; }', Qt.application, 'InternalQmlObject');
|
||||
}
|
||||
notification.remoteActions = [ { "name": "app", "displayName": "Do something", "icon": "icon-s-do-it", "service": "ba.dysko.harbour.tooter", "path": "/", "iface": "ba.dysko.harbour.tooter", "method": "openapp", "arguments": [ ]}]
|
||||
|
||||
notification.timestamp = item.timestamp
|
||||
notification.summary = item.summary
|
||||
|
|
|
@ -41,13 +41,29 @@ Page {
|
|||
videoError.visible = true;
|
||||
}
|
||||
onStatusChanged: {
|
||||
console.log(status)
|
||||
switch (status){
|
||||
case MediaPlayer.Buffering:
|
||||
return;
|
||||
case MediaPlayer.Loading:
|
||||
playerIcon.visible = false;
|
||||
console.log("loading")
|
||||
return;
|
||||
default:
|
||||
case MediaPlayer.EndOfMedia:
|
||||
console.log("EndOfMedia")
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onPlaybackStateChanged: {
|
||||
console.log(playbackState)
|
||||
switch (playbackState){
|
||||
case MediaPlayer.PlayingState:
|
||||
playerIcon.icon.source = "image://theme/icon-m-play"
|
||||
return;
|
||||
case MediaPlayer.PausedState:
|
||||
playerIcon.icon.source = "image://theme/icon-m-pause"
|
||||
return;
|
||||
case MediaPlayer.StoppedState:
|
||||
playerIcon.icon.source = "image://theme/icon-m-stop"
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -70,35 +86,53 @@ Page {
|
|||
//console.log(duration)
|
||||
//console.log(bufferProgress)
|
||||
//console.log(position)
|
||||
progressRec.width = parent.width * position/duration
|
||||
if (status !== MediaPlayer.Loading){
|
||||
playerProgress.indeterminate = false
|
||||
playerProgress.maximumValue = duration
|
||||
playerProgress.minimumValue = 0
|
||||
playerProgress.value = position
|
||||
}
|
||||
|
||||
}
|
||||
onStopped: function(){
|
||||
play()
|
||||
}
|
||||
IconButton {
|
||||
id: playerIcon
|
||||
anchors.centerIn: parent
|
||||
icon.source: "image://theme/icon-l-play"
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.leftMargin: Theme.paddingLarge
|
||||
anchors.bottomMargin: Theme.paddingMedium
|
||||
icon.source: "image://theme/icon-m-play"
|
||||
onClicked: function() {
|
||||
visible = false;
|
||||
if (video.playbackState === MediaPlayer.PlayingState)
|
||||
video.pause()
|
||||
else
|
||||
video.play()
|
||||
}
|
||||
}
|
||||
|
||||
ProgressBar {
|
||||
indeterminate: true
|
||||
id: playerProgress
|
||||
anchors.left: playerIcon.right
|
||||
anchors.right: parent.right
|
||||
|
||||
anchors.verticalCenter: playerIcon.verticalCenter
|
||||
anchors.leftMargin: 0
|
||||
anchors.bottomMargin: Theme.paddingMedium
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: function() {
|
||||
playerIcon.visible = true;
|
||||
video.stop()
|
||||
if (video.playbackState === MediaPlayer.PlayingState)
|
||||
video.pause()
|
||||
else
|
||||
video.play()
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: progressRec
|
||||
anchors.bottom: parent.bottom
|
||||
width: 0
|
||||
height: Theme.paddingSmall
|
||||
color: Theme.highlightBackgroundColor
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
|
|
|
@ -3,6 +3,7 @@ import Sailfish.Silica 1.0
|
|||
import "../../lib/API.js" as Logic
|
||||
import "."
|
||||
|
||||
import org.nemomobile.notifications 1.0;
|
||||
|
||||
SilicaListView {
|
||||
id: myList
|
||||
|
@ -61,15 +62,31 @@ SilicaListView {
|
|||
text: "NOTIFIKACIJA"
|
||||
onClicked: {
|
||||
Logic.notifier({
|
||||
type: "favourite",
|
||||
type: "follow",
|
||||
urgency: "critical",
|
||||
created_at: new Date(),
|
||||
account_display_name: '@muo',
|
||||
reblog_account_display_name: "@akakakak",
|
||||
content: "blaaaaaa blaaaaaablaaaaaablaaaaaa"
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: "NOTIFIKACIJA2"
|
||||
onClicked: {
|
||||
|
||||
Logic.notifier({
|
||||
type: "reblog",
|
||||
urgency: "critical",
|
||||
created_at: new Date(),
|
||||
account_display_name: '@muowww',
|
||||
reblog_account_display_name: "@akakwwakak",
|
||||
content: "blaaaaaa blaaaaawwwablaaaaaablaaaaaa"
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Settings")
|
||||
onClicked: {
|
||||
|
@ -119,6 +136,34 @@ SilicaListView {
|
|||
console.log("CountChanged!")*/
|
||||
|
||||
}
|
||||
Button {
|
||||
Notification {
|
||||
id: notification
|
||||
category: "x-harbour.tooter.activity"
|
||||
appName: "Tooter"
|
||||
appIcon: "/usr/share/harbour-tooter/config/icon-lock-harbour-tooter.png"
|
||||
summary: "Notification summary"
|
||||
body: "Notification body"
|
||||
previewSummary: "Notification preview summary"
|
||||
previewBody: "Notification preview body"
|
||||
itemCount: 5
|
||||
timestamp: "2013-02-20 18:21:00"
|
||||
remoteActions: [ {
|
||||
"name": "default",
|
||||
"displayName": "Do something",
|
||||
"icon": "icon-s-certificates",
|
||||
"service": "ba.dysko.harbour.tooter",
|
||||
"path": "/",
|
||||
"iface": "ba.dysko.harbour.tooter",
|
||||
"method": "openapp",
|
||||
"arguments": [ ]
|
||||
}]
|
||||
onClicked: console.log("Clicked")
|
||||
onClosed: console.log("Closed, reason: " + reason)
|
||||
}
|
||||
text: "Application notification" + (notification.replacesId ? " ID:" + notification.replacesId : "")
|
||||
onClicked: notification.publish()
|
||||
}
|
||||
footer: Item{
|
||||
width: parent.width
|
||||
height: Theme.itemSizeLarge
|
||||
|
|
52
src/dbus.cpp
Normal file
52
src/dbus.cpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
#include "dbus.h"
|
||||
|
||||
static const char *PATH = "/";
|
||||
static const char *SERVICE = SERVICE_NAME;
|
||||
|
||||
Dbus::Dbus(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
m_dbusRegistered = false;
|
||||
new TooterAdaptor(this);
|
||||
registerDBus();
|
||||
}
|
||||
|
||||
Dbus::~Dbus()
|
||||
{
|
||||
if (m_dbusRegistered)
|
||||
{
|
||||
QDBusConnection connection = QDBusConnection::sessionBus();
|
||||
connection.unregisterObject(PATH);
|
||||
connection.unregisterService(SERVICE);
|
||||
}
|
||||
}
|
||||
|
||||
void Dbus::registerDBus()
|
||||
{
|
||||
if (!m_dbusRegistered)
|
||||
{
|
||||
QDBusConnection connection = QDBusConnection::sessionBus();
|
||||
if (!connection.registerService(SERVICE))
|
||||
{
|
||||
QCoreApplication::quit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!connection.registerObject(PATH, this))
|
||||
{
|
||||
QCoreApplication::quit();
|
||||
return;
|
||||
}
|
||||
m_dbusRegistered = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Dbus::showtoot(const QStringList &key)
|
||||
{
|
||||
emit viewtoot(key.at(0));
|
||||
}
|
||||
|
||||
void Dbus::openapp()
|
||||
{
|
||||
emit activateapp();
|
||||
}
|
33
src/dbus.h
Normal file
33
src/dbus.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef DBUS_H
|
||||
#define DBUS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include "dbusAdaptor.h"
|
||||
|
||||
#define SERVICE_NAME "ba.dysko.harbour.tooter"
|
||||
|
||||
class QDBusInterface;
|
||||
class Dbus : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", SERVICE_NAME)
|
||||
|
||||
public:
|
||||
explicit Dbus(QObject *parent = 0);
|
||||
~Dbus();
|
||||
void registerDBus();
|
||||
|
||||
public Q_SLOTS:
|
||||
Q_NOREPLY void showtoot(const QStringList &key);
|
||||
Q_NOREPLY void openapp();
|
||||
|
||||
signals:
|
||||
void viewtoot(QString key);
|
||||
void activateapp();
|
||||
|
||||
private:
|
||||
bool m_dbusRegistered;
|
||||
};
|
||||
|
||||
#endif // DBUS_H
|
47
src/dbusAdaptor.cpp
Normal file
47
src/dbusAdaptor.cpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* This file was generated by qdbusxml2cpp version 0.8
|
||||
* Command line was: qdbusxml2cpp config/com.kimmoli.harbour.maira.xml -i dbus.h -a src/dbusAdaptor
|
||||
*
|
||||
* qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
|
||||
*
|
||||
* This is an auto-generated file.
|
||||
* Do not edit! All changes made to it will be lost.
|
||||
*/
|
||||
|
||||
#include "src/dbusAdaptor.h"
|
||||
#include <QtCore/QMetaObject>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
/*
|
||||
* Implementation of adaptor class TooterAdaptor
|
||||
*/
|
||||
|
||||
TooterAdaptor::TooterAdaptor(QObject *parent)
|
||||
: QDBusAbstractAdaptor(parent)
|
||||
{
|
||||
// constructor
|
||||
setAutoRelaySignals(true);
|
||||
}
|
||||
|
||||
TooterAdaptor::~TooterAdaptor()
|
||||
{
|
||||
// destructor
|
||||
}
|
||||
|
||||
void TooterAdaptor::openapp()
|
||||
{
|
||||
// handle method call ba.dysko.harbour.tooter.openapp
|
||||
QMetaObject::invokeMethod(parent(), "openapp");
|
||||
}
|
||||
|
||||
void TooterAdaptor::showtoot(const QStringList &key)
|
||||
{
|
||||
// handle method call ba.dysko.harbour.tooter.showtoot
|
||||
QMetaObject::invokeMethod(parent(), "showtoot", Q_ARG(QStringList, key));
|
||||
}
|
||||
|
54
src/dbusAdaptor.h
Normal file
54
src/dbusAdaptor.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* This file was generated by qdbusxml2cpp version 0.8
|
||||
* Command line was: qdbusxml2cpp config/com.kimmoli.harbour.maira.xml -i dbus.h -a src/dbusAdaptor
|
||||
*
|
||||
* qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
|
||||
*
|
||||
* This is an auto-generated file.
|
||||
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||
* before re-generating it.
|
||||
*/
|
||||
|
||||
#ifndef DBUSADAPTOR_H
|
||||
#define DBUSADAPTOR_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include "dbus.h"
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QByteArray;
|
||||
template<class T> class QList;
|
||||
template<class Key, class Value> class QMap;
|
||||
class QString;
|
||||
class QStringList;
|
||||
class QVariant;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/*
|
||||
* Adaptor class for interface com.kimmoli.harbour.maira
|
||||
*/
|
||||
class TooterAdaptor: public QDBusAbstractAdaptor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "ba.dysko.harbour.tooter")
|
||||
Q_CLASSINFO("D-Bus Introspection", ""
|
||||
" <interface name=\"ba.dysko.harbour.tooter\">\n"
|
||||
" <method name=\"showtoot\">\n"
|
||||
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
|
||||
" <arg direction=\"in\" type=\"as\" name=\"key\"/>\n"
|
||||
" </method>\n"
|
||||
" <method name=\"openapp\"/>\n"
|
||||
" </interface>\n"
|
||||
"")
|
||||
public:
|
||||
TooterAdaptor(QObject *parent);
|
||||
virtual ~TooterAdaptor();
|
||||
|
||||
public: // PROPERTIES
|
||||
public Q_SLOTS: // METHODS
|
||||
void openapp();
|
||||
Q_NOREPLY void showtoot(const QStringList &key);
|
||||
Q_SIGNALS: // SIGNALS
|
||||
};
|
||||
|
||||
#endif
|
|
@ -8,7 +8,7 @@
|
|||
#include <QtQml>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include "imageuploader.h"
|
||||
|
||||
#include "dbus.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -21,6 +21,9 @@ int main(int argc, char *argv[])
|
|||
QQmlEngine* engine = view->engine();
|
||||
QObject::connect(engine, SIGNAL(quit()), app.data(), SLOT(quit()));
|
||||
|
||||
Dbus *dbus = new Dbus();
|
||||
view->rootContext()->setContextProperty("Dbus", dbus);
|
||||
|
||||
view->setSource(SailfishApp::pathTo("qml/harbour-tooter.qml"));
|
||||
view->show();
|
||||
return app->exec();
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<context>
|
||||
<name>ImageFullScreen</name>
|
||||
<message>
|
||||
<source>Error loading image</source>
|
||||
<source>Error loading</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
|
Loading…
Reference in a new issue