frontend: Add renamed Qt UI components

This commit only contains Qt UI components that are self-contained,
i.e. the translation units only contain code for a single class or
interface and don't mix implementations.
This commit is contained in:
PatTheMav 2024-11-30 16:41:38 +01:00
commit 3bbda4803e
No known key found for this signature in database
26 changed files with 74 additions and 62 deletions

View file

@ -0,0 +1,26 @@
#include "UrlPushButton.hpp"
#include <QDesktopServices>
#include "moc_UrlPushButton.cpp"
void UrlPushButton::setTargetUrl(QUrl url)
{
setToolTip(url.toString());
m_targetUrl = url;
}
QUrl UrlPushButton::targetUrl()
{
return m_targetUrl;
}
void UrlPushButton::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event)
QUrl openUrl = m_targetUrl;
if (openUrl.isEmpty())
return;
QDesktopServices::openUrl(openUrl);
}