diff options
Diffstat (limited to 'libs/installer_fomod_plus/installer/ui/ScaleLabel.h')
| -rw-r--r-- | libs/installer_fomod_plus/installer/ui/ScaleLabel.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/libs/installer_fomod_plus/installer/ui/ScaleLabel.h b/libs/installer_fomod_plus/installer/ui/ScaleLabel.h deleted file mode 100644 index f4fb5f2..0000000 --- a/libs/installer_fomod_plus/installer/ui/ScaleLabel.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -// Taken from https://github.com/ModOrganizer2/modorganizer-installer_fomod/blob/master/src/scalelabel.h -#include <QLabel> -#include <QMouseEvent> -#include <QMovie> - - -class ScaleLabel final : public QLabel { - Q_OBJECT - -public: - explicit ScaleLabel(QWidget* parent = nullptr) : QLabel(parent) - { - setCursor(Qt::PointingHandCursor); - } - - void setScalableResource(const QString& path); - void setStatic(bool isStatic); - [[nodiscard]] bool hasResource() const { return mHasResource; } - -signals: - void clicked(); - -protected: - void mousePressEvent(QMouseEvent* event) override - { - if (event->button() == Qt::LeftButton) { - emit clicked(); - } - QLabel::mousePressEvent(event); - } - - void resizeEvent(QResizeEvent* event) override; - void showEvent(QShowEvent* event) override; - -private: - void setScalableMovie(const QString& path); - void setScalableImage(const QString& path); - - QImage mUnscaledImage; - QSize mOriginalMovieSize; - bool mHasResource = false; - bool misStatic = false; -};
\ No newline at end of file |
