mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
pixmap() -> imagePreview()
This commit is contained in:
parent
aa4e7f13e7
commit
959aa4616f
3 changed files with 8 additions and 8 deletions
|
@ -168,7 +168,7 @@ int ImageLayoutElement::getXFromIndex(int index)
|
|||
}
|
||||
}
|
||||
|
||||
boost::optional<QPixmap> ImageLayoutElement::pixmap() const
|
||||
boost::optional<QPixmap> ImageLayoutElement::imagePreview() const
|
||||
{
|
||||
return this->image_->pixmap();
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ int TextLayoutElement::getXFromIndex(int index)
|
|||
}
|
||||
}
|
||||
|
||||
boost::optional<QPixmap> TextLayoutElement::pixmap() const
|
||||
boost::optional<QPixmap> TextLayoutElement::imagePreview() const
|
||||
{
|
||||
return boost::none;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ int TextIconLayoutElement::getXFromIndex(int index)
|
|||
}
|
||||
}
|
||||
|
||||
boost::optional<QPixmap> TextIconLayoutElement::pixmap() const
|
||||
boost::optional<QPixmap> TextIconLayoutElement::imagePreview() const
|
||||
{
|
||||
return boost::none;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
virtual void paintAnimated(QPainter &painter, int yOffset) = 0;
|
||||
virtual int getMouseOverIndex(const QPoint &abs) const = 0;
|
||||
virtual int getXFromIndex(int index) = 0;
|
||||
virtual boost::optional<QPixmap> pixmap() const = 0;
|
||||
virtual boost::optional<QPixmap> imagePreview() const = 0;
|
||||
|
||||
const Link &getLink() const;
|
||||
const QString &getText() const;
|
||||
|
@ -72,7 +72,7 @@ protected:
|
|||
void paintAnimated(QPainter &painter, int yOffset) override;
|
||||
int getMouseOverIndex(const QPoint &abs) const override;
|
||||
int getXFromIndex(int index) override;
|
||||
boost::optional<QPixmap> pixmap() const override;
|
||||
boost::optional<QPixmap> imagePreview() const override;
|
||||
|
||||
private:
|
||||
ImagePtr image_;
|
||||
|
@ -96,7 +96,7 @@ protected:
|
|||
void paintAnimated(QPainter &painter, int yOffset) override;
|
||||
int getMouseOverIndex(const QPoint &abs) const override;
|
||||
int getXFromIndex(int index) override;
|
||||
boost::optional<QPixmap> pixmap() const override;
|
||||
boost::optional<QPixmap> imagePreview() const override;
|
||||
|
||||
private:
|
||||
QColor color_;
|
||||
|
@ -122,7 +122,7 @@ protected:
|
|||
void paintAnimated(QPainter &painter, int yOffset) override;
|
||||
int getMouseOverIndex(const QPoint &abs) const override;
|
||||
int getXFromIndex(int index) override;
|
||||
boost::optional<QPixmap> pixmap() const override;
|
||||
boost::optional<QPixmap> imagePreview() const override;
|
||||
|
||||
private:
|
||||
float scale;
|
||||
|
|
|
@ -1217,7 +1217,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (auto pixmap = hoverLayoutElement->pixmap()) {
|
||||
if (auto pixmap = hoverLayoutElement->imagePreview()) {
|
||||
QBuffer buffer;
|
||||
pixmap->save(&buffer, "PNG");
|
||||
|
||||
|
|
Loading…
Reference in a new issue