digiKam
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  * Copyright (C) 2011-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 1997 by Tim D. Gilman <tdgilman at best dot org>
11  * Copyright (C) 1998-2001 by Mirko Boehm <mirko at kde dot org>
12  * Copyright (C) 2007 by John Layt <john at layt dot net>
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_DDATE_TABLE_PRIVATE_H
28 #define DIGIKAM_DDATE_TABLE_PRIVATE_H
29 
30 #include "ddatetable.h"
31 
32 // C++ includes
33 
34 #include <cmath>
35 
36 // Qt includes
37 
38 #include <QObject>
39 #include <QColor>
40 #include <QDate>
41 #include <QRectF>
42 #include <QHash>
43 
44 namespace Digikam
45 {
46 
47 class Q_DECL_HIDDEN DDateTable::Private : public QObject
48 {
49  Q_OBJECT
50 
51 public:
52 
53  class Q_DECL_HIDDEN DatePaintingMode
54  {
55  public:
56 
57  QColor fgColor;
58  QColor bgColor;
60  };
61 
62 public:
63 
64  explicit Private(DDateTable* const qq);
65  ~Private() override;
66 
67 public Q_SLOTS:
68 
69  void setDate(const QDate&);
70  void nextMonth();
71  void previousMonth();
72  void beginningOfMonth();
73  void endOfMonth();
74  void beginningOfWeek();
75  void endOfWeek();
76 
77 public:
78 
80 
84  QDate date;
85 
90 
95 
99  QRectF maxCell;
100 
105 
110 
114  int fontsize;
115 
118 
119  QHash <int, DatePaintingMode> customPaintingModes;
120 
122 };
123 
124 } // namespace Digikam
125 
126 #endif // DIGIKAM_DDATE_TABLE_PRIVATE_H
QColor fgColor
Definition: ddatetable_p.h:57
QColor bgColor
Definition: ddatetable_p.h:58
BackgroundMode bgMode
Definition: ddatetable_p.h:59
Definition: ddatetable_p.h:48
DDateTable * q
Definition: ddatetable_p.h:79
QRectF maxCell
Definition: ddatetable_p.h:99
bool useCustomColors
Definition: ddatetable_p.h:117
int numWeekRows
Definition: ddatetable_p.h:104
int hoveredPos
Definition: ddatetable_p.h:121
int weekDayFirstOfMonth
Definition: ddatetable_p.h:89
bool popupMenuEnabled
Definition: ddatetable_p.h:116
QDate date
Definition: ddatetable_p.h:84
int numDayColumns
Definition: ddatetable_p.h:109
int fontsize
Definition: ddatetable_p.h:114
int numDaysThisMonth
Definition: ddatetable_p.h:94
QHash< int, DatePaintingMode > customPaintingModes
Definition: ddatetable_p.h:119
Definition: ddatetable.h:50
BackgroundMode
Definition: ddatetable.h:58
Definition: datefolderview.cpp:43