File indexing completed on 2025-01-05 03:58:06
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-07-23 0007 * Description : QGraphicsRectItem wrapper for FacesEngine Demo 0008 * 0009 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2008 by Adrien Bustany <madcat at mymadcat dot com> 0011 * SPDX-FileCopyrightText: 2010 by Aditya Bhatt <adityabhatt1991 at gmail dot com> 0012 * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * 0015 * ============================================================ */ 0016 0017 #ifndef DIGIKAM_FACE_ENGINE_DEMO_FANCY_RECT_H 0018 #define DIGIKAM_FACE_ENGINE_DEMO_FANCY_RECT_H 0019 0020 // Qt includes 0021 0022 #include <QGraphicsItem> 0023 #include <QGraphicsRectItem> 0024 #include <QRectF> 0025 #include <QPainter> 0026 #include <QStyleOptionGraphicsItem> 0027 #include <QWidget> 0028 0029 namespace FaceEngineDemo 0030 { 0031 0032 class FancyRect : public QGraphicsRectItem 0033 { 0034 0035 public: 0036 0037 explicit FancyRect(QGraphicsItem* const parent = nullptr); 0038 explicit FancyRect(const QRectF& rect, QGraphicsItem* const parent = nullptr); 0039 0040 FancyRect(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* const parent = nullptr); 0041 FancyRect(QGraphicsRectItem* const other, QGraphicsItem* const parent); 0042 0043 public: 0044 0045 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; 0046 }; 0047 0048 } // namespace FaceEngineDemo 0049 0050 #endif // DIGIKAM_FACE_ENGINE_DEMO_FANCY_RECT_H