File indexing completed on 2025-01-19 03:57:58
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 28/08/2021 0007 * Description : Managing of focus point items on a GraphicsDImgView 0008 * 0009 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2021 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_FOCUSPOINT_ITEM_H 0017 #define DIGIKAM_FOCUSPOINT_ITEM_H 0018 0019 // Qt includes 0020 0021 #include <QObject> 0022 #include <QGraphicsWidget> 0023 0024 // Local includes 0025 0026 #include "regionframeitem.h" 0027 #include "focuspoint.h" 0028 0029 namespace Digikam 0030 { 0031 0032 class FocusPointItem : public RegionFrameItem // clazy:exclude=ctor-missing-parent-argument 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 0038 explicit FocusPointItem(QGraphicsItem* const parent); 0039 ~FocusPointItem() override; 0040 0041 void setPoint(const FocusPoint& point); 0042 FocusPoint point() const; 0043 void setEditable(bool allowEdit); 0044 0045 private: 0046 0047 // Disable 0048 FocusPointItem() = delete; 0049 FocusPointItem(const FocusPointItem&) = delete; 0050 FocusPointItem& operator=(const FocusPointItem&) = delete; 0051 0052 void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*); 0053 0054 private: 0055 0056 class Private; 0057 Private* const d; 0058 }; 0059 0060 } // namespace Digikam 0061 0062 #endif // DIGIKAM_FOCUSPOINT_ITEM_H