KDELibs4Support

kdatewidget.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001 Waldo Bastian ([email protected])
3  Copyright (c) 2007 John Layt <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KDATEWIDGET_H
21 #define KDATEWIDGET_H
22 
23 #include <kdelibs4support_export.h>
24 
25 #include <QWidget>
26 
27 #include "klocale.h"
28 
29 class KCalendarSystem;
30 
31 class QDate;
32 
44 class KDELIBS4SUPPORT_EXPORT KDateWidget : public QWidget
45 {
46  Q_OBJECT
47  Q_PROPERTY(QDate date READ date WRITE setDate NOTIFY changed USER true)
48 //FIXME Q_PROPERTY( KCalendarSystem calendar READ calendar WRITE setCalendar USER true )
49 
50 public:
54  KDELIBS4SUPPORT_DEPRECATED explicit KDateWidget(QWidget *parent = nullptr);
55 
59  KDELIBS4SUPPORT_DEPRECATED explicit KDateWidget(const QDate &date, QWidget *parent = nullptr);
60 
64  virtual ~KDateWidget();
65 
66  // KDE5 remove const &
70  const QDate &date() const;
71 
77  bool setDate(const QDate &date);
78 
84  const KCalendarSystem *calendar() const;
85 
93  bool setCalendar(KCalendarSystem *calendar = nullptr);
94 
103  bool setCalendarSystem(KLocale::CalendarSystem calendarSystem);
104 
105 Q_SIGNALS:
110  void changed(const QDate &date);
111 
112 protected:
113  void initWidget(const QDate &date);
114 
115 protected Q_SLOTS:
116  void slotDateChanged();
117 
118 private:
119  class KDateWidgetPrivate;
120  KDateWidgetPrivate *const d;
121 };
122 
123 #endif // KDATEWIDGET_H
124 
KCalendarSystem abstract base class, provides support for local Calendar Systems in KDE...
CalendarSystem
Definition: klocale.h:646
A date selection widget.
Definition: kdatewidget.h:44
Q_PROPERTY(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:59:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.