scene_item_image.h 691 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "editor/scene/scene_item_base.h"
  9. namespace Editor {
  10. class ItemImage : public ItemBase {
  11. public:
  12. ItemImage(
  13. const QPixmap &&pixmap,
  14. ItemBase::Data data);
  15. void paint(
  16. QPainter *p,
  17. const QStyleOptionGraphicsItem *option,
  18. QWidget *widget) override;
  19. protected:
  20. void performFlip() override;
  21. std::shared_ptr<ItemBase> duplicate(ItemBase::Data data) const override;
  22. private:
  23. QPixmap _pixmap;
  24. };
  25. } // namespace Editor