digiKam
Loading...
Searching...
No Matches
showfotodelegate_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 : 2013-08-01
7 * Description : Qt model view for Showfoto item - the delegate Private
8 *
9 * SPDX-FileCopyrightText: 2013 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
10 * SPDX-FileCopyrightText: 2013-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18#include "showfotodelegate.h"
19
20// Qt includes
21
22#include <QPainter>
23#include <QApplication>
24#include <QRect>
25#include <QCache>
26
27// KDE includes
28
29#include <ksharedconfig.h>
30#include <kconfiggroup.h>
31
32// Local includes
33
34#include "showfotoitemmodel.h"
35#include "showfotofiltermodel.h"
37#include "showfotoiteminfo.h"
39#include "showfotosettings.h"
41
42namespace ShowFoto
43{
44
46{
47public:
48
50 {
51 actualPixmapRectCache.setMaxCost(250);
52 }
53
54 int contentWidth = 0;
55
56 QRect dateRect;
58 QRect nameRect;
60 QRect sizeRect;
62 QRect groupRect;
64
65 bool drawImageFormat = true;
66 bool drawFocusFrame = true;
67 bool drawMouseOverFrame = true;
68
69 QCache<int, QRect> actualPixmapRectCache;
70
71 ShowfotoThumbnailBar* currentView = nullptr;
72 QAbstractItemModel* currentModel = nullptr;
73
74public:
75
76 void clearRects() override;
77};
78
79// --- ShowfotoThumbnailDelegate ----------------------------------------------------
80
82{
83public:
84
86 {
87 // switch off drawing of frames
88
89 drawMouseOverFrame = false;
90 drawFocusFrame = false;
91 }
92
93 void init(ShowfotoThumbnailDelegate* const q);
94
95public:
96
97 QListView::Flow flow = QListView::LeftToRight;
98 QRect viewSize;
99};
100
101// --- ShowfotoNormalDelegate ----------------------------------------------------
102
104{
105public:
106
108
109 void init(ShowfotoNormalDelegate* const q, ShowfotoThumbnailBar* const parent);
110};
111
112} // namespace Showfoto
Definition showfotodelegate_p.h:46
QRect dateRect
Definition showfotodelegate_p.h:56
QRect sizeRect
Definition showfotodelegate_p.h:60
QCache< int, QRect > actualPixmapRectCache
Definition showfotodelegate_p.h:69
QRect pixmapRect
Definition showfotodelegate_p.h:57
QRect resolutionRect
Definition showfotodelegate_p.h:59
ShowfotoDelegatePrivate()
Definition showfotodelegate_p.h:49
QRect groupRect
Definition showfotodelegate_p.h:62
QRect imageInformationRect
Definition showfotodelegate_p.h:61
QRect coordinatesRect
Definition showfotodelegate_p.h:63
QRect nameRect
Definition showfotodelegate_p.h:58
Definition showfotodelegate.h:36
Definition showfotoitemviewdelegate_p.h:48
Definition showfotodelegate_p.h:104
Definition showfotodelegate.h:164
Definition showfotothumbnailbar.h:28
Definition showfotodelegate_p.h:82
QRect viewSize
Definition showfotodelegate_p.h:98
ShowfotoThumbnailDelegatePrivate()
Definition showfotodelegate_p.h:85
Definition showfotodelegate.h:122
Definition showfotofolderviewbar.cpp:43