KDEUI
kdatewidget.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2001 Waldo Bastian (bastian@kde.org) 00003 Copyright (c) 2007 John Layt <john@layt.net> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KDATEWIDGET_H 00021 #define KDATEWIDGET_H 00022 00023 #include <kdeui_export.h> 00024 00025 #include <QtGui/QWidget> 00026 00027 #include "klocale.h" 00028 00029 class KCalendarSystem; 00030 00031 class QDate; 00032 00044 class KDEUI_EXPORT KDateWidget : public QWidget 00045 { 00046 Q_OBJECT 00047 Q_PROPERTY( QDate date READ date WRITE setDate NOTIFY changed USER true ) 00048 //FIXME Q_PROPERTY( KCalendarSystem calendar READ calendar WRITE setCalendar USER true ) 00049 00050 public: 00054 explicit KDateWidget( QWidget *parent = 0 ); 00055 00059 explicit KDateWidget( const QDate &date, QWidget *parent = 0 ); 00060 00064 virtual ~KDateWidget(); 00065 00066 // KDE5 remove const & 00070 const QDate& date() const; 00071 00077 bool setDate( const QDate &date ); 00078 00084 const KCalendarSystem *calendar() const; 00085 00093 bool setCalendar( KCalendarSystem *calendar = 0 ); 00094 00102 bool setCalendar( const QString &calendarType ); 00103 00112 bool setCalendarSystem( KLocale::CalendarSystem calendarSystem ); 00113 00114 Q_SIGNALS: 00119 void changed( const QDate& date ); 00120 00121 protected: 00122 void init( const QDate& date ); 00123 00124 protected Q_SLOTS: 00125 void slotDateChanged(); 00126 00127 private: 00128 class KDateWidgetPrivate; 00129 KDateWidgetPrivate * const d; 00130 }; 00131 00132 #endif // KDATEWIDGET_H 00133
KDE 4.6 API Reference