diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2016-02-17 20:41:52 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2016-02-17 20:41:52 +0100 |
| commit | 0f3d090bd1dc9a6b912eb0b1e587602573304b4a (patch) | |
| tree | aa52d58d9ba119d20d491a37595c3fa4f3458980 /rockwork | |
| parent | 07fb609095291f8d8544441925dea3d60d636f87 (diff) | |
First attempt at QML hacking.
Main and ServiceControl adapted. Project files
Diffstat (limited to 'rockwork')
34 files changed, 945 insertions, 1797 deletions
diff --git a/rockwork/artwork/back-cover.png b/rockwork/artwork/back-cover.png Binary files differnew file mode 100644 index 0000000..2d5ab14 --- /dev/null +++ b/rockwork/artwork/back-cover.png diff --git a/rockwork/artwork/rockwork.svg b/rockwork/artwork/rockwork.svg deleted file mode 100644 index e4e92c0..0000000 --- a/rockwork/artwork/rockwork.svg +++ /dev/null @@ -1,275 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="72.248886mm" - height="72.248886mm" - viewBox="0 0 255.99999 255.99999" - id="svg2" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="upebble.svg"> - <defs - id="defs4"> - <filter - inkscape:collect="always" - style="color-interpolation-filters:sRGB" - id="filter4248" - x="-0.025328101" - width="1.0506562" - y="-0.013960773" - height="1.0279215"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.3907822" - id="feGaussianBlur4250" /> - </filter> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="3.959798" - inkscape:cx="89.121544" - inkscape:cy="77.044911" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="true" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:window-width="2880" - inkscape:window-height="1752" - inkscape:window-x="0" - inkscape:window-y="48" - inkscape:window-maximized="1"> - <inkscape:grid - type="xygrid" - id="grid4136" - originx="-40.000001" - originy="-539" - snapvisiblegridlinesonly="true" - enabled="false" /> - </sodipodi:namedview> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(-40,-257.36221)"> - <rect - style="opacity:1;fill:#78d3fc;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4200" - width="256" - height="256" - x="40" - y="257.36221" /> - <path - style="opacity:1;fill:#000000;fill-opacity:0.0479798;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 40,257.36221 256,0 -256,256 z" - id="rect4252" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccc" /> - <g - id="g4300"> - <g - style="fill:#000000;fill-opacity:1;opacity:0.291;filter:url(#filter4248)" - id="g4202" - transform="matrix(0.60632857,0,0,0.60632857,-37.462675,74.399202)"> - <path - sodipodi:nodetypes="czccc" - inkscape:connector-curvature="0" - id="path4204" - d="m 437.97969,445.08937 c 0,0 11.49464,-4.59544 12.27285,0.25253 0.77821,4.84797 2.06459,45.23266 2.06459,45.23266 -8.36034,0.32794 -13.15013,-0.0886 -13.15013,-0.0886 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="ccccc" - inkscape:connector-curvature="0" - id="path4206" - d="m 439.49492,491.6046 12.68287,0.70015 0.54937,42.27954 -13.73731,0.25254 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4208" - width="120" - height="95" - x="280" - y="623.36218" /> - <rect - y="307.36221" - x="280" - height="95" - width="120" - id="rect4210" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zcczz" - inkscape:connector-curvature="0" - id="path4212" - d="M 228.0862,442.4309 C 228.58744,435.98794 240,437.36221 240,437.36221 l 0,42.02031 c 0,0 -14.31567,-1.22669 -13.80125,-2.84014 0.51442,-1.61345 1.3862,-27.66851 1.88745,-34.11148 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 420,643.715 337.60905,658.36221 255,643.715 l 0,-20 165,0 z" - id="path4214" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> - <path - sodipodi:nodetypes="cccccc" - inkscape:connector-curvature="0" - id="path4216" - d="M 255,382.36221 337.39095,367.715 420,382.36221 l 0,20 -165,0 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cczcc" - inkscape:connector-curvature="0" - id="path4218" - d="m 438.52906,535.82255 c 0,0 5.15979,0.84007 13.83236,0.44761 0.13423,13.76866 -1.20901,37.74804 -1.85634,42.35471 -0.64733,4.60667 -11.01016,-0.50508 -11.01016,-0.50508 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zzzzzzzzz" - inkscape:connector-curvature="0" - id="path4220" - d="m 244.85206,406.56127 c 16.07143,-13.92858 66.12644,-13.34299 97.65304,-13.30725 31.5266,0.0357 73.56632,-0.53467 90.70918,15.17961 17.14286,15.71428 12.91706,70.98675 13.01566,106.0726 0.0986,35.08586 5.19864,81.42741 -13.01565,99.64169 C 415,632.3622 371.12033,628.47664 339.15317,628.18658 307.186,627.89652 263.91063,632.7014 245.3392,615.91569 226.76777,599.12997 231.43107,540.45867 231.61582,505.9352 c 0.18475,-34.52347 -2.83519,-85.44536 13.23624,-99.37393 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - ry="20" - rx="20" - y="422.36221" - x="260" - height="174.99998" - width="155" - id="rect4222" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - y="442.36221" - x="280" - height="135" - width="120" - id="rect4224" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cccccccc" - inkscape:connector-curvature="0" - id="path4226" - d="m 375,442.36221 25,0 0,135 -25,0 0,-109.75206 -7.32361,-5.3033 7.32361,-4.9245 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - </g> - <path - sodipodi:nodetypes="czccc" - inkscape:connector-curvature="0" - id="rect4177" - d="m 228.09692,344.2696 c 0,0 6.96953,-2.78634 7.44138,0.15312 0.47185,2.93946 1.25182,27.42585 1.25182,27.42585 -5.06911,0.19884 -7.9733,-0.0537 -7.9733,-0.0537 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="ccccc" - inkscape:connector-curvature="0" - id="rect4179" - d="m 229.01565,372.47312 7.68999,0.42452 0.3331,25.63529 -8.32933,0.15312 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4167" - width="72.75943" - height="57.601215" - x="132.30933" - y="452.36151" /> - <rect - y="260.76169" - x="132.30933" - height="57.601215" - width="72.75943" - id="rect4165" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zcczz" - inkscape:connector-curvature="0" - id="rect4169" - d="m 100.8325,342.6577 c 0.30392,-3.90655 7.22368,-3.07329 7.22368,-3.07329 l 0,25.47811 c 0,0 -8.679998,-0.74378 -8.36809,-1.72206 0.311907,-0.97828 0.84049,-16.77621 1.14441,-20.68276 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 217.19532,464.702 -49.95598,8.88102 -50.08823,-8.88102 0,-12.12657 100.04421,0 z" - id="path4175" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> - <path - sodipodi:nodetypes="cccccc" - inkscape:connector-curvature="0" - id="rect4172" - d="m 117.15111,306.23633 49.95599,-8.88102 50.08822,8.88102 0,12.12658 -100.04421,0 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cczcc" - inkscape:connector-curvature="0" - id="rect4181" - d="m 228.43002,399.28372 c 0,0 3.12853,0.50936 8.38696,0.2714 0.0814,8.34833 -0.73306,22.88772 -1.12555,25.68087 -0.3925,2.79316 -6.67578,-0.30624 -6.67578,-0.30624 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zzzzzzzzz" - inkscape:connector-curvature="0" - id="rect4149" - d="m 110.99812,320.90892 c 9.74457,-8.4453 40.09435,-8.09024 59.20983,-8.06857 19.11548,0.0217 44.60536,-0.32419 54.99957,9.20383 10.39421,9.52802 7.83198,43.0413 7.89177,64.31485 0.0598,21.27356 3.15208,49.37176 -7.89176,60.4156 -11.04385,11.04384 -37.64935,8.68791 -57.03195,8.51204 -19.38261,-0.17587 -45.6217,2.73747 -56.88209,-7.44019 -11.26039,-10.17766 -8.4329,-45.75175 -8.32088,-66.68431 0.11202,-20.93257 -1.71905,-51.80796 8.02551,-60.25325 z" - style="opacity:1;fill:#cbcbcb;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 133.22587,330.48948 69.72779,0 c 6.71812,0 11.83367,5.41484 12.12657,12.12657 1.19073,27.28478 1.19022,54.56956 0,81.85435 -0.29278,6.71174 -5.40845,12.12657 -12.12657,12.12657 l -69.72779,0 c -6.71812,0 -11.82926,-5.41504 -12.12657,-12.12657 -1.18246,-26.69356 -1.65764,-53.74075 0,-81.85435 0.39543,-6.70647 5.40845,-12.12657 12.12657,-12.12657 z" - id="rect4152" - inkscape:connector-curvature="0" - sodipodi:nodetypes="sssssssss" /> - <rect - y="342.61606" - x="131.62029" - height="81.854355" - width="72.75943" - id="rect4154" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cccccccc" - inkscape:connector-curvature="0" - id="rect4156" - d="m 189.2215,342.61605 15.15821,0 0,81.85436 -15.15821,0 0,-66.54581 -4.44052,-3.21555 4.44052,-2.98586 z" - style="opacity:1;fill:#78d3fc;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - </g> - <path - style="fill:#000000" - d="m 143.63128,393.17695 c -0.82884,-0.82884 0.32908,-1.46136 2.67524,-1.46136 3.02637,0 3.07586,-0.7116 0.31911,-4.58902 l -2.10477,-2.96041 2.0287,-2.94922 c 1.15063,-1.67272 2.20678,-4.13671 2.44014,-5.69282 0.40696,-2.71383 0.44252,-2.74828 3.27625,-3.17322 1.57564,-0.23629 4.03472,-1.23453 5.46462,-2.21832 1.42988,-0.98379 2.85437,-1.78871 3.16551,-1.78871 0.31114,0 1.68177,0.80847 3.04585,1.7966 1.40341,1.01663 3.70432,1.98019 5.29992,2.21946 2.92933,0.43928 2.99923,0.52347 3.81465,4.59457 0.23714,1.18397 1.22649,3.16119 2.19857,4.39382 0.97208,1.23265 1.76741,2.42825 1.76741,2.6569 0,0.22864 -0.83031,1.62253 -1.84514,3.09753 -2.44659,3.556 -2.38325,4.49115 0.32038,4.72947 1.19102,0.10499 2.22891,0.46766 2.30641,0.80594 0.15778,0.68864 -33.49245,1.21919 -34.17285,0.53879 z m 27.8729,-2.84521 c 0.009,-0.76112 0.83738,-2.4679 1.83992,-3.79283 l 1.82279,-2.40898 -1.58789,-2.08183 c -0.87334,-1.14501 -1.90888,-3.37431 -2.30119,-4.954 -0.68475,-2.75721 -0.82407,-2.89364 -3.48101,-3.40876 -1.52223,-0.29514 -3.68339,-1.22898 -4.80255,-2.0752 l -2.03486,-1.53859 -2.27046,1.53481 c -2.19134,1.48132 -2.85113,1.74296 -6.34208,2.51493 -1.32103,0.29212 -1.68348,0.80695 -2.01126,2.85674 -0.2199,1.37522 -1.11243,3.57721 -1.98338,4.8933 l -1.58355,2.39291 1.54803,2.0343 c 0.85141,1.11887 1.73796,2.79542 1.97011,3.72567 l 0.42209,1.69138 10.38909,0 c 10.35877,0 10.38914,-0.004 10.4062,-1.38385 z m -16.16204,-1.17442 c -3.00082,-0.83158 -3.29439,-2.70542 -0.30753,-1.96294 1.0994,0.27329 2.9676,0.49689 4.15156,0.49689 1.18396,0 3.05216,-0.2236 4.15155,-0.49689 1.34833,-0.33517 1.9989,-0.27586 1.9989,0.18225 0,1.61808 -6.44052,2.76557 -9.99448,1.78069 z m -1.87921,-5.21512 c -0.23497,-0.23497 -0.42721,-1.51123 -0.42721,-2.83614 0,-2.76084 1.40937,-2.98541 1.73071,-0.27578 0.21201,1.78766 -0.62633,3.78908 -1.3035,3.11192 z m 10.02856,-2.68238 c 0,-1.7768 0.25627,-2.46018 0.92256,-2.46018 0.6663,0 0.92257,0.68338 0.92257,2.46018 0,1.7768 -0.25627,2.46018 -0.92257,2.46018 -0.66629,0 -0.92256,-0.68338 -0.92256,-2.46018 z m -22.75668,2.7677 c 0,-0.69366 0.43166,-0.94682 1.38386,-0.81158 0.76111,0.10809 1.38385,0.47331 1.38385,0.81158 0,0.33828 -0.62274,0.70349 -1.38385,0.81159 -0.9522,0.13523 -1.38386,-0.11793 -1.38386,-0.81159 z m 37.8226,0.30318 c -0.46699,-0.7556 1.22568,-1.49279 2.13592,-0.93022 0.35999,0.22248 0.4953,0.66216 0.30068,0.97707 -0.46943,0.75955 -1.95589,0.73096 -2.4366,-0.0469 z m -32.49939,-13.42132 c -1.23387,-1.36341 -1.29125,-1.95046 -0.19065,-1.95046 1.05106,0 3.00139,2.11681 2.45435,2.66385 -0.65422,0.65422 -1.17438,0.49029 -2.2637,-0.71339 z m 27.38286,0.11435 c 0.23773,-1.20797 2.11252,-2.50883 2.72827,-1.89307 0.48678,0.48678 -1.47947,2.90348 -2.36232,2.90348 -0.31065,0 -0.47533,-0.45468 -0.36595,-1.01041 z m -13.38512,-4.7488 c -0.52662,-1.37234 -0.0519,-3.6431 0.82178,-3.93083 0.51752,-0.17043 0.76881,0.45533 0.76881,1.91443 0,2.29458 -0.99824,3.56005 -1.59059,2.0164 z" - id="path4285" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ssscsssssssssssssssscsssscsssscsscsssssssssssssssssssssscssccssssssssssss" /> - <text - xml:space="preserve" - style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - x="136.46957" - y="405.82156" - id="text4342" - sodipodi:linespacing="125%"><tspan - sodipodi:role="line" - id="tspan4344" - x="136.46957" - y="405.82156" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">Tomorrow</tspan></text> - </g> -</svg> diff --git a/rockwork/main.cpp b/rockwork/main.cpp index 70fd0d7..57a8772 100644 --- a/rockwork/main.cpp +++ b/rockwork/main.cpp @@ -12,26 +12,28 @@ #include "applicationsfiltermodel.h" #include "appstoreclient.h" #include "screenshotmodel.h" +#include <sailfishapp.h> int main(int argc, char *argv[]) { - QGuiApplication app(argc, argv); + QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv)); + app->setApplicationName("pebble"); + app->setOrganizationName(""); - qmlRegisterUncreatableType<Pebble>("RockWork", 1, 0, "Pebble", "Get them from the model"); - qmlRegisterUncreatableType<ApplicationsModel>("RockWork", 1, 0, "ApplicationsModel", "Get them from a Pebble object"); - qmlRegisterUncreatableType<AppItem>("RockWork", 1, 0, "AppItem", "Get them from an ApplicationsModel"); - qmlRegisterType<ApplicationsFilterModel>("RockWork", 1, 0, "ApplicationsFilterModel"); - qmlRegisterType<Pebbles>("RockWork", 1, 0, "Pebbles"); - qmlRegisterUncreatableType<NotificationSourceModel>("RockWork", 1, 0, "NotificationSourceModel", "Get it from a Pebble object"); - qmlRegisterType<ServiceControl>("RockWork", 1, 0, "ServiceController"); - qmlRegisterType<AppStoreClient>("RockWork", 1, 0, "AppStoreClient"); - qmlRegisterType<ScreenshotModel>("RockWork", 1, 0, "ScreenshotModel"); + qmlRegisterUncreatableType<Pebble>("RockPool", 1, 0, "Pebble", "Get them from the model"); + qmlRegisterUncreatableType<ApplicationsModel>("RockPool", 1, 0, "ApplicationsModel", "Get them from a Pebble object"); + qmlRegisterUncreatableType<AppItem>("RockPool", 1, 0, "AppItem", "Get them from an ApplicationsModel"); + qmlRegisterType<ApplicationsFilterModel>("RockPool", 1, 0, "ApplicationsFilterModel"); + qmlRegisterType<Pebbles>("RockPool", 1, 0, "Pebbles"); + qmlRegisterUncreatableType<NotificationSourceModel>("RockPool", 1, 0, "NotificationSourceModel", "Get it from a Pebble object"); + qmlRegisterType<ServiceControl>("RockPool", 1, 0, "ServiceController"); + qmlRegisterType<AppStoreClient>("RockPool", 1, 0, "AppStoreClient"); + qmlRegisterType<ScreenshotModel>("RockPool", 1, 0, "ScreenshotModel"); - QQuickView view; - view.engine()->rootContext()->setContextProperty("version", QStringLiteral(VERSION)); - view.engine()->rootContext()->setContextProperty("homePath", QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first()); - view.setSource(QUrl(QStringLiteral("qrc:///Main.qml"))); - view.setResizeMode(QQuickView::SizeRootObjectToView); - view.show(); - return app.exec(); + QScopedPointer<QQuickView> view(SailfishApp::createView()); + view->rootContext()->setContextProperty("version", QStringLiteral(VERSION)); + view->setSource(SailfishApp::pathTo("qml/Main.qml")); + view->show(); + + return app->exec(); } diff --git a/rockwork/qml/AppSettingsPage.qml b/rockwork/qml/AppSettingsPage.qml index d8d865b..da7d577 100644 --- a/rockwork/qml/AppSettingsPage.qml +++ b/rockwork/qml/AppSettingsPage.qml @@ -1,7 +1,5 @@ -import QtQuick 2.4 -import Ubuntu.Web 0.2 -import Ubuntu.Components 1.3 -import com.canonical.Oxide 1.0 as Oxide +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { id: settings diff --git a/rockwork/qml/AppStoreDetailsPage.qml b/rockwork/qml/AppStoreDetailsPage.qml index 696e3c6..dbb8d5f 100644 --- a/rockwork/qml/AppStoreDetailsPage.qml +++ b/rockwork/qml/AppStoreDetailsPage.qml @@ -1,7 +1,5 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 import QtGraphicalEffects 1.0 Page { diff --git a/rockwork/qml/AppStorePage.qml b/rockwork/qml/AppStorePage.qml index bb8712b..7e006da 100644 --- a/rockwork/qml/AppStorePage.qml +++ b/rockwork/qml/AppStorePage.qml @@ -1,11 +1,10 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 -import QtQuick.Layouts 1.1 -import RockWork 1.0 +import QtQuick 2.0 +import QtQml 2.1 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root - title: showWatchApps ? i18n.tr("Add new watchapp") : i18n.tr("Add new watchface") property var pebble: null property bool showWatchApps: false @@ -20,247 +19,250 @@ Page { client.fetchHome(AppStoreClient.TypeWatchface) } } - - head { - actions: [ - Action { - iconName: "search" - onTriggered: { - if (searchField.shown) { - searchField.shown = false; - root.fetchHome(); - } else { - searchField.shown = true; + SilicaFlickable { + id: flickable + anchors.top: parent.top + width: parent.width + PageHeader { + title: showWatchApps ? qsTr("Add new watchapp") : qsTr("Add new watchface") + } + PullDownMenu { + MenuItem { + text: qsTr("Show search") + onClicked: { + if (searchField.shown) { + searchField.shown = false; + root.fetchHome(); + } else { + searchField.shown = true; + } } } - } - ] - } + } - Component.onCompleted: { - if (root.link) { - client.fetchLink(link) - } else { - root.fetchHome() + Component.onCompleted: { + if (root.link) { + client.fetchLink(link) + } else { + root.fetchHome() + } } - } - AppStoreClient { - id: client - hardwarePlatform: pebble.hardwarePlatform - } + AppStoreClient { + id: client + hardwarePlatform: pebble.hardwarePlatform + } - Item { - id: searchField - anchors { left: parent.left; right: parent.right; top: parent.top } - anchors.topMargin: shown ? 0 : -height - Behavior on anchors.topMargin { UbuntuNumberAnimation {} } - opacity: shown ? 1 : 0 - Behavior on opacity { UbuntuNumberAnimation {} } - height: units.gu(6) + Item { + id: searchField + anchors { left: parent.left; right: parent.right; top: parent.top } + anchors.topMargin: shown ? 0 : -height + Behavior on anchors.topMargin { NumberAnimation {} } + opacity: shown ? 1 : 0 + Behavior on opacity { NumberAnimation {} } + height: units.gu(6) - property bool shown: false - onShownChanged: { - if (shown) { - searchTextField.focus = true; + property bool shown: false + onShownChanged: { + if (shown) { + searchTextField.focus = true; + } } - } - TextField { - id: searchTextField - anchors.centerIn: parent - width: parent.width - units.gu(2) - onDisplayTextChanged: { - searchTimer.restart() - } + SearchField { + id: searchTextField + anchors.centerIn: parent + width: parent.width - units.gu(2) + onDisplayTextChanged: { + searchTimer.restart() + } - Timer { - id: searchTimer - interval: 300 - onTriggered: { - client.search(searchTextField.displayText, root.showWatchApps ? AppStoreClient.TypeWatchapp : AppStoreClient.TypeWatchface); + Timer { + id: searchTimer + interval: 300 + onTriggered: { + client.search(searchTextField.displayText, root.showWatchApps ? AppStoreClient.TypeWatchapp : AppStoreClient.TypeWatchface); + } } } } - } - Item { - anchors { left: parent.left; top: searchField.bottom; right: parent.right; bottom: parent.bottom } - ListView { - anchors.fill: parent - model: ApplicationsFilterModel { - id: appsFilterModel - model: client.model - } - clip: true - section.property: "groupId" - section.labelPositioning: ViewSection.CurrentLabelAtStart | - ViewSection.InlineLabels - section.delegate: ListItem { - height: section ? label.implicitHeight + units.gu(3) : 0 - - Rectangle { - anchors.fill: parent - color: "white" + Item { + anchors { left: parent.left; top: searchField.bottom; right: parent.right; bottom: parent.bottom } + ListView { + anchors.fill: parent + model: ApplicationsFilterModel { + id: appsFilterModel + model: client.model } + clip: true + section.property: "groupId" + section.labelPositioning: ViewSection.CurrentLabelAtStart | + ViewSection.InlineLabels + section.delegate: ListItem { + height: section ? label.implicitHeight + units.gu(3) : 0 - RowLayout { - anchors.fill: parent - anchors.margins: units.gu(1) - Label { - id: label - text: client.model.groupName(section) - fontSize: "large" -// font.weight: Font.DemiBold - elide: Text.ElideRight - Layout.fillWidth: true + Rectangle { + anchors.fill: parent + color: "white" } - AbstractButton { - Layout.fillHeight: true - implicitWidth: seeAllLabel.implicitWidth + height - Row { - anchors.verticalCenter: parent.verticalCenter - Label { - id: seeAllLabel - text: i18n.tr("See all") + + Row { + anchors.fill: parent + anchors.margins: units.gu(1) + Label { + id: label + text: client.model.groupName(section) + font.pixelSize: Theme.fontSizeLarge + // font.weight: Font.DemiBold + elide: Text.ElideRight + width: parent.width + } + Button { + implicitWidth: seeAllLabel.implicitWidth + height + Row { + anchors.verticalCenter: parent.verticalCenter + Label { + id: seeAllLabel + text: qsTr("See all") + } + IconButton { + implicitHeight: parent.height + implicitWidth: height + icon.source: "image://theme/icon-m-forward" + } } - Icon { - implicitHeight: parent.height - implicitWidth: height - name: "go-next" + onClicked: { + pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, link: client.model.groupLink(section), title: client.model.groupName(section)}); } } - onClicked: { - pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, link: client.model.groupLink(section), title: client.model.groupName(section)}); - } } } - } - footer: Item { - height: client.model.links.length > 0 ? units.gu(6) : 0 - width: parent.width + footer: Item { + height: client.model.links.length > 0 ? units.gu(6) : 0 + width: parent.width - RowLayout { - anchors { - fill: parent - margins: units.gu(1) - } - spacing: units.gu(1) + Row { + anchors { + fill: parent + margins: units.gu(1) + } + spacing: units.gu(1) - Repeater { - model: client.model.links - Button { - text: client.model.linkName(client.model.links[index]) - onClicked: client.fetchLink(client.model.links[index]); - color: UbuntuColors.orange - Layout.fillWidth: true + Repeater { + model: client.model.links + Button { + text: client.model.linkName(client.model.links[index]) + onClicked: client.fetchLink(client.model.links[index]); + color: UbuntuColors.orange + width: parent.width + } } } } - } - - delegate: ListItem { - height: delegateColumn.height + units.gu(2) - RowLayout { - id: delegateRow - anchors.fill: parent - anchors.margins: units.gu(1) - spacing: units.gu(1) + delegate: ListItem { + height: delegateColumn.height + units.gu(2) - AnimatedImage { - Layout.fillHeight: true - Layout.preferredWidth: height - source: model.icon - asynchronous: true -// sourceSize.width: width -// sourceSize.height: height - } + Row { + id: delegateRow + anchors.fill: parent + anchors.margins: units.gu(1) + spacing: units.gu(1) - ColumnLayout { - id: delegateColumn - Layout.fillWidth: true; - Layout.fillHeight: true; - Label { - Layout.fillWidth: true - text: model.name - font.weight: Font.DemiBold - elide: Text.ElideRight + AnimatedImage { + source: model.icon + asynchronous: true + // sourceSize.width: width + // sourceSize.height: height } - Label { - Layout.fillWidth: true - text: model.category - } - RowLayout { - Icon { - name: "like" - Layout.preferredHeight: parent.height - Layout.preferredWidth: height - implicitHeight: parent.height + + Column { + id: delegateColumn + width: parent.width + //Layout.fillHeight: true; + Label { + width: parent.width + text: model.name + font.weight: Font.DemiBold + elide: Text.ElideRight } Label { - Layout.fillWidth: true - text: model.hearts + width: parent.width + text: model.category } - Icon { - id: tickIcon - name: "tick" - implicitHeight: parent.height - Layout.preferredWidth: height - visible: root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) - Connections { - target: root.pebble.installedApps - onChanged: { - tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) - } + Row { + IconButton { + icon.source: "image://theme/icon-m-back" + id: like + //Layout.preferredHeight: parent.height + //Layout.preferredWidth: height + implicitHeight: parent.height + } + Label { + width: parent.width + text: model.hearts } + IconButton { + id: tickIcon + icon.source: "image://theme/icon-m-acknowledge" + implicitHeight: parent.height + //Layout.preferredWidth: height + visible: root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + Connections { + target: root.pebble.installedApps + onTargetChanged: { + tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + } + } - Connections { - target: root.pebble.installedWatchfaces - onChanged: { - tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + Connections { + target: root.pebble.installedWatchfaces + onTargetChanged: { + tickIcon.visible = root.pebble.installedApps.contains(model.storeId) || root.pebble.installedWatchfaces.contains(model.storeId) + } } - } + } } } - } - } + } - onClicked: { - client.fetchAppDetails(model.storeId); - pageStack.push(Qt.resolvedUrl("AppStoreDetailsPage.qml"), {app: appsFilterModel.get(index), pebble: root.pebble}) + onClicked: { + client.fetchAppDetails(model.storeId); + pageStack.push(Qt.resolvedUrl("AppStoreDetailsPage.qml"), {app: appsFilterModel.get(index), pebble: root.pebble}) + } } } - } -// RowLayout { -// id: buttonRow -// anchors { left: parent.left; bottom: parent.bottom; right: parent.right; margins: units.gu(1) } -// spacing: units.gu(1) -// Button { -// text: i18n.tr("Previous") -// Layout.fillWidth: true -// enabled: client.offset > 0 -// onClicked: { -// client.previous() -// } -// } -// Button { -// text: i18n.tr("Next") -// Layout.fillWidth: true -// onClicked: { -// client.next() -// } -// } -// } - } + // RowLayout { + // id: buttonRow + // anchors { left: parent.left; bottom: parent.bottom; right: parent.right; margins: units.gu(1) } + // spacing: units.gu(1) + // Button { + // text: qsTr("Previous") + // Layout.fillWidth: true + // enabled: client.offset > 0 + // onClicked: { + // client.previous() + // } + // } + // Button { + // text: qsTr("Next") + // Layout.fillWidth: true + // onClicked: { + // client.next() + // } + // } + // } + } - ActivityIndicator { - anchors.centerIn: parent - running: client.busy + BusyIndicator { + anchors.centerIn: parent + running: client.busy + } } } diff --git a/rockwork/qml/ContentPeerPickerPage.qml b/rockwork/qml/ContentPeerPickerPage.qml index 7ee9702..9f9917f 100644 --- a/rockwork/qml/ContentPeerPickerPage.qml +++ b/rockwork/qml/ContentPeerPickerPage.qml @@ -1,7 +1,6 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 -import Ubuntu.Content 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: pickerPage diff --git a/rockwork/qml/CoverPage.qml b/rockwork/qml/CoverPage.qml new file mode 100644 index 0000000..962e876 --- /dev/null +++ b/rockwork/qml/CoverPage.qml @@ -0,0 +1,44 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +CoverBackground { + property var pebble: null + Image { + fillMode: Image.PreserveAspectCrop + anchors.fill: parent + source: "back-cover.png" + } + + Label { + id: label + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: state.top + anchors.bottomMargin: Theme.paddingSmall + font.pointSize: Theme.fontSizeExtraLarge + text: pebble.name ? pebble.name : "Pebble" + } + Label { + id: state + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.verticalCenter + font.pointSize: Theme.fontSizeExtraSmall + color: Theme.highlightColor + text: pebble.connected ? qsTr("connected") : qsTr("disconnected") + } + + CoverActionList { + id: coverAction + enabled: pebble.connected + + CoverAction { + iconSource: pebble.connected ? "image://theme/icon-cover-transfers" : "image://theme/icon-cover-sync" + onTriggered: { + if (pebble.connected) { + pebble.requestScreenshot(); + } else { + pebble.reconnect(); + } + } + } + } +} diff --git a/rockwork/qml/DeveloperToolsPage.qml b/rockwork/qml/DeveloperToolsPage.qml index 2f77254..dec03d1 100644 --- a/rockwork/qml/DeveloperToolsPage.qml +++ b/rockwork/qml/DeveloperToolsPage.qml @@ -1,8 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import Ubuntu.Content 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/FirmwareUpgradePage.qml b/rockwork/qml/FirmwareUpgradePage.qml index 3281a12..0b0a6d5 100644 --- a/rockwork/qml/FirmwareUpgradePage.qml +++ b/rockwork/qml/FirmwareUpgradePage.qml @@ -1,5 +1,5 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { id: root diff --git a/rockwork/qml/HealthSettingsDialog.qml b/rockwork/qml/HealthSettingsDialog.qml index 94e5d22..66a0215 100644 --- a/rockwork/qml/HealthSettingsDialog.qml +++ b/rockwork/qml/HealthSettingsDialog.qml @@ -1,8 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Dialog { id: root diff --git a/rockwork/qml/ImportPackagePage.qml b/rockwork/qml/ImportPackagePage.qml index 4f86f78..5de3df0 100644 --- a/rockwork/qml/ImportPackagePage.qml +++ b/rockwork/qml/ImportPackagePage.qml @@ -1,6 +1,6 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 -import Ubuntu.Content 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/InfoPage.qml b/rockwork/qml/InfoPage.qml index 3eec387..b23aed1 100644 --- a/rockwork/qml/InfoPage.qml +++ b/rockwork/qml/InfoPage.qml @@ -1,7 +1,5 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { title: "About RockWork" diff --git a/rockwork/qml/InstalledAppDelegate.qml b/rockwork/qml/InstalledAppDelegate.qml index 89f6ba8..e910a40 100644 --- a/rockwork/qml/InstalledAppDelegate.qml +++ b/rockwork/qml/InstalledAppDelegate.qml @@ -1,7 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 ListItem { id: root @@ -17,71 +16,62 @@ ListItem { signal deleteApp(); signal configureApp(); - leadingActions: ListItemActions { - actions: [ - Action { - visible: !root.isSystemApp - iconName: "delete" - onTriggered: { - root.deleteApp(); - } + menu: ContextMenu { + MenuItem { + visible: !root.isSystemApp + text: "Delete" + onClicked: { + root.deleteApp(); } - ] - } - - trailingActions: ListItemActions { - actions: [ - Action { - visible: root.hasSettings - iconName: "settings" - onTriggered: { - print("settings triggered") - root.configureApp(); - } + } + MenuItem { + visible: root.hasSettings + text: "Settings" + onClicked: { + print("Settings triggered") + root.configureApp(); } - ] + } } - RowLayout { + Row { anchors { fill: parent - margins: units.gu(1) + //margins: units.gu(1) } - spacing: units.gu(1) + //spacing: units.gu(1) SystemAppIcon { - Layout.fillHeight: true - Layout.preferredWidth: height isSystemApp: root.isSystemApp uuid: root.uuid iconSource: root.iconSource } - ColumnLayout { - Layout.fillWidth: true + Column { + width: parent.width Label { text: root.name - Layout.fillWidth: true + width: parent.width } Label { text: root.vendor - Layout.fillWidth: true - fontSize: "small" + width: parent.width + font.pixelSize: Theme.fontSizeSmall } } Item { id: grip - Layout.fillHeight: true - Layout.preferredWidth: height +// Layout.fillHeight: true +// Layout.preferredWidth: height opacity: (root.contentMoving || root.swiped || root.dragging) ? 0 : 1 - Behavior on opacity { UbuntuNumberAnimation {} } - Icon { - width: units.gu(3) + Behavior on opacity { NumberAnimation {} } + IconButton { + //width: units.gu(3) height: width anchors.centerIn: parent - name: "grip-large" + icon.source: "image://theme/icon-m-gesture" } } } diff --git a/rockwork/qml/InstalledAppsPage.qml b/rockwork/qml/InstalledAppsPage.qml index a18cd3f..f7c8113 100644 --- a/rockwork/qml/InstalledAppsPage.qml +++ b/rockwork/qml/InstalledAppsPage.qml @@ -1,200 +1,204 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root - title: showWatchApps ? (showWatchFaces ? i18n.tr("Apps & Watchfaces") : i18n.tr("Apps")) : i18n.tr("Watchfaces") property var pebble: null property bool showWatchApps: false property bool showWatchFaces: false - head { - actions: [ - Action { - iconName: "add" - onTriggered: pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, showWatchApps: root.showWatchApps, showWatchFaces: root.showWatchFaces}) + SilicaFlickable { + id: flickable + anchors.top: parent.top + width: parent.width + PullDownMenu { + MenuItem { + text: qsTr("Add") + onClicked: pageStack.push(Qt.resolvedUrl("AppStorePage.qml"), {pebble: root.pebble, showWatchApps: root.showWatchApps, showWatchFaces: root.showWatchFaces}) } - ] - } + } - function configureApp(uuid) { - // The health app is special :/ - if (uuid == "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}") { - var popup = PopupUtils.open(Qt.resolvedUrl("HealthSettingsDialog.qml"), root, {healthParams: pebble.healthParams}); - popup.accepted.connect(function() { - pebble.healthParams = popup.healthParams - }) - } else { - pebble.requestConfigurationURL(uuid); + PageHeader { + title: showWatchApps ? (showWatchFaces ? qsTr("Apps & Watchfaces") : qsTr("Apps")) : qsTr("Watchfaces") } - } - Item { - anchors.fill: parent - ListView { - id: listView - anchors.fill: parent - model: root.showWatchApps ? root.pebble.installedApps : root.pebble.installedWatchfaces - clip: true - property real realContentY: contentY + originY - - delegate: InstalledAppDelegate { - id: delegate - uuid: model.uuid - name: model.name - iconSource: model.icon - vendor: model.vendor - visible: dndArea.draggedIndex !== index - hasGrip: index > 0 - isSystemApp: model.isSystemApp - hasSettings: model.hasSettings - - onDeleteApp: { - pebble.removeApp(model.uuid) - } - onConfigureApp: { - root.configureApp(model.uuid) - } - onClicked: { - PopupUtils.open(dialogComponent, root, {app: listView.model.get(index)}) - } + function configureApp(uuid) { + // The health app is special :/ + if (uuid == "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}") { + var popup = PopupUtils.open(Qt.resolvedUrl("HealthSettingsDialog.qml"), root, {healthParams: pebble.healthParams}); + popup.accepted.connect(function() { + pebble.healthParams = popup.healthParams + }) + } else { + pebble.requestConfigurationURL(uuid); } } - MouseArea { - id: dndArea - anchors { - top: parent.top - bottom: parent.bottom - right: parent.right + + Item { + anchors.fill: parent + ListView { + id: listView + anchors.fill: parent + model: root.showWatchApps ? root.pebble.installedApps : root.pebble.installedWatchfaces + clip: true + property real realContentY: contentY + originY + + delegate: InstalledAppDelegate { + id: delegate + uuid: model.uuid + name: model.name + iconSource: model.icon + vendor: model.vendor + visible: dndArea.draggedIndex !== index + hasGrip: index > 0 + isSystemApp: model.isSystemApp + hasSettings: model.hasSettings + + onDeleteApp: { + pebble.removeApp(model.uuid) + } + onConfigureApp: { + root.configureApp(model.uuid) + } + onClicked: { + PopupUtils.open(dialogComponent, root, {app: listView.model.get(index)}) + } + } } - drag.axis: Drag.YAxis - propagateComposedEvents: true - width: units.gu(5) + MouseArea { + id: dndArea + anchors { + top: parent.top + bottom: parent.bottom + right: parent.right + } + drag.axis: Drag.YAxis + propagateComposedEvents: true + //width: units.gu(5) - property int startY: 0 - property int draggedIndex: -1 + property int startY: 0 + property int draggedIndex: -1 - onPressAndHold: { - startY = mouseY; - draggedIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) - if (draggedIndex == 0) { - print("cannot drag settings app"); - return; - } + onPressAndHold: { + startY = mouseY; + draggedIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) + if (draggedIndex == 0) { + print("cannot drag settings app"); + return; + } - var draggedItem = listView.model.get(draggedIndex); - fakeDragItem.uuid = draggedItem.uuid; - fakeDragItem.name = draggedItem.name; - fakeDragItem.vendor = draggedItem.vendor; - fakeDragItem.iconSource = draggedItem.icon; - fakeDragItem.isSystemApp = draggedItem.isSystemApp; - fakeDragItem.y = (fakeDragItem.height * draggedIndex) - listView.realContentY - drag.target = fakeDragItem; - } + var draggedItem = listView.model.get(draggedIndex); + fakeDragItem.uuid = draggedItem.uuid; + fakeDragItem.name = draggedItem.name; + fakeDragItem.vendor = draggedItem.vendor; + fakeDragItem.iconSource = draggedItem.icon; + fakeDragItem.isSystemApp = draggedItem.isSystemApp; + fakeDragItem.y = (fakeDragItem.height * draggedIndex) - listView.realContentY + drag.target = fakeDragItem; + } - onMouseYChanged: { - var newIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) + onMouseYChanged: { + var newIndex = Math.floor((listView.realContentY + mouseY) / fakeDragItem.height) - if (newIndex > draggedIndex) { - newIndex = draggedIndex + 1; - } else if (newIndex < draggedIndex) { - newIndex = draggedIndex - 1; - } else { - return; - } + if (newIndex > draggedIndex) { + newIndex = draggedIndex + 1; + } else if (newIndex < draggedIndex) { + newIndex = draggedIndex - 1; + } else { + return; + } - if (newIndex >= 1 && newIndex < listView.count) { - listView.model.move(draggedIndex, newIndex); - draggedIndex = newIndex; + if (newIndex >= 1 && newIndex < listView.count) { + listView.model.move(draggedIndex, newIndex); + draggedIndex = newIndex; + } } - } - onReleased: { - if (draggedIndex > -1) { - listView.model.commitMove(); - draggedIndex = -1; - drag.target = null; + onReleased: { + if (draggedIndex > -1) { + listView.model.commitMove(); + draggedIndex = -1; + drag.target = null; + } } } } - } - InstalledAppDelegate { - id: fakeDragItem - visible: dndArea.draggedIndex != -1 + InstalledAppDelegate { + id: fakeDragItem + visible: dndArea.draggedIndex != -1 - } - - Component { - id: dialogComponent - Dialog { - id: dialog - property var app: null - - RowLayout { - SystemAppIcon { - height: titleCol.height - width: height - isSystemApp: app.isSystemApp - uuid: app.uuid - iconSource: app.icon - } - - ColumnLayout { - id: titleCol - Layout.fillWidth: true + } - Label { - Layout.fillWidth: true - text: app.name - fontSize: "large" + Component { + id: dialogComponent + Dialog { + id: dialog + property var app: null + + Row { + SystemAppIcon { + height: titleCol.height + width: height + isSystemApp: app.isSystemApp + uuid: app.uuid + iconSource: app.icon } - Label { - Layout.fillWidth: true - text: app.vendor + + Column { + id: titleCol + width: parent.width; + + Label { + width: parent.width; + text: app.name + font.pixelSize: Theme.fontSizeLarge + } + Label { + width: parent.width; + text: app.vendor + } } } - } - Button { - text: i18n.tr("Launch") - color: UbuntuColors.green - onClicked: { - pebble.launchApp(app.uuid); - PopupUtils.close(dialog); + Button { + text: qsTr("Launch") + color: UbuntuColors.green + onClicked: { + pebble.launchApp(app.uuid); + PopupUtils.close(dialog); + } } - } - Button { - text: i18n.tr("Configure") - color: UbuntuColors.blue - visible: app.hasSettings - onClicked: { - root.configureApp(app.uuid); - PopupUtils.close(dialog); + Button { + text: qsTr("Configure") + color: UbuntuColors.blue + visible: app.hasSettings + onClicked: { + root.configureApp(app.uuid); + PopupUtils.close(dialog); + } } - } - Button { - text: i18n.tr("Delete") - color: UbuntuColors.red - visible: !app.isSystemApp - onClicked: { - pebble.removeApp(app.uuid); - PopupUtils.close(dialog); + Button { + text: qsTr("Delete") + color: UbuntuColors.red + visible: !app.isSystemApp + onClicked: { + pebble.removeApp(app.uuid); + PopupUtils.close(dialog); + } } - } - Button { - text: i18n.tr("Close") - onClicked: PopupUtils.close(dialog) + Button { + text: qsTr("Close") + onClicked: PopupUtils.close(dialog) + } } } } diff --git a/rockwork/qml/Main.qml b/rockwork/qml/Main.qml index 2bdece3..aae852b 100644 --- a/rockwork/qml/Main.qml +++ b/rockwork/qml/Main.qml @@ -1,26 +1,17 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 /*! \brief MainView with a Label and Button elements. */ -MainView { - applicationName: "rockwork.mzanetti" - - width: units.gu(40) - height: units.gu(70) +ApplicationWindow { + id: app ServiceController { id: serviceController - serviceName: "rockworkd" Component.onCompleted: { - if (!serviceController.serviceFileInstalled) { - print("Service file not installed. Installing now.") - serviceController.installServiceFile(); - } if (!serviceController.serviceRunning) { print("Service not running. Starting now.") serviceController.startService(); @@ -41,6 +32,7 @@ MainView { pageStack.clear() if (pebbles.count == 1) { pageStack.push(Qt.resolvedUrl("MainMenuPage.qml"), {pebble: pebbles.get(0)}) + app.cover.replace(Qt.resolvedUrl("CoverPage.qml"), {pebble: pebbles.get(0)}) } else { pageStack.push(Qt.resolvedUrl("PebblesPage.qml")) } diff --git a/rockwork/qml/MainMenuPage.qml b/rockwork/qml/MainMenuPage.qml index 32c7b96..6713d70 100644 --- a/rockwork/qml/MainMenuPage.qml +++ b/rockwork/qml/MainMenuPage.qml @@ -1,311 +1,286 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 Page { id: root - title: pebble.name property var pebble: null - head { - actions: [ - Action { - iconName: "info" - text: i18n.tr("About") - onTriggered: { + SilicaFlickable { + id: flickable + anchors.fill: parent + contentHeight: column.height + + VerticalScrollDecorator { flickable: flickable } + + PullDownMenu { + MenuItem { + text: qsTr("About") + onClicked: { pageStack.push(Qt.resolvedUrl("InfoPage.qml")) } - }, - Action { - iconName: "ubuntu-sdk-symbolic" - text: i18n.tr("Developer tools") - onTriggered: { + } + MenuItem { + text: qsTr("Developer tools") + onClicked: { pageStack.push(Qt.resolvedUrl("DeveloperToolsPage.qml"), {pebble: root.pebble}) } } - ] - } - - //Creating the menu list this way to allow the text field to be translatable (http://askubuntu.com/a/476331) - ListModel { - id: mainMenuModel - dynamicRoles: true - } - - Component.onCompleted: { - populateMainMenu(); - } - - Connections { - target: root.pebble - onFirmwareUpgradeAvailableChanged: { - populateMainMenu(); } - } + Column { + id: column + width: root.width + spacing: Theme.paddingLarge + PageHeader { + title: qsTr("RockPool") + } - function populateMainMenu() { - mainMenuModel.clear(); - - mainMenuModel.append({ - icon: "stock_notification", - text: i18n.tr("Manage notifications"), - page: "NotificationsPage.qml", - color: "blue" - }); - - mainMenuModel.append({ - icon: "stock_application", - text: i18n.tr("Manage Apps"), - page: "InstalledAppsPage.qml", - showWatchApps: true, - color: UbuntuColors.green - }); - - mainMenuModel.append({ - icon: "clock-app-symbolic", - text: i18n.tr("Manage Watchfaces"), - page: "InstalledAppsPage.qml", - showWatchFaces: true, - color: "black" - }); - - mainMenuModel.append({ - icon: "settings", - text: i18n.tr("Settings"), - page: "SettingsPage.qml", - showWatchFaces: true, - color: "gold" - }); - - if (root.pebble.firmwareUpgradeAvailable) { - mainMenuModel.append({ - icon: "preferences-system-updates-symbolic", - text: i18n.tr("Firmware upgrade"), - page: "FirmwareUpgradePage.qml", - color: "red" - }); - } + ListView { + model: mainMenuModel + } - } + //Creating the menu list this way to allow the text field to be translatable (http://askubuntu.com/a/476331) + ListModel { + id: mainMenuModel + dynamicRoles: true + } - PebbleModels { - id: modelModel - } + Component.onCompleted: { + populateMainMenu(); + } - GridLayout { - anchors.fill: parent - columns: parent.width > parent.height ? 2 : 1 + Connections { + target: root.pebble + onFirmwareUpgradeAvailableChanged: { + populateMainMenu(); + } + } - Item { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.maximumHeight: units.gu(30) + function populateMainMenu() { + mainMenuModel.clear(); + + mainMenuModel.append({ + icon: "stock_notification", + text: qsTr("Manage notifications"), + page: "NotificationsPage.qml", + color: "blue" + }); + + mainMenuModel.append({ + icon: "stock_application", + text: qsTr("Manage Apps"), + page: "InstalledAppsPage.qml", + showWatchApps: true, + color: "green" + }); + + mainMenuModel.append({ + icon: "clock-app-symbolic", + text: qsTr("Manage Watchfaces"), + page: "InstalledAppsPage.qml", + showWatchFaces: true, + color: "black" + }); + + mainMenuModel.append({ + icon: "settings", + text: qsTr("Settings"), + page: "SettingsPage.qml", + showWatchFaces: true, + color: "gold" + }); + + if (root.pebble.firmwareUpgradeAvailable) { + mainMenuModel.append({ + icon: "preferences-system-updates-symbolic", + text: qsTr("Firmware upgrade"), + page: "FirmwareUpgradePage.qml", + color: "red" + }); + } + } - RowLayout { - anchors.fill: parent - anchors.margins: units.gu(1) - spacing: units.gu(1) + PebbleModels { + id: modelModel + } + Column { + anchors.fill: parent Item { - Layout.alignment: Qt.AlignHCenter - Layout.fillHeight: true - Layout.fillWidth: true - Layout.minimumWidth: watchImage.width + //Layout.alignment: Qt.AlignHCenter + width: root.width Image { id: watchImage width: implicitWidth * height / implicitHeight height: parent.height anchors.horizontalCenter: parent.horizontalCenter - source: modelModel.get(root.pebble.model).image + source: Qt.resolvedUrl("qrc:///"+modelModel.get(root.pebble.model).image) fillMode: Image.PreserveAspectFit + } + Item { + id: watchFace + height: parent.height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .5 : .515) + width: height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .85 : 1) + anchors.centerIn: parent + anchors.horizontalCenterOffset: units.dp(1) + anchors.verticalCenterOffset: units.dp(modelModel.get(root.pebble.model - 1).shape === "rectangle" ? 0 : 1) + + Image { + id: image + anchors.fill: parent + source: "file://" + root.pebble.screenshots.latestScreenshot + visible: false + } - Item { - id: watchFace - height: parent.height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .5 : .515) - width: height * (modelModel.get(root.pebble.model - 1).shape === "rectangle" ? .85 : 1) - anchors.centerIn: parent - anchors.horizontalCenterOffset: units.dp(1) - anchors.verticalCenterOffset: units.dp(modelModel.get(root.pebble.model - 1).shape === "rectangle" ? 0 : 1) - - Image { - id: image - anchors.fill: parent - source: "file://" + root.pebble.screenshots.latestScreenshot - visible: false - } - - Component.onCompleted: { - if (!root.pebble.screenshots.latestScreenshot) { - root.pebble.requestScreenshot(); - } + Component.onCompleted: { + if (!root.pebble.screenshots.latestScreenshot) { + root.pebble.requestScreenshot(); } + } - Rectangle { - id: textItem - anchors.fill: parent - layer.enabled: true - radius: modelModel.get(root.pebble.model - 1).shape === "rectangle" ? units.gu(.5) : height / 2 - // This item should be used as the 'mask' - layer.samplerName: "maskSource" - layer.effect: ShaderEffect { - property var colorSource: image; - fragmentShader: " - uniform lowp sampler2D colorSource; - uniform lowp sampler2D maskSource; - uniform lowp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - void main() { - gl_FragColor = - texture2D(colorSource, qt_TexCoord0) - * texture2D(maskSource, qt_TexCoord0).a - * qt_Opacity; - } - " - } + Rectangle { + id: textItem + anchors.fill: parent + layer.enabled: true + radius: modelModel.get(root.pebble.model - 1).shape === "rectangle" ? units.gu(.5) : height / 2 + // This item should be used as the 'mask' + layer.samplerName: "maskSource" + layer.effect: ShaderEffect { + property var colorSource: image; + fragmentShader: " + uniform lowp sampler2D colorSource; + uniform lowp sampler2D maskSource; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + void main() { + gl_FragColor = + texture2D(colorSource, qt_TexCoord0) + * texture2D(maskSource, qt_TexCoord0).a + * qt_Opacity; + } + " } } } } - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true + Column { + width: root.width spacing: units.gu(2) Rectangle { height: units.gu(10) width: height radius: height / 2 - color: root.pebble.connected ? UbuntuColors.green : UbuntuColors.red + color: root.pebble.connected ? "green" : "red" - Icon { + IconButton { anchors.fill: parent anchors.margins: units.gu(2) - color: "white" - name: root.pebble.connected ? "tick" : "dialog-error-symbolic" + icon.source: root.pebble.connected ? "image://theme/icon-m-acknowledge" : "image://theme/icon-m-reset" } } Label { - text: root.pebble.connected ? i18n.tr("Connected") : i18n.tr("Disconnected") - Layout.fillWidth: true + text: root.pebble.connected ? qsTr("Connected") : qsTr("Disconnected") + width: root.width } } } - } - Column { - Layout.fillWidth: true - Layout.preferredHeight: childrenRect.height - spacing: menuRepeater.count > 0 ? 0 : units.gu(2) - Label { - text: i18n.tr("Your Pebble smartwatch is disconnected. Please make sure it is powered on, within range and it is paired properly in the Bluetooth System Settings.") - width: parent.width - units.gu(4) - anchors.horizontalCenter: parent.horizontalCenter - wrapMode: Text.WordWrap - visible: !root.pebble.connected - fontSize: "large" - horizontalAlignment: Text.AlignHCenter - } - - Button { - text: i18n.tr("Open System Settings") - visible: !root.pebble.connected - onClicked: Qt.openUrlExternally("settings://system/bluetooth") - color: UbuntuColors.orange - anchors.horizontalCenter: parent.horizontalCenter - } + Column { + width: root.width + //Layout.preferredHeight: childrenRect.height + spacing: menuRepeater.count > 0 ? 0 : units.gu(2) + Label { + text: qsTr("Your Pebble smartwatch is disconnected. Please make sure it is powered on, within range and it is paired properly in the Bluetooth System Settings.") + width: parent.width - units.gu(4) + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + visible: !root.pebble.connected + font.pixelSize: Theme.fontSizeLarge + horizontalAlignment: Text.AlignHCenter + } - Label { - text: i18n.tr("Your Pebble smartwatch is in factory mode and needs to be initialized.") - width: parent.width - units.gu(4) - anchors.horizontalCenter: parent.horizontalCenter - wrapMode: Text.WordWrap - visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware - fontSize: "large" - horizontalAlignment: Text.AlignHCenter - } - Button { - text: i18n.tr("Initialize Pebble") - onClicked: root.pebble.performFirmwareUpgrade(); - visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware - color: UbuntuColors.orange - anchors.horizontalCenter: parent.horizontalCenter - } + Label { + text: qsTr("Your Pebble smartwatch is in factory mode and needs to be initialized.") + width: parent.width - units.gu(4) + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware + font.pixelSize: Theme.fontSizeLarge + horizontalAlignment: Text.AlignHCenter + } + Button { + text: qsTr("Initialize Pebble") + onClicked: root.pebble.performFirmwareUpgrade(); + visible: root.pebble.connected && root.pebble.recovery && !root.pebble.upgradingFirmware + color: "orange" + anchors.horizontalCenter: parent.horizontalCenter + } - Rectangle { - id: upgradeIcon - height: units.gu(10) - width: height - radius: width / 2 - color: UbuntuColors.orange - anchors.horizontalCenter: parent.horizontalCenter - Icon { - anchors.fill: parent - anchors.margins: units.gu(1) - name: "preferences-system-updates-symbolic" - color: "white" + Rectangle { + id: upgradeIcon + height: units.gu(10) + width: height + radius: width / 2 + color: Theme.highlightColor + anchors.horizontalCenter: parent.horizontalCenter + BusyIndicator { + anchors.horizontalCenter: parent.horizontalCenter + running: upgradeInProgress + size: BusyIndicatorSize.Large + } + visible: root.pebble.connected && root.pebble.upgradingFirmware } - RotationAnimation on rotation { - duration: 2000 - loops: Animation.Infinite - from: 0 - to: 360 - running: upgradeIcon.visible + Label { + text: qsTr("Upgrading...") + font.pixelSize: Theme.fontSizeLarge + anchors.horizontalCenter: parent.horizontalCenter + visible: root.pebble.connected && root.pebble.upgradingFirmware } - visible: root.pebble.connected && root.pebble.upgradingFirmware - } - Label { - text: i18n.tr("Upgrading...") - fontSize: "large" - anchors.horizontalCenter: parent.horizontalCenter - visible: root.pebble.connected && root.pebble.upgradingFirmware - } + Repeater { + id: menuRepeater + model: root.pebble.connected && !root.pebble.recovery && !root.pebble.upgradingFirmware ? mainMenuModel : null + delegate: ListItem { + + Row { + anchors.fill: parent + anchors.margins: units.gu(1) - Repeater { - id: menuRepeater - model: root.pebble.connected && !root.pebble.recovery && !root.pebble.upgradingFirmware ? mainMenuModel : null - delegate: ListItem { - - RowLayout { - anchors.fill: parent - anchors.margins: units.gu(1) - - UbuntuShape { - Layout.fillHeight: true - Layout.preferredWidth: height - backgroundColor: model.color - Icon { - anchors.fill: parent - anchors.margins: units.gu(.5) - name: model.icon - color: "white" + Rectangle { + //Layout.fillHeight: true + //Layout.preferredWidth: height + //backgroundColor: model.color + Image { + anchors.fill: parent + anchors.margins: units.gu(.5) + source: model.icon + } } - } - Label { - text: model.text - Layout.fillWidth: true + Label { + text: model.text + width: page.width + } } - } - onClicked: { - var options = {}; - options["pebble"] = root.pebble - var modelItem = mainMenuModel.get(index) - options["showWatchApps"] = modelItem.showWatchApps - options["showWatchFaces"] = modelItem.showWatchFaces - pageStack.push(Qt.resolvedUrl(model.page), options) + onClicked: { + var options = {}; + options["pebble"] = root.pebble + var modelItem = mainMenuModel.get(index) + options["showWatchApps"] = modelItem.showWatchApps + options["showWatchFaces"] = modelItem.showWatchFaces + pageStack.push(Qt.resolvedUrl(model.page), options) + } } } } } } - Connections { target: pebble onOpenURL: { diff --git a/rockwork/qml/NotificationsPage.qml b/rockwork/qml/NotificationsPage.qml index 9802b05..3942ecf 100644 --- a/rockwork/qml/NotificationsPage.qml +++ b/rockwork/qml/NotificationsPage.qml @@ -1,84 +1,95 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root - title: i18n.tr("Notifications") property var pebble: null - ColumnLayout { + SilicaFlickable { + id: flickable anchors.fill: parent - anchors.topMargin: units.gu(1) + contentHeight: column.height + PageHeader { + title: qsTr("Notifications") + } + Column { - Item { - Layout.fillWidth: true - implicitHeight: infoLabel.height + anchors.fill: parent + anchors.topMargin: units.gu(1) - Label { - id: infoLabel - anchors { - left: parent.left - right: parent.right - margins: units.gu(2) - } - wrapMode: Text.WordWrap - text: i18n.tr("Entries here will be added as notifications appear on the phone. Selected notifications will be shown on your Pebble smartwatch.") + + Item { + width: parent.width + implicitHeight: infoLabel.height + + Label { + id: infoLabel + anchors { + left: parent.left + right: parent.right + margins: units.gu(2) + } + + wrapMode: Text.WordWrap + text: i18n.tr("Entries here will be added as notifications appear on the phone. Selected notifications will be shown on your Pebble smartwatch.") + } } - } - ListView { - Layout.fillWidth: true - Layout.fillHeight: true - clip: true - model: root.pebble.notifications + ListView { + width: parent.width + //Layout.fillHeight: true + clip: true + model: root.pebble.notifications - delegate: ListItem { - ListItemLayout { - title.text: model.name + delegate: ListItem { + Item { + Rectangle { + //SlotsLayout.position: SlotsLayout.Leading; + height: units.gu(5) + width: height + color: { + // Add some hacks for known icons + switch (model.icon) { + case "calendar": + return "orange"; + case "settings": + return "grey"; + case "dialog-question-symbolic": + return "red"; + case "alarm-clock": + return "purple"; + case "gpm-battery-050": + return "green"; + } + return "black" + } + // source: Image { + // height: parent.height + // width: parent.width + // source: model.icon.indexOf("/") === 0 ? "file://" + model.icon : "" + // } + Label { + text: model.name + } - UbuntuShape { - SlotsLayout.position: SlotsLayout.Leading; - height: units.gu(5) - width: height - backgroundColor: { - // Add some hacks for known icons - switch (model.icon) { - case "calendar": - return UbuntuColors.orange; - case "settings": - return "grey"; - case "dialog-question-symbolic": - return UbuntuColors.red; - case "alarm-clock": - return UbuntuColors.purple; - case "gpm-battery-050": - return UbuntuColors.green; + IconButton { + anchors.fill: parent + anchors.margins: units.gu(.5) + icon.source: model.icon.indexOf("/") !== 0 ? model.icon : "" + //color: "white" } - return "black" - } - source: Image { - height: parent.height - width: parent.width - source: model.icon.indexOf("/") === 0 ? "file://" + model.icon : "" } - Icon { - anchors.fill: parent - anchors.margins: units.gu(.5) - name: model.icon.indexOf("/") !== 0 ? model.icon : "" - color: "white" - } - } - Switch { - checked: model.enabled - SlotsLayout.position: SlotsLayout.Trailing; - onClicked: { - root.pebble.setNotificationFilter(model.name, checked) + Switch { + checked: model.enabled + // SlotsLayout.position: SlotsLayout.Trailing; + onClicked: { + root.pebble.setNotificationFilter(model.name, checked) + } } } } diff --git a/rockwork/qml/PebbleModels.qml b/rockwork/qml/PebbleModels.qml index 103064a..d2248c1 100644 --- a/rockwork/qml/PebbleModels.qml +++ b/rockwork/qml/PebbleModels.qml @@ -1,28 +1,28 @@ -import QtQuick 2.4 +import QtQuick 2.0 ListModel { id: modelModel - ListElement { image: 'artwork/tintin-black.png'; shape: "rectangle" } // Fallback for Unknown - ListElement { image: 'artwork/tintin-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-white.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-red.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-orange.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-grey.png'; shape: "rectangle" } - ListElement { image: 'artwork/bianca-silver.png'; shape: "rectangle" } - ListElement { image: 'artwork/bianca-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-blue.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-green.png'; shape: "rectangle" } - ListElement { image: 'artwork/tintin-pink.png'; shape: "rectangle" } - ListElement { image: 'artwork/snowy-white.png'; shape: "rectangle" } - ListElement { image: 'artwork/snowy-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/snowy-red.png'; shape: "rectangle" } - ListElement { image: 'artwork/bobby-silver.png'; shape: "rectangle" } - ListElement { image: 'artwork/bobby-black.png'; shape: "rectangle" } - ListElement { image: 'artwork/bobby-gold.png'; shape: "rectangle" } - ListElement { image: 'artwork/spalding-14mm-silver.png'; shape: "round" } - ListElement { image: 'artwork/spalding-14mm-black.png'; shape: "round" } - ListElement { image: 'artwork/spalding-20mm-silver.png'; shape: "round" } - ListElement { image: 'artwork/spalding-20mm-black.png'; shape: "round" } - ListElement { image: 'artwork/spalding-14mm-rose-gold.png'; shape: "round" } + ListElement { image: 'tintin-black.png'; shape: "rectangle" } // Fallback for Unknown + ListElement { image: 'tintin-black.png'; shape: "rectangle" } + ListElement { image: 'tintin-white.png'; shape: "rectangle" } + ListElement { image: 'tintin-red.png'; shape: "rectangle" } + ListElement { image: 'tintin-orange.png'; shape: "rectangle" } + ListElement { image: 'tintin-grey.png'; shape: "rectangle" } + ListElement { image: 'bianca-silver.png'; shape: "rectangle" } + ListElement { image: 'bianca-black.png'; shape: "rectangle" } + ListElement { image: 'tintin-blue.png'; shape: "rectangle" } + ListElement { image: 'tintin-green.png'; shape: "rectangle" } + ListElement { image: 'tintin-pink.png'; shape: "rectangle" } + ListElement { image: 'snowy-white.png'; shape: "rectangle" } + ListElement { image: 'snowy-black.png'; shape: "rectangle" } + ListElement { image: 'snowy-red.png'; shape: "rectangle" } + ListElement { image: 'bobby-silver.png'; shape: "rectangle" } + ListElement { image: 'bobby-black.png'; shape: "rectangle" } + ListElement { image: 'bobby-gold.png'; shape: "rectangle" } + ListElement { image: 'spalding-14mm-silver.png'; shape: "round" } + ListElement { image: 'spalding-14mm-black.png'; shape: "round" } + ListElement { image: 'spalding-20mm-silver.png'; shape: "round" } + ListElement { image: 'spalding-20mm-black.png'; shape: "round" } + ListElement { image: 'spalding-14mm-rose-gold.png'; shape: "round" } } diff --git a/rockwork/qml/PebblesPage.qml b/rockwork/qml/PebblesPage.qml index a973b0a..13aca60 100644 --- a/rockwork/qml/PebblesPage.qml +++ b/rockwork/qml/PebblesPage.qml @@ -1,6 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { title: i18n.tr("Manage Pebble Watches") diff --git a/rockwork/qml/ScreenshotsPage.qml b/rockwork/qml/ScreenshotsPage.qml index fdbeb9a..28ca866 100644 --- a/rockwork/qml/ScreenshotsPage.qml +++ b/rockwork/qml/ScreenshotsPage.qml @@ -1,9 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.Popups 1.3 -import Ubuntu.Content 1.3 -import RockWork 1.0 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/SettingsPage.qml b/rockwork/qml/SettingsPage.qml index 153aaf4..8116f7a 100644 --- a/rockwork/qml/SettingsPage.qml +++ b/rockwork/qml/SettingsPage.qml @@ -1,7 +1,6 @@ -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import Ubuntu.Components 1.3 -import Ubuntu.Components.ListItems 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Page { id: root diff --git a/rockwork/qml/SystemAppIcon.qml b/rockwork/qml/SystemAppIcon.qml index 88e37bc..3823cf2 100644 --- a/rockwork/qml/SystemAppIcon.qml +++ b/rockwork/qml/SystemAppIcon.qml @@ -1,5 +1,6 @@ -import QtQuick 2.4 -import Ubuntu.Components 1.3 +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import RockPool 1.0 Item { id: root @@ -8,10 +9,10 @@ Item { property string uuid: "" property string iconSource: "" - UbuntuShape { + Rectangle { anchors.fill: parent visible: root.isSystemApp - backgroundColor: { + color: { switch (root.uuid) { case "{07e0d9cb-8957-4bf7-9d42-35bf47caadfe}": return "gray"; @@ -32,28 +33,27 @@ Item { return ""; } } - Icon { + IconButton { anchors.fill: parent implicitHeight: height - anchors.margins: units.gu(1) + //anchors.margins: units.gu(1) visible: root.isSystemApp - color: "white" - name: { + icon.source: { switch (root.uuid) { case "{07e0d9cb-8957-4bf7-9d42-35bf47caadfe}": - return "settings"; + return "image://theme/icon-m-developer-mode"; case "{18e443ce-38fd-47c8-84d5-6d0c775fbe55}": - return "clock-app-symbolic"; + return "image://theme/icon-m-clock"; case "{36d8c6ed-4c83-4fa1-a9e2-8f12dc941f8c}": - return "like"; + return "image://theme/icon-m-like"; case "{1f03293d-47af-4f28-b960-f2b02a6dd757}": - return "stock_music"; + return "image://theme/icon-m-music"; case "{b2cae818-10f8-46df-ad2b-98ad2254a3c1}": - return "stock_notification"; + return "image://theme/icon-m-notifications"; case "{67a32d95-ef69-46d4-a0b9-854cc62f97f9}": - return "stock_alarm-clock"; + return "image://theme/icon-m-alarm"; case "{8f3c8686-31a1-4f5f-91f5-01600c9bdc59}": - return "clock-app-symbolic"; + return "image://theme/icon-m-clock"; } return ""; } diff --git a/rockwork/rockpool.desktop b/rockwork/rockpool.desktop index 0a75199..989d24d 100644 --- a/rockwork/rockpool.desktop +++ b/rockwork/rockpool.desktop @@ -1,8 +1,7 @@ [Desktop Entry] -Name=RockWork -Exec=rockwork -Icon=rockwork/rockwork.svg -Terminal=false +Name=RockPool +Exec=rockpool +Icon=rockpool Type=Application -X-Ubuntu-Touch=true +X-Nemo-Application-Type=silica-qt5 diff --git a/rockwork/rockpool.png b/rockwork/rockpool.png Binary files differnew file mode 100644 index 0000000..571ac11 --- /dev/null +++ b/rockwork/rockpool.png diff --git a/rockwork/rockwork.apparmor b/rockwork/rockwork.apparmor deleted file mode 100644 index 9756323..0000000 --- a/rockwork/rockwork.apparmor +++ /dev/null @@ -1,7 +0,0 @@ -{ - "policy_groups": [ - "networking" - ], - "policy_version": 1.3, - "template": "unconfined" -} diff --git a/rockwork/rockwork.pro b/rockwork/rockwork.pro index 0d04f81..a695e42 100644 --- a/rockwork/rockwork.pro +++ b/rockwork/rockwork.pro @@ -1,71 +1,54 @@ -TEMPLATE = app -TARGET = rockpool - -include(../version.pri) - -QT += qml quick dbus - -CONFIG += c++11 - -HEADERS += \ - notificationsourcemodel.h \ - servicecontrol.h \ - pebble.h \ - pebbles.h \ - applicationsmodel.h \ - applicationsfiltermodel.h \ - appstoreclient.h \ - screenshotmodel.h - -SOURCES += main.cpp \ - notificationsourcemodel.cpp \ - servicecontrol.cpp \ - pebble.cpp \ - pebbles.cpp \ - applicationsmodel.cpp \ - applicationsfiltermodel.cpp \ - appstoreclient.cpp \ - screenshotmodel.cpp - -RESOURCES += rockwork.qrc - -QML_FILES += $$files(*.qml,true) \ - $$files(*.js,true) - -CONF_FILES += rockwork.apparmor \ - rockwork.svg \ - rockwork.desktop \ - rockwork.url-dispatcher - -AP_TEST_FILES += tests/autopilot/run \ - $$files(tests/*.py,true) - -#show all the files in QtCreator -OTHER_FILES += $${CONF_FILES} \ - $${QML_FILES} \ - $${AP_TEST_FILES} \ - - -#specify where the config files are installed to -config_files.path = /rockpool -config_files.files += $${CONF_FILES} -INSTALLS+=config_files - -#install the desktop file, a translated version is -#automatically created in the build directory -desktop_file.path = /rockpool -desktop_file.files = $$OUT_PWD/rockpool.desktop -desktop_file.CONFIG += no_check_exist -INSTALLS+=desktop_file - -# Default rules for deployment. -target.path = /usr/bin -INSTALLS+=target - -DISTFILES += \ - NotificationsPage.qml \ - PebblesPage.qml \ - AppStorePage.qml \ - AppStoreDetailsPage.qml \ - PebbleModels.qml \ - InfoPage.qml +TARGET = rockpool
+
+include(../version.pri)
+
+QT += qml quick dbus webkit quick-private webkit-private
+
+CONFIG += c++11
+CONFIG += sailfishapp
+
+HEADERS += \
+ notificationsourcemodel.h \
+ servicecontrol.h \
+ pebble.h \
+ pebbles.h \
+ applicationsmodel.h \
+ applicationsfiltermodel.h \
+ appstoreclient.h \
+ screenshotmodel.h
+
+SOURCES += main.cpp \
+ notificationsourcemodel.cpp \
+ servicecontrol.cpp \
+ pebble.cpp \
+ pebbles.cpp \
+ applicationsmodel.cpp \
+ applicationsfiltermodel.cpp \
+ appstoreclient.cpp \
+ screenshotmodel.cpp
+
+RESOURCES += rockwork.qrc
+
+QML_FILES += $$files(qml/*.qml,true)
+
+CONF_FILES += rockpool.png \
+ rockpool.desktop
+
+#show all the files in QtCreator
+OTHER_FILES += $${QML_FILES} \
+ $${CONF_FILES}
+
+#specify where the qml files are installed to
+qml.path = /usr/share/rockpool/qml
+qml.files += $${QML_FILES}
+INSTALLS+=qml
+
+#and the app icon
+icon.path = /usr/share/icons/hicolor/86x86/apps/
+icon.files = rockpool.png
+INSTALLS+=icon
+
+# Default rules for deployment.
+INSTALLS+=target icon
+target.path = /usr/bin
+
diff --git a/rockwork/rockwork.qrc b/rockwork/rockwork.qrc index 3fc0cfb..3cb6f76 100644 --- a/rockwork/rockwork.qrc +++ b/rockwork/rockwork.qrc @@ -1,18 +1,6 @@ <RCC> <qresource prefix="/"> - <file>Main.qml</file> - <file>NotificationsPage.qml</file> - <file>PebblesPage.qml</file> - <file>InstalledAppsPage.qml</file> - <file>MainMenuPage.qml</file> - <file>AppSettingsPage.qml</file> - <file>AppStorePage.qml</file> - <file>AppStoreDetailsPage.qml</file> - <file>InstalledAppDelegate.qml</file> - <file>SystemAppIcon.qml</file> - <file>ScreenshotsPage.qml</file> - <file>snowywhite.svg</file> - <file>snowywhite.png</file> + <file>artwork/back-cover.png</file> <file>artwork/bianca-black.png</file> <file>artwork/bianca-silver.png</file> <file>artwork/black-20mm-hole.png</file> @@ -35,13 +23,5 @@ <file>artwork/tintin-pink.png</file> <file>artwork/tintin-red.png</file> <file>artwork/tintin-white.png</file> - <file>PebbleModels.qml</file> - <file>FirmwareUpgradePage.qml</file> - <file>InfoPage.qml</file> - <file>artwork/rockwork.svg</file> - <file>DeveloperToolsPage.qml</file> - <file>ContentPeerPickerPage.qml</file> - <file>HealthSettingsDialog.qml</file> - <file>SettingsPage.qml</file> </qresource> </RCC> diff --git a/rockwork/rockwork.svg b/rockwork/rockwork.svg deleted file mode 100644 index e4e92c0..0000000 --- a/rockwork/rockwork.svg +++ /dev/null @@ -1,275 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="72.248886mm" - height="72.248886mm" - viewBox="0 0 255.99999 255.99999" - id="svg2" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="upebble.svg"> - <defs - id="defs4"> - <filter - inkscape:collect="always" - style="color-interpolation-filters:sRGB" - id="filter4248" - x="-0.025328101" - width="1.0506562" - y="-0.013960773" - height="1.0279215"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.3907822" - id="feGaussianBlur4250" /> - </filter> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="3.959798" - inkscape:cx="89.121544" - inkscape:cy="77.044911" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="true" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:window-width="2880" - inkscape:window-height="1752" - inkscape:window-x="0" - inkscape:window-y="48" - inkscape:window-maximized="1"> - <inkscape:grid - type="xygrid" - id="grid4136" - originx="-40.000001" - originy="-539" - snapvisiblegridlinesonly="true" - enabled="false" /> - </sodipodi:namedview> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(-40,-257.36221)"> - <rect - style="opacity:1;fill:#78d3fc;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4200" - width="256" - height="256" - x="40" - y="257.36221" /> - <path - style="opacity:1;fill:#000000;fill-opacity:0.0479798;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 40,257.36221 256,0 -256,256 z" - id="rect4252" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccc" /> - <g - id="g4300"> - <g - style="fill:#000000;fill-opacity:1;opacity:0.291;filter:url(#filter4248)" - id="g4202" - transform="matrix(0.60632857,0,0,0.60632857,-37.462675,74.399202)"> - <path - sodipodi:nodetypes="czccc" - inkscape:connector-curvature="0" - id="path4204" - d="m 437.97969,445.08937 c 0,0 11.49464,-4.59544 12.27285,0.25253 0.77821,4.84797 2.06459,45.23266 2.06459,45.23266 -8.36034,0.32794 -13.15013,-0.0886 -13.15013,-0.0886 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="ccccc" - inkscape:connector-curvature="0" - id="path4206" - d="m 439.49492,491.6046 12.68287,0.70015 0.54937,42.27954 -13.73731,0.25254 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4208" - width="120" - height="95" - x="280" - y="623.36218" /> - <rect - y="307.36221" - x="280" - height="95" - width="120" - id="rect4210" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zcczz" - inkscape:connector-curvature="0" - id="path4212" - d="M 228.0862,442.4309 C 228.58744,435.98794 240,437.36221 240,437.36221 l 0,42.02031 c 0,0 -14.31567,-1.22669 -13.80125,-2.84014 0.51442,-1.61345 1.3862,-27.66851 1.88745,-34.11148 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 420,643.715 337.60905,658.36221 255,643.715 l 0,-20 165,0 z" - id="path4214" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> - <path - sodipodi:nodetypes="cccccc" - inkscape:connector-curvature="0" - id="path4216" - d="M 255,382.36221 337.39095,367.715 420,382.36221 l 0,20 -165,0 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cczcc" - inkscape:connector-curvature="0" - id="path4218" - d="m 438.52906,535.82255 c 0,0 5.15979,0.84007 13.83236,0.44761 0.13423,13.76866 -1.20901,37.74804 -1.85634,42.35471 -0.64733,4.60667 -11.01016,-0.50508 -11.01016,-0.50508 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zzzzzzzzz" - inkscape:connector-curvature="0" - id="path4220" - d="m 244.85206,406.56127 c 16.07143,-13.92858 66.12644,-13.34299 97.65304,-13.30725 31.5266,0.0357 73.56632,-0.53467 90.70918,15.17961 17.14286,15.71428 12.91706,70.98675 13.01566,106.0726 0.0986,35.08586 5.19864,81.42741 -13.01565,99.64169 C 415,632.3622 371.12033,628.47664 339.15317,628.18658 307.186,627.89652 263.91063,632.7014 245.3392,615.91569 226.76777,599.12997 231.43107,540.45867 231.61582,505.9352 c 0.18475,-34.52347 -2.83519,-85.44536 13.23624,-99.37393 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - ry="20" - rx="20" - y="422.36221" - x="260" - height="174.99998" - width="155" - id="rect4222" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - y="442.36221" - x="280" - height="135" - width="120" - id="rect4224" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cccccccc" - inkscape:connector-curvature="0" - id="path4226" - d="m 375,442.36221 25,0 0,135 -25,0 0,-109.75206 -7.32361,-5.3033 7.32361,-4.9245 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - </g> - <path - sodipodi:nodetypes="czccc" - inkscape:connector-curvature="0" - id="rect4177" - d="m 228.09692,344.2696 c 0,0 6.96953,-2.78634 7.44138,0.15312 0.47185,2.93946 1.25182,27.42585 1.25182,27.42585 -5.06911,0.19884 -7.9733,-0.0537 -7.9733,-0.0537 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="ccccc" - inkscape:connector-curvature="0" - id="rect4179" - d="m 229.01565,372.47312 7.68999,0.42452 0.3331,25.63529 -8.32933,0.15312 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4167" - width="72.75943" - height="57.601215" - x="132.30933" - y="452.36151" /> - <rect - y="260.76169" - x="132.30933" - height="57.601215" - width="72.75943" - id="rect4165" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zcczz" - inkscape:connector-curvature="0" - id="rect4169" - d="m 100.8325,342.6577 c 0.30392,-3.90655 7.22368,-3.07329 7.22368,-3.07329 l 0,25.47811 c 0,0 -8.679998,-0.74378 -8.36809,-1.72206 0.311907,-0.97828 0.84049,-16.77621 1.14441,-20.68276 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 217.19532,464.702 -49.95598,8.88102 -50.08823,-8.88102 0,-12.12657 100.04421,0 z" - id="path4175" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> - <path - sodipodi:nodetypes="cccccc" - inkscape:connector-curvature="0" - id="rect4172" - d="m 117.15111,306.23633 49.95599,-8.88102 50.08822,8.88102 0,12.12658 -100.04421,0 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cczcc" - inkscape:connector-curvature="0" - id="rect4181" - d="m 228.43002,399.28372 c 0,0 3.12853,0.50936 8.38696,0.2714 0.0814,8.34833 -0.73306,22.88772 -1.12555,25.68087 -0.3925,2.79316 -6.67578,-0.30624 -6.67578,-0.30624 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="zzzzzzzzz" - inkscape:connector-curvature="0" - id="rect4149" - d="m 110.99812,320.90892 c 9.74457,-8.4453 40.09435,-8.09024 59.20983,-8.06857 19.11548,0.0217 44.60536,-0.32419 54.99957,9.20383 10.39421,9.52802 7.83198,43.0413 7.89177,64.31485 0.0598,21.27356 3.15208,49.37176 -7.89176,60.4156 -11.04385,11.04384 -37.64935,8.68791 -57.03195,8.51204 -19.38261,-0.17587 -45.6217,2.73747 -56.88209,-7.44019 -11.26039,-10.17766 -8.4329,-45.75175 -8.32088,-66.68431 0.11202,-20.93257 -1.71905,-51.80796 8.02551,-60.25325 z" - style="opacity:1;fill:#cbcbcb;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 133.22587,330.48948 69.72779,0 c 6.71812,0 11.83367,5.41484 12.12657,12.12657 1.19073,27.28478 1.19022,54.56956 0,81.85435 -0.29278,6.71174 -5.40845,12.12657 -12.12657,12.12657 l -69.72779,0 c -6.71812,0 -11.82926,-5.41504 -12.12657,-12.12657 -1.18246,-26.69356 -1.65764,-53.74075 0,-81.85435 0.39543,-6.70647 5.40845,-12.12657 12.12657,-12.12657 z" - id="rect4152" - inkscape:connector-curvature="0" - sodipodi:nodetypes="sssssssss" /> - <rect - y="342.61606" - x="131.62029" - height="81.854355" - width="72.75943" - id="rect4154" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - sodipodi:nodetypes="cccccccc" - inkscape:connector-curvature="0" - id="rect4156" - d="m 189.2215,342.61605 15.15821,0 0,81.85436 -15.15821,0 0,-66.54581 -4.44052,-3.21555 4.44052,-2.98586 z" - style="opacity:1;fill:#78d3fc;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - </g> - <path - style="fill:#000000" - d="m 143.63128,393.17695 c -0.82884,-0.82884 0.32908,-1.46136 2.67524,-1.46136 3.02637,0 3.07586,-0.7116 0.31911,-4.58902 l -2.10477,-2.96041 2.0287,-2.94922 c 1.15063,-1.67272 2.20678,-4.13671 2.44014,-5.69282 0.40696,-2.71383 0.44252,-2.74828 3.27625,-3.17322 1.57564,-0.23629 4.03472,-1.23453 5.46462,-2.21832 1.42988,-0.98379 2.85437,-1.78871 3.16551,-1.78871 0.31114,0 1.68177,0.80847 3.04585,1.7966 1.40341,1.01663 3.70432,1.98019 5.29992,2.21946 2.92933,0.43928 2.99923,0.52347 3.81465,4.59457 0.23714,1.18397 1.22649,3.16119 2.19857,4.39382 0.97208,1.23265 1.76741,2.42825 1.76741,2.6569 0,0.22864 -0.83031,1.62253 -1.84514,3.09753 -2.44659,3.556 -2.38325,4.49115 0.32038,4.72947 1.19102,0.10499 2.22891,0.46766 2.30641,0.80594 0.15778,0.68864 -33.49245,1.21919 -34.17285,0.53879 z m 27.8729,-2.84521 c 0.009,-0.76112 0.83738,-2.4679 1.83992,-3.79283 l 1.82279,-2.40898 -1.58789,-2.08183 c -0.87334,-1.14501 -1.90888,-3.37431 -2.30119,-4.954 -0.68475,-2.75721 -0.82407,-2.89364 -3.48101,-3.40876 -1.52223,-0.29514 -3.68339,-1.22898 -4.80255,-2.0752 l -2.03486,-1.53859 -2.27046,1.53481 c -2.19134,1.48132 -2.85113,1.74296 -6.34208,2.51493 -1.32103,0.29212 -1.68348,0.80695 -2.01126,2.85674 -0.2199,1.37522 -1.11243,3.57721 -1.98338,4.8933 l -1.58355,2.39291 1.54803,2.0343 c 0.85141,1.11887 1.73796,2.79542 1.97011,3.72567 l 0.42209,1.69138 10.38909,0 c 10.35877,0 10.38914,-0.004 10.4062,-1.38385 z m -16.16204,-1.17442 c -3.00082,-0.83158 -3.29439,-2.70542 -0.30753,-1.96294 1.0994,0.27329 2.9676,0.49689 4.15156,0.49689 1.18396,0 3.05216,-0.2236 4.15155,-0.49689 1.34833,-0.33517 1.9989,-0.27586 1.9989,0.18225 0,1.61808 -6.44052,2.76557 -9.99448,1.78069 z m -1.87921,-5.21512 c -0.23497,-0.23497 -0.42721,-1.51123 -0.42721,-2.83614 0,-2.76084 1.40937,-2.98541 1.73071,-0.27578 0.21201,1.78766 -0.62633,3.78908 -1.3035,3.11192 z m 10.02856,-2.68238 c 0,-1.7768 0.25627,-2.46018 0.92256,-2.46018 0.6663,0 0.92257,0.68338 0.92257,2.46018 0,1.7768 -0.25627,2.46018 -0.92257,2.46018 -0.66629,0 -0.92256,-0.68338 -0.92256,-2.46018 z m -22.75668,2.7677 c 0,-0.69366 0.43166,-0.94682 1.38386,-0.81158 0.76111,0.10809 1.38385,0.47331 1.38385,0.81158 0,0.33828 -0.62274,0.70349 -1.38385,0.81159 -0.9522,0.13523 -1.38386,-0.11793 -1.38386,-0.81159 z m 37.8226,0.30318 c -0.46699,-0.7556 1.22568,-1.49279 2.13592,-0.93022 0.35999,0.22248 0.4953,0.66216 0.30068,0.97707 -0.46943,0.75955 -1.95589,0.73096 -2.4366,-0.0469 z m -32.49939,-13.42132 c -1.23387,-1.36341 -1.29125,-1.95046 -0.19065,-1.95046 1.05106,0 3.00139,2.11681 2.45435,2.66385 -0.65422,0.65422 -1.17438,0.49029 -2.2637,-0.71339 z m 27.38286,0.11435 c 0.23773,-1.20797 2.11252,-2.50883 2.72827,-1.89307 0.48678,0.48678 -1.47947,2.90348 -2.36232,2.90348 -0.31065,0 -0.47533,-0.45468 -0.36595,-1.01041 z m -13.38512,-4.7488 c -0.52662,-1.37234 -0.0519,-3.6431 0.82178,-3.93083 0.51752,-0.17043 0.76881,0.45533 0.76881,1.91443 0,2.29458 -0.99824,3.56005 -1.59059,2.0164 z" - id="path4285" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ssscsssssssssssssssscsssscsssscsscsssssssssssssssssssssscssccssssssssssss" /> - <text - xml:space="preserve" - style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - x="136.46957" - y="405.82156" - id="text4342" - sodipodi:linespacing="125%"><tspan - sodipodi:role="line" - id="tspan4344" - x="136.46957" - y="405.82156" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10px;font-family:Ubuntu;-inkscape-font-specification:Ubuntu">Tomorrow</tspan></text> - </g> -</svg> diff --git a/rockwork/rockwork.url-dispatcher b/rockwork/rockwork.url-dispatcher deleted file mode 100644 index 3453482..0000000 --- a/rockwork/rockwork.url-dispatcher +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "protocol": "pebblejs" - } -] diff --git a/rockwork/servicecontrol.cpp b/rockwork/servicecontrol.cpp index 4d6903f..ced7f1a 100644 --- a/rockwork/servicecontrol.cpp +++ b/rockwork/servicecontrol.cpp @@ -5,84 +5,42 @@ #include <QDebug> #include <QCoreApplication> #include <QProcess> +#include <QDBusReply> -ServiceControl::ServiceControl(QObject *parent) : QObject(parent) +ServiceControl::ServiceControl(QObject *parent) : QObject(parent), + systemd(new QDBusInterface("org.freedesktop.systemd1", + "/org/freedesktop/systemd1", + "org.freedesktop.systemd1.Manager", + QDBusConnection::sessionBus(), this)) { + systemd->call("Subscribe"); -} + QDBusReply<QDBusObjectPath> unit = systemd->call("LoadUnit", ROCKPOOLD_SYSTEMD_UNIT); + if (unit.isValid()) { + unitPath = unit.value(); -QString ServiceControl::serviceName() const -{ - return m_serviceName; -} + getUnitProperties(); -void ServiceControl::setServiceName(const QString &serviceName) -{ - if (m_serviceName != serviceName) { - m_serviceName = serviceName; - emit serviceNameChanged(); + QDBusConnection::sessionBus().connect( + "org.freedesktop.systemd1", unitPath.path(), + "org.freedesktop.DBus.Properties", "PropertiesChanged", + this, SLOT(onPropertiesChanged(QString,QMap<QString,QVariant>,QStringList))); + } else { + qWarning() << unit.error().message(); } } -bool ServiceControl::serviceFileInstalled() const +void ServiceControl::onPropertiesChanged(QString interface, QMap<QString,QVariant> changed, QStringList invalidated) { - if (m_serviceName.isEmpty()) { - qDebug() << "Service name not set."; - return false; - } - QFile f(QDir::homePath() + "/.config/upstart/" + m_serviceName + ".conf"); - return f.exists(); -} - -bool ServiceControl::installServiceFile() -{ - if (m_serviceName.isEmpty()) { - qDebug() << "Service name not set. Cannot generate service file."; - return false; - } - - QFile f(QDir::homePath() + "/.config/upstart/" + m_serviceName + ".conf"); - if (f.exists()) { - qDebug() << "Service file already existing..."; - return false; - } - - if (!f.open(QFile::WriteOnly | QFile::Truncate)) { - qDebug() << "Cannot create service file"; - return false; - } - - QString appDir = qApp->applicationDirPath(); - // Try to replace version with "current" to be more robust against updates - appDir.replace(QRegExp("rockwork.mzanetti\/[0-9.]*\/"), "rockwork.mzanetti/current/"); - - f.write("start on started unity8\n"); - f.write("pre-start script\n"); - f.write(" initctl set-env LD_LIBRARY_PATH=" + appDir.toUtf8() + "/../:$LD_LIBRARY_PATH\n"); - f.write("end script\n"); - f.write("exec " + appDir.toUtf8() + "/" + m_serviceName.toUtf8() + "\n"); - f.close(); - return true; -} - -bool ServiceControl::removeServiceFile() -{ - if (m_serviceName.isEmpty()) { - qDebug() << "Service name not set."; - return false; - } - QFile f(QDir::homePath() + "/.config/upstart/" + m_serviceName + ".conf"); - return f.remove(); + qDebug() << Q_FUNC_INFO << interface << changed << invalidated; + if (interface != "org.freedesktop.systemd1.Unit") return; + if (invalidated.contains("UnitFileState") || invalidated.contains("ActiveState")) + getUnitProperties(); } bool ServiceControl::serviceRunning() const { - QProcess p; - p.start("initctl", {"status", m_serviceName}); - p.waitForFinished(); - QByteArray output = p.readAll(); - qDebug() << output; - return output.contains("running"); + return unitProperties["UnitFileState"].toString() == "enabled"; } bool ServiceControl::setServiceRunning(bool running) @@ -97,22 +55,49 @@ bool ServiceControl::setServiceRunning(bool running) bool ServiceControl::startService() { - qDebug() << "should start service"; - int ret = QProcess::execute("start", {m_serviceName}); - return ret == 0; + QDBusError reply; + systemd->call("EnableUnitFiles", QStringList() << ROCKPOOLD_SYSTEMD_UNIT, false, true); + if (reply.isValid()) { + qWarning() << reply.message(); + return false; + } else { + systemd->call("Reload"); + return true; + } } bool ServiceControl::stopService() { - qDebug() << "should stop service"; - int ret = QProcess::execute("stop", {m_serviceName}); - return ret == 0; + QDBusError reply; + systemd->call("DisableUnitFiles", QStringList() << ROCKPOOLD_SYSTEMD_UNIT, false); + if (reply.isValid()) { + qWarning() << reply.message(); + return false; + } else { + systemd->call("Reload"); + return true; + } } bool ServiceControl::restartService() { - qDebug() << "should stop service"; - int ret = QProcess::execute("restart", {m_serviceName}); - return ret == 0; + return stopService() && startService(); } +void ServiceControl::getUnitProperties() +{ + QDBusMessage request = QDBusMessage::createMethodCall( + "org.freedesktop.systemd1", unitPath.path(), + "org.freedesktop.DBus.Properties", "GetAll"); + request << "org.freedesktop.systemd1.Unit"; + QDBusReply<QVariantMap> reply = QDBusConnection::sessionBus().call(request); + if (reply.isValid()) { + QVariantMap newProperties = reply.value(); + //bool emitEnabledChanged = (unitProperties["UnitFileState"] != newProperties["UnitFileState"]); + bool emitRunningChanged = (unitProperties["ActiveState"] != newProperties["ActiveState"]); + unitProperties = newProperties; + if (emitRunningChanged) emit serviceRunning(); + } else { + qWarning() << reply.error().message(); + } +} diff --git a/rockwork/servicecontrol.h b/rockwork/servicecontrol.h index 4689506..ebab061 100644 --- a/rockwork/servicecontrol.h +++ b/rockwork/servicecontrol.h @@ -1,38 +1,37 @@ #ifndef SERVICECONTROL_H #define SERVICECONTROL_H +#include <QDBusInterface> #include <QObject> +static const QString ROCKPOOLD_SYSTEMD_UNIT("rockpoold.service"); + class ServiceControl : public QObject { Q_OBJECT - Q_PROPERTY(QString serviceName READ serviceName WRITE setServiceName NOTIFY serviceNameChanged) - Q_PROPERTY(bool serviceFileInstalled READ serviceFileInstalled NOTIFY serviceFileInstalledChanged) Q_PROPERTY(bool serviceRunning READ serviceRunning WRITE setServiceRunning NOTIFY serviceRunningChanged) public: explicit ServiceControl(QObject *parent = 0); - QString serviceName() const; - void setServiceName(const QString &serviceName); - - bool serviceFileInstalled() const; - Q_INVOKABLE bool installServiceFile(); - Q_INVOKABLE bool removeServiceFile(); - bool serviceRunning() const; bool setServiceRunning(bool running); Q_INVOKABLE bool startService(); Q_INVOKABLE bool stopService(); Q_INVOKABLE bool restartService(); +private slots: + void getUnitProperties(); + void onPropertiesChanged(QString interface, QMap<QString, QVariant> changed, QStringList invalidated); + signals: - void serviceNameChanged(); - void serviceFileInstalledChanged(); void serviceRunningChanged(); private: - QString m_serviceName; + QDBusInterface *systemd; + QDBusObjectPath unitPath; + QVariantMap unitProperties; + }; #endif // SERVICECONTROL_H diff --git a/rockwork/snowywhite.png b/rockwork/snowywhite.png Binary files differdeleted file mode 100644 index 1a354b4..0000000 --- a/rockwork/snowywhite.png +++ /dev/null diff --git a/rockwork/snowywhite.svg b/rockwork/snowywhite.svg deleted file mode 100644 index 0544670..0000000 --- a/rockwork/snowywhite.svg +++ /dev/null @@ -1,241 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="72.248886mm" - height="72.248886mm" - viewBox="0 0 255.99999 255.99999" - id="svg2" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="snowywhite.svg"> - <defs - id="defs4"> - <filter - inkscape:collect="always" - style="color-interpolation-filters:sRGB" - id="filter4364" - x="-0.059098901" - width="1.1181978" - y="-0.032575137" - height="1.0651503"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="5.5784918" - id="feGaussianBlur4366" /> - </filter> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="3.959798" - inkscape:cx="89.121544" - inkscape:cy="77.044911" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="true" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:window-width="2880" - inkscape:window-height="1752" - inkscape:window-x="0" - inkscape:window-y="48" - inkscape:window-maximized="1"> - <inkscape:grid - type="xygrid" - id="grid4136" - originx="-40.000001" - originy="-539" - snapvisiblegridlinesonly="true" - enabled="false" /> - </sodipodi:namedview> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(-40,-257.36221)"> - <g - transform="matrix(0.60632857,0,0,0.60632857,-37.462675,74.399202)" - id="g4202" - style="opacity:0.581;fill:#000000;fill-opacity:1;filter:url(#filter4364)"> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 437.97969,445.08937 c 0,0 11.49464,-4.59544 12.27285,0.25253 0.77821,4.84797 2.06459,45.23266 2.06459,45.23266 -8.36034,0.32794 -13.15013,-0.0886 -13.15013,-0.0886 z" - id="path4204" - inkscape:connector-curvature="0" - sodipodi:nodetypes="czccc" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 439.49492,491.6046 12.68287,0.70015 0.54937,42.27954 -13.73731,0.25254 z" - id="path4206" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ccccc" /> - <rect - y="623.36218" - x="280" - height="95" - width="120" - id="rect4208" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4210" - width="120" - height="95" - x="280" - y="307.36221" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 228.0862,442.4309 C 228.58744,435.98794 240,437.36221 240,437.36221 l 0,42.02031 c 0,0 -14.31567,-1.22669 -13.80125,-2.84014 0.51442,-1.61345 1.3862,-27.66851 1.88745,-34.11148 z" - id="path4212" - inkscape:connector-curvature="0" - sodipodi:nodetypes="zcczz" /> - <path - sodipodi:nodetypes="cccccc" - inkscape:connector-curvature="0" - id="path4214" - d="M 420,643.715 337.60905,658.36221 255,643.715 l 0,-20 165,0 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="M 255,382.36221 337.39095,367.715 420,382.36221 l 0,20 -165,0 z" - id="path4216" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 438.52906,535.82255 c 0,0 5.15979,0.84007 13.83236,0.44761 0.13423,13.76866 -1.20901,37.74804 -1.85634,42.35471 -0.64733,4.60667 -11.01016,-0.50508 -11.01016,-0.50508 z" - id="path4218" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cczcc" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 244.85206,406.56127 c 16.07143,-13.92858 66.12644,-13.34299 97.65304,-13.30725 31.5266,0.0357 73.56632,-0.53467 90.70918,15.17961 17.14286,15.71428 12.91706,70.98675 13.01566,106.0726 0.0986,35.08586 5.19864,81.42741 -13.01565,99.64169 C 415,632.3622 371.12033,628.47664 339.15317,628.18658 307.186,627.89652 263.91063,632.7014 245.3392,615.91569 226.76777,599.12997 231.43107,540.45867 231.61582,505.9352 c 0.18475,-34.52347 -2.83519,-85.44536 13.23624,-99.37393 z" - id="path4220" - inkscape:connector-curvature="0" - sodipodi:nodetypes="zzzzzzzzz" /> - <rect - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4222" - width="155" - height="174.99998" - x="260" - y="422.36221" - rx="20" - ry="20" /> - <rect - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4224" - width="120" - height="135" - x="280" - y="442.36221" /> - <path - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 375,442.36221 25,0 0,135 -25,0 0,-109.75206 -7.32361,-5.3033 7.32361,-4.9245 z" - id="path4226" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccccc" /> - </g> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 228.09692,344.2696 c 0,0 6.96953,-2.78634 7.44138,0.15312 0.47185,2.93946 1.25182,27.42585 1.25182,27.42585 -5.06911,0.19884 -7.9733,-0.0537 -7.9733,-0.0537 z" - id="rect4177" - inkscape:connector-curvature="0" - sodipodi:nodetypes="czccc" /> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 229.01565,372.47312 7.68999,0.42452 0.3331,25.63529 -8.32933,0.15312 z" - id="rect4179" - inkscape:connector-curvature="0" - sodipodi:nodetypes="ccccc" /> - <rect - y="452.36151" - x="132.30933" - height="57.601215" - width="72.75943" - id="rect4167" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4165" - width="72.75943" - height="57.601215" - x="132.30933" - y="260.76169" /> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 100.8325,342.6577 c 0.30392,-3.90655 7.22368,-3.07329 7.22368,-3.07329 l 0,25.47811 c 0,0 -8.679998,-0.74378 -8.36809,-1.72206 0.311907,-0.97828 0.84049,-16.77621 1.14441,-20.68276 z" - id="rect4169" - inkscape:connector-curvature="0" - sodipodi:nodetypes="zcczz" /> - <path - sodipodi:nodetypes="cccccc" - inkscape:connector-curvature="0" - id="path4175" - d="m 217.19532,464.702 -49.95598,8.88102 -50.08823,-8.88102 0,-12.12657 100.04421,0 z" - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 117.15111,306.23633 49.95599,-8.88102 50.08822,8.88102 0,12.12658 -100.04421,0 z" - id="rect4172" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccc" /> - <path - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 228.43002,399.28372 c 0,0 3.12853,0.50936 8.38696,0.2714 0.0814,8.34833 -0.73306,22.88772 -1.12555,25.68087 -0.3925,2.79316 -6.67578,-0.30624 -6.67578,-0.30624 z" - id="rect4181" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cczcc" /> - <path - style="opacity:1;fill:#cbcbcb;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 110.99812,320.90892 c 9.74457,-8.4453 40.09435,-8.09024 59.20983,-8.06857 19.11548,0.0217 44.60536,-0.32419 54.99957,9.20383 10.39421,9.52802 7.83198,43.0413 7.89177,64.31485 0.0598,21.27356 3.15208,49.37176 -7.89176,60.4156 -11.04385,11.04384 -37.64935,8.68791 -57.03195,8.51204 -19.38261,-0.17587 -45.6217,2.73747 -56.88209,-7.44019 -11.26039,-10.17766 -8.4329,-45.75175 -8.32088,-66.68431 0.11202,-20.93257 -1.71905,-51.80796 8.02551,-60.25325 z" - id="rect4149" - inkscape:connector-curvature="0" - sodipodi:nodetypes="zzzzzzzzz" /> - <path - sodipodi:nodetypes="sssssssss" - inkscape:connector-curvature="0" - id="rect4152" - d="m 133.22587,330.48948 69.72779,0 c 6.71812,0 11.83367,5.41484 12.12657,12.12657 1.19073,27.28478 1.19022,54.56956 0,81.85435 -0.29278,6.71174 -5.40845,12.12657 -12.12657,12.12657 l -69.72779,0 c -6.71812,0 -11.82926,-5.41504 -12.12657,-12.12657 -1.18246,-26.69356 -1.65764,-53.74075 0,-81.85435 0.39543,-6.70647 5.40845,-12.12657 12.12657,-12.12657 z" - style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <rect - style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect4154" - width="72.75943" - height="81.854355" - x="131.62029" - y="342.61606" /> - <path - style="opacity:1;fill:#78d3fc;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - d="m 189.2215,342.61605 15.15821,0 0,81.85436 -15.15821,0 0,-66.54581 -4.44052,-3.21555 4.44052,-2.98586 z" - id="rect4156" - inkscape:connector-curvature="0" - sodipodi:nodetypes="cccccccc" /> - </g> -</svg> |
