class dateTimeEdit

This Class provides a DateTimeEdit to select a date and a time. More...

Definition#include <calenderedit.h>
InheritsDateTimeDlg (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This Class provides a DateTimeEdit to select a date and a time.

dateTimeEdit opens a QTable which is filled with the actual date info or with the provided date string date. Additionaly a TimePicker is provided.

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.
      dtEdit = new dateTimeEdit ( (QDialog *)this, tr("Date and Time"), true );
      dtEdit->hide();


      // call prepare short before exec()
      // to feed the calender with the date you want
      // and to init all variables.
      dtEdit->prepare ( const QDateTime &somedatetime );

      dtEdit->exec( );
      dtEdit->hide( );

      if ( dtEdit->result() == QDialog::Accepted )
      {
        tmpdatetime = dtEdit->datetime();
      }

QString  date ()

date

call this method, after the editor is hided, to get the selected date (as string).

Returns: : the datestring

QString  time ()

time

call this method, after the editor is hided, to get the selected time (as string).

Returns: : the timestring

QDateTime  datetime ()

datetime

call this method, after the editor is hided, to get the selected QDateTime.

Returns: : the selected QDateTime

void  prepare ( const QDateTime &dt=QDateTime::currentDateTime() )

prepare

prepares the new view. Call this before calling exec().

 dateTimeEdit (QDialog *parent=0, const char *name="", bool modal=FALSE )

dateTimeEdit

constructor

 ~dateTimeEdit ()

~dateTimeEdit

destructor