22 #ifndef PIXMAPOBJECT_H_
23 #define PIXMAPOBJECT_H_
48 #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
49 Q_PROPERTY(QString
id READ
id WRITE
setId)
58 PixmapObject (
const QString & fileName,
const char * format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor );
59 PixmapObject (
const QString& fileName,
const QSize& desiredSize,
bool limitOnly =
true,
const char * format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor );
66 virtual bool valid()
const;
68 virtual QUuid
id()
const;
70 virtual void setId(
const QUuid& uid);
71 virtual void setId(
const QString& quuid_as_string);
75 virtual bool resize(
const quint32 w,
const quint32 h);
80 virtual QSize
size()
const;
81 virtual int width()
const;
82 virtual int height()
const;
83 virtual QSizeF
sizeF()
const;
84 virtual quint64
sizeOf()
const;
92 virtual void fill(
const QColor& c);
93 virtual void paint(QPainter * painter);
94 virtual void paint(QPainter * painter,
const QPointF& targetOriginInPainterCS);
95 virtual void paint(QPainter * painter,
const QRectF& targetRectInPainterCS);
110 virtual void paint(QPainter * painter,
const QRect& targetRectInPainterCS,
111 const QRect& sourceRect);
123 {
return static_cast<QPixmap*
>(
const_cast<QPixmap*
>(
pm)); }
125 {
return *
static_cast<QPixmap*
>(
const_cast<QPixmap*
>(
pm)); }
126 virtual operator QPixmap*()
const
127 {
return static_cast<QPixmap*
>(
const_cast<QPixmap*
>(
pm)); }
129 {
return static_cast<QPixmap*
>(
const_cast<QPixmap*
>(
pm)); }