mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 21:33:59 +00:00
[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:
committed by
Konstantin Pastbin
parent
df89761eba
commit
b4f115a8fa
@@ -117,6 +117,7 @@ PlacePageDialogDeveloper::PlacePageDialogDeveloper(QWidget * parent, place_page:
|
||||
case PropID::FMD_CONTACT_BLUESKY:
|
||||
case PropID::FMD_WIKIPEDIA:
|
||||
case PropID::FMD_WIKIMEDIA_COMMONS:
|
||||
case PropID::FMD_PANORAMAX:
|
||||
isLink = true;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -233,6 +233,17 @@ PlacePageDialogUser::PlacePageDialogUser(QWidget * parent, place_page::Info cons
|
||||
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
|
||||
if (auto level = info.GetMetadata(feature::Metadata::EType::FMD_LEVEL); !level.empty())
|
||||
addEntry("Level", std::string(level));
|
||||
|
||||
Reference in New Issue
Block a user