00001 #ifndef DATEPICKER_H 00002 #define DATEPICKER_H 00003 00004 #include <qdialog.h> 00005 #include <qlabel.h> 00006 #include <qdatetime.h> 00007 #include <qcombobox.h> 00008 #include <qlayout.h> 00009 00010 class DatePicker : public QDialog 00011 00012 { 00013 Q_OBJECT 00014 00015 public: 00016 QLabel *daylabel; 00017 QComboBox *daybox; 00018 00019 QLabel *monthlabel; 00020 QComboBox *monthbox; 00021 00022 DatePicker ( QDate entrydate ); 00023 int getDay (); 00024 int getMonth (); 00025 int getYear (); 00026 00027 private slots: 00028 void setDay ( int ); 00029 void setMonth ( int ); 00030 void setYear ( int ); 00031 00032 private: 00033 void displayDays ( QComboBox *daybox ); 00034 void displayMonths ( QComboBox *monthbox ); 00035 void displayYears ( QComboBox *yearbox ); 00036 00037 QDate date; 00038 00039 QLabel *yearlabel; 00040 QComboBox *yearbox; 00041 00042 QGridLayout *layout; 00043 00044 int day, month, year; 00045 00046 }; 00047 00048 #endif 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060
1.4.2