4 #ifndef SELECTIONRECT_H
5 #define SELECTIONRECT_H
28 QPoint
end() {
return _end; }
29 QPoint
start() {
return _start; }
32 void paint(QPainter* painter,
const QStyleOptionGraphicsItem*, QWidget*)
36 painter->setPen(QPen(QColor(128, 128, 128), 1, Qt::DashLine, Qt::SquareCap, Qt::BevelJoin));
37 painter->drawRect(_start.x(), _start.y(), _end.x(), _end.y());
42 #endif // SELECTIONRECT_H
selection rectangle QGraphicsObject (UIItem)
Definition: SelectionRect.h:17
void setStart(QPoint start)
Definition: SelectionRect.h:26
UIItem QGraphicsObject class.
Definition: UIItem.h:15
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
Definition: SelectionRect.h:32
SelectionRect()
Definition: SelectionRect.cpp:9
QPoint end()
Definition: SelectionRect.h:28
void setActive(bool active)
Definition: SelectionRect.h:25
bool active()
Definition: SelectionRect.h:30
QPoint start()
Definition: SelectionRect.h:29
void setEnd(QPoint end)
Definition: SelectionRect.h:27