24#ifndef KPTCALENDARPANEL_H
25#define KPTCALENDARPANEL_H
29#include <tqdatetime.h>
57 CalendarPanel(TQWidget *parent=0, TQDate=TQDate::currentDate(),
const char *name=0, WFlags f=0);
78 TQSize minimumSizeHint()
const {
return sizeHint(); }
96 const TQDate &
date()
const;
131 DateMap selectedDates();
132 IntMap selectedWeekdays();
133 WeekMap selectedWeeks();
135 DateMap markedDates();
136 IntMap markedWeekdays();
137 WeekMap markedWeeks();
141 void markSelected(
int state);
145 virtual bool eventFilter(TQObject *o, TQEvent *e );
170 void dateChangedSlot(TQDate);
171 void tableClickedSlot();
172 void monthForwardClicked();
173 void monthBackwardClicked();
174 void yearForwardClicked();
175 void yearBackwardClicked();
176 void selectWeekClicked();
177 void selectMonthClicked();
178 void selectYearClicked();
179 void lineEnterPressed();
181 void slotWeekdaySelected(
int day);
182 void slotWeekSelected(
int week,
int year);
183 void slotSelectionCleared();
208 void weekSelected(
int week,
int year);
209 void weekdaySelected(
int day);
219 bool m_selectedDays[7];
222 virtual void virtual_hook(
int id,
void* data );
224 void init(
const TQDate &dt );
225 class CalendarPanelPrivate;
226 CalendarPanelPrivate *d;
228 int weekOfYear(TQDate);
TQSize sizeHint() const
The size hint for date pickers.
void setCloseButton(bool enable)
By calling this method with enable = true, CalendarPanel will show a little close-button in the upper...
void setFontSize(int)
Sets the font size of the widgets elements.
CalendarPanel(TQWidget *parent=0, TQDate=TQDate::currentDate(), const char *name=0, WFlags f=0)
The usual constructor.
bool hasCloseButton() const
const TQDate & date() const
virtual void resizeEvent(TQResizeEvent *)
the resize event
virtual ~CalendarPanel()
The destructor.
TQToolButton * monthForward
the month forward button
TQLineEdit * line
the line edit to enter the date directly
void dateSelected(TQDate)
This signal is emitted each time a day has been selected by clicking on the table (hitting a day in t...
TQToolButton * selectMonth
the button for selecting the month directly
int fontSize() const
Returns the font size of the widget elements.
void dateEntered(TQDate)
This signal is emitted when enter is pressed and a VALID date has been entered before into the line e...
TQToolButton * yearBackward
the year backward button
TQToolButton * selectYear
the button for selecting the year directly
bool setDate(const TQDate &)
Sets the date.
TQToolButton * yearForward
the year forward button
const TQDate & getDate() const
Returns the selected date.
void setEnabled(bool)
Enables or disables the widget.
virtual bool eventFilter(TQObject *o, TQEvent *e)
to catch move keyEvents when TQLineEdit has keyFocus
void dateChanged(TQDate)
This signal is emitted each time the selected date is changed.
TQToolButton * monthBackward
the month backward button
DateTable * table
the date table
void tableClicked()
This signal is emitted when the day has been selected by clicking on it in the table.
DateValidator * val
the validator for the line edit:
void selectionCleared()
All selections have been cleared.
Calendar defines the working and nonworking days and hours.
Validates user-entered dates.