/** * @RDE_HEADER@ * AreaEffectSimulation - PixmapLabel * $Id$ * $HeadURL$ * $Author$ * Created by Malte Schroeder, NLSE, 2018-05-09 */ #pragma once #include #include #include "aes_base_exports.h" #include 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; }; }