• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • widgets
kdatepicker.h
Go to the documentation of this file.
1 /* -*- C++ -*-
2  This file is part of the KDE libraries
3  Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org)
4  (C) 1998-2001 Mirko Boehm (mirko@kde.org)
5  (C) 2007 John Layt <john@layt.net>
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KDATEPICKER_H
23 #define KDATEPICKER_H
24 
25 #include <kdeui_export.h>
26 
27 #include <QtCore/QDateTime>
28 #include <QtGui/QFrame>
29 
30 #include <klocale.h>
31 
32 class QLineEdit;
33 class KDateTable;
34 class KCalendarSystem;
35 
55 class KDEUI_EXPORT KDatePicker: public QFrame
56 {
57  Q_OBJECT
58  Q_PROPERTY( QDate date READ date WRITE setDate NOTIFY dateChanged USER true )
59 //FIXME Q_PROPERTY( KCalendarSystem calendar READ calendar WRITE setCalendar USER true )
60  Q_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton )
61  Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
62 
63 public:
67  explicit KDatePicker( QWidget *parent = 0 );
68 
72  explicit KDatePicker( const QDate &dt, QWidget *parent = 0 );
73 
77  virtual ~KDatePicker();
78 
85  QSize sizeHint() const;
86 
92  bool setDate( const QDate& date );
93 
97  const QDate &date() const;
98 
104  const KCalendarSystem *calendar() const;
105 
113  bool setCalendar( KCalendarSystem *calendar = 0 );
114 
122  bool setCalendar( const QString &calendarType );
123 
132  bool setCalendarSystem( KLocale::CalendarSystem calendarSystem );
133 
137  void setEnabled( bool enable );
138 
143  KDateTable *dateTable() const;
144 
148  void setFontSize( int );
149 
153  int fontSize() const;
154 
163  void setCloseButton( bool enable );
164 
169  bool hasCloseButton() const;
170 
171 protected:
173  virtual bool eventFilter( QObject *o, QEvent *e );
175  virtual void resizeEvent( QResizeEvent* );
176 
177 protected Q_SLOTS:
178  void dateChangedSlot( const QDate& date );
179  void tableClickedSlot();
180  void monthForwardClicked();
181  void monthBackwardClicked();
182  void yearForwardClicked();
183  void yearBackwardClicked();
184  void selectMonthClicked();
185  void selectYearClicked();
186  void uncheckYearSelector();
187  void lineEnterPressed();
188  void todayButtonClicked();
189  void weekSelected( int );
190 
191 Q_SIGNALS:
198  void dateChanged( const QDate &date );
199 
205  void dateSelected( const QDate &date );
206 
212  void dateEntered( const QDate &date );
213 
217  void tableClicked();
218 
219 private:
220  void init( const QDate &date );
221  class KDatePickerPrivate;
222  friend class KDatePickerPrivate;
223  KDatePickerPrivate *const d;
224 };
225 
226 #endif // KDATEPICKER_H
QEvent
QResizeEvent
QWidget
KDateTable
Date selection table.
Definition: kdatetable.h:139
klocale.h
KCalendarSystem
QObject
QDate
QString
QSize
QFrame
KLocale
kdeui_export.h
QLineEdit
KDatePicker
A date selection widget.
Definition: kdatepicker.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal