digiKam
Loading...
Searching...
No Matches
ddatetable_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 : 1997-04-21
7 * Description : Date selection table.
8 *
9 * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 1997 by Tim D. Gilman <tdgilman at best dot org>
11 * SPDX-FileCopyrightText: 1998-2001 by Mirko Boehm <mirko at kde dot org>
12 * SPDX-FileCopyrightText: 2007 by John Layt <john at layt dot net>
13 *
14 * SPDX-License-Identifier: GPL-2.0-or-later
15 *
16 * ============================================================ */
17
18#pragma once
19
20#include "ddatetable.h"
21
22// C++ includes
23
24#include <cmath>
25
26// Qt includes
27
28#include <QObject>
29#include <QColor>
30#include <QDate>
31#include <QRectF>
32#include <QHash>
33
34namespace Digikam
35{
36
37class Q_DECL_HIDDEN DDateTable::Private : public QObject
38{
39 Q_OBJECT
40
41public:
42
43 class Q_DECL_HIDDEN DatePaintingMode
44 {
45 public:
46
47 QColor fgColor;
48 QColor bgColor;
50 };
51
52public:
53
54 explicit Private(DDateTable* const qq);
55 ~Private() override = default;
56
57public Q_SLOTS:
58
59 void setDate(const QDate&);
60 void nextMonth();
61 void previousMonth();
62 void beginningOfMonth();
63 void endOfMonth();
64 void beginningOfWeek();
65 void endOfWeek();
66
67public:
68
69 DDateTable* q = nullptr;
70
74 QDate date;
75
79 int weekDayFirstOfMonth = 0;
80
84 int numDaysThisMonth = 0;
85
89 QRectF maxCell;
90
94 int numWeekRows = 0;
95
99 int numDayColumns = 0;
100
104 int fontsize = 0;
105
106 bool popupMenuEnabled = false;
107 bool useCustomColors = false;
108
109 QHash <int, DatePaintingMode> customPaintingModes;
110
111 int hoveredPos = -1;
112};
113
114} // namespace Digikam
QColor fgColor
Definition ddatetable_p.h:47
QColor bgColor
Definition ddatetable_p.h:48
BackgroundMode bgMode
Definition ddatetable_p.h:49
Definition ddatetable_p.h:38
QRectF maxCell
Definition ddatetable_p.h:89
QDate date
Definition ddatetable_p.h:74
~Private() override=default
QHash< int, DatePaintingMode > customPaintingModes
Definition ddatetable_p.h:109
Definition ddatetable.h:40
BackgroundMode
Definition ddatetable.h:48
Definition datefolderview.cpp:34