Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 vdatepopup.h - description 00003 ------------------- 00004 begin : Tue Apr 2 2002 00005 copyright : (C) 2002 by Bryan Brunton 00006 email : bryanbrun@yahoo.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef VDATEPOPUP_H 00019 #define VDATEPOPUP_H 00020 00021 #include <qwidget.h> 00022 #include <qframe.h> 00023 #include <qdatetime.h> 00024 #include <qrect.h> 00025 00026 class QToolButton; 00027 class VDateTable; 00028 00029 class VDatePopup: public QFrame { 00030 Q_OBJECT 00031 00032 public: 00033 VDatePopup( QWidget * parent = 0, QDate = QDate::currentDate(), const char *name = 0 ); 00034 ~VDatePopup(); 00035 00036 QSize sizeHint() const; 00037 00038 bool setDate( const QDate & ); 00039 00040 00041 const QDate & getDate(); 00042 const QDate & date() const; 00043 00044 void setEnabled( bool ); 00045 00046 00047 protected: 00048 void resizeEvent( QResizeEvent * ); 00049 00050 QToolButton *yearForward; 00051 00052 QToolButton *yearBackward; 00053 00054 QToolButton *monthForward; 00055 00056 QToolButton *monthBackward; 00057 00058 QToolButton *selectMonth; 00059 00060 QToolButton *selectYear; 00061 00062 VDateTable *table; 00063 00064 QSize maxMonthRect; 00065 00066 protected slots: 00067 void dateChangedSlot( QDate ); 00068 void tableClickedSlot(); 00069 void monthForwardClicked(); 00070 void monthBackwardClicked(); 00071 void yearForwardClicked(); 00072 void yearBackwardClicked(); 00073 void selectMonthClicked(); 00074 void selectYearClicked(); 00075 00076 signals: 00077 void dateChanged( const QDate & ); 00078 void dateSelected( const QDate & ); 00079 void dateEntered( const QDate & ); 00080 void tableClicked(); 00081 00082 protected: 00083 virtual void virtual_hook( int id, void *data ); 00084 00085 private: 00086 00087 class VDatePopupPrivate; 00088 VDatePopupPrivate *d; 00089 }; 00090 00091 #endif