sptk2 logo
SPTK Home Page

sptk::CDateIntervalInput Class Reference
[GUI Classes]

Date interval input widget. More...

#include <CDateIntervalInput.h>

Inheritance diagram for sptk::CDateIntervalInput:

sptk::CInput sptk::CControl sptk::CLayoutClient

List of all members.

Public Member Functions

 CDateIntervalInput (const char *label=0, int layoutSize=10, CLayoutAlign layoutAlign=SP_ALIGN_TOP)
 Constructor in SPTK style.
void separator (std::string s)
 Sets the separator to display between date inputs.
std::string separator ()
 Returns the separator between date inputs.
CDateTime beginOfInterval () const
 Returns the date from the first date input - the beginning of interval.
void beginOfInterval (const CDateTime dt)
 Sets the date in the first date input - the beginning of interval.
CDateTime endOfInterval () const
 Returns the date from the second date input - the end of interval.
void endOfInterval (const CDateTime dt)
virtual CControlKind kind () const
 Returns the control kind, SPTK-style RTTI.
virtual std::string className () const
 Returns the control class name, SPTK-style RTTI.
virtual CVariant data () const
 Universal data connection, returns data from control.
virtual void data (const CVariant v)
 Universal data connection, sets data from control.
virtual void resize (int x, int y, int w, int h)
 Resizes the control and inside widgets.
virtual bool valid () const
 Returns true if the control state is valid, and the data is inside the limits if applicable.

Static Public Member Functions

static CLayoutClientcreator (CXmlNode *node)
 Creates a widget based on the XML node information.

Protected Member Functions

void showCalendar (Fl_Widget *btn)
 Shows drop-down calendar for the particular date input that owns the button btn.


Detailed Description

Date interval input widget.

Masked date interval input with the drop-down calendar


Constructor & Destructor Documentation

sptk::CDateIntervalInput::CDateIntervalInput ( const char *  label = 0,
int  layoutSize = 10,
CLayoutAlign  layoutAlign = SP_ALIGN_TOP 
)

Constructor in SPTK style.

Parameters:
label const char *, label
layoutSize int, widget align in layout
layoutAlign CLayoutAlign, widget align in layout


Member Function Documentation

void sptk::CDateIntervalInput::beginOfInterval ( const CDateTime  dt  ) 

Sets the date in the first date input - the beginning of interval.

Parameters:
dt const CDateTime, date and time value for the first control

void sptk::CDateIntervalInput::endOfInterval ( const CDateTime  dt  ) 

Sets the date from the second date input - the end of interval

Parameters:
dt const CDateTime, date and time value for the second control

virtual CControlKind sptk::CDateIntervalInput::kind (  )  const [inline, virtual]

Returns the control kind, SPTK-style RTTI.

See also:
CControlKind for more information

Reimplemented from sptk::CInput.

References sptk::DCV_DATEINTERVAL.

virtual void sptk::CDateIntervalInput::resize ( int  x,
int  y,
int  w,
int  h 
) [virtual]

Resizes the control and inside widgets.

Parameters:
x int, x-position
y int, y-position
w int, width
h int, height

Reimplemented from sptk::CControl.

void sptk::CDateIntervalInput::separator ( std::string  s  ) 

Sets the separator to display between date inputs.

Parameters:
s std::string, separator value

void sptk::CDateIntervalInput::showCalendar ( Fl_Widget *  btn  )  [protected]

Shows drop-down calendar for the particular date input that owns the button btn.

Parameters:
btn Fl_Widget *, button of the date input widget


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

Mon Mar 5 11:56:11 2012: SPTK 3.5.7