27#include <QtGui/QValidator>
28#include <QtGui/QLineEdit>
29#include <QtCore/QDateTime>
48 virtual void keyPressEvent( QKeyEvent *e );
75 void setMainWidget(
QWidget* m );
81 virtual void resizeEvent( QResizeEvent *resize );
86 void popup(
const QPoint &pos );
91 int exec(
const QPoint &p );
96 int exec(
int x,
int y );
102 class KPopupFramePrivate;
103 friend class KPopupFramePrivate;
104 KPopupFramePrivate *
const d;
116 virtual State validate( QString &text,
int &e )
const;
117 virtual void fixup ( QString &input )
const;
118 State date(
const QString &text, QDate &date )
const;
120 class KDateValidatorPrivate;
121 friend class KDateValidatorPrivate;
122 KDateValidatorPrivate *
const d;
142 Q_PROPERTY( QDate date READ date WRITE setDate )
144 Q_PROPERTY(
bool popupMenu READ popupMenuEnabled WRITE setPopupMenuEnabled )
169 virtual QSize sizeHint()
const;
174 void setFontSize(
int size );
179 bool setDate(
const QDate &date );
185 const QDate &date()
const;
210 bool setCalendar(
const QString &calendarType );
228 void setPopupMenuEnabled(
bool enable );
233 bool popupMenuEnabled()
const;
241 void setCustomDatePainting(
const QDate &date,
const QColor &fgColor,
242 BackgroundMode bgMode = NoBgMode,
const QColor &bgColor = QColor() );
247 void unsetCustomDatePainting(
const QDate &date );
254 virtual int posFromDate(
const QDate &date );
260 virtual QDate dateFromPos(
int pos );
262 virtual void paintEvent( QPaintEvent *e );
267 virtual void mousePressEvent( QMouseEvent *e );
268 virtual void wheelEvent( QWheelEvent *e );
269 virtual void keyPressEvent( QKeyEvent *e );
270 virtual void focusInEvent( QFocusEvent *e );
271 virtual void focusOutEvent( QFocusEvent *e );
276 virtual bool event(QEvent *e);
305 Q_PRIVATE_SLOT( d,
void nextMonth() )
306 Q_PRIVATE_SLOT( d,
void previousMonth() )
307 Q_PRIVATE_SLOT( d,
void beginningOfMonth() )
308 Q_PRIVATE_SLOT( d,
void endOfMonth() )
309 Q_PRIVATE_SLOT( d,
void beginningOfWeek() )
310 Q_PRIVATE_SLOT( d,
void endOfWeek() )
313 class KDateTablePrivate;
314 friend class KDateTablePrivate;
315 KDateTablePrivate * const d;
317 void init( const QDate &date );
319 void paintCell( QPainter *painter,
int row,
int col, const
KColorScheme &colorScheme );
A set of methods used to work with colors.
void dateChanged(const QDate &cur, const QDate &old)
This function behaves essentially like the one above.
void aboutToShowContextMenu(KMenu *menu, const QDate &date)
A popup menu for a given date is about to be shown (as when the user right clicks on that date and th...
void dateChanged(const QDate &date)
The selected date changed.
void tableClicked()
A date has been selected by clicking on the table.
Validates user-entered dates.