[desktop] Add Panoramax link on the place page

Signed-off-by: Jean-Baptiste Charron <jeanbaptiste.charron@outlook.fr>
Co-authored by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Jean-Baptiste
2025-06-22 21:47:01 +02:00
committed by Konstantin Pastbin
parent df89761eba
commit b4f115a8fa
2 changed files with 12 additions and 0 deletions

View File

@@ -117,6 +117,7 @@ PlacePageDialogDeveloper::PlacePageDialogDeveloper(QWidget * parent, place_page:
case PropID::FMD_CONTACT_BLUESKY: case PropID::FMD_CONTACT_BLUESKY:
case PropID::FMD_WIKIPEDIA: case PropID::FMD_WIKIPEDIA:
case PropID::FMD_WIKIMEDIA_COMMONS: case PropID::FMD_WIKIMEDIA_COMMONS:
case PropID::FMD_PANORAMAX:
isLink = true; isLink = true;
break; break;
default: default:

View File

@@ -233,6 +233,17 @@ PlacePageDialogUser::PlacePageDialogUser(QWidget * parent, place_page::Info cons
data->addWidget(value, row++, 1); data->addWidget(value, row++, 1);
} }
if (auto panoramax = info.GetMetadata(feature::Metadata::EType::FMD_PANORAMAX); !panoramax.empty())
{
data->addWidget(new QLabel("Panoramax Picture"), row, 0);
QLabel * value = new QLabel(QString::fromStdString("<a href='https://api.panoramax.xyz/?pic=" + std::string(panoramax) + "'>Panoramax Image</a>"));
value->setOpenExternalLinks(true);
value->setTextInteractionFlags(Qt::TextBrowserInteraction);
data->addWidget(value, row++, 1);
}
// Level fragment // Level fragment
if (auto level = info.GetMetadata(feature::Metadata::EType::FMD_LEVEL); !level.empty()) if (auto level = info.GetMetadata(feature::Metadata::EType::FMD_LEVEL); !level.empty())
addEntry("Level", std::string(level)); addEntry("Level", std::string(level));