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

KDEUI

kdatepicker.h

Go to the documentation of this file.
00001 /*  -*- C++ -*-
00002     This file is part of the KDE libraries
00003     Copyright (C) 1997 Tim D. Gilman (tdgilman@best.org)
00004               (C) 1998-2001 Mirko Boehm (mirko@kde.org)
00005               (C) 2007 John Layt <john@layt.net>
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010  
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015  
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KDATEPICKER_H
00023 #define KDATEPICKER_H
00024 
00025 #include <kdeui_export.h>
00026 
00027 #include <QtCore/QDateTime>
00028 #include <QtGui/QFrame>
00029 
00030 class QLineEdit;
00031 class KDateTable;
00032 class KCalendarSystem;
00033 
00053 class KDEUI_EXPORT KDatePicker: public QFrame
00054 {
00055     Q_OBJECT
00056     Q_PROPERTY( QDate date READ date WRITE setDate USER true )
00057 //FIXME    Q_PROPERTY( KCalendarSystem calendar READ calendar WRITE setCalendar USER true )
00058     Q_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton )
00059     Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
00060 
00061 public:
00065     explicit KDatePicker( QWidget *parent = 0 );
00066 
00070     explicit KDatePicker( const QDate &dt, QWidget *parent = 0 );
00071 
00075     virtual ~KDatePicker();
00076 
00083     QSize sizeHint() const;
00084 
00090     bool setDate( const QDate& date );
00091 
00095     const QDate &date() const;
00096 
00102     const KCalendarSystem *calendar() const;
00103 
00111     bool setCalendar( KCalendarSystem *calendar = 0 );
00112 
00120     bool setCalendar( const QString &calendarType );
00121 
00125     void setEnabled( bool enable );
00126 
00131     KDateTable *dateTable() const;
00132 
00136     void setFontSize( int );
00137 
00141     int fontSize() const;
00142 
00151     void setCloseButton( bool enable );
00152 
00157     bool hasCloseButton() const;
00158 
00159 protected:
00161     virtual bool eventFilter( QObject *o, QEvent *e );
00163     virtual void resizeEvent( QResizeEvent* );
00164 
00165 protected Q_SLOTS:
00166     void dateChangedSlot( const QDate& date );
00167     void tableClickedSlot();
00168     void monthForwardClicked();
00169     void monthBackwardClicked();
00170     void yearForwardClicked();
00171     void yearBackwardClicked();
00172     void selectMonthClicked();
00173     void selectYearClicked();
00174     void uncheckYearSelector();
00175     void lineEnterPressed();
00176     void todayButtonClicked();
00177     void weekSelected( int );
00178 
00179 Q_SIGNALS:
00186     void dateChanged( const QDate &date );
00187 
00193     void dateSelected( const QDate &date );
00194 
00200     void dateEntered( const QDate &date );
00201 
00205     void tableClicked();
00206 
00207 private:
00208     void init( const QDate &date );
00209     class KDatePickerPrivate;
00210     friend class KDatePickerPrivate;
00211     KDatePickerPrivate *const d;
00212 };
00213 
00214 #endif //  KDATEPICKER_H

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal