diff options
author | Arseniy Movshev <dodoradio@outlook.com> | 2022-10-22 13:31:50 +0100 |
---|---|---|
committer | Arseniy Movshev <dodoradio@outlook.com> | 2023-01-07 14:19:27 +0000 |
commit | 95c72f71f9382e3bf2918892edc1e7137391554d (patch) | |
tree | 4eb93e137d72c7c8bb5604d8a66b6315ab0f87a9 | |
parent | b2f45991df2498a050352f3c6dd8c956bde535ee (diff) |
Fork from asteroid-stopwatch and initialise repo
copied over the asteroidos boilerplate from asteroid-stopwatch and
removed everything else
started work on getting a UI to show up
52 files changed, 99 insertions, 685 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f3648a..dc8cba6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.6.0) -project(asteroid-stopwatch +project(asteroid-map VERSION 0.0.1 - DESCRIPTION "Default stopwatch app for AsteroidOS") + DESCRIPTION "Map app for AsteroidOS") find_package(ECM REQUIRED NO_MODULE) find_package(AsteroidApp REQUIRED) @@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ASTEROID_MODULE_PATH}) include(FeatureSummary) include(GNUInstallDirs) -include(ECMQMLModules) +include(ECMFindQmlModule) include(AsteroidCMakeSettings) include(AsteroidTranslations) @@ -20,6 +20,6 @@ ecm_find_qmlmodule(Nemo.Configuration 1.0) add_subdirectory(src) build_translations(i18n) -generate_desktop(${CMAKE_SOURCE_DIR} asteroid-stopwatch) +generate_desktop(${CMAKE_SOURCE_DIR} asteroid-map) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -1,19 +1,8 @@ -# Asteroid Stopwatch -A stopwatch app for [AsteroidOS](http://asteroidos.org/) - -## Dependencies -* [qml-asteroid](https://github.com/AsteroidOS/qml-asteroid) - -## Copyright and License -(C) Copyright 2015 by Tim Süberkrüb - -Part of this code is based on "Stopwatch" (https://github.com/baleboy/stopwatch) - -Copyright (C) 2011 Francesco Balestrieri - -This application is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -See LICENSE for more information. +# Asteroid Map +A map app for AsteroidOS. Depends on Qt5 and qml-asteroid. Aims to provide a useful map app optimised for small and round displays, and devices with limited connectivity. +# Planned features and ideas for implementing them +- Buttons for zoom and centering view on the user. +- Manual caching/downloading of map tiles - A useful feature for going offline. The qt +- Waypoints - save a location, some text, an icon? +- Importing navigation routes - perhaps sending these over from a paired device as GPX, or something else. Probably way off in the future. +- Some sort of navigation system on watch? diff --git a/asteroid-map.desktop.template b/asteroid-map.desktop.template new file mode 100644 index 0000000..521786d --- /dev/null +++ b/asteroid-map.desktop.template @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Categories=Applications; +Exec=invoker --single-instance --type=qtcomponents-qt5 /usr/bin/asteroid-map +Icon=ios-map-outline +X-Asteroid-Center-Color=#9800A6 +X-Asteroid-Outer-Color=#0C0009 diff --git a/i18n/asteroid-stopwatch.desktop.h b/i18n/asteroid-map.desktop.h index f65208f..5faf750 100644 --- a/i18n/asteroid-stopwatch.desktop.h +++ b/i18n/asteroid-map.desktop.h @@ -2,5 +2,5 @@ * will be integrated to i18n/.ts files, translated on Weblate and then merged * back with the .desktop.template file into a single .desktop file. */ -//% "Stopwatch" +//% "Map" qtTrId("id-app-launcher-name"); diff --git a/i18n/asteroid-stopwatch.ar.ts b/i18n/asteroid-stopwatch.ar.ts deleted file mode 100644 index 279373b..0000000 --- a/i18n/asteroid-stopwatch.ar.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ar"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>ساعة التوقيف</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ast.ts b/i18n/asteroid-stopwatch.ast.ts deleted file mode 100644 index 5dddff4..0000000 --- a/i18n/asteroid-stopwatch.ast.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ast"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronómetru</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.cs.ts b/i18n/asteroid-stopwatch.cs.ts deleted file mode 100644 index f72fc7e..0000000 --- a/i18n/asteroid-stopwatch.cs.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="cs"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopky</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.da.ts b/i18n/asteroid-stopwatch.da.ts deleted file mode 100644 index fc50674..0000000 --- a/i18n/asteroid-stopwatch.da.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="da"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopur</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.de_DE.ts b/i18n/asteroid-stopwatch.de_DE.ts deleted file mode 100644 index 723e5e9..0000000 --- a/i18n/asteroid-stopwatch.de_DE.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="de_DE"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stoppuhr</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.el.ts b/i18n/asteroid-stopwatch.el.ts deleted file mode 100644 index 7f2a59a..0000000 --- a/i18n/asteroid-stopwatch.el.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="el"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Χρονόμετρο</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.en_GB.ts b/i18n/asteroid-stopwatch.en_GB.ts deleted file mode 100644 index becac4c..0000000 --- a/i18n/asteroid-stopwatch.en_GB.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="en_GB"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopwatch</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.es.ts b/i18n/asteroid-stopwatch.es.ts deleted file mode 100644 index 95a0678..0000000 --- a/i18n/asteroid-stopwatch.es.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="es"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronómetro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.es_AR.ts b/i18n/asteroid-stopwatch.es_AR.ts deleted file mode 100644 index ed1ba86..0000000 --- a/i18n/asteroid-stopwatch.es_AR.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="es_AR"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronómetro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.fa.ts b/i18n/asteroid-stopwatch.fa.ts deleted file mode 100644 index 6f48989..0000000 --- a/i18n/asteroid-stopwatch.fa.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="fa"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>زمانسنج</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.fi.ts b/i18n/asteroid-stopwatch.fi.ts deleted file mode 100644 index 6a08529..0000000 --- a/i18n/asteroid-stopwatch.fi.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="fi"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Sekuntikello</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.fr.ts b/i18n/asteroid-stopwatch.fr.ts deleted file mode 100644 index f73162b..0000000 --- a/i18n/asteroid-stopwatch.fr.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="fr"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Chronomètre</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.gl.ts b/i18n/asteroid-stopwatch.gl.ts deleted file mode 100644 index 5493dfc..0000000 --- a/i18n/asteroid-stopwatch.gl.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="gl"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronómetro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.he.ts b/i18n/asteroid-stopwatch.he.ts deleted file mode 100644 index fb79fd8..0000000 --- a/i18n/asteroid-stopwatch.he.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="he"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>שעון עצר</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.hr.ts b/i18n/asteroid-stopwatch.hr.ts deleted file mode 100644 index 87fb8e9..0000000 --- a/i18n/asteroid-stopwatch.hr.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="hr"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Štoperica</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.hu.ts b/i18n/asteroid-stopwatch.hu.ts deleted file mode 100644 index 3960547..0000000 --- a/i18n/asteroid-stopwatch.hu.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="hu"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopperóra</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.id.ts b/i18n/asteroid-stopwatch.id.ts deleted file mode 100644 index 92315e7..0000000 --- a/i18n/asteroid-stopwatch.id.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="id"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopwatch</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.it.ts b/i18n/asteroid-stopwatch.it.ts deleted file mode 100644 index f7034f2..0000000 --- a/i18n/asteroid-stopwatch.it.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="it"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronometro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ja.ts b/i18n/asteroid-stopwatch.ja.ts deleted file mode 100644 index a54d80d..0000000 --- a/i18n/asteroid-stopwatch.ja.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ja"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>ストップウォッチ</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ka.ts b/i18n/asteroid-stopwatch.ka.ts deleted file mode 100644 index ee10903..0000000 --- a/i18n/asteroid-stopwatch.ka.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ka"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>წამზომი</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.kab.ts b/i18n/asteroid-stopwatch.kab.ts deleted file mode 100644 index 6bb425e..0000000 --- a/i18n/asteroid-stopwatch.kab.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="kab"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Amesmiḍan n wakud</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ko.ts b/i18n/asteroid-stopwatch.ko.ts deleted file mode 100644 index a6ff6c2..0000000 --- a/i18n/asteroid-stopwatch.ko.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ko"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>초시계</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.lb.ts b/i18n/asteroid-stopwatch.lb.ts deleted file mode 100644 index 092c6b8..0000000 --- a/i18n/asteroid-stopwatch.lb.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="lb"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stoppauer</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.lt.ts b/i18n/asteroid-stopwatch.lt.ts deleted file mode 100644 index 08b50ab..0000000 --- a/i18n/asteroid-stopwatch.lt.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="lt"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Chronometras</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.mr.ts b/i18n/asteroid-stopwatch.mr.ts deleted file mode 100644 index 4938e5f..0000000 --- a/i18n/asteroid-stopwatch.mr.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="mr"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>स्टॉपवॉच</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ms.ts b/i18n/asteroid-stopwatch.ms.ts deleted file mode 100644 index b50eeb4..0000000 --- a/i18n/asteroid-stopwatch.ms.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ms"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Jam Randik</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.nb_NO.ts b/i18n/asteroid-stopwatch.nb_NO.ts deleted file mode 100644 index 317853d..0000000 --- a/i18n/asteroid-stopwatch.nb_NO.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="nb_NO"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stoppeklokke</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.nl_BE.ts b/i18n/asteroid-stopwatch.nl_BE.ts deleted file mode 100644 index b151fe0..0000000 --- a/i18n/asteroid-stopwatch.nl_BE.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="nl_BE"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation></translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.nl_NL.ts b/i18n/asteroid-stopwatch.nl_NL.ts deleted file mode 100644 index cb52233..0000000 --- a/i18n/asteroid-stopwatch.nl_NL.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="nl_NL"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopwatch</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.pl.ts b/i18n/asteroid-stopwatch.pl.ts deleted file mode 100644 index c65a00f..0000000 --- a/i18n/asteroid-stopwatch.pl.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="pl"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stoper</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.pt.ts b/i18n/asteroid-stopwatch.pt.ts deleted file mode 100644 index 0fb0837..0000000 --- a/i18n/asteroid-stopwatch.pt.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="pt"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronómetro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.pt_BR.ts b/i18n/asteroid-stopwatch.pt_BR.ts deleted file mode 100644 index b246bff..0000000 --- a/i18n/asteroid-stopwatch.pt_BR.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="pt_BR"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronômetro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.pt_PT.ts b/i18n/asteroid-stopwatch.pt_PT.ts deleted file mode 100644 index ca28778..0000000 --- a/i18n/asteroid-stopwatch.pt_PT.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="pt_PT"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronómetro</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ro.ts b/i18n/asteroid-stopwatch.ro.ts deleted file mode 100644 index e3dde81..0000000 --- a/i18n/asteroid-stopwatch.ro.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ro"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Cronometru</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ru.ts b/i18n/asteroid-stopwatch.ru.ts deleted file mode 100644 index 5c6a600..0000000 --- a/i18n/asteroid-stopwatch.ru.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ru"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Секундомер</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.sk.ts b/i18n/asteroid-stopwatch.sk.ts deleted file mode 100644 index 06539f5..0000000 --- a/i18n/asteroid-stopwatch.sk.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="sk"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Stopky</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.sv.ts b/i18n/asteroid-stopwatch.sv.ts deleted file mode 100644 index 7e77223..0000000 --- a/i18n/asteroid-stopwatch.sv.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="sv"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Tidtagarur</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.ta.ts b/i18n/asteroid-stopwatch.ta.ts deleted file mode 100644 index c46a42a..0000000 --- a/i18n/asteroid-stopwatch.ta.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="ta"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>நிறுத்தளவி</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.th.ts b/i18n/asteroid-stopwatch.th.ts deleted file mode 100644 index 32a80fe..0000000 --- a/i18n/asteroid-stopwatch.th.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="th"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>นาฬิกาจับเวลา</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.tr.ts b/i18n/asteroid-stopwatch.tr.ts deleted file mode 100644 index e90a97d..0000000 --- a/i18n/asteroid-stopwatch.tr.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="tr"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Süreölçer</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.uk.ts b/i18n/asteroid-stopwatch.uk.ts deleted file mode 100644 index 71ce83e..0000000 --- a/i18n/asteroid-stopwatch.uk.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="uk"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Секундомір</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.vi.ts b/i18n/asteroid-stopwatch.vi.ts deleted file mode 100644 index 87a3ed3..0000000 --- a/i18n/asteroid-stopwatch.vi.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="vi"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>Đồng hồ bấm giờ</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.zh_Hans.ts b/i18n/asteroid-stopwatch.zh_Hans.ts deleted file mode 100644 index 0f45e16..0000000 --- a/i18n/asteroid-stopwatch.zh_Hans.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="zh_Hans"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>跑表</translation> - </message> -</context> -</TS> diff --git a/i18n/asteroid-stopwatch.zh_Hant.ts b/i18n/asteroid-stopwatch.zh_Hant.ts deleted file mode 100644 index 415c325..0000000 --- a/i18n/asteroid-stopwatch.zh_Hant.ts +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS> -<TS version="2.1" language="zh_Hant"> -<context> - <name></name> - <message id="id-app-launcher-name"> - <location filename="asteroid-stopwatch.desktop.h" line="6"/> - <source>Stopwatch</source> - <translation>碼錶</translation> - </message> -</context> -</TS> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 446b4c9..2c3e089 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,8 +1,8 @@ -add_library(asteroid-stopwatch main.cpp resources.qrc) -set_target_properties(asteroid-stopwatch PROPERTIES PREFIX "" SUFFIX "") +add_library(asteroid-map main.cpp resources.qrc) +set_target_properties(asteroid-map PROPERTIES PREFIX "" SUFFIX "") -target_link_libraries(asteroid-stopwatch PUBLIC +target_link_libraries(asteroid-map PUBLIC AsteroidApp) -install(TARGETS asteroid-stopwatch +install(TARGETS asteroid-map DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/src/MainMapView.qml b/src/MainMapView.qml new file mode 100644 index 0000000..9a00a45 --- /dev/null +++ b/src/MainMapView.qml @@ -0,0 +1,58 @@ +import QtQuick 2.0 +import org.asteroid.controls 1.0 +import QtPositioning 5.15 +import QtLocation 5.15 + +Item { + Map { + id: mapView + plugin: mapProvider + anchors.fill: parent + copyrightsVisible: false //this is compensated by showing the copyright when application is loading + color: "#00000000" + z: 1 + } + IconButton { + iconName: "ios-add-circle-outline" + anchors.right: parent.right + anchors.bottom: parent.verticalCenter + height: parent.height*0.2 + width: height + iconColor: "blue" + z: 2 + onClicked: mapView.zoomLevel = mapView.zoomLevel + 0.1 + } + IconButton { + iconName: "ios-remove-circle-outline" + anchors.right: parent.right + anchors.top: parent.verticalCenter + height: parent.height*0.2 + width: height + iconColor: "blue" + z: 2 + onClicked: mapView.zoomLevel = mapView.zoomLevel - 0.1 + } + IconButton { + iconName: "ios-locate-outline" + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + height: parent.height*0.2 + width: height + iconColor: "blue" + z: 2 + } + IconButton { + iconName: "ios-menu-outline" + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + height: parent.height*0.2 + width: height + iconColor: "blue" + z: 2 + // Icon { + // anchors.fill: parent + // name: "ios-circle-outline" + // // color: parent.iconColor + // } + } +} diff --git a/src/main.qml b/src/main.qml index 4cb01ae..5442abc 100644 --- a/src/main.qml +++ b/src/main.qml @@ -1,26 +1,7 @@ -/* - * Copyright (C) 2016 Florent Revest <revestflo@gmail.com> - * 2015 Tim Süberkrüb <tim.sueberkrueb@web.de> - * Part of this code is based on "Stopwatch" (https://github.com/baleboy/stopwatch) - * Copyright (C) 2011 Francesco Balestrieri - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -import QtQuick 2.9 +import QtQuick 2.0 import org.asteroid.controls 1.0 -import Nemo.Configuration 1.0 +import QtPositioning 5.15 +import QtLocation 5.15 Application { id: app @@ -28,117 +9,23 @@ Application { centerColor: "#9800A6" outerColor: "#0C0009" - ConfigurationValue { - id: previousTime - key: "/stopwatch/previousTime" - defaultValue: -1 - } - ConfigurationValue { - id: elapsed - key: "/stopwatch/elapsed" - defaultValue: -1 - } - ConfigurationValue { - id: running - key: "/stopwatch/running" - defaultValue: false - } - - function zeroPad(n) { - return (n < 10 ? "0" : "") + n - } - - function toTimeString(usec) { - var mod = Math.abs(usec) - if (mod >= 3600000) { // Hours + Minutes + Seconds - return '<font color=\"#FFFFFF\" size="3">' + Math.floor(mod / 3600000) + '<sup>h</sup>' + '<br></font>' + - '<font color=\"#CCCCF3\" size="1">' + zeroPad(Math.floor((mod % 3600000) / 60000)) + '<sup>m</sup>' + - zeroPad(Math.floor((mod % 60000) / 1000)) + '<sup>s</sup></font>' - - } else if (mod >= 60000) { // Minutes + Seconds + Tenth - return '<font color="#FFFFFF" size="3">' + zeroPad(Math.floor((mod % 3600000) / 60000)) + '<sup>m</sup>' + '<br></font>' + - '<font color="#CCCCF3" size="1">' + zeroPad(Math.floor((mod % 60000) / 1000)) + '<sup>s</sup>' + - Math.floor((mod % 1000) / 100) + '</font>' - } else { // Seconds + Tenth - return '<font color="#FFFFFF" size="3">' + zeroPad(Math.floor((mod % 60000) / 1000)) + '<sup>s</sup>' + '</font>' + - '<font color="#CCCCF3" size="1">' + Math.floor((mod % 1000) / 100) + '</font>' - } - } - - function toHandsPosition(usec) { - var mod = Math.abs(usec) - return(Math.floor((mod % 60000) / 1000)*3) + Label { + text: "Map Data from OpenStreetMap" + anchors.centerIn: parent + z: 0 } - - PhysicalHands { - minuteHandPosition: toHandsPosition(elapsed.value) - hourHandPosition: toHandsPosition(elapsed.value) + Plugin { + id: mapProvider + name: "osm" } - - Item { - id: mainPage + LayerStack { + id: pagestack anchors.fill: parent - - state: running.value ? "running" : elapsed.value == -1 ? "zero" : "paused" - states: [ - State { name: "zero" }, - State { name: "running" }, - State { name: "paused" } - ] - - Label { - id: elapsedLabel - textFormat: Text.RichText - anchors.centerIn: parent - text: toTimeString(elapsed.value) - font.pixelSize: Dims.h(25) - horizontalAlignment: Text.AlignHCenter - - SequentialAnimation { - running: mainPage.state == "paused" - loops: Animation.Infinite - NumberAnimation { target: elapsedLabel; property: "opacity"; from: 1; to: 0; duration: 500 } - NumberAnimation { target: elapsedLabel; property: "opacity"; from: 0; to: 1; duration: 500 } - onStopped: elapsedLabel.opacity = 1 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - switch(mainPage.state) { - case "zero": - case "paused": - var curTime = new Date - previousTime.value = curTime.getTime() - running.value = true - break; - case "running": - running.value = false - break; - } - } - } - - IconButton { - id: resetButton - iconName: "ios-refresh" - visible: mainPage.state === "paused" - onClicked: elapsed.value = -1 - } + firstPage: mainmapview } - Timer { - interval: 100 - repeat: true - running: mainPage.state == "running" - triggeredOnStart: true - - onTriggered: { - var currentTime = new Date - var delta = (currentTime.getTime() - previousTime.value) - previousTime.value = currentTime.getTime() - elapsed.value += delta - } + Component { + id: mainmapview + MainMapView {} } } diff --git a/src/resources.qrc b/src/resources.qrc index 5f6483a..bd1509f 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -1,5 +1,6 @@ <RCC> <qresource prefix="/"> <file>main.qml</file> + <file>MainMapView.qml</file> </qresource> </RCC> |