digiKam
itemdelegate_p.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 items - the delegate
8  *
9  * Copyright (C) 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2002-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com>
12  * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_ITEM_DELEGATE_P_H
28 #define DIGIKAM_ITEM_DELEGATE_P_H
29 
30 // Qt includes
31 
32 #include <QRect>
33 #include <QCache>
34 
35 // Local includes
36 
37 #include "itemviewdelegate_p.h"
38 
39 namespace Digikam
40 {
41 
42 class ItemCategoryDrawer;
43 
45 {
46 public:
47 
49  {
50  contentWidth = 0;
51  drawFocusFrame = true;
52  drawCoordinates = false;
53  drawImageFormat = false;
54  drawImageFormatTop = false;
55  drawMouseOverFrame = true;
56  ratingOverThumbnail = false;
57  categoryDrawer = nullptr;
58  currentView = nullptr;
59  currentModel = nullptr;
60 
61  actualPixmapRectCache.setMaxCost(250);
62  }
63 
65 
66  QRect dateRect;
67  QRect modDateRect;
68  QRect pixmapRect;
70  QRect nameRect;
71  QRect titleRect;
72  QRect commentsRect;
74  QRect arRect;
75  QRect sizeRect;
76  QRect tagRect;
80  QRect groupRect;
81 
88 
89  QCache<int, QRect> actualPixmapRectCache;
91 
93  QAbstractItemModel* currentModel;
94 
95 public:
96 
97  void clearRects() override;
98 };
99 
100 } // namespace Digikam
101 
102 #endif // DIGIKAM_ITEM_DELEGATE_P_H
Definition: itemcategorizedview.h:49
Definition: itemcategorydrawer.h:44
Definition: itemdelegate_p.h:45
QRect resolutionRect
Definition: itemdelegate_p.h:73
bool ratingOverThumbnail
Definition: itemdelegate_p.h:87
ItemCategoryDrawer * categoryDrawer
Definition: itemdelegate_p.h:90
QRect sizeRect
Definition: itemdelegate_p.h:75
QRect coordinatesRect
Definition: itemdelegate_p.h:78
bool drawImageFormatTop
Definition: itemdelegate_p.h:85
QRect imageInformationRect
Definition: itemdelegate_p.h:77
QRect pixmapRect
Definition: itemdelegate_p.h:68
QRect modDateRect
Definition: itemdelegate_p.h:67
QRect dateRect
Definition: itemdelegate_p.h:66
QRect titleRect
Definition: itemdelegate_p.h:71
QRect pickLabelRect
Definition: itemdelegate_p.h:79
QCache< int, QRect > actualPixmapRectCache
Definition: itemdelegate_p.h:89
bool drawFocusFrame
Definition: itemdelegate_p.h:82
QAbstractItemModel * currentModel
Definition: itemdelegate_p.h:93
QRect tagRect
Definition: itemdelegate_p.h:76
QRect commentsRect
Definition: itemdelegate_p.h:72
ItemCategorizedView * currentView
Definition: itemdelegate_p.h:92
bool drawMouseOverFrame
Definition: itemdelegate_p.h:86
QRect nameRect
Definition: itemdelegate_p.h:70
int contentWidth
Definition: itemdelegate_p.h:64
QRect specialInfoRect
Definition: itemdelegate_p.h:69
bool drawImageFormat
Definition: itemdelegate_p.h:84
QRect groupRect
Definition: itemdelegate_p.h:80
bool drawCoordinates
Definition: itemdelegate_p.h:83
ItemDelegatePrivate()
Definition: itemdelegate_p.h:48
QRect arRect
Definition: itemdelegate_p.h:74
Definition: itemdelegate.h:44
Definition: itemviewdelegate_p.h:50
Definition: datefolderview.cpp:43