kplato

#include <kptcalendarpanel.h>

Signals

void dateChanged (TQDate)
void dateSelected (TQDate)
void dateEntered (TQDate)
void tableClicked ()
void weekSelected (int week, int year)
void weekdaySelected (int day)
void selectionCleared ()

Public Member Functions

 CalendarPanel (TQWidget *parent=0, TQDate=TQDate::currentDate(), const char *name=0, WFlags f=0)
 CalendarPanel (TQWidget *parent, const char *name)
virtual ~CalendarPanel ()
TQSize sizeHint () const
TQSize minimumSizeHint () const
bool setDate (const TQDate &)
const TQDate & getDate () const
const TQDate & date () const
void setEnabled (bool)
void setFontSize (int)
int fontSize () const
void setCloseButton (bool enable)
bool hasCloseButton () const
void setCalendar (Calendar *cal)
DateMap selectedDates ()
IntMap selectedWeekdays ()
WeekMap selectedWeeks ()
DateMap markedDates ()
IntMap markedWeekdays ()
WeekMap markedWeeks ()
void clear ()
void markSelected (int state)

Protected Slots

void dateChangedSlot (TQDate)
void tableClickedSlot ()
void monthForwardClicked ()
void monthBackwardClicked ()
void yearForwardClicked ()
void yearBackwardClicked ()
void selectWeekClicked ()
void selectMonthClicked ()
void selectYearClicked ()
void lineEnterPressed ()
void slotWeekdaySelected (int day)
void slotWeekSelected (int week, int year)
void slotSelectionCleared ()

Protected Member Functions

virtual bool eventFilter (TQObject *o, TQEvent *e)
virtual void resizeEvent (TQResizeEvent *)
virtual void virtual_hook (int id, void *data)

Protected Attributes

TQToolButton * yearForward
TQToolButton * yearBackward
TQToolButton * monthForward
TQToolButton * monthBackward
TQToolButton * selectMonth
TQToolButton * selectYear
TQLineEdit * line
DateValidator * val
DateTable * table
TQSize maxMonthRect

Detailed Description

Provides a widget for calendar input.

Definition at line 46 of file kptcalendarpanel.h.

Constructor & Destructor Documentation

◆ CalendarPanel() [1/2]

KPlato::CalendarPanel::CalendarPanel ( TQWidget * parent = 0,
TQDate dt = TQDate::currentDate(),
const char * name = 0,
WFlags f = 0 )

The usual constructor.

The given date will be displayed initially.

Definition at line 59 of file kptcalendarpanel.cpp.

◆ CalendarPanel() [2/2]

KPlato::CalendarPanel::CalendarPanel ( TQWidget * parent,
const char * name )

Standard tqt widget constructor.

The initial date will be the current date.

Definition at line 65 of file kptcalendarpanel.cpp.

◆ ~CalendarPanel()

KPlato::CalendarPanel::~CalendarPanel ( )
virtual

The destructor.

Definition at line 122 of file kptcalendarpanel.cpp.

Member Function Documentation

◆ clear()

void KPlato::CalendarPanel::clear ( )

Definition at line 585 of file kptcalendarpanel.cpp.

◆ date()

const TQDate & KPlato::CalendarPanel::date ( ) const
Returns
the selected date.

Definition at line 233 of file kptcalendarpanel.cpp.

◆ dateChanged

void KPlato::CalendarPanel::dateChanged ( TQDate )
signal

This signal is emitted each time the selected date is changed.

Usually, this does not mean that the date has been entered, since the date also changes, for example, when another month is selected.

See also
dateSelected

◆ dateChangedSlot

void KPlato::CalendarPanel::dateChangedSlot ( TQDate date)
protectedslot

Definition at line 208 of file kptcalendarpanel.cpp.

◆ dateEntered

void KPlato::CalendarPanel::dateEntered ( TQDate )
signal

This signal is emitted when enter is pressed and a VALID date has been entered before into the line edit.

Connect to both dateEntered() and dateSelected() to receive all events where the user really enters a date.

◆ dateSelected

