|
|
This Class provides a CalenderEdit like used in QTopia.
calenderEdit opens a QTable which is filled with the actual date info or with the provided date string date.
After calling the constructor, the user has to prepare some things calling prepare(). The following paragraph shows an example call.
// call the constructor somewhere in your program
// and hide the result.
calEdit = new calenderEdit ( (QDialog *)this, tr("Calendar"), true );
calEdit->hide();
// call prepare short before exec()
// to feed the calender with the date you want
// and to init all variables.
calEdit->prepare ( somedatestr );
calEdit->exec( );
calEdit->hide( );
if ( calEdit->result() == QDialog::Accepted )
{
tmpdatestr = calEdit->date();
LineEdit->setText( tmpdatestr );
slotTextChanged( tmpdatestr );
}
|
| QString date ()
| date |
call this method, after the editor is hided, to get the selected date (as string).
Returns: : the datestring
| int diffDays ( const QString &from="", const QString &to="" )
| diffDays |
calcs the diffence between two days
: from the first day
: to the second day (must be newer than from)
Returns: : the difference in days
| void prepare ( const QString &dstr="" )
| prepare |
prepares the new view. Call this before calling exec().
| calenderEdit (QDialog *parent=0, const char *name="",
bool modal=FALSE )
| calenderEdit |
constructor
| ~calenderEdit ()
| ~calenderEdit |
destructor