/*  -*- C++ -*-
    This file is part of the KDE libraries
    SPDX-FileCopyrightText: 1997 Tim D. Gilman (tdgilman@best.org)
              SPDX-FileCopyrightText: 1998-2001 Mirko Boehm (mirko@kde.org)
              SPDX-FileCopyrightText: 1998-2001 Mirko Boehm (john@layt.net)
    SPDX-License-Identifier: LGPL-2.0-or-later
*/

#ifndef KDATEPICKER_P_H
#define KDATEPICKER_P_H

#include <QDate>
#include <QLineEdit>
#include <QValidator>

namespace KPlato
{

/** Year selection widget.
* @internal
* @author Tim Gilman, Mirko Boehm, John Layt
*/

class KDatePickerPrivateYearSelector : public QLineEdit
{
    Q_OBJECT

public:
    KDatePickerPrivateYearSelector(const QDate &currentDate, QWidget *parent = nullptr);
    int year();
    void setYear(int year);

public Q_SLOTS:
    void yearEnteredSlot();

Q_SIGNALS:
    void closeMe(int);

protected:
    QIntValidator *val;
    int result;

private:
    QDate oldDate;

    Q_DISABLE_COPY(KDatePickerPrivateYearSelector)
};

} //namespace KPlato

#endif // KDATEPICKER_P_H

