0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00
LimeReport/limereport/items/lrlayoutmarker.h

32 lines
804 B
C
Raw Permalink Normal View History

2018-06-21 14:29:00 +03:00
#ifndef LRLAYOUTMARKER_H
#define LRLAYOUTMARKER_H
#include "lrbanddesignintf.h"
#include <QGraphicsItem>
namespace LimeReport {
2018-06-21 14:29:00 +03:00
class LayoutMarker: public QGraphicsItem {
2018-06-21 14:29:00 +03:00
public:
explicit LayoutMarker(BaseDesignIntf* layout, QGraphicsItem* parent = 0);
virtual QRectF boundingRect() const { return m_rect; }
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*);
2018-06-21 14:29:00 +03:00
void setHeight(qreal height);
void setWidth(qreal width);
void setColor(QColor color);
qreal width() { return m_rect.width(); }
qreal height() { return m_rect.height(); }
2018-06-21 14:29:00 +03:00
protected:
void mousePressEvent(QGraphicsSceneMouseEvent* event);
2018-06-21 14:29:00 +03:00
private:
QRectF m_rect;
QColor m_color;
BaseDesignIntf* m_layout;
};
} // namespace LimeReport
#endif // LRLAYOUTMARKER_H