Referencia de la Clase QmcDateNav
Date Navigation Widget.
Más...
#include <qmcdatenav.h>
Diagrama de herencias de QmcDateNav
[leyenda]Diagrama de colaboración para QmcDateNav:[leyenda]Lista de todos los miembros.
|
Slots públicos |
void | forceUpdate () |
void | forceUpdate () |
Señales |
void | dateChanged () |
void | yearChanged (int) |
void | close () |
void | dateChanged () |
void | yearChanged (int) |
void | close () |
Métodos públicos |
| QmcDateNav (class QWidget *parent=0, const char *name=0) |
| Default Constructor.
|
| QmcDateNav (const class QDate &, class QWidget *parent=0, const char *name=0) |
| Alternate Constructor.
|
| ~QmcDateNav () |
| Destructor.
|
virtual QSizePolicy | sizePolicy () const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
bool | frame () const |
void | setFrame (bool) |
QPtrList< QDate > | selectedDates () const |
bool | setDate (const QDate d) |
bool | outlook () const |
void | setOutlook (bool) |
void | installEventDayList (QPtrList< QDate > *) |
void | removeEventDayList () |
void | installNonWorkingDayList (QPtrList< QDate > *) |
void | removeNonWorkingDayList () |
| QmcDateNav (class QWidget *parent=0, const char *name=0) |
| QmcDateNav (const class QDate &, class QWidget *parent=0, const char *name=0) |
| ~QmcDateNav () |
virtual QSizePolicy | sizePolicy () const |
virtual QSize | sizeHint () const |
virtual QSize | minimumSizeHint () const |
bool | frame () const |
void | setFrame (bool) |
QPtrList< QDate > | selectedDates () const |
bool | setDate (const QDate d) |
bool | outlook () const |
void | setOutlook (bool) |
void | installEventDayList (QPtrList< QDate > *) |
void | removeEventDayList () |
void | installNonWorkingDayList (QPtrList< QDate > *) |
void | removeNonWorkingDayList () |
Métodos protegidos |
virtual void | paintEvent (QPaintEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | paintEvent (QPaintEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
Slots privados |
void | monthMenuClicked (int) |
void | rbMenuClicked (int) |
void | monthMenuClicked (int) |
void | rbMenuClicked (int) |
Métodos privados |
void | init () |
void | makePixmap () |
void | drawArrows (QPainter &) |
QRect * | drawCaptionText (QPainter &) |
void | drawCaption (QPainter &) |
void | drawFrame (QPainter &) |
void | drawDays (QPainter &) |
void | drawDates (QPainter &) |
void | drawSelectedDate (int, bool pe=false) |
void | undrawSelectedDate (int) |
int | numSelected () |
void | drawToday (int) |
void | drawSelections () |
void | clear () |
void | changeMonth (bool forward, int steps) |
QString | monthName (int) |
int | fixDays (int, int, int) |
void | prepPopup () |
void | prepRBPopup () |
bool | hasEvent (const QDate &) |
bool | isNonWorkingDay (const QDate &) |
int | findIndex (QRect &) |
int | findIndex (QDate &) |
void | init () |
void | makePixmap () |
void | drawArrows (QPainter &) |
QRect * | drawCaptionText (QPainter &) |
void | drawCaption (QPainter &) |
void | drawFrame (QPainter &) |
void | drawDays (QPainter &) |
void | drawDates (QPainter &) |
void | drawSelectedDate (int, bool pe=false) |
void | undrawSelectedDate (int) |
int | numSelected () |
void | drawToday (int) |
void | drawSelections () |
void | clear () |
void | changeMonth (bool forward, int steps) |
QString | monthName (int) |
int | fixDays (int, int, int) |
void | prepPopup () |
void | prepRBPopup () |
bool | hasEvent (const QDate &) |
bool | isNonWorkingDay (const QDate &) |
int | findIndex (QRect &) |
int | findIndex (QDate &) |
Atributos privados |
QDate | currentMonth |
QPopupMenu * | sevenMonthPopup |
QPopupMenu * | rbPopup |
bool | pmDirty |
bool | doFrame |
QPixmap * | pm |
QPopupMenu * | sevenMonthPopup |
QPopupMenu * | rbPopup |
QPixmap * | pm |
Descripción detallada
Date Navigation Widget.
The QmcDateNav widget is visually similar to the calendar navigation widgets found in many popular PIMs.
Currently the widget is quite simple, with constructors to create a widget with either the current date selected or a specific date selected, and methods to retrieve a list of all dates selected or set the selected date.
A signal is emitted whenever the selection changes so that you can retrieve the selection list and your application can react to that data.
Non-Working Days and Event Days
A PIM application generally displays days that have events or are non-working days (such as weekends) in either a different font or colour.
QmcDateNav paints non-working days with an italic font face, and days containing event with a bold font face.
Event days and non-working days are two areas that will almost definitely cause headaches and grey hairs for an application developer.
The grey area that tends to cause confusion is the ownership and maintenance of the lists of non-working and event days. QmcDateNav assigns this responsibility solely to the application writer, and provides hooks for passing the address of the list to the widget for iteration.
The widget will, under no circumstances, attempt to modify the lists in any way whatsoever.
The lists may be any size, and contain any number of dates, although iteration performance will (clearly) suffer on large lists.
To avoid unusually large lists, it is recommended that you use the yearChanged() and, to a lesser extent, the dateChanged() signals to alert your application to the fact that the list needs updating.
It's a good idea to force a widget repaint using the forceUpdate() method if you add or remove a date in your list that is in the currently visible month.
- Atención:
- Unexpected behaviour will result if the lists are deleted behind the widgets back.
The correct way to go about removing a list is to use the supplied remove method before using delete on the list.
See the test application source for the recommended usage of the list manipulation methods.
- Ver también:
- installEventDayList()
removeEventDayList()
installNonWorkingDayList()
removeNonWorkingDayList()
- Autor:
- Michael van der Westhuizen (michael@mudpuppies.co.za).
- Fecha:
- Date
- 2005/01/31 00:08:31
Documentación del constructor y destructor
QmcDateNav::QmcDateNav |
( |
class QWidget * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
|
|
|
Default Constructor.
This constructor creates a date navigation widget with todays date selected.
The parent and name arguments are passed to the QWidget constructor.
Gráfico de llamadas para esta función: |
QmcDateNav::QmcDateNav |
( |
const class QDate & |
d, |
|
|
class QWidget * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
|
|
|
Alternate Constructor.
This constructor creates a date navigation widget with the date specified by d selected.
If d is an invalid date, todays date is selected.
The parent and name arguments are passed to the QWidget constructor.
- Parámetros:
-
| d | The date on which to base this widget. |
- Ver también:
- setDate()
Gráfico de llamadas para esta función: |
QmcDateNav::~QmcDateNav |
( |
|
) |
|
|
|
Destructor.
Destroys the widget, freeing allocated memory and emptying lists. |
QmcDateNav::QmcDateNav |
( |
class QWidget * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
|
|
QmcDateNav::QmcDateNav |
( |
const class QDate & |
, |
|
|
class QWidget * |
parent = 0 , |
|
|
const char * |
name = 0 |
|
) |
|
|
QmcDateNav::~QmcDateNav |
( |
|
) |
|
|
Documentación de las funciones miembro
void QmcDateNav::changeMonth |
( |
bool |
forward, |
|
|
int |
steps |
|
) |
[private] |
|
void QmcDateNav::changeMonth |
( |
bool |
forward, |
|
|
int |
steps |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::clear |
( |
|
) |
[private] |
|
void QmcDateNav::clear |
( |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::close |
( |
|
) |
[signal] |
|
void QmcDateNav::close |
( |
|
) |
[signal] |
|
void QmcDateNav::dateChanged |
( |
|
) |
[signal] |
|
void QmcDateNav::dateChanged |
( |
|
) |
[signal] |
|
|
This signal is emitted whenever the selection changes. |
void QmcDateNav::drawArrows |
( |
QPainter & |
|
) |
[private] |
|
void QmcDateNav::drawArrows |
( |
QPainter & |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::drawCaption |
( |
QPainter & |
|
) |
[private] |
|
void QmcDateNav::drawCaption |
( |
QPainter & |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
QRect* QmcDateNav::drawCaptionText |
( |
QPainter & |
|
) |
[private] |
|
QRect * QmcDateNav::drawCaptionText |
( |
QPainter & |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::drawDates |
( |
QPainter & |
|
) |
[private] |
|
void QmcDateNav::drawDates |
( |
QPainter & |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::drawDays |
( |
QPainter & |
|
) |
[private] |
|
void QmcDateNav::drawDays |
( |
QPainter & |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::drawFrame |
( |
QPainter & |
|
) |
[private] |
|
void QmcDateNav::drawFrame |
( |
QPainter & |
|
) |
[private] |
|
void QmcDateNav::drawSelectedDate |
( |
int |
, |
|
|
bool |
pe = false |
|
) |
[private] |
|
void QmcDateNav::drawSelectedDate |
( |
int |
, |
|
|
bool |
pe = false |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::drawSelections |
( |
|
) |
[private] |
|
void QmcDateNav::drawSelections |
( |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::drawToday |
( |
int |
|
) |
[private] |
|
void QmcDateNav::drawToday |
( |
int |
|
) |
[private] |
|
int QmcDateNav::findIndex |
( |
QDate & |
|
) |
[private] |
|
int QmcDateNav::findIndex |
( |
QRect & |
|
) |
[private] |
|
int QmcDateNav::findIndex |
( |
QDate & |
|
) |
[private] |
|
int QmcDateNav::findIndex |
( |
QRect & |
|
) |
[private] |
|
int QmcDateNav::fixDays |
( |
int |
, |
|
|
int |
, |
|
|
int |
|
|
) |
[private] |
|
int QmcDateNav::fixDays |
( |
int |
, |
|
|
int |
, |
|
|
int |
|
|
) |
[private] |
|
void QmcDateNav::forceUpdate |
( |
|
) |
[slot] |
|
void QmcDateNav::forceUpdate |
( |
|
) |
[slot] |
|
|
Ensures that the entire widget is repainted by setting the offscreen buffer state flag to dirty and calling QWidget::update(). |
bool QmcDateNav::frame |
( |
|
) |
const |
|
bool QmcDateNav::frame |
( |
|
) |
const |
|
|
- Devuelve:
- True if this widget is drawn with a frame, false otherwise.
- Ver también:
- setFrame()
|
bool QmcDateNav::hasEvent |
( |
const QDate & |
|
) |
[private] |
|
bool QmcDateNav::hasEvent |
( |
const QDate & |
|
) |
[private] |
|
void QmcDateNav::init |
( |
|
) |
[private] |
|
void QmcDateNav::init |
( |
|
) |
[private] |
|
void QmcDateNav::installEventDayList |
( |
QPtrList< QDate > * |
|
) |
|
|
void QmcDateNav::installEventDayList |
( |
QPtrList< QDate > * |
n |
) |
|
|
|
Assigns the address of the list n to be iterated over when searching for dates with events.
- Parámetros:
-
| n | The new list address to assign to the internal event day list pointer. |
- Atención:
- This is the one area you can really break your application. Always call removeEventDayList() before using delete on your list.
If you don't, you may find the internal pointer pointing to deallocated memory and crashing your application.
- Ver también:
- removeEventDayList()
|
void QmcDateNav::installNonWorkingDayList |
( |
QPtrList< QDate > * |
|
) |
|
|
void QmcDateNav::installNonWorkingDayList |
( |
QPtrList< QDate > * |
n |
) |
|
|
|
Assigns the address of the list n to be iterated over when searching for dates that are non-working days.
- Parámetros:
-
| n | The new list address to assign to the internal non-working day list pointer. |
- Atención:
- This is the one area you can really break your application. Always call removeNonWorkingDayList() before using delete on your list.
If you don't, you may find the internal pointer pointing to deallocated memory and crashing your application.
- Ver también:
- removeNonWorkingDayList()
|
bool QmcDateNav::isNonWorkingDay |
( |
const QDate & |
|
) |
[private] |
|
bool QmcDateNav::isNonWorkingDay |
( |
const QDate & |
|
) |
[private] |
|
virtual void QmcDateNav::keyPressEvent |
( |
QKeyEvent * |
|
) |
[protected, virtual] |
|
void QmcDateNav::keyPressEvent |
( |
QKeyEvent * |
|
) |
[protected, virtual] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::makePixmap |
( |
|
) |
[private] |
|
void QmcDateNav::makePixmap |
( |
|
) |
[private] |
|
virtual QSize QmcDateNav::minimumSizeHint |
( |
|
) |
const [virtual] |
|
QSize QmcDateNav::minimumSizeHint |
( |
|
) |
const [virtual] |
|
|
- Devuelve:
- The amount of space this widget requires to be useful.
Gráfico de llamadas para esta función: |
void QmcDateNav::monthMenuClicked |
( |
int |
|
) |
[private, slot] |
|
void QmcDateNav::monthMenuClicked |
( |
int |
|
) |
[private, slot] |
|
QString QmcDateNav::monthName |
( |
int |
|
) |
[private] |
|
QString QmcDateNav::monthName |
( |
int |
|
) |
[private] |
|
virtual void QmcDateNav::mouseDoubleClickEvent |
( |
QMouseEvent * |
|
) |
[protected, virtual] |
|
void QmcDateNav::mouseDoubleClickEvent |
( |
QMouseEvent * |
|
) |
[protected, virtual] |
|
|
Gráfico de llamadas para esta función: |
virtual void QmcDateNav::mouseMoveEvent |
( |
QMouseEvent * |
|
) |
[protected, virtual] |
|
void QmcDateNav::mouseMoveEvent |
( |
QMouseEvent * |
e |
) |
[protected, virtual] |
|
|
Gráfico de llamadas para esta función: |
virtual void QmcDateNav::mousePressEvent |
( |
QMouseEvent * |
|
) |
[protected, virtual] |
|
void QmcDateNav::mousePressEvent |
( |
QMouseEvent * |
e |
) |
[protected, virtual] |
|
|
Gráfico de llamadas para esta función: |
int QmcDateNav::numSelected |
( |
|
) |
[private] |
|
int QmcDateNav::numSelected |
( |
|
) |
[private] |
|
bool QmcDateNav::outlook |
( |
|
) |
const |
|
bool QmcDateNav::outlook |
( |
|
) |
const |
|
|
- Devuelve:
- True if this widget is in Outlook mode, false otherwise.
- Ver también:
- setOutlook()
|
virtual void QmcDateNav::paintEvent |
( |
QPaintEvent * |
|
) |
[protected, virtual] |
|
void QmcDateNav::paintEvent |
( |
QPaintEvent * |
|
) |
[protected, virtual] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::prepPopup |
( |
|
) |
[private] |
|
void QmcDateNav::prepPopup |
( |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::prepRBPopup |
( |
|
) |
[private] |
|
void QmcDateNav::prepRBPopup |
( |
|
) |
[private] |
|
void QmcDateNav::rbMenuClicked |
( |
int |
|
) |
[private, slot] |
|
void QmcDateNav::rbMenuClicked |
( |
int |
|
) |
[private, slot] |
|
void QmcDateNav::removeEventDayList |
( |
|
) |
|
|
void QmcDateNav::removeEventDayList |
( |
|
) |
|
|
|
Sets the internal event day list pointer to 0 and prevents any attempts at list iteration.
Always call this before using the delete operator on your list.
- Ver también:
- installEventDayList()
|
void QmcDateNav::removeNonWorkingDayList |
( |
|
) |
|
|
void QmcDateNav::removeNonWorkingDayList |
( |
|
) |
|
|
|
Sets the internal non-working day list pointer to 0 and prevents any attempts at list iteration.
Always call this before using the delete operator on your list.
- Ver también:
- installNonWorkingDayList()
|
QPtrList<QDate> QmcDateNav::selectedDates |
( |
|
) |
const |
|
QPtrList< QDate > QmcDateNav::selectedDates |
( |
|
) |
const |
|
|
- Devuelve:
- A QList containing all of the selected dates in the navigator.
|
bool QmcDateNav::setDate |
( |
const QDate |
d |
) |
|
|
bool QmcDateNav::setDate |
( |
const QDate |
d |
) |
|
|
|
If the new date is valid the date is changed to that date.
- Parámetros:
-
- Devuelve:
- True if the date is changed, false otherwise.
|
void QmcDateNav::setFrame |
( |
bool |
|
) |
|
|
void QmcDateNav::setFrame |
( |
bool |
f |
) |
|
|
|
Toggles the drawing of a frame.
- Parámetros:
-
| f | Set to true to enable the frame, false to disable. |
The default is to draw a frame.
- Ver también:
- frame()
|
void QmcDateNav::setOutlook |
( |
bool |
|
) |
|
|
void QmcDateNav::setOutlook |
( |
bool |
on |
) |
|
|
|
The QmcDateNav widget can paint itself in a way similar to Microsoft Outlook or using highlight colours from the current Qt style.
The default is to use standard Qt colours.
- Parámetros:
-
| on | Pass true if you wish the widget to be painted in Outlook mode, false if you want standard Qt colours. |
- Ver también:
- outlook()
|
virtual QSize QmcDateNav::sizeHint |
( |
|
) |
const [virtual] |
|
QSize QmcDateNav::sizeHint |
( |
|
) |
const [virtual] |
|
virtual QSizePolicy QmcDateNav::sizePolicy |
( |
|
) |
const [virtual] |
|
QSizePolicy QmcDateNav::sizePolicy |
( |
|
) |
const [virtual] |
|
|
- Devuelve:
- A QSizePolicy of QSizePolicy::Fixed by QSizePolicy::Fixed with no height-for-width capabilities.
|
void QmcDateNav::undrawSelectedDate |
( |
int |
|
) |
[private] |
|
void QmcDateNav::undrawSelectedDate |
( |
int |
|
) |
[private] |
|
|
Gráfico de llamadas para esta función: |
void QmcDateNav::yearChanged |
( |
int |
|
) |
[signal] |
|
QmcDateNav::yearChanged |
( |
int |
|
) |
[signal] |
|
|
Emitted whenever the current year changes. |
Documentación de los datos miembro
La documentación para esta clase fué generada a partir de los siguientes archivos:
Generado el Sat May 21 00:05:07 2005 para BulmaGes por
1.4.2