mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-30 15:37:46 +00:00
25 lines
549 B
C
25 lines
549 B
C
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <QLabel>
|
||
|
|
||
|
class ImageLabel : public QLabel
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit ImageLabel(QWidget *parent = nullptr);
|
||
|
|
||
|
[[nodiscard]] int heightForWidth(int width) const override;
|
||
|
[[nodiscard]] QSize sizeHint() const override;
|
||
|
[[nodiscard]] QPixmap scaledPixmap() const;
|
||
|
|
||
|
public Q_SLOTS:
|
||
|
void setQPixmap(const QPixmap &);
|
||
|
void resizeEvent(QResizeEvent *) override;
|
||
|
|
||
|
private:
|
||
|
QPixmap pix;
|
||
|
};
|