digiKam
itempreviewcanvas.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 : 2006-21-12
7  * Description : a embedded item-view to show the canvas preview widget.
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
11  * Copyright (C) 2010-2011 by Aditya Bhatt <adityabhatt1991 at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_ITEM_PREVIEW_CANVAS_H
27 #define DIGIKAM_ITEM_PREVIEW_CANVAS_H
28 
29 // Local includes
30 
31 #include "digikam_config.h"
32 #include "dimgpreviewitem.h"
33 #include "iteminfo.h"
34 
35 class QGraphicsSceneContextMenuEvent;
36 class QGraphicsSceneHoverEvent;
37 
38 namespace Digikam
39 {
40 
41 class FaceGroup;
42 
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit ItemPreviewCanvas();
50  ~ItemPreviewCanvas() override;
51 
52  void setItemInfo(const ItemInfo& info);
53  ItemInfo imageInfo() const;
54 
55  void setFaceGroup(FaceGroup* const group);
56 
57 protected:
58 
59  void hoverEnterEvent(QGraphicsSceneHoverEvent* e) override;
60  void hoverLeaveEvent(QGraphicsSceneHoverEvent* e) override;
61  void hoverMoveEvent(QGraphicsSceneHoverEvent* e) override;
62 
63 private:
64 
65  // Disable
66  ItemPreviewCanvas(QObject*) = delete;
67 
68 private:
69 
70  class Private;
71  Private* const d;
72 };
73 
74 } // namespace Digikam
75 
76 #endif // DIGIKAM_ITEM_PREVIEW_CANVAS_H
Definition: dimgitems_p.h:97
Definition: facegroup.h:45
Definition: iteminfo.h:78
Definition: itempreviewcanvas.h:44
ItemPreviewCanvas()
Definition: itempreviewcanvas.cpp:53
void hoverMoveEvent(QGraphicsSceneHoverEvent *e) override
Definition: itempreviewcanvas.cpp:90
void setFaceGroup(FaceGroup *const group)
Definition: itempreviewcanvas.cpp:64
~ItemPreviewCanvas() override
Definition: itempreviewcanvas.cpp:59
void hoverLeaveEvent(QGraphicsSceneHoverEvent *e) override
Definition: itempreviewcanvas.cpp:85
void hoverEnterEvent(QGraphicsSceneHoverEvent *e) override
Definition: itempreviewcanvas.cpp:80
ItemInfo imageInfo() const
Definition: itempreviewcanvas.cpp:75
void setItemInfo(const ItemInfo &info)
Definition: itempreviewcanvas.cpp:69
Definition: datefolderview.cpp:43