34#include <NDEVR/QTTools.h>
64 m_smooth_transform = smooth_resize;
67 void setIcon(
const QIcon& image, QIcon::Mode mode = QIcon::Mode::Normal);
76 m_auto_resize = auto_resize;
93 QIcon
icon() {
return m_icon; };
95 void setupIconListener();
96 QRect alignRect(QSize size, QSize preferred_size)
const;
98 ViewMode m_view_mode = ViewMode::e_zoom_out;
99 bool m_auto_resize =
true;
100 bool m_smooth_transform =
true;
101 bool m_force_aspect_ratio_width =
false;
102 bool m_force_aspect_ratio_height =
false;
103 bool m_ignore_device_pixel_ratio =
false;
107 QPixmap m_blend_image;
111 QIcon::Mode m_icon_mode;
112 QStyle::PixelMetric m_size_hint_pixel_metric;
113 Qt::Alignment m_alignment;
A widget that shows a raster image or icon.
Definition ImageView.h:43
ImageView(QWidget *parent=nullptr)
QSize minimumSizeHint() const override
Definition ImageView.h:70
void setIconID(const String &image, bool force_refresh=false)
void setViewMode(ViewMode mode)
Definition ImageView.h:78
void setImage(const QImage &image)
void setBlendFactor(fltp04 blend_factor)
void setImageScale(fltp08 scale)
Definition ImageView.h:86
QSize sizeHint() const override
ViewMode
Definition ImageView.h:46
void setAutoResize(bool auto_resize)
Definition ImageView.h:74
void setBlendImage(const QPixmap &blend_image)
void setSizeHintPixelMetric(QStyle::PixelMetric metric)
void setForceAspectRatioW(bool force)
void setAlignment(Qt::Alignment alignment)
void paintEvent(QPaintEvent *event) override
void setSmoothResize(bool smooth_resize)
Definition ImageView.h:62
void setImage(const QPixmap &pixmap)
void setImageID(const String &image, bool force_refresh=false)
void setIgnoreDPR(bool ignore)
QIcon icon()
Definition ImageView.h:93
void resizeEvent(QResizeEvent *resize_event) override
void setForceAspectRatioH(bool force)
void setIconMode(QIcon::Mode mode)
void setIcon(const QIcon &image, QIcon::Mode mode=QIcon::Mode::Normal)
ImageView(const String &image, QWidget *parent=nullptr)
The core String class for the software.
Definition String.h:47
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:125
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:146