mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
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:
parent
d2645b03f8
commit
d4a6defed6
2 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue