From e1ec1375a0f665568cdee794e4f26eaaf4637619 Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Tue, 16 Jul 2024 20:17:16 +0200 Subject: [PATCH] highlight image when clicked to object pin in the map --- mainwindow.cpp | 1 + mapwidget.cpp | 2 +- mapwidget.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e64ee5a..74e582a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -118,6 +118,7 @@ MainWindow::MainWindow(QWidget* parent) imageWidgetsList, SLOT(rubberBandSelection(QRect, bool))); connect(imageWidgetsList, SIGNAL(setExifInfo(QStringList)), exifInfo, SLOT(setNewInfo(QStringList))); connect(map, SIGNAL(mClicked(int, bool, bool)), imageWidgetsList, SLOT(selectOne(int, bool, bool))); + connect(map, SIGNAL(oClicked(int, bool, bool)), imageWidgetsList, SLOT(selectOne(int, bool, bool))); connect(ui->actionSave_Gps, SIGNAL(triggered()), imageWidgetsList, SLOT(saveExifGpsInAll())); connect(ui->actionSave_Datetime, SIGNAL(triggered()), imageWidgetsList, SLOT(saveExifDateTimeInAll())); diff --git a/mapwidget.cpp b/mapwidget.cpp index eacf4bb..cbc8720 100644 --- a/mapwidget.cpp +++ b/mapwidget.cpp @@ -462,7 +462,7 @@ void MapWidget::objectClicked(int id) scriptStr << QString("markerOrObjectClicked(%1, %2);").arg(id).arg((QApplication::keyboardModifiers() & Qt::ControlModifier)); mapView->page()->runJavaScript(scriptStr.join("\n"), [](const QVariant& result) { qDebug() << result.toString(); }); - // emit mClicked(id, 0, 1); // FIXME + emit oClicked(id, 0, 1); } void MapWidget::objectDragged(int id) diff --git a/mapwidget.h b/mapwidget.h index b31af42..da0bf1c 100644 --- a/mapwidget.h +++ b/mapwidget.h @@ -70,6 +70,7 @@ class MapWidget : public QDockWidget { signals: void mClicked(int id, bool clickMarker, bool focus); + void oClicked(int id, bool clickMarker, bool focus); void processEvent(QKeyEvent* event); void setGpsInImage(int id, double lat, double lon, double ele); void setObjectGpsInImage(int id, double lat, double lon, double ele);