From 95c72f71f9382e3bf2918892edc1e7137391554d Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Sat, 22 Oct 2022 13:31:50 +0100 Subject: 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 --- CMakeLists.txt | 8 +- README.md | 27 ++----- asteroid-map.desktop.template | 7 ++ i18n/asteroid-map.desktop.h | 6 ++ i18n/asteroid-stopwatch.ar.ts | 12 --- i18n/asteroid-stopwatch.ast.ts | 12 --- i18n/asteroid-stopwatch.cs.ts | 12 --- i18n/asteroid-stopwatch.da.ts | 12 --- i18n/asteroid-stopwatch.de_DE.ts | 12 --- i18n/asteroid-stopwatch.desktop.h | 6 -- i18n/asteroid-stopwatch.el.ts | 12 --- i18n/asteroid-stopwatch.en_GB.ts | 12 --- i18n/asteroid-stopwatch.es.ts | 12 --- i18n/asteroid-stopwatch.es_AR.ts | 12 --- i18n/asteroid-stopwatch.fa.ts | 12 --- i18n/asteroid-stopwatch.fi.ts | 12 --- i18n/asteroid-stopwatch.fr.ts | 12 --- i18n/asteroid-stopwatch.gl.ts | 12 --- i18n/asteroid-stopwatch.he.ts | 12 --- i18n/asteroid-stopwatch.hr.ts | 12 --- i18n/asteroid-stopwatch.hu.ts | 12 --- i18n/asteroid-stopwatch.id.ts | 12 --- i18n/asteroid-stopwatch.it.ts | 12 --- i18n/asteroid-stopwatch.ja.ts | 12 --- i18n/asteroid-stopwatch.ka.ts | 12 --- i18n/asteroid-stopwatch.kab.ts | 12 --- i18n/asteroid-stopwatch.ko.ts | 12 --- i18n/asteroid-stopwatch.lb.ts | 12 --- i18n/asteroid-stopwatch.lt.ts | 12 --- i18n/asteroid-stopwatch.mr.ts | 12 --- i18n/asteroid-stopwatch.ms.ts | 12 --- i18n/asteroid-stopwatch.nb_NO.ts | 12 --- i18n/asteroid-stopwatch.nl_BE.ts | 12 --- i18n/asteroid-stopwatch.nl_NL.ts | 12 --- i18n/asteroid-stopwatch.pl.ts | 12 --- i18n/asteroid-stopwatch.pt.ts | 12 --- i18n/asteroid-stopwatch.pt_BR.ts | 12 --- i18n/asteroid-stopwatch.pt_PT.ts | 12 --- i18n/asteroid-stopwatch.ro.ts | 12 --- i18n/asteroid-stopwatch.ru.ts | 12 --- i18n/asteroid-stopwatch.sk.ts | 12 --- i18n/asteroid-stopwatch.sv.ts | 12 --- i18n/asteroid-stopwatch.ta.ts | 12 --- i18n/asteroid-stopwatch.th.ts | 12 --- i18n/asteroid-stopwatch.tr.ts | 12 --- i18n/asteroid-stopwatch.uk.ts | 12 --- i18n/asteroid-stopwatch.vi.ts | 12 --- i18n/asteroid-stopwatch.zh_Hans.ts | 12 --- i18n/asteroid-stopwatch.zh_Hant.ts | 12 --- src/CMakeLists.txt | 8 +- src/MainMapView.qml | 58 +++++++++++++++ src/main.qml | 145 ++++--------------------------------- src/resources.qrc | 1 + 53 files changed, 104 insertions(+), 690 deletions(-) create mode 100644 asteroid-map.desktop.template create mode 100644 i18n/asteroid-map.desktop.h delete mode 100644 i18n/asteroid-stopwatch.ar.ts delete mode 100644 i18n/asteroid-stopwatch.ast.ts delete mode 100644 i18n/asteroid-stopwatch.cs.ts delete mode 100644 i18n/asteroid-stopwatch.da.ts delete mode 100644 i18n/asteroid-stopwatch.de_DE.ts delete mode 100644 i18n/asteroid-stopwatch.desktop.h delete mode 100644 i18n/asteroid-stopwatch.el.ts delete mode 100644 i18n/asteroid-stopwatch.en_GB.ts delete mode 100644 i18n/asteroid-stopwatch.es.ts delete mode 100644 i18n/asteroid-stopwatch.es_AR.ts delete mode 100644 i18n/asteroid-stopwatch.fa.ts delete mode 100644 i18n/asteroid-stopwatch.fi.ts delete mode 100644 i18n/asteroid-stopwatch.fr.ts delete mode 100644 i18n/asteroid-stopwatch.gl.ts delete mode 100644 i18n/asteroid-stopwatch.he.ts delete mode 100644 i18n/asteroid-stopwatch.hr.ts delete mode 100644 i18n/asteroid-stopwatch.hu.ts delete mode 100644 i18n/asteroid-stopwatch.id.ts delete mode 100644 i18n/asteroid-stopwatch.it.ts delete mode 100644 i18n/asteroid-stopwatch.ja.ts delete mode 100644 i18n/asteroid-stopwatch.ka.ts delete mode 100644 i18n/asteroid-stopwatch.kab.ts delete mode 100644 i18n/asteroid-stopwatch.ko.ts delete mode 100644 i18n/asteroid-stopwatch.lb.ts delete mode 100644 i18n/asteroid-stopwatch.lt.ts delete mode 100644 i18n/asteroid-stopwatch.mr.ts delete mode 100644 i18n/asteroid-stopwatch.ms.ts delete mode 100644 i18n/asteroid-stopwatch.nb_NO.ts delete mode 100644 i18n/asteroid-stopwatch.nl_BE.ts delete mode 100644 i18n/asteroid-stopwatch.nl_NL.ts delete mode 100644 i18n/asteroid-stopwatch.pl.ts delete mode 100644 i18n/asteroid-stopwatch.pt.ts delete mode 100644 i18n/asteroid-stopwatch.pt_BR.ts delete mode 100644 i18n/asteroid-stopwatch.pt_PT.ts delete mode 100644 i18n/asteroid-stopwatch.ro.ts delete mode 100644 i18n/asteroid-stopwatch.ru.ts delete mode 100644 i18n/asteroid-stopwatch.sk.ts delete mode 100644 i18n/asteroid-stopwatch.sv.ts delete mode 100644 i18n/asteroid-stopwatch.ta.ts delete mode 100644 i18n/asteroid-stopwatch.th.ts delete mode 100644 i18n/asteroid-stopwatch.tr.ts delete mode 100644 i18n/asteroid-stopwatch.uk.ts delete mode 100644 i18n/asteroid-stopwatch.vi.ts delete mode 100644 i18n/asteroid-stopwatch.zh_Hans.ts delete mode 100644 i18n/asteroid-stopwatch.zh_Hant.ts create mode 100644 src/MainMapView.qml 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) diff --git a/README.md b/README.md index e587fa5..74d8e9d 100644 --- a/README.md +++ b/README.md @@ -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-map.desktop.h b/i18n/asteroid-map.desktop.h new file mode 100644 index 0000000..5faf750 --- /dev/null +++ b/i18n/asteroid-map.desktop.h @@ -0,0 +1,6 @@ +/* This dummy header is just used to generate a translatable Qt string that + * will be integrated to i18n/.ts files, translated on Weblate and then merged + * back with the .desktop.template file into a single .desktop file. */ + +//% "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 @@ - - - - - - - - Stopwatch - ساعة التوقيف - - - 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 @@ - - - - - - - - Stopwatch - Cronómetru - - - 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 @@ - - - - - - - - Stopwatch - Stopky - - - 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 @@ - - - - - - - - Stopwatch - Stopur - - - 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 @@ - - - - - - - - Stopwatch - Stoppuhr - - - diff --git a/i18n/asteroid-stopwatch.desktop.h b/i18n/asteroid-stopwatch.desktop.h deleted file mode 100644 index f65208f..0000000 --- a/i18n/asteroid-stopwatch.desktop.h +++ /dev/null @@ -1,6 +0,0 @@ -/* This dummy header is just used to generate a translatable Qt string that - * 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" -qtTrId("id-app-launcher-name"); 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 @@ - - - - - - - - Stopwatch - Χρονόμετρο - - - 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 @@ - - - - - - - - Stopwatch - Stopwatch - - - 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 @@ - - - - - - - - Stopwatch - Cronómetro - - - 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 @@ - - - - - - - - Stopwatch - Cronómetro - - - 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 @@ - - - - - - - - Stopwatch - زمان‌سنج - - - 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 @@ - - - - - - - - Stopwatch - Sekuntikello - - - 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 @@ - - - - - - - - Stopwatch - Chronomètre - - - 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 @@ - - - - - - - - Stopwatch - Cronómetro - - - 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 @@ - - - - - - - - Stopwatch - שעון עצר - - - 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 @@ - - - - - - - - Stopwatch - Štoperica - - - 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 @@ - - - - - - - - Stopwatch - Stopperóra - - - 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 @@ - - - - - - - - Stopwatch - Stopwatch - - - 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 @@ - - - - - - - - Stopwatch - Cronometro - - - 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 @@ - - - - - - - - Stopwatch - ストップウォッチ - - - 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 @@ - - - - - - - - Stopwatch - წამზომი - - - 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 @@ - - - - - - - - Stopwatch - Amesmiḍan n wakud - - - 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 @@ - - - - - - - - Stopwatch - 초시계 - - - 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 @@ - - - - - - - - Stopwatch - Stoppauer - - - 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 @@ - - - - - - - - Stopwatch - Chronometras - - - 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 @@ - - - - - - - - Stopwatch - स्टॉपवॉच - - - 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 @@ - - - - - - - - Stopwatch - Jam Randik - - - 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 @@ - - - - - - - - Stopwatch - Stoppeklokke - - - 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 @@ - - - - - - - - Stopwatch - - - - 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 @@ - - - - - - - - Stopwatch - Stopwatch - - - 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 @@ - - - - - - - - Stopwatch - Stoper - - - 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 @@ - - - - - - - - Stopwatch - Cronómetro - - - 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 @@ - - - - - - - - Stopwatch - Cronômetro - - - 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 @@ - - - - - - - - Stopwatch - Cronómetro - - - 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 @@ - - - - - - - - Stopwatch - Cronometru - - - 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 @@ - - - - - - - - Stopwatch - Секундомер - - - 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 @@ - - - - - - - - Stopwatch - Stopky - - - 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 @@ - - - - - - - - Stopwatch - Tidtagarur - - - 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 @@ - - - - - - - - Stopwatch - நிறுத்தளவி - - - 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 @@ - - - - - - - - Stopwatch - นาฬิกาจับเวลา - - - 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 @@ - - - - - - - - Stopwatch - Süreölçer - - - 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 @@ - - - - - - - - Stopwatch - Секундомір - - - 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 @@ - - - - - - - - Stopwatch - Đồng hồ bấm giờ - - - 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 @@ - - - - - - - - Stopwatch - 跑表 - - - 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 @@ - - - - - - - - Stopwatch - 碼錶 - - - 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 - * 2015 Tim Süberkrüb - * 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 . - */ - -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 '' + Math.floor(mod / 3600000) + 'h' + '
' + - '' + zeroPad(Math.floor((mod % 3600000) / 60000)) + 'm' + - zeroPad(Math.floor((mod % 60000) / 1000)) + 's' - - } else if (mod >= 60000) { // Minutes + Seconds + Tenth - return '' + zeroPad(Math.floor((mod % 3600000) / 60000)) + 'm' + '
' + - '' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' + - Math.floor((mod % 1000) / 100) + '' - } else { // Seconds + Tenth - return '' + zeroPad(Math.floor((mod % 60000) / 1000)) + 's' + '' + - '' + Math.floor((mod % 1000) / 100) + '' - } - } - - 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 @@ main.qml + MainMapView.qml -- cgit v1.2.3-54-g00ecf