void KPlato::CalendarPanel::dateSelected ( TQDate )
signal

This signal is emitted each time a day has been selected by clicking on the table (hitting a day in the current month).

◆ eventFilter()

bool KPlato::CalendarPanel::eventFilter ( TQObject * o,
TQEvent * e )
protectedvirtual

to catch move keyEvents when TQLineEdit has keyFocus

Definition at line 128 of file kptcalendarpanel.cpp.

◆ fontSize()

int KPlato::CalendarPanel::fontSize ( ) const
inline

Returns the font size of the widget elements.

Definition at line 110 of file kptcalendarpanel.h.

◆ getDate()

const TQDate & KPlato::CalendarPanel::getDate ( ) const

Returns the selected date.

Deprecated

Definition at line 227 of file kptcalendarpanel.cpp.

◆ hasCloseButton()

bool KPlato::CalendarPanel::hasCloseButton ( ) const
Returns
true if a CalendarPanel shows a close-button.
See also
setCloseButton

Definition at line 503 of file kptcalendarpanel.cpp.

◆ lineEnterPressed

void KPlato::CalendarPanel::lineEnterPressed ( )
protectedslot

Definition at line 396 of file kptcalendarpanel.cpp.

◆ markedDates()

DateMap KPlato::CalendarPanel::markedDates ( )

Definition at line 577 of file kptcalendarpanel.cpp.

◆ markedWeekdays()

IntMap KPlato::CalendarPanel::markedWeekdays ( )

Definition at line 581 of file kptcalendarpanel.cpp.

◆ markSelected()

void KPlato::CalendarPanel::markSelected ( int state)

Definition at line 590 of file kptcalendarpanel.cpp.

◆ minimumSizeHint()

TQSize KPlato::CalendarPanel::minimumSizeHint ( ) const
inline

Definition at line 78 of file kptcalendarpanel.h.

◆ monthBackwardClicked

void KPlato::CalendarPanel::monthBackwardClicked ( )
protectedslot

Definition at line 264 of file kptcalendarpanel.cpp.

◆ monthForwardClicked

void KPlato::CalendarPanel::monthForwardClicked ( )
protectedslot

Definition at line 258 of file kptcalendarpanel.cpp.

◆ resizeEvent()

void KPlato::CalendarPanel::resizeEvent ( TQResizeEvent * )
protectedvirtual

the resize event

Definition at line 147 of file kptcalendarpanel.cpp.

◆ selectedDates()

DateMap KPlato::CalendarPanel::selectedDates ( )

Definition at line 569 of file kptcalendarpanel.cpp.

◆ selectedWeekdays()

IntMap KPlato::CalendarPanel::selectedWeekdays ( )

Definition at line 573 of file kptcalendarpanel.cpp.

◆ selectionCleared

void KPlato::CalendarPanel::selectionCleared ( )
signal

All selections have been cleared.

◆ selectMonthClicked

void KPlato::CalendarPanel::selectMonthClicked ( )
protectedslot

Definition at line 319 of file kptcalendarpanel.cpp.

◆ selectWeekClicked

void KPlato::CalendarPanel::selectWeekClicked ( )
protectedslot

Definition at line 282 of file kptcalendarpanel.cpp.

◆ selectYearClicked

void KPlato::CalendarPanel::selectYearClicked ( )
protectedslot

Definition at line 349 of file kptcalendarpanel.cpp.

◆ setCalendar()

void KPlato::CalendarPanel::setCalendar ( Calendar * cal)

Definition at line 551 of file kptcalendarpanel.cpp.

◆ setCloseButton()

void KPlato::CalendarPanel::setCloseButton ( bool enable)

By calling this method with enable = true, CalendarPanel will show a little close-button in the upper button-row.

Clicking the close-button will cause the CalendarPanel's topLevelWidget()'s close() method being called. This is mostly useful for toplevel datepickers without a window manager decoration.

See also
hasCloseButton

Definition at line 483 of file kptcalendarpanel.cpp.

◆ setDate()

bool KPlato::CalendarPanel::setDate ( const TQDate & date)

