Wt
3.2.1
|
A calendar. More...
#include <Wt/Ext/Calendar>
Public Member Functions | |
Calendar (bool i18n=false, WContainerWidget *parent=0) | |
Create a new calendar. | |
void | select (const WDate &date) |
Select a date. | |
const std::set< WDate > & | selection () const |
Get the current selection. | |
Signal< void > & | selectionChanged () |
Signal emitted when the user changes the selection. | |
Signal< void > & | selected () |
Signal emitted when the user has selected a date. |
A calendar.
The calendar provides navigation by month and year, and indicates the current day.
The calendar only allows selection of a single day, and you may listen for when the user selects a new date using the selected() signal.
The API is a subset of the WCalendar API:
Here is a snapshot taken on 01/09/2007 (shown as today), and 12/09/2007 currently selected.
Wt::Ext::Calendar::Calendar | ( | bool | i18n = false , |
WContainerWidget * | parent = 0 |
||
) |
Create a new calendar.
Constructs a new calendar, with optional support for internationalization. The calendar shows the current day, and has an empty selection.
void Wt::Ext::Calendar::select | ( | const WDate & | date | ) |
Select a date.
Select one date.
Signal<void>& Wt::Ext::Calendar::selected | ( | ) |
Signal emitted when the user has selected a date.
This signal indicates that the user has selected a new date, which is only available when in single selection mode.
const std::set<WDate>& Wt::Ext::Calendar::selection | ( | ) | const |
Get the current selection.
Returns the set of dates currently selected. This set contains 0 or 1 dates.
Signal<void>& Wt::Ext::Calendar::selectionChanged | ( | ) |
Signal emitted when the user changes the selection.
Emitted after the user has changed the current selection, before the selected() signal is emitted.