2021-03-03 09:24:35 +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
|
|
|
|
|
2021-03-21 12:38:33 +00:00
|
|
|
#include "editor/scene/scene_item_base.h"
|
2021-03-03 09:24:35 +00:00
|
|
|
|
|
|
|
namespace Editor {
|
|
|
|
|
2021-03-14 09:44:49 +00:00
|
|
|
class ItemLine : public NumberedItem {
|
2021-03-03 09:24:35 +00:00
|
|
|
public:
|
2021-03-08 16:31:48 +00:00
|
|
|
ItemLine(const QPixmap &&pixmap);
|
2021-03-03 09:24:35 +00:00
|
|
|
QRectF boundingRect() const override;
|
|
|
|
void paint(
|
|
|
|
QPainter *p,
|
|
|
|
const QStyleOptionGraphicsItem *option,
|
|
|
|
QWidget *widget) override;
|
|
|
|
protected:
|
|
|
|
bool collidesWithItem(
|
|
|
|
const QGraphicsItem *,
|
|
|
|
Qt::ItemSelectionMode) const override;
|
|
|
|
bool collidesWithPath(
|
|
|
|
const QPainterPath &,
|
|
|
|
Qt::ItemSelectionMode) const override;
|
|
|
|
private:
|
|
|
|
const QPixmap _pixmap;
|
2021-03-08 16:31:48 +00:00
|
|
|
const QRectF _rect;
|
2021-03-03 09:24:35 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Editor
|