Skip to content

Commit

Permalink
refactor: Make use of std::format in Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Framstag committed Nov 16, 2024
1 parent c35fc08 commit 36190e6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Empty file.
9 changes: 5 additions & 4 deletions OSMScout2/qml/SearchDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ FocusScope {
y: 2

columns: 2
rows: 1
columnSpacing: 0

LocationSearch {
Expand All @@ -98,7 +99,7 @@ FocusScope {

focus: true

Layout.column: 1
Layout.column: 0
Layout.row: 1
Layout.fillWidth: true
Layout.minimumWidth: Theme.averageCharWidth*5
Expand All @@ -123,7 +124,7 @@ FocusScope {

visible: false

Layout.column: 2
Layout.column: 1
Layout.row: 1

width: searchEdit.height
Expand Down Expand Up @@ -161,7 +162,7 @@ FocusScope {

visible: false

Layout.column: 1
Layout.column: 0
Layout.row: 2
Layout.fillWidth: true
Layout.minimumWidth: Theme.averageCharWidth*5
Expand All @@ -182,7 +183,7 @@ FocusScope {

visible: false

Layout.column: 2
Layout.column: 1
Layout.row: 2

width: searchEdit.height
Expand Down
9 changes: 6 additions & 3 deletions OSMScout2/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -188,10 +189,11 @@ Window {
}

onObjectPicked: {
/*
if (pick.checked) {
console.log("Object picked: " + object);
openObjectInfoDialog(object)
}
}*/
}

Keys.onPressed: {
Expand Down Expand Up @@ -352,6 +354,7 @@ Window {
}
}*/

/*
MapButton {
id: pick
checkable: true
Expand All @@ -360,7 +363,7 @@ Window {
onClicked: {
console.log("Toggle analysis mode "+checked);
}
}
}*/

MapButton {
id: resetRotation
Expand Down
6 changes: 3 additions & 3 deletions libosmscout-client-qt/src/osmscoutclientqt/OSMScoutQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>("LocationEntryRef");
qRegisterMetaType<osmscout::LocationEntry>("LocationEntry");
qRegisterMetaType<osmscout::LocationEntryRef>("LocationEntryRef");
qRegisterMetaType<osmscout::BreakerRef>("osmscout::BreakerRef");
qRegisterMetaType<osmscout::Distance>("osmscout::Distance");
qRegisterMetaType<osmscout::Bearing>("osmscout::Bearing");
Expand All @@ -207,7 +208,6 @@ void OSMScoutQt::RegisterQmlTypes(const char *uri,
qRegisterMetaType<osmscout::Vehicle>("osmscout::Vehicle");
qRegisterMetaType<osmscout::PositionAgent::PositionState>("osmscout::PositionAgent::PositionState");
qRegisterMetaType<osmscout::LaneAgent::Lane>("osmscout::LaneAgent::Lane");
qRegisterMetaType<QList<LocationEntry>>("QList<LocationEntry>");
qRegisterMetaType<QList<QDir>>("QList<QDir>");
qRegisterMetaType<MapViewStruct>("MapViewStruct");
qRegisterMetaType<QtRouteData>("QtRouteData");
Expand All @@ -218,7 +218,7 @@ void OSMScoutQt::RegisterQmlTypes(const char *uri,
qRegisterMetaType<QList<AdminRegionInfoRef>>("QList<AdminRegionInfoRef>");
qRegisterMetaType<std::unordered_map<std::string,bool>>("std::unordered_map<std::string,bool>");
qRegisterMetaType<QMap<QString,bool>>("QMap<QString,bool>");
qRegisterMetaType<LocationEntry>("LocationEntry");
qRegisterMetaType<QList<osmscout::LocationEntry>>("QList<osmscout::LocationEntry>");
qRegisterMetaType<OnlineTileProvider>("OnlineTileProvider");
qRegisterMetaType<RouteStep>("RouteStep");
qRegisterMetaType<std::list<RouteStep>>("std::list<RouteStep>");
Expand Down

0 comments on commit 36190e6

Please sign in to comment.