25 #include <tqvalidator.h>
26 #include <tqgridview.h>
27 #include <tqlineedit.h>
28 #include <tqdatetime.h>
31 #include <tdelibs_export.h>
47 void weekEnteredSlot();
48 void setMaxWeek(
int max);
54 void setWeek(
int week);
57 class KDateInternalWeekPrivate;
58 KDateInternalWeekPrivate *d;
101 TQSize sizeHint()
const;
106 int getResult()
const;
111 void setupPainter(TQPainter *p);
115 virtual void viewportResizeEvent(TQResizeEvent*);
119 virtual void paintCell(TQPainter* painter,
int row,
int col);
123 virtual void contentsMousePressEvent(TQMouseEvent *e);
124 virtual void contentsMouseMoveEvent(TQMouseEvent *e);
128 virtual void contentsMouseReleaseEvent(TQMouseEvent *e);
131 class KDateInternalMonthPrivate;
132 KDateInternalMonthPrivate *d;
147 void yearEnteredSlot();
153 void setYear(
int year);
156 class KDateInternalYearPrivate;
157 KDateInternalYearPrivate *d;
177 virtual void keyPressEvent(TQKeyEvent* e);
209 void setMainWidget(TQWidget* m);
214 virtual void resizeEvent(TQResizeEvent*);
218 void popup(
const TQPoint &pos);
226 int exec(
int x,
int y);
230 virtual bool close(
bool alsoDelete) {
return TQFrame::close(alsoDelete); }
232 virtual void virtual_hook(
int id,
void* data );
234 class TDEPopupFramePrivate;
235 TDEPopupFramePrivate *d;
245 virtual State validate(TQString&,
int&)
const;
246 virtual void fixup ( TQString & input )
const;
247 State date(
const TQString&, TQDate&)
const;
266 TQ_PROPERTY( TQDate date READ getDate WRITE setDate )
267 TQ_PROPERTY(
bool popupMenu READ popupMenuEnabled WRITE setPopupMenuEnabled )
273 KDateTable(TQWidget *parent=0, TQDate date=TQDate::currentDate(),
274 const char* name=0, WFlags f=0);
280 KDateTable(TQWidget *parent,
const char* name, WFlags f=0);
294 virtual TQSize sizeHint()
const;
298 void setFontSize(
int size);
302 bool setDate(
const TQDate&);
304 const TQDate& getDate()
const;
314 void setPopupMenuEnabled(
bool enable );
319 bool popupMenuEnabled()
const;
321 enum BackgroundMode { NoBgMode=0, RectangleMode, CircleMode };
329 void setCustomDatePainting(
const TQDate &date,
const TQColor &fgColor, BackgroundMode bgMode=NoBgMode,
const TQColor &bgColor=TQColor());
336 void unsetCustomDatePainting(
const TQDate &date );
342 int posFromDate(
const TQDate &date );
347 TQDate dateFromPos(
int pos );
352 virtual void paintCell(TQPainter*,
int,
int);
357 virtual void paintEmptyArea(TQPainter*,
int,
int,
int,
int);
362 virtual void viewportResizeEvent(TQResizeEvent *);
366 virtual void contentsMousePressEvent(TQMouseEvent *);
367 virtual void wheelEvent( TQWheelEvent * e );
368 virtual void keyPressEvent( TQKeyEvent *e );
369 virtual void focusInEvent( TQFocusEvent *e );
370 virtual void focusOutEvent( TQFocusEvent *e );
408 void dateChanged(TQDate);
415 void dateChanged(
const TQDate& cur,
const TQDate& old);
428 void aboutToShowContextMenu(
TDEPopupMenu * menu,
const TQDate &date);
432 void previousMonth();
433 void beginningOfMonth();
435 void beginningOfWeek();
439 virtual void virtual_hook(
int id,
void* data );
441 class KDateTablePrivate;
442 KDateTablePrivate *d;
int numdays
The number of days in the current month.
int result
Store the month that has been clicked [1..12].
A table containing month names.
short int activeCol
the cell under mouse cursor when LBM is pressed
int numDaysPrevMonth
The number of days in the previous month.
TQDate date
The currently selected date.
TQRect max
Contains the largest rectangle needed by the month names.
TQRect maxCell
Save the size of the largest used cell content.
Validates user-entered dates.
int firstday
The day of the first day in the month [1..7].
bool unused_hasSelection
unused remove in KDE 4.0
int fontsize
The font size of the displayed text.