digiKam
itemfacedelegate.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-19
7  * Description : Qt model-view for face item - the delegate
8  *
9  * Copyright (C) 2009-2010 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_ITEM_FACE_DELEGATE_H
25 #define DIGIKAM_ITEM_FACE_DELEGATE_H
26 
27 // Local includes
28 
29 #include "digikamitemdelegate.h"
30 
31 namespace Digikam
32 {
33 
34 class ItemCategoryDrawer;
35 class FaceTagsIface;
36 class ItemFaceDelegatePrivate;
37 
39 {
40  Q_OBJECT
41 
42 public:
43 
44  explicit ItemFaceDelegate(ItemCategorizedView* const parent);
45  ~ItemFaceDelegate() override;
46 
47  QRect faceRect(const QModelIndex& index) const;
48  QRect largerFaceRect(const QModelIndex& index) const;
49 
50  static FaceTagsIface face(const QModelIndex& index);
51 
52 protected:
53 
54  QPixmap thumbnailPixmap(const QModelIndex& index) const override;
55  void updateRects() override;
56  void clearModelDataCaches() override;
57 
58 private:
59 
60  // Disable
61  ItemFaceDelegate(QObject*) = delete;
62 
63 private:
64 
65  Q_DECLARE_PRIVATE(ItemFaceDelegate)
66 };
67 
68 } // namespace Digikam
69 
70 #endif // DIGIKAM_ITEM_FACE_DELEGATE_H
Definition: digikamitemdelegate.h:38
Definition: facetagsiface.h:44
Definition: itemcategorizedview.h:49
Definition: itemfacedelegate.h:39
void updateRects() override
Definition: itemfacedelegate.cpp:114
QRect largerFaceRect(const QModelIndex &index) const
Definition: itemfacedelegate.cpp:88
QPixmap thumbnailPixmap(const QModelIndex &index) const override
Definition: itemfacedelegate.cpp:52
static FaceTagsIface face(const QModelIndex &index)
Definition: itemfacedelegate.cpp:102
void clearModelDataCaches() override
Definition: itemfacedelegate.cpp:121
~ItemFaceDelegate() override
Definition: itemfacedelegate.cpp:48
QRect faceRect(const QModelIndex &index) const
Definition: itemfacedelegate.cpp:83
ItemFaceDelegate(ItemCategorizedView *const parent)
Definition: itemfacedelegate.cpp:43
Definition: datefolderview.cpp:43