summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/aspectratiolabel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/aspectratiolabel.h')
-rw-r--r--src/libs/installer/aspectratiolabel.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/libs/installer/aspectratiolabel.h b/src/libs/installer/aspectratiolabel.h
index 6fbc774a2..bbe54d3a1 100644
--- a/src/libs/installer/aspectratiolabel.h
+++ b/src/libs/installer/aspectratiolabel.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -44,18 +44,25 @@ class INSTALLER_EXPORT AspectRatioLabel : public QLabel
public:
explicit AspectRatioLabel(QWidget *parent = nullptr);
- int heightForWidth(int w) const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ int heightForWidth(int w) const override;
+ QSize sizeHint() const override;
public slots:
- void setPixmap (const QPixmap &pixmap);
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void setPixmap(const QPixmap &pixmap);
+ void setPixmapAndUrl (const QPixmap &pixmap, const QString &url);
+ void resizeEvent(QResizeEvent *event) override;
+
+protected:
+ void mousePressEvent(QMouseEvent* event) override;
+ bool event(QEvent *e) override;
private:
QPixmap scaledPixmap() const;
private:
QPixmap m_pixmap;
+ QString m_clickableUrl;
+ bool m_discardMousePress;
};
} // namespace QInstaller