Use QGraphicsObject's signalling to enable/disable MapRuler

This commit is contained in:
BigBahss
2020-11-17 16:49:34 -05:00
committed by huderlem
parent bc0127430b
commit 6ca4802948
2 changed files with 20 additions and 20 deletions

View File

@@ -10,24 +10,13 @@ class MapRuler : public QGraphicsObject, private QLine
Q_OBJECT
public:
MapRuler(QColor innerColor = Qt::yellow, QColor borderColor = Qt::black) :
innerColor(innerColor),
borderColor(borderColor),
mapSize(QSize()),
statusMessage(QString()),
xRuler(QRect()),
yRuler(QRect()),
cornerTick(QLine()),
anchored(false),
locked(false)
{ }
MapRuler(QColor innerColor = Qt::yellow, QColor borderColor = Qt::black);
QRectF boundingRect() const override;
QPainterPath shape() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override;
bool eventFilter(QObject *, QEvent *event) override;
void setEnabled(bool enabled);
bool isAnchored() const { return anchored; }
bool isLocked() const { return locked; }