File indexing completed on 2025-02-16 13:11:40
0001 /* -*- C++ -*- 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 1997 Tim D . Gilman <tdgilman@best.org> 0004 SPDX-FileCopyrightText: 1998-2001 Mirko Boehm <mirko@kde.org> 0005 SPDX-FileCopyrightText: 2007 John Layt <john@layt.net> 0006 0007 SPDX-License-Identifier: LGPL-2.0-or-later 0008 */ 0009 0010 #ifndef KDATEPICKER_P_H 0011 #define KDATEPICKER_P_H 0012 0013 #include <QDate> 0014 #include <QIntValidator> 0015 #include <QLineEdit> 0016 0017 /** 0018 * @internal 0019 * Year selection widget. 0020 * @author Tim Gilman, Mirko Boehm, John Layt 0021 */ 0022 class KDatePickerPrivateYearSelector : public QLineEdit 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit KDatePickerPrivateYearSelector(const QDate ¤tDate, QWidget *parent = nullptr); 0028 int year(); 0029 void setYear(const QDate &year); 0030 0031 public Q_SLOTS: 0032 void yearEnteredSlot(); 0033 0034 Q_SIGNALS: 0035 void closeMe(int); 0036 0037 protected: 0038 QIntValidator *val; 0039 int result; 0040 0041 private: 0042 QDate oldDate; 0043 0044 Q_DISABLE_COPY(KDatePickerPrivateYearSelector) 0045 }; 0046 0047 #endif // KDATEPICKER_P_H