digiKam
facerejectionoverlay.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 : 2009-04-30
7  * Description : rejection icon view item on mouse hover
8  *
9  * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_FACE_REJECTION_OVERLAY_H
25 #define DIGIKAM_FACE_REJECTION_OVERLAY_H
26 
27 // Qt includes
28 
29 #include <QAbstractItemView>
30 
31 // Local includes
32 
33 #include "itemviewhoverbutton.h"
34 #include "itemdelegateoverlay.h"
35 #include "iteminfo.h"
36 
37 namespace Digikam
38 {
39 
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit FaceRejectionOverlayButton(QAbstractItemView* const parentView);
47  QSize sizeHint() const override;
48 
49 protected:
50 
51  QIcon icon() override;
52  void updateToolTip() override;
53 };
54 
55 // --------------------------------------------------------------------
56 
58 {
59  Q_OBJECT
60 
61 public:
62 
63  explicit FaceRejectionOverlay(QObject* const parent);
64  void setActive(bool active) override;
65 
66 Q_SIGNALS:
67 
68  void rejectFaces(const QList<QModelIndex>& indexes);
69 
70 protected:
71 
73  void updateButton(const QModelIndex& index) override;
74  bool checkIndex(const QModelIndex& index) const override;
75  void widgetEnterEvent() override;
76  void widgetLeaveEvent() override;
77 
78 protected Q_SLOTS:
79 
80  void slotClicked();
81 };
82 
83 } // namespace Digikam
84 
85 #endif // DIGIKAM_FACE_REJECTION_OVERLAY_H
Definition: facerejectionoverlay.h:41
FaceRejectionOverlayButton(QAbstractItemView *const parentView)
Definition: facerejectionoverlay.cpp:42
QIcon icon() override
Definition: facerejectionoverlay.cpp:53
QSize sizeHint() const override
Definition: facerejectionoverlay.cpp:48
void updateToolTip() override
Definition: facerejectionoverlay.cpp:58
Definition: facerejectionoverlay.h:58
ItemViewHoverButton * createButton() override
Definition: facerejectionoverlay.cpp:85
void rejectFaces(const QList< QModelIndex > &indexes)
bool checkIndex(const QModelIndex &index) const override
Definition: facerejectionoverlay.cpp:111
void widgetLeaveEvent() override
Definition: facerejectionoverlay.cpp:121
void setActive(bool active) override
Definition: facerejectionoverlay.cpp:70
void slotClicked()
Definition: facerejectionoverlay.cpp:101
FaceRejectionOverlay(QObject *const parent)
Definition: facerejectionoverlay.cpp:65
void widgetEnterEvent() override
Definition: facerejectionoverlay.cpp:116
void updateButton(const QModelIndex &index) override
Definition: facerejectionoverlay.cpp:90
Definition: itemdelegateoverlay.h:225
Definition: itemviewhoverbutton.h:42
Definition: datefolderview.cpp:43