digiKam
itemviewdelegate_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 item view for items - the delegate (private container)
8  *
9  * Copyright (C) 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2009 by Andi Clemens <andi dot clemens at gmail dot com>
11  * Copyright (C) 2002-2022 by Gilles Caulier <caulier dot gilles 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_VIEW_DELEGATE_P_H
28 #define DIGIKAM_ITEM_VIEW_DELEGATE_P_H
29 
30 #include "itemviewdelegate.h"
31 
32 // Qt includes
33 
34 #include <QCache>
35 #include <QFont>
36 #include <QPainter>
37 #include <QPolygon>
38 
39 // Local includes
40 
41 #include "digikam_debug.h"
42 #include "digikam_export.h"
43 
44 namespace Digikam
45 {
46 
47 class ItemViewDelegate;
48 
49 class DIGIKAM_EXPORT ItemViewDelegatePrivate
50 {
51 public:
52 
53  explicit ItemViewDelegatePrivate();
54  virtual ~ItemViewDelegatePrivate() = default;
55 
56  void init(ItemViewDelegate* const _q);
57 
58  void makeStarPolygon();
59 
63  virtual void clearRects();
64 
65 public:
66 
67  int spacing;
68  QSize gridSize;
69 
70  QRect rect;
71  QRect ratingRect;
72 
73  QPixmap regPixmap;
74  QPixmap selPixmap;
75  QVector<QPixmap> ratingPixmaps;
76 
77  QFont font;
78  QFont fontReg;
79  QFont fontCom;
80  QFont fontXtra;
81 
82  QPolygon starPolygon;
84 
86 
87  QPersistentModelIndex editingRating;
88 
90 
94 
96  int radius;
97  int margin;
98 
99 private:
100 
101  Q_DISABLE_COPY(ItemViewDelegatePrivate)
102 };
103 
104 } // namespace Digikam
105 
106 #endif // DIGIKAM_ITEM_VIEW_DELEGATE_P_H
Definition: itemviewdelegate_p.h:50
int radius
constant values for drawing
Definition: itemviewdelegate_p.h:96
QPixmap regPixmap
Definition: itemviewdelegate_p.h:73
int spacing
Definition: itemviewdelegate_p.h:67
QRect oneRowXtraRect
Definition: itemviewdelegate_p.h:93
QSize gridSize
Definition: itemviewdelegate_p.h:68
ThumbnailSize thumbSize
Definition: itemviewdelegate_p.h:85
virtual ~ItemViewDelegatePrivate()=default
QFont fontCom
Definition: itemviewdelegate_p.h:79
QFont fontReg
Definition: itemviewdelegate_p.h:78
QSize starPolygonSize
Definition: itemviewdelegate_p.h:83
QRect ratingRect
Definition: itemviewdelegate_p.h:71
int margin
Definition: itemviewdelegate_p.h:97
ItemViewDelegate * q
Definition: itemviewdelegate_p.h:89
QRect rect
Definition: itemviewdelegate_p.h:70
QPixmap selPixmap
Definition: itemviewdelegate_p.h:74
QVector< QPixmap > ratingPixmaps
Definition: itemviewdelegate_p.h:75
QRect oneRowComRect
Definition: itemviewdelegate_p.h:92
QFont font
Definition: itemviewdelegate_p.h:77
QPolygon starPolygon
Definition: itemviewdelegate_p.h:82
QPersistentModelIndex editingRating
Definition: itemviewdelegate_p.h:87
QFont fontXtra
Definition: itemviewdelegate_p.h:80
QRect oneRowRegRect
Definition: itemviewdelegate_p.h:91
Definition: itemviewdelegate.h:42
Definition: thumbnailsize.h:42
Definition: datefolderview.cpp:43