digiKam
itemviewimportdelegate_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 : 2012-07-08
7  * Description : Item delegate for import interface items - private container.
8  *
9  * Copyright (C) 2012 by Islam Wazery <wazery at ubuntu dot com>
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_VIEW_IMPORT_DELEGATE_P_H
25 #define DIGIKAM_ITEM_VIEW_IMPORT_DELEGATE_P_H
26 
27 #include "itemviewimportdelegate.h"
28 
29 // Qt includes
30 
31 #include <QCache>
32 #include <QFont>
33 #include <QPainter>
34 #include <QPolygon>
35 #include <QModelIndex>
36 
37 // Local includes
38 
39 #include "digikam_debug.h"
40 #include "thumbnailsize.h"
41 
42 namespace Digikam
43 {
44 
45 class ItemDelegateOverlay;
46 class ItemViewImportDelegate;
47 
48 class Q_DECL_HIDDEN ItemViewImportDelegatePrivate
49 {
50 public:
51 
53  virtual ~ItemViewImportDelegatePrivate() = default;
54 
55  void init(ItemViewImportDelegate* const _q);
56 
57  void makeStarPolygon();
58 
60  virtual void clearRects();
61 
62 public:
63 
64  int spacing;
65  QSize gridSize;
66 
67  QRect rect;
68  QRect ratingRect;
69 
70  QPixmap regPixmap;
71  QPixmap selPixmap;
72  QVector<QPixmap> ratingPixmaps;
73 
74  QFont font;
75  QFont fontReg;
76  QFont fontCom;
77  QFont fontXtra;
78 
79  QPolygon starPolygon;
81 
83 
84  QPersistentModelIndex editingRating;
85 
87 
91 
93  int radius;
94  int margin;
95 
96 private:
97 
98  Q_DISABLE_COPY(ItemViewImportDelegatePrivate)
99 };
100 
101 } // namespace Digikam
102 
103 #endif // DIGIKAM_ITEM_VIEW_IMPORT_DELEGATE_P_H
Definition: itemviewimportdelegate_p.h:49
QFont fontReg
Definition: itemviewimportdelegate_p.h:75
int spacing
Definition: itemviewimportdelegate_p.h:64
QPixmap regPixmap
Definition: itemviewimportdelegate_p.h:70
QSize gridSize
Definition: itemviewimportdelegate_p.h:65
QRect rect
Definition: itemviewimportdelegate_p.h:67
ThumbnailSize thumbSize
Definition: itemviewimportdelegate_p.h:82
QFont font
Definition: itemviewimportdelegate_p.h:74
virtual ~ItemViewImportDelegatePrivate()=default
QRect oneRowRegRect
Definition: itemviewimportdelegate_p.h:88
int radius
constant values for drawing
Definition: itemviewimportdelegate_p.h:93
QSize starPolygonSize
Definition: itemviewimportdelegate_p.h:80
QRect ratingRect
Definition: itemviewimportdelegate_p.h:68
QFont fontCom
Definition: itemviewimportdelegate_p.h:76
QPersistentModelIndex editingRating
Definition: itemviewimportdelegate_p.h:84
ItemViewImportDelegate * q
Definition: itemviewimportdelegate_p.h:86
QFont fontXtra
Definition: itemviewimportdelegate_p.h:77
QRect oneRowXtraRect
Definition: itemviewimportdelegate_p.h:90
QPolygon starPolygon
Definition: itemviewimportdelegate_p.h:79
QVector< QPixmap > ratingPixmaps
Definition: itemviewimportdelegate_p.h:72
QPixmap selPixmap
Definition: itemviewimportdelegate_p.h:71
QRect oneRowComRect
Definition: itemviewimportdelegate_p.h:89
int margin
Definition: itemviewimportdelegate_p.h:94
NOTE: Some reuse of the existing model-view classes.
Definition: itemviewimportdelegate.h:46
Definition: thumbnailsize.h:42
Definition: datefolderview.cpp:43