Files
qt5-legatus-legacy/Lts/Plugins/AreaEffectSimulation/Gui/Base/aes_pixmap_label.h
T
2026-08-13 18:33:10 +02:00

43 lines
1.0 KiB
C++
Executable File

/**
* @RDE_HEADER@
* AreaEffectSimulation - PixmapLabel
* $Id$
* $HeadURL$
* $Author$
* Created by Malte Schroeder, NLSE, 2018-05-09
*/
#pragma once
#include <QLabel>
#include <QPolygonF>
#include "aes_base_exports.h"
#include <AreaEffectSimulation/aes_enums.hpp>
namespace AreaEffectSimulation
{
constexpr int ICON_RESOLUTION = 256;
class AESBASEGUI_EXPORT PixmapLabel : public QLabel
{
public:
explicit PixmapLabel(QWidget *parent = nullptr);
int heightForWidth(int width) const override;
QSize sizeHint() const override;
QPixmap scaledPixmap(const QSize &size,
const Qt::AspectRatioMode &ratioMode = Qt::KeepAspectRatio,
const Qt::TransformationMode &transformationMode = Qt::SmoothTransformation) const;
static Qt::BrushStyle checkForBrushStyle(const AreaEffectSimulation::AesEffectState &state);
static QPolygonF geographic2Utm(const QPolygonF &poly);
public slots:
void setPixmap(const QPixmap &pixmap);
void resizeEvent(QResizeEvent *e) override;
private:
QPixmap m_pixmap;
};
}