2021-05-06 21:47:49 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "editor/scene/scene_item_base.h"
|
|
|
|
|
|
|
|
namespace Editor {
|
|
|
|
|
|
|
|
class ItemImage : public ItemBase {
|
|
|
|
public:
|
|
|
|
ItemImage(
|
|
|
|
const QPixmap &&pixmap,
|
2021-07-04 12:57:07 +00:00
|
|
|
ItemBase::Data data);
|
2021-05-06 21:47:49 +00:00
|
|
|
void paint(
|
|
|
|
QPainter *p,
|
|
|
|
const QStyleOptionGraphicsItem *option,
|
|
|
|
QWidget *widget) override;
|
|
|
|
protected:
|
|
|
|
void performFlip() override;
|
2021-07-04 12:57:07 +00:00
|
|
|
std::shared_ptr<ItemBase> duplicate(ItemBase::Data data) const override;
|
2021-05-06 21:47:49 +00:00
|
|
|
private:
|
|
|
|
QPixmap _pixmap;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Editor
|