File indexing completed on 2025-01-26 05:06:22

0001 /*
0002     SPDX-FileCopyrightText: 2014-2015 Eike Hein <hein@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QQuickPaintedItem>
0010 
0011 class RubberBand : public QQuickPaintedItem
0012 {
0013     Q_OBJECT
0014 
0015 public:
0016     explicit RubberBand(QQuickItem *parent = nullptr);
0017     ~RubberBand() override;
0018 
0019     void paint(QPainter *painter) override;
0020 
0021     Q_INVOKABLE bool intersects(const QRectF &rect) const;
0022 
0023 protected:
0024     void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
0025 
0026 private:
0027     QRectF m_geometry;
0028 };