Sets the date.

Returns
false and does not change anything if the date given is invalid.

Definition at line 239 of file kptcalendarpanel.cpp.

◆ setEnabled()

void KPlato::CalendarPanel::setEnabled ( bool enable)

Enables or disables the widget.

Definition at line 379 of file kptcalendarpanel.cpp.

◆ setFontSize()

void KPlato::CalendarPanel::setFontSize ( int s)

Sets the font size of the widgets elements.

Definition at line 450 of file kptcalendarpanel.cpp.

◆ sizeHint()

TQSize KPlato::CalendarPanel::sizeHint ( ) const

The size hint for date pickers.

The size hint recommends the minimum size of the widget so that all elements may be placed without clipping. This sometimes looks ugly, so when using the size hint, try adding 28 to each of the reported numbers of pixels.

Definition at line 412 of file kptcalendarpanel.cpp.

◆ slotSelectionCleared

void KPlato::CalendarPanel::slotSelectionCleared ( )
protectedslot

Definition at line 594 of file kptcalendarpanel.cpp.

◆ slotWeekdaySelected

void KPlato::CalendarPanel::slotWeekdaySelected ( int day)
protectedslot

Definition at line 541 of file kptcalendarpanel.cpp.

◆ slotWeekSelected

void KPlato::CalendarPanel::slotWeekSelected ( int week,
int year )
protectedslot

Definition at line 546 of file kptcalendarpanel.cpp.

◆ tableClicked

void KPlato::CalendarPanel::tableClicked ( )
signal

This signal is emitted when the day has been selected by clicking on it in the table.

◆ tableClickedSlot

void KPlato::CalendarPanel::tableClickedSlot ( )
protectedslot

Definition at line 219 of file kptcalendarpanel.cpp.

◆ virtual_hook()

void KPlato::CalendarPanel::virtual_hook ( int id,
void * data )
protectedvirtual

Definition at line 598 of file kptcalendarpanel.cpp.

◆ yearBackwardClicked

void KPlato::CalendarPanel::yearBackwardClicked ( )
protectedslot

Definition at line 276 of file kptcalendarpanel.cpp.

◆ yearForwardClicked

void KPlato::CalendarPanel::yearForwardClicked ( )
protectedslot

Definition at line 270 of file kptcalendarpanel.cpp.

Member Data Documentation

◆ line

TQLineEdit* KPlato::CalendarPanel::line
protected

the line edit to enter the date directly

Definition at line 161 of file kptcalendarpanel.h.

◆ maxMonthRect

TQSize KPlato::CalendarPanel::maxMonthRect
protected

Definition at line 167 of file kptcalendarpanel.h.

◆ monthBackward

TQToolButton* KPlato::CalendarPanel::monthBackward
protected

the month backward button

Definition at line 155 of file kptcalendarpanel.h.

◆ monthForward

TQToolButton* KPlato::CalendarPanel::monthForward
protected

the month forward button

Definition at line 153 of file kptcalendarpanel.h.

◆ selectMonth

TQToolButton* KPlato::CalendarPanel::selectMonth
protected

the button for selecting the month directly

Definition at line 157 of file kptcalendarpanel.h.

◆ selectYear

TQToolButton* KPlato::CalendarPanel::selectYear
protected

the button for selecting the year directly

Definition at line 159 of file kptcalendarpanel.h.

◆ table

DateTable* KPlato::CalendarPanel::table
protected

the date table

Definition at line 165 of file kptcalendarpanel.h.

◆ val

DateValidator* KPlato::CalendarPanel::val
protected

the validator for the line edit:

Definition at line 163 of file kptcalendarpanel.h.

◆ yearBackward

TQToolButton* KPlato::CalendarPanel::yearBackward
protected

the year backward button

Definition at line 151 of file kptcalendarpanel.h.

◆ yearForward

TQToolButton* KPlato::CalendarPanel::yearForward
protected

the year forward button

Definition at line 149 of file kptcalendarpanel.h.


The documentation for this class was generated from the following files: