2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2015-06-20 01:04:54 +02:00
|
|
|
*
|
2020-08-20 22:42:19 +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
|
|
|
*
|
2020-08-25 16:05:56 +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 );
|
2020-09-22 22:49:30 +02:00
|
|
|
~FixedAspectRatioLabel() override;
|
2015-06-20 01:04:54 +02:00
|
|
|
|
|
|
|
public slots:
|
2019-08-13 20:57:52 +02:00
|
|
|
void setPixmap( const QPixmap& pixmap );
|
2015-06-20 01:04:54 +02:00
|
|
|
void resizeEvent( QResizeEvent* event ) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPixmap m_pixmap;
|
|
|
|
};
|
|
|
|
|
2019-08-13 20:57:52 +02:00
|
|
|
#endif // FIXEDASPECTRATIOLABEL_H
|