1/* -*- C++ -*-
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 1997 Tim D . Gilman <tdgilman@best.org>
4 SPDX-FileCopyrightText: 1998-2001 Mirko Boehm <mirko@kde.org>
5 SPDX-FileCopyrightText: 2007 John Layt <john@layt.net>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#ifndef KDATEPICKER_P_H
11#define KDATEPICKER_P_H
12
13#include <QDate>
14#include <QIntValidator>
15#include <QLineEdit>
16
17/**
18 * @internal
19 * Year selection widget.
20 * @author Tim Gilman, Mirko Boehm, John Layt
21 */
22class KDatePickerPrivateYearSelector : public QLineEdit
23{
24 Q_OBJECT
25
26public:
27 explicit KDatePickerPrivateYearSelector(const QDate &currentDate, QWidget *parent = nullptr);
28 int year();
29 void setYear(const QDate &year);
30
31public Q_SLOTS:
32 void yearEnteredSlot();
33
34Q_SIGNALS:
35 void closeMe(int);
36
37protected:
38 QIntValidator *val;
39 int result;
40
41private:
42 QDate oldDate;
43
44 Q_DISABLE_COPY(KDatePickerPrivateYearSelector)
45};
46
47#endif // KDATEPICKER_P_H
48

source code of kwidgetsaddons/src/kdatepicker_p.h