1#ifndef LINEGRAPHICSITEM_H
2#define LINEGRAPHICSITEM_H
3#include <QGraphicsLineItem>
4#include <Kanoop/gui/libkanoopgui.h>
37 virtual int type()
const override {
return _type; }
61 virtual QPainterPath
shape()
const override;
QGraphicsLineItem with an application-defined type integer and appearance helpers.
void setColor(const QColor &color)
Set the pen color.
virtual QPainterPath shape() const override
Return the shape used for hit testing.
void setLength(double length)
Set the length of the line, extending from its current start point.
virtual int type() const override
Return the application-defined type integer.
void setWidth(double width)
Set the pen width.
virtual QRectF boundingRect() const override
Return the bounding rectangle (expanded to account for pen width).
LineGraphicsItem(const Line &line, int type, QGraphicsItem *parent=nullptr)
Construct from a Line geometry object, with a type integer and optional parent.
LineGraphicsItem(int type, QGraphicsItem *parent=nullptr)
Construct with a type integer and optional parent item.