kMyMoneyDateTbl Class Reference

#include <kmymoneydatetbl.h>

Inheritance diagram for kMyMoneyDateTbl:

QGridView kMyMoneyScheduledDateTbl
Collaboration diagram for kMyMoneyDateTbl:

Collaboration graph

List of all members.

Public Types

enum  calendarType { WEEKLY, MONTHLY, QUARTERLY }


void dateChanged (QDate)
void tableClicked ()
virtual void hoverDate (QDate)

Public Member Functions

 kMyMoneyDateTbl (QWidget *parent=0, QDate date=QDate::currentDate(), const char *name=0, WFlags f=0)
virtual QSize sizeHint () const
virtual void setFontSize (int size)
virtual bool setDate (const QDate &)
virtual const QDate & getDate () const
virtual void setType (calendarType type)
virtual calendarType type (void) const

Protected Member Functions

virtual void paintCell (QPainter *, int, int)
virtual void viewportResizeEvent (QResizeEvent *)
virtual void contentsMouseReleaseEvent (QMouseEvent *)
virtual void wheelEvent (QWheelEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void focusInEvent (QFocusEvent *e)
virtual void focusOutEvent (QFocusEvent *e)
virtual void drawCellContents (QPainter *painter, int row, int col, const QDate &theDate)=0
virtual void contentsMouseMoveEvent (QMouseEvent *e)

Protected Attributes

int fontsize
QDate date
int firstday
int numdays
int numDaysPrevMonth
bool unused_hasSelection
QRect maxCell
calendarType m_type
int m_colCount
int m_rowCount
QDate m_drawDateOrig

Private Member Functions

int weekNumber (const QDate &, int *yr) const

Detailed Description

Michael Edwardes

Member Enumeration Documentation


Constructor & Destructor Documentation

kMyMoneyDateTbl::kMyMoneyDateTbl ( QWidget parent = 0,
QDate  date = QDate::currentDate(),
const char *  name = 0,
WFlags  f = 0 

The constructor.

Member Function Documentation

virtual QSize kMyMoneyDateTbl::sizeHint (  )  const [virtual]

Returns a recommended size for the widget. To save some time, the size of the largest used cell content is calculated in each paintCell() call, since all calculations have to be done there anyway. The size is stored in maxCell. The sizeHint() simply returns a multiple of maxCell.

virtual void kMyMoneyDateTbl::setFontSize ( int  size  )  [virtual]

Set the font size of the date table.

virtual bool kMyMoneyDateTbl::setDate ( const QDate &   )  [virtual]

Select and display this date.

virtual const QDate& kMyMoneyDateTbl::getDate (  )  const [virtual]

virtual void kMyMoneyDateTbl::setType ( calendarType  type  )  [virtual]

virtual calendarType kMyMoneyDateTbl::type ( void   )  const [inline, virtual]

void kMyMoneyDateTbl::dateChanged ( QDate   )  [signal]

The selected date changed.

void kMyMoneyDateTbl::tableClicked (  )  [signal]

A date has been selected by clicking on the table.

virtual void kMyMoneyDateTbl::hoverDate ( QDate   )  [virtual, signal]

virtual void kMyMoneyDateTbl::paintCell ( QPainter *  ,
int  ,
) [protected, virtual]

Paint a cell.

virtual void kMyMoneyDateTbl::viewportResizeEvent ( QResizeEvent *   )  [protected, virtual]

Handle the resize events.

virtual void kMyMoneyDateTbl::contentsMouseReleaseEvent ( QMouseEvent *   )  [protected, virtual]

React on mouse clicks that select a date.

virtual void kMyMoneyDateTbl::wheelEvent ( QWheelEvent *  e  )  [protected, virtual]

virtual void kMyMoneyDateTbl::keyPressEvent ( QKeyEvent *  e  )  [protected, virtual]

virtual void kMyMoneyDateTbl::focusInEvent ( QFocusEvent *  e  )  [protected, virtual]

virtual void kMyMoneyDateTbl::focusOutEvent ( QFocusEvent *  e  )  [protected, virtual]

virtual void kMyMoneyDateTbl::drawCellContents ( QPainter *  painter,
int  row,
int  col,
const QDate &  theDate 
) [protected, pure virtual]

Implemented in kMyMoneyScheduledDateTbl.

virtual void kMyMoneyDateTbl::contentsMouseMoveEvent ( QMouseEvent *  e  )  [protected, virtual]

Reimplemented in kMyMoneyScheduledDateTbl.

int kMyMoneyDateTbl::weekNumber ( const QDate &  ,
int *  yr 
) const [private]

Member Data Documentation

int kMyMoneyDateTbl::fontsize [protected]

The font size of the displayed text.

QDate kMyMoneyDateTbl::date [protected]

The currently selected date.

int kMyMoneyDateTbl::firstday [protected]

The day of the first day in the month [1..7].

int kMyMoneyDateTbl::numdays [protected]

The number of days in the current month.

The number of days in the previous month.

unused ### remove in KDE 4.0

QRect kMyMoneyDateTbl::maxCell [protected]

Save the size of the largest used cell content.

Type related variables

int kMyMoneyDateTbl::m_colCount [protected]

int kMyMoneyDateTbl::m_rowCount [protected]

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

Generated on Wed Jan 26 13:07:59 2011 for KMyMoney by  doxygen 1.5.6