digiKam
ddatepickerpopup.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 : 2004-04-21
7
* Description : a menu widget to pick a date.
8
*
9
* Copyright (C) 2004 by Bram Schoenmakers <bramschoenmakers at kde dot nl>
10
* Copyright (C) 2006 by Mikolaj Machowski <mikmach at wp dot pl>
11
* Copyright (C) 2011-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
*
13
* This program is free software; you can redistribute it
14
* and/or modify it under the terms of the GNU General
15
* Public License as published by the Free Software Foundation;
16
* either version 2, or (at your option)
17
* any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU General Public License for more details.
23
*
24
* ============================================================ */
25
26
#ifndef DIGIKAM_DDATE_PICKER_POP_UP_H
27
#define DIGIKAM_DDATE_PICKER_POP_UP_H
28
29
// Qt includes
30
31
#include <QDateTime>
32
#include <QMenu>
33
34
// Local includes
35
36
#include "
ddatepicker.h
"
37
38
namespace
Digikam
39
{
40
54
class
DDatePickerPopup
:
public
QMenu
55
{
56
Q_OBJECT
57
58
public
:
59
60
enum
ItemFlag
61
{
62
NoDate
= 1,
63
DatePicker
= 2,
64
Words
= 4
65
};
66
67
Q_DECLARE_FLAGS(Items,
ItemFlag
)
68
69
public
:
70
78
explicit
DDatePickerPopup
(Items
items
,
79
const
QDate& date = QDate::currentDate(),
80
QWidget*
const
parent =
nullptr
);
81
~DDatePickerPopup
()
override
;
82
87
DDatePicker
*
datePicker
()
const
;
88
89
void
setDate
(
const
QDate& date);
90
91
#if 0
96
void
setItems(
int
items
= 1);
97
#endif
98
102
int
items
()
const
;
103
104
Q_SIGNALS:
105
110
void
dateChanged
(
const
QDate&);
111
112
protected
Q_SLOTS:
113
114
void
slotDateChanged
(
const
QDate&);
115
void
slotToday
();
116
void
slotTomorrow
();
117
void
slotNextWeek
();
118
void
slotNextMonth
();
119
120
void
slotYesterday
();
121
void
slotPrevMonday
();
122
void
slotPrevFriday
();
123
void
slotPrevWeek
();
124
void
slotPrevMonth
();
125
126
void
slotNoDate
();
127
128
private
:
129
130
void
buildMenu();
131
132
private
:
133
134
// Disable
135
DDatePickerPopup
() =
delete
;
136
137
private
:
138
139
class
Private;
140
Private*
const
d;
141
};
142
143
Q_DECLARE_OPERATORS_FOR_FLAGS(DDatePickerPopup::Items)
144
145
}
// namespace Digikam
146
147
#endif
// DIGIKAM_DDATE_PICKER_POP_UP_H
Digikam::DDatePickerPopup
This menu helps the user to select a date quickly.
Definition:
ddatepickerpopup.h:55
Digikam::DDatePickerPopup::ItemFlag
ItemFlag
Definition:
ddatepickerpopup.h:61
Digikam::DDatePickerPopup::NoDate
@ NoDate
Definition:
ddatepickerpopup.h:62
Digikam::DDatePickerPopup::Words
@ Words
Definition:
ddatepickerpopup.h:64
Digikam::DDatePickerPopup::DatePicker
@ DatePicker
Definition:
ddatepickerpopup.h:63
Digikam::DDatePickerPopup::items
int items() const
Definition:
ddatepickerpopup.cpp:178
Digikam::DDatePickerPopup::slotToday
void slotToday()
Definition:
ddatepickerpopup.cpp:189
Digikam::DDatePickerPopup::setDate
void setDate(const QDate &date)
Definition:
ddatepickerpopup.cpp:165
Digikam::DDatePickerPopup::slotNextWeek
void slotNextWeek()
Definition:
ddatepickerpopup.cpp:204
Digikam::DDatePickerPopup::slotPrevWeek
void slotPrevWeek()
Definition:
ddatepickerpopup.cpp:242
Digikam::DDatePickerPopup::slotPrevFriday
void slotPrevFriday()
Definition:
ddatepickerpopup.cpp:219
Digikam::DDatePickerPopup::dateChanged
void dateChanged(const QDate &)
Digikam::DDatePickerPopup::slotDateChanged
void slotDateChanged(const QDate &)
Definition:
ddatepickerpopup.cpp:183
Digikam::DDatePickerPopup::slotYesterday
void slotYesterday()
Definition:
ddatepickerpopup.cpp:214
Digikam::DDatePickerPopup::~DDatePickerPopup
~DDatePickerPopup() override
Definition:
ddatepickerpopup.cpp:112
Digikam::DDatePickerPopup::slotPrevMonth
void slotPrevMonth()
Definition:
ddatepickerpopup.cpp:247
Digikam::DDatePickerPopup::slotNextMonth
void slotNextMonth()
Definition:
ddatepickerpopup.cpp:209
Digikam::DDatePickerPopup::slotTomorrow
void slotTomorrow()
Definition:
ddatepickerpopup.cpp:194
Digikam::DDatePickerPopup::datePicker
DDatePicker * datePicker() const
Definition:
ddatepickerpopup.cpp:160
Digikam::DDatePickerPopup::slotNoDate
void slotNoDate()
Definition:
ddatepickerpopup.cpp:199
Digikam::DDatePickerPopup::slotPrevMonday
void slotPrevMonday()
Definition:
ddatepickerpopup.cpp:236
Digikam::DDatePicker
Definition:
ddatepicker.h:50
ddatepicker.h
Digikam
Definition:
datefolderview.cpp:43
core
app
date
ddatepickerpopup.h
Generated by
1.9.1