kMyMoneyCalendar Class Reference

#include <kmymoneycalendar.h>

Inheritance diagram for kMyMoneyCalendar:

QFrame kMyMoneyScheduledCalendar
Collaboration diagram for kMyMoneyCalendar:

Collaboration graph

List of all members.


void dateChanged (QDate)
void dateSelected (QDate)
void dateEntered (QDate)
void tableClicked ()

Public Member Functions

 kMyMoneyCalendar (QWidget *parent=0, const char *name=0)
 ~kMyMoneyCalendar ()
void setType (kMyMoneyDateTbl::calendarType type)
kMyMoneyDateTbl::calendarType type (void) const
QSize sizeHint () const
bool setDate (const QDate &)
const QDate & getDate () const
const QDate & date () const
void setEnabled (bool)
void setFontSize (int)
int fontSize () const
void setCloseButton (bool enable)
bool hasCloseButton () const
virtual void setDateTable (kMyMoneyDateTbl *tbl)=0
void setUserButton1 (bool enable, QPushButton *pb)
void setUserButton2 (bool enable, QPushButton *pb)

Protected Slots

void dateChangedSlot (QDate)
void tableClickedSlot ()
void monthForwardClicked ()
void monthBackwardClicked ()
void yearForwardClicked ()
void yearBackwardClicked ()
void selectWeekClicked ()
void selectMonthClicked ()
void selectYearClicked ()
void lineEnterPressed ()
void slotSetStyleWeekly ()
void slotSetStyleMonthly ()
void slotSetStyleQuarterly ()

Protected Member Functions

virtual bool eventFilter (QObject *o, QEvent *e)
 to catch move keyEvents when QLineEdit has keyFocus
virtual void resizeEvent (QResizeEvent *)
 the resize event
virtual void virtual_hook (int id, void *data)
void init (const QDate &dt)

Protected Attributes

QPushButton * styleControl
 the style control button
QToolButton * yearForward
 the year forward button
QToolButton * yearBackward
 the year backward button
QToolButton * monthForward
 the month forward button
QToolButton * monthBackward
 the month backward button
QToolButton * selectMonth
 the button for selecting the month directly
QToolButton * selectYear
 the button for selecting the year directly
QLineEdit * line
 the line edit to enter the date directly
KDateValidator * val
 the validator for the line edit:
 the date table
QSize maxMonthRect
 the size calculated during resize events

Private Member Functions

int weekOfYear (QDate)

Private Attributes

int fontsize
 the font size for the widget
kMyMoneyCalendarPrivate *const d

Detailed Description

A representation of a calendar.

Michael Edwardes 2003

Constructor & Destructor Documentation

kMyMoneyCalendar::kMyMoneyCalendar ( QWidget parent = 0,
const char *  name = 0 

Standard constructor.

kMyMoneyCalendar::~kMyMoneyCalendar (  ) 

Standard destructor.

Member Function Documentation

void kMyMoneyCalendar::setType ( kMyMoneyDateTbl::calendarType  type  )  [inline]

Sets the calendar type.

kMyMoneyDateTbl::calendarType kMyMoneyCalendar::type ( void   )  const [inline]

Get the calendar type.

QSize kMyMoneyCalendar::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.

bool kMyMoneyCalendar::setDate ( const QDate &   ) 

Sets the date.

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

const QDate& kMyMoneyCalendar::getDate (  )  const

Returns the selected date.


const QDate& kMyMoneyCalendar::date (  )  const

the selected date.

void kMyMoneyCalendar::setEnabled ( bool   ) 

Enables or disables the widget.

void kMyMoneyCalendar::setFontSize ( int   ) 

Sets the font size of the widgets elements.

int kMyMoneyCalendar::fontSize (  )  const [inline]

Returns the font size of the widget elements.

void kMyMoneyCalendar::setCloseButton ( bool  enable  ) 

By calling this method with enable = true, KDatePicker will show a little close-button in the upper button-row. Clicking the close-button will cause the KDatePicker's topLevelWidget()'s close() method being called. This is mostly useful for toplevel datepickers without a window manager decoration.

See also:

bool kMyMoneyCalendar::hasCloseButton (  )  const

true if a KDatePicker shows a close-button.
See also:

virtual void kMyMoneyCalendar::setDateTable ( kMyMoneyDateTbl tbl  )  [pure virtual]

Dynamically set the Date Table

Implemented in kMyMoneyScheduledCalendar.

void kMyMoneyCalendar::setUserButton1 ( bool  enable,
QPushButton *  pb 

void kMyMoneyCalendar::setUserButton2 ( bool  enable,
QPushButton *  pb 

virtual bool kMyMoneyCalendar::eventFilter ( QObject o,
QEvent *  e 
) [protected, virtual]

virtual void kMyMoneyCalendar::resizeEvent ( QResizeEvent *   )  [protected, virtual]

void kMyMoneyCalendar::dateChangedSlot ( QDate   )  [protected, slot]

void kMyMoneyCalendar::tableClickedSlot (  )  [protected, slot]

void kMyMoneyCalendar::monthForwardClicked (  )  [protected, slot]

void kMyMoneyCalendar::monthBackwardClicked (  )  [protected, slot]

void kMyMoneyCalendar::yearForwardClicked (  )  [protected, slot]

void kMyMoneyCalendar::yearBackwardClicked (  )  [protected, slot]

void kMyMoneyCalendar::selectWeekClicked (  )  [protected, slot]


void kMyMoneyCalendar::selectMonthClicked (  )  [protected, slot]

void kMyMoneyCalendar::selectYearClicked (  )  [protected, slot]

void kMyMoneyCalendar::lineEnterPressed (  )  [protected, slot]

void kMyMoneyCalendar::slotSetStyleWeekly (  )  [protected, slot]

void kMyMoneyCalendar::slotSetStyleMonthly (  )  [protected, slot]

void kMyMoneyCalendar::slotSetStyleQuarterly (  )  [protected, slot]

void kMyMoneyCalendar::dateChanged ( QDate   )  [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:

void kMyMoneyCalendar::dateSelected ( QDate   )  [signal]

This signal is emitted each time a day has been selected by clicking on the table (hitting a day in the current month). It has the same meaning as dateSelected() in older versions of KDatePicker.

void kMyMoneyCalendar::dateEntered ( QDate   )  [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.

void kMyMoneyCalendar::tableClicked (  )  [signal]

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

virtual void kMyMoneyCalendar::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

void kMyMoneyCalendar::init ( const QDate &  dt  )  [protected]

int kMyMoneyCalendar::weekOfYear ( QDate   )  [private]

Member Data Documentation

QPushButton* kMyMoneyCalendar::styleControl [protected]

QToolButton* kMyMoneyCalendar::yearForward [protected]

QToolButton* kMyMoneyCalendar::yearBackward [protected]

QToolButton* kMyMoneyCalendar::monthForward [protected]

QToolButton* kMyMoneyCalendar::monthBackward [protected]

QToolButton* kMyMoneyCalendar::selectMonth [protected]

QToolButton* kMyMoneyCalendar::selectYear [protected]

QLineEdit* kMyMoneyCalendar::line [protected]

KDateValidator* kMyMoneyCalendar::val [protected]

QSize kMyMoneyCalendar::maxMonthRect [protected]

the widest month string in pixels:

kMyMoneyCalendarPrivate* const kMyMoneyCalendar::d [private]

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

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