kdatepicker.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KDATEPICKER_H
00021 #define KDATEPICKER_H
00022 #include <qdatetime.h>
00023 #include <qframe.h>
00024 #include <kdemacros.h>
00025
00026 class QLineEdit;
00027 class QToolButton;
00028 class KDateValidator;
00029 class KDateTable;
00030
00050 class KDatePicker: public QFrame
00051 {
00052 Q_OBJECT
00053 Q_PROPERTY( QDate date READ date WRITE setDate)
00054 Q_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton )
00055 Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
00056
00057 public:
00061 KDatePicker(QWidget *parent=0,
00062 QDate=QDate::currentDate(),
00063 const char *name=0);
00064
00069 KDatePicker(QWidget *parent,
00070 QDate,
00071 const char *name,
00072 WFlags f);
00073
00079 KDatePicker( QWidget *parent, const char *name );
00080
00084 virtual ~KDatePicker();
00085
00092 QSize sizeHint() const;
00093
00100 bool setDate(const QDate&);
00101
00106 const QDate& getDate() const KDE_DEPRECATED;
00107
00111 const QDate &date() const;
00112
00116 void setEnabled(bool);
00117
00123 KDateTable *dateTable() const { return table; };
00124
00128 void setFontSize(int);
00132 int fontSize() const
00133 { return fontsize; }
00134
00144 void setCloseButton( bool enable );
00145
00151 bool hasCloseButton() const;
00152
00153 protected:
00155 virtual bool eventFilter(QObject *o, QEvent *e );
00157 virtual void resizeEvent(QResizeEvent*);
00159 QToolButton *yearForward;
00161 QToolButton *yearBackward;
00163 QToolButton *monthForward;
00165 QToolButton *monthBackward;
00167 QToolButton *selectMonth;
00169 QToolButton *selectYear;
00171 QLineEdit *line;
00173 KDateValidator *val;
00175 KDateTable *table;
00177
00179 QSize maxMonthRect;
00180 protected slots:
00181 void dateChangedSlot(QDate);
00182 void tableClickedSlot();
00183 void monthForwardClicked();
00184 void monthBackwardClicked();
00185 void yearForwardClicked();
00186 void yearBackwardClicked();
00191 void selectWeekClicked();
00195 void selectMonthClicked();
00199 void selectYearClicked();
00203 void lineEnterPressed();
00207 void todayButtonClicked();
00211 void weekSelected(int);
00212
00213 signals:
00214
00215
00222 void dateChanged(QDate);
00228 void dateSelected(QDate);
00234 void dateEntered(QDate);
00238 void tableClicked();
00239
00240 private:
00242 int fontsize;
00243
00244 protected:
00245 virtual void virtual_hook( int id, void* data );
00246 private:
00247 void init( const QDate &dt );
00248 void fillWeeksCombo(const QDate &date);
00249 class KDatePickerPrivate;
00250 KDatePickerPrivate *d;
00251 };
00252
00253 #endif
This file is part of the documentation for kdeui Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 23 17:11:53 2004 by
doxygen 1.3.8-20040913 written by
Dimitri van Heesch, © 1997-2003