-rw-r--r-- | library/datebookmonth.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/datebookmonth.h b/library/datebookmonth.h index cb436a8..46b02c8 100644 --- a/library/datebookmonth.h +++ b/library/datebookmonth.h @@ -57,172 +57,174 @@ protected slots: e->ignore(); } private slots: void updateDate(); void firstMonth(); void lastMonth(); void monthBack(); void monthForward(); private: QToolButton *begin, *back, *next, *end; QComboBox *month; QSpinBox *year; DateBookMonthHeaderPrivate *d; int focus; }; class DayItemMonthPrivate; class DayItemMonth : public QTableItem { public: DayItemMonth( QTable *table, EditType et, const QString &t ); ~DayItemMonth(); void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); void setDay( int d ) { dy = d; } void setEvents( const QValueList<Event> &events ) { daysEvents = events; }; void setEvents( const QValueList<EffectiveEvent> &effEvents ); void clearEvents() { daysEvents.clear(); }; void clearEffEvents(); int day() const { return dy; } void setType( Calendar::Day::Type t ); Calendar::Day::Type type() const { return typ; } private: QBrush back; QColor forg; int dy; Calendar::Day::Type typ; QValueList<Event> daysEvents; // not used anymore... DayItemMonthPrivate *d; }; class DateBookMonthTablePrivate; class DateBookMonthTable : public QTable { Q_OBJECT public: DateBookMonthTable( QWidget *parent = 0, const char *name = 0, DateBookDB *newDb = 0 ); ~DateBookMonthTable(); void setDate( int y, int m, int d ); void redraw(); QSize minimumSizeHint() const { return sizeHint(); } QSize minimumSize() const { return sizeHint(); } void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;} void setWeekStart( bool onMonday ); signals: void dateClicked( int year, int month, int day ); protected: void viewportMouseReleaseEvent( QMouseEvent * ); protected slots: void keyPressEvent(QKeyEvent *e ) { e->ignore(); } private slots: void dayClicked( int row, int col ); void dragDay( int row, int col ); private: void setupTable(); void setupLabels(); void findDay( int day, int &row, int &col ); void getEvents(); void changeDaySelection( int row, int col ); int year, month, day; int selYear, selMonth, selDay; QValueList<Event> monthsEvents; // not used anymore... DateBookDB *db; DateBookMonthTablePrivate *d; }; class DateBookMonthPrivate; class DateBookMonth : public QVBox { Q_OBJECT public: + /* ac = Auto Close */ DateBookMonth( QWidget *parent = 0, const char *name = 0, bool ac = FALSE, DateBookDB *data = 0 ); ~DateBookMonth(); QDate selectedDate() const; signals: + /* ### FIXME add a signal with QDate -zecke */ void dateClicked( int year, int month, int day ); public slots: void setDate( int y, int m ); void setDate( int y, int m, int d ); void setDate( QDate ); void redraw(); void slotWeekChange( bool ); protected slots: virtual void keyPressEvent(QKeyEvent *e); private slots: void forwardDateClicked( int y, int m, int d ) { emit dateClicked( y, m, d ); } void finalDate(int, int, int); private: DateBookMonthHeader *header; DateBookMonthTable *table; int year, month, day; bool autoClose; class DateBookMonthPrivate *d; }; class DateButton : public QPushButton { Q_OBJECT public: DateButton( bool longDate, QWidget *parent, const char * name = 0 ); QDate date() const { return currDate; } bool customWhatsThis() const; signals: void dateSelected( int year, int month, int day ); public slots: void setDate( int y, int m, int d ); void setDate( QDate ); void setWeekStartsMonday( int ); void setDateFormat( DateFormat ); private slots: void pickDate(); void gotHide(); private: bool longFormat; bool weekStartsMonday; QDate currDate; DateFormat df; }; // this class is only here for Sharp ROM compatibility // I have reverse engineered this class and it seems to // work (only qtmail seems to use it) - sandman // DO NOT USE IT IN NEW CODE !! class DateBookMonthPopup : public QPopupMenu { Q_OBJECT public: DateBookMonthPopup ( QWidget *w ); private: DateBookMonth *m_dbm; }; #endif |