Introduce a way to extract QPixmap from ImageLayoutElement
Probably should be a part of MessageLayoutElement interface, but good for now
This commit is contained in:
@@ -168,6 +168,11 @@ int ImageLayoutElement::getXFromIndex(int index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boost::optional<QPixmap> ImageLayoutElement::pixmap() const
|
||||||
|
{
|
||||||
|
return this->image_->pixmap();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// TEXT
|
// TEXT
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ public:
|
|||||||
ImageLayoutElement(MessageElement &creator, ImagePtr image,
|
ImageLayoutElement(MessageElement &creator, ImagePtr image,
|
||||||
const QSize &size);
|
const QSize &size);
|
||||||
|
|
||||||
|
boost::optional<QPixmap> pixmap() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void addCopyTextToString(QString &str, int from = 0,
|
void addCopyTextToString(QString &str, int from = 0,
|
||||||
int to = INT_MAX) const override;
|
int to = INT_MAX) const override;
|
||||||
|
|||||||
Reference in New Issue
Block a user