digiKam
focuspointitem.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 28/08/2021
7  * Description : Managing of focus point items on a GraphicsDImgView
8  *
9  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2021 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_FOCUSPOINT_ITEM_H
26 #define DIGIKAM_FOCUSPOINT_ITEM_H
27 
28 // Qt includes
29 
30 #include <QObject>
31 #include <QGraphicsWidget>
32 
33 // Local includes
34 
35 #include "regionframeitem.h"
36 #include "focuspoint.h"
37 
38 namespace Digikam
39 {
40 
41 class FocusPointItem : public RegionFrameItem // clazy:exclude=ctor-missing-parent-argument
42 {
43  Q_OBJECT
44 
45 public:
46 
47  explicit FocusPointItem(QGraphicsItem* const parent);
48  ~FocusPointItem() override;
49 
50  void setPoint(const FocusPoint& point);
51  FocusPoint point() const;
52  void setEditable(bool allowEdit);
53 
54 private:
55 
56  // Disable
57  FocusPointItem() = delete;
58  FocusPointItem(const FocusPointItem&) = delete;
59  FocusPointItem& operator=(const FocusPointItem&) = delete;
60 
61  void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*);
62 
63 private:
64 
65  class Private;
66  Private* const d;
67 };
68 
69 } // namespace Digikam
70 
71 #endif // DIGIKAM_FOCUSPOINT_ITEM_H
Definition: focuspointitem.h:42
void setEditable(bool allowEdit)
Definition: focuspointitem.cpp:113
void setPoint(const FocusPoint &point)
Definition: focuspointitem.cpp:66
~FocusPointItem() override
Definition: focuspointitem.cpp:61
FocusPoint point() const
Definition: focuspointitem.cpp:95
Definition: focuspoint.h:45
Definition: regionframeitem.h:43
Definition: datefolderview.cpp:43