calamares/src/libcalamaresui/widgets/FixedAspectRatioLabel.h

33 lines
790 B
C
Raw Normal View History

/* === This file is part of Calamares - <https://calamares.io> ===
2015-06-20 01:04:54 +02:00
*
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
2015-06-20 01:04:54 +02:00
*
* Calamares is Free Software: see the License-Identifier above.
2015-06-20 01:04:54 +02:00
*
*/
#ifndef FIXEDASPECTRATIOLABEL_H
#define FIXEDASPECTRATIOLABEL_H
#include <QLabel>
#include <QPixmap>
class FixedAspectRatioLabel : public QLabel
{
Q_OBJECT
public:
explicit FixedAspectRatioLabel( QWidget* parent = nullptr );
2017-09-13 18:35:56 +02:00
virtual ~FixedAspectRatioLabel() override;
2015-06-20 01:04:54 +02:00
public slots:
void setPixmap( const QPixmap& pixmap );
2015-06-20 01:04:54 +02:00
void resizeEvent( QResizeEvent* event ) override;
private:
QPixmap m_pixmap;
};
#endif // FIXEDASPECTRATIOLABEL_H