Debian Codegraph @

core/showfoto/thumbbar/showfotoitemviewdelegate_p.h

raw symbols SCIP
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2013-08-01
7 * Description : Qt model view for Showfoto item - the delegate
8 *
9 * SPDX-FileCopyrightText: 2013 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15 #pragma once
16
17 #include "showfotoitemviewdelegate.h"
18
19 // Qt includes
20
21 #include <QPainter>
22 #include <QApplication>
23 #include <QFont>
24 #include <QModelIndex>
25
26 // KDE includes
27
28 #include <klocalizedstring.h>
29
30 // Local includes
31
32 #include "digikam_debug.h"
33 #include "digikam_globals.h"
34 #include "thememanager.h"
35 #include "itempropertiestab.h"
36 #include "showfotoiteminfo.h"
37 #include "colorlabelwidget.h"
38 #include "thumbnailsize.h"
39 #include "itemdelegateoverlay.h"
40
41 using namespace Digikam;
42
43 namespace ShowFoto
44 {
45
46 class ShowfotoItemViewDelegate;
47
48 class Q_DECL_HIDDEN ShowfotoItemViewDelegatePrivate
49 {
50 public:
51
52 ShowfotoItemViewDelegatePrivate() = default;
53 virtual ~ShowfotoItemViewDelegatePrivate() = default;
54
55 void init(ShowfotoItemViewDelegate* const _q, QWidget* const _widget);
56
57 /// Resets cached rects. Remember to reimplement in subclass for added rects.
58 virtual void clearRects();
59
60 public:
61
62 int spacing = 0;
63 QSize gridSize;
64
65 QRect rect;
66
67 QPixmap regPixmap;
68 QPixmap selPixmap;
69 QVector<QPixmap> ratingPixmaps;
70
71 QFont font;
72 QFont fontReg;
73 QFont fontCom;
74 QFont fontXtra;
75
76 ThumbnailSize thumbSize = ThumbnailSize(0);
77
78 ShowfotoItemViewDelegate* q = nullptr;
79
80 QWidget* displayWidget = nullptr;
81
82 QRect oneRowRegRect;
83 QRect oneRowComRect;
84 QRect oneRowXtraRect;
85
86 /// constant values for drawing
87 int radius = 3;
88 int margin = 5;
89
90 private:
91
92 Q_DISABLE_COPY(ShowfotoItemViewDelegatePrivate)
93 };
94
95 } // namespace ShowFoto