OSB_GUI::MonthDays Class Reference

Inheritance diagram for OSB_GUI::MonthDays:

Inheritance graph
[legend]
Collaboration diagram for OSB_GUI::MonthDays:

Collaboration graph
[legend]
List of all members.

Detailed Description

Qt widget to display all days of a month.

Todo:
Allow for some more parametrization: colors, show current and selected date, allow selection ...

Definition at line 174 of file dateselect.h.

Public Types

Public Slots

Signals

Public Member Functions

Private Member Functions

Private Attributes

Static Private Attributes


Member Typedef Documentation

typedef DateSelect::SelectMode OSB_GUI::MonthDays::SelectMode

Date selection mode.

Definition at line 182 of file dateselect.h.


Constructor & Destructor Documentation

OSB_GUI::MonthDays::MonthDays ( const QDate &  date,
QWidget parent,
const char *  name = "monthDays_",
WFlags  f = 0 
)

Constructor with selected date and Qt arguments.

If date is not valid selected_ is set to the current date.


Member Function Documentation

void OSB_GUI::MonthDays::calcMonth (  )  [private]

Determine the column of the frist day of the month.

void OSB_GUI::MonthDays::calcWidth (  )  [private]

Determine the width of the widget.

bool OSB_GUI::MonthDays::cursorKey ( Qt::Key  key  )  [private]

Add days: wraps in the current month.

int OSB_GUI::MonthDays::day ( int  x,
int  y 
) [private]

Get clicked day from x- and y-coordinates.

QRect OSB_GUI::MonthDays::dayRect ( int  d,
bool  withBorder 
) [private]

Determine the rectangle for a day.

int OSB_GUI::MonthDays::height (  )  const

Total height.

void OSB_GUI::MonthDays::keyPressEvent ( QKeyEvent *  e  )  [private]

Process keys.

void OSB_GUI::MonthDays::mousePressEvent ( QMouseEvent *  e  )  [private]

Process left clicks.

void OSB_GUI::MonthDays::nextMonth (  )  [signal]

PageDown pressed: show next month.

void OSB_GUI::MonthDays::paintEvent ( QPaintEvent *   )  [private]

Paint the widget.

void OSB_GUI::MonthDays::polish (  )  [private]

Deferred initialisation (see Qt manual).

void OSB_GUI::MonthDays::prevMonth (  )  [signal]

PageUp pressed: show prev. month.

QDate OSB_GUI::MonthDays::selected (  )  const

Get the selected date, it may be null.

SelectMode OSB_GUI::MonthDays::selectMode (  )  const

Get the selection mode.

void OSB_GUI::MonthDays::setMonth ( int  m  )  [slot]

Set the month.

void OSB_GUI::MonthDays::setSelected ( const QDate &  date  ) 

Set the selected date.

void OSB_GUI::MonthDays::setSelectMode ( SelectMode  mode  ) 

Set the selection mode.

void OSB_GUI::MonthDays::setYear ( int  y  )  [slot]

Set the year.

void OSB_GUI::MonthDays::setYearMonth ( const QDate &  date  )  [private]

Set displayed year and month.

void OSB_GUI::MonthDays::showCurrent ( QPainter &  p  )  [private]

Show the current date.

void OSB_GUI::MonthDays::showSelected ( QPainter &  p  )  [private]

Show the selected date.

bool OSB_GUI::MonthDays::showSelected (  )  const

Show selected date?

The return value depends on mode_.

QRect OSB_GUI::MonthDays::wdayRect ( int  wd,
bool  withBorder 
) [private]

Determine the rectangle needed for the weekdays header.

int OSB_GUI::MonthDays::width (  )  const

Total width.


Member Data Documentation

QDate OSB_GUI::MonthDays::curMonthYear_ [private]

Currently displayed month and year (day is not relevant).

Definition at line 254 of file dateselect.h.

int OSB_GUI::MonthDays::dayHeight_ [private]

Height of 1 day.

Definition at line 270 of file dateselect.h.

int OSB_GUI::MonthDays::dayWidth_ [private]

Width of 1 day.

Definition at line 268 of file dateselect.h.

const int OSB_GUI::MonthDays::dh_ = 0 [static, private]

Border height.

Definition at line 179 of file dateselect.h.

const int OSB_GUI::MonthDays::dw_ = 2 [static, private]

Border width.

Definition at line 177 of file dateselect.h.

int OSB_GUI::MonthDays::firstDay_ [private]

Column of the months first day.

Definition at line 276 of file dateselect.h.

SelectMode OSB_GUI::MonthDays::mode_ [private]

Selection mode.

Definition at line 256 of file dateselect.h.

int OSB_GUI::MonthDays::numRows_ [private]

Number of needed rows.

Definition at line 278 of file dateselect.h.

QDate OSB_GUI::MonthDays::selected_ [private]

The selected date.

Definition at line 258 of file dateselect.h.

int OSB_GUI::MonthDays::selectedDay_ [private]

The selected day.

This member is needed to remember the selected day while changing the months: it allows to go from 30-Jan to 30-Mar via 28-Feb.

Definition at line 266 of file dateselect.h.

int OSB_GUI::MonthDays::wdayHeight_ [private]

Height of 1 weekday.

Definition at line 274 of file dateselect.h.

int OSB_GUI::MonthDays::wdayWidth_ [private]

Width of 1 weekday.

Definition at line 272 of file dateselect.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:18:39 2006 for OSB Library by  doxygen 1.4.7