From 36190e6a0e29f2790b3dc2d170a22823ecf01dc0 Mon Sep 17 00:00:00 2001 From: Tim Teulings Date: Sat, 16 Nov 2024 16:06:50 +0100 Subject: [PATCH] refactor: Make use of std::format in Progress --- OSMScout2/qml/ObjectInfoDialog.qml | 0 OSMScout2/qml/SearchDialog.qml | 9 +++++---- OSMScout2/qml/main.qml | 9 ++++++--- .../src/osmscoutclientqt/OSMScoutQt.cpp | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 OSMScout2/qml/ObjectInfoDialog.qml diff --git a/OSMScout2/qml/ObjectInfoDialog.qml b/OSMScout2/qml/ObjectInfoDialog.qml new file mode 100644 index 000000000..e69de29bb diff --git a/OSMScout2/qml/SearchDialog.qml b/OSMScout2/qml/SearchDialog.qml index d4d03615b..ebc7ff51a 100644 --- a/OSMScout2/qml/SearchDialog.qml +++ b/OSMScout2/qml/SearchDialog.qml @@ -88,6 +88,7 @@ FocusScope { y: 2 columns: 2 + rows: 1 columnSpacing: 0 LocationSearch { @@ -98,7 +99,7 @@ FocusScope { focus: true - Layout.column: 1 + Layout.column: 0 Layout.row: 1 Layout.fillWidth: true Layout.minimumWidth: Theme.averageCharWidth*5 @@ -123,7 +124,7 @@ FocusScope { visible: false - Layout.column: 2 + Layout.column: 1 Layout.row: 1 width: searchEdit.height @@ -161,7 +162,7 @@ FocusScope { visible: false - Layout.column: 1 + Layout.column: 0 Layout.row: 2 Layout.fillWidth: true Layout.minimumWidth: Theme.averageCharWidth*5 @@ -182,7 +183,7 @@ FocusScope { visible: false - Layout.column: 2 + Layout.column: 1 Layout.row: 2 width: searchEdit.height diff --git a/OSMScout2/qml/main.qml b/OSMScout2/qml/main.qml index b27431040..87fa06d6d 100644 --- a/OSMScout2/qml/main.qml +++ b/OSMScout2/qml/main.qml @@ -168,9 +168,10 @@ Window { console.log("tap: " + screenX + "x" + screenY + " @ " + lat + " " + lon + " (map center "+ map.view.lat + " " + map.view.lon + ")"); map.focus=true; + /* if (pick.checked) { map.pick(lat,lon); - } + }*/ } onLongTap: { console.log("long tap: " + screenX + "x" + screenY + " @ " + lat + " " + lon); @@ -188,10 +189,11 @@ Window { } onObjectPicked: { + /* if (pick.checked) { console.log("Object picked: " + object); openObjectInfoDialog(object) - } + }*/ } Keys.onPressed: { @@ -352,6 +354,7 @@ Window { } }*/ + /* MapButton { id: pick checkable: true @@ -360,7 +363,7 @@ Window { onClicked: { console.log("Toggle analysis mode "+checked); } - } + }*/ MapButton { id: resetRotation diff --git a/libosmscout-client-qt/src/osmscoutclientqt/OSMScoutQt.cpp b/libosmscout-client-qt/src/osmscoutclientqt/OSMScoutQt.cpp index 581490d30..52897539a 100644 --- a/libosmscout-client-qt/src/osmscoutclientqt/OSMScoutQt.cpp +++ b/libosmscout-client-qt/src/osmscoutclientqt/OSMScoutQt.cpp @@ -192,7 +192,8 @@ void OSMScoutQt::RegisterQmlTypes(const char *uri, { // TODO: unify usage of osmscout namespace in signals and slots // register osmscout + standard types for usage in Qt signals/slots - qRegisterMetaType("LocationEntryRef"); + qRegisterMetaType("LocationEntry"); + qRegisterMetaType("LocationEntryRef"); qRegisterMetaType("osmscout::BreakerRef"); qRegisterMetaType("osmscout::Distance"); qRegisterMetaType("osmscout::Bearing"); @@ -207,7 +208,6 @@ void OSMScoutQt::RegisterQmlTypes(const char *uri, qRegisterMetaType("osmscout::Vehicle"); qRegisterMetaType("osmscout::PositionAgent::PositionState"); qRegisterMetaType("osmscout::LaneAgent::Lane"); - qRegisterMetaType>("QList"); qRegisterMetaType>("QList"); qRegisterMetaType("MapViewStruct"); qRegisterMetaType("QtRouteData"); @@ -218,7 +218,7 @@ void OSMScoutQt::RegisterQmlTypes(const char *uri, qRegisterMetaType>("QList"); qRegisterMetaType>("std::unordered_map"); qRegisterMetaType>("QMap"); - qRegisterMetaType("LocationEntry"); + qRegisterMetaType>("QList"); qRegisterMetaType("OnlineTileProvider"); qRegisterMetaType("RouteStep"); qRegisterMetaType>("std::list");