1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-26 05:37:46 +00:00
novus/parts/tex/imagelabel.h

26 lines
550 B
C
Raw Normal View History

2023-10-12 21:40:26 -04:00
// 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
2023-10-12 23:45:39 -04:00
2023-10-12 21:40:26 -04:00
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;
};