diff options
Diffstat (limited to 'kplato/kptcalendarpanel.h')
-rw-r--r-- | kplato/kptcalendarpanel.h | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/kplato/kptcalendarpanel.h b/kplato/kptcalendarpanel.h index ce57e4af..18302ec1 100644 --- a/kplato/kptcalendarpanel.h +++ b/kplato/kptcalendarpanel.h @@ -26,11 +26,11 @@ #include "kptmap.h" -#include <qdatetime.h> -#include <qframe.h> +#include <tqdatetime.h> +#include <tqframe.h> -class QLineEdit; -class QToolButton; +class TQLineEdit; +class TQToolButton; namespace KPlato { @@ -43,23 +43,24 @@ class Calendar; * Provides a widget for calendar input. * **/ -class CalendarPanel: public QFrame +class CalendarPanel: public TQFrame { Q_OBJECT - Q_PROPERTY( QDate date READ date WRITE setDate) - Q_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton ) + TQ_OBJECT + TQ_PROPERTY( TQDate date READ date WRITE setDate) + TQ_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton ) public: /** The usual constructor. The given date will be displayed * initially. **/ - CalendarPanel(QWidget *parent=0, QDate=QDate::currentDate(), const char *name=0, WFlags f=0); + CalendarPanel(TQWidget *tqparent=0, TQDate=TQDate::tqcurrentDate(), const char *name=0, WFlags f=0); /** * Standard qt widget constructor. The initial date will be the * current date. */ - CalendarPanel( QWidget *parent, const char *name ); + CalendarPanel( TQWidget *tqparent, const char *name ); /** * The destructor. @@ -72,27 +73,27 @@ public: * size hint, try adding 28 to each of the reported numbers of * pixels. **/ - QSize sizeHint() const; + TQSize tqsizeHint() const; - QSize minimumSizeHint() const { return sizeHint(); } + TQSize tqminimumSizeHint() const { return tqsizeHint(); } /** * Sets the date. * * @returns @p false and does not change anything * if the date given is invalid. **/ - bool setDate(const QDate&); + bool setDate(const TQDate&); /** * Returns the selected date. * @deprecated **/ - const QDate& getDate() const; + const TQDate& getDate() const; /** * @returns the selected date. */ - const QDate &date() const; + const TQDate &date() const; /** * Enables or disables the widget. @@ -112,7 +113,7 @@ public: /** * By calling this method with @p enable = true, CalendarPanel will show * a little close-button in the upper button-row. Clicking the - * close-button will cause the CalendarPanel's topLevelWidget()'s close() + * close-button will cause the CalendarPanel's tqtopLevelWidget()'s close() * method being called. This is mostly useful for toplevel datepickers * without a window manager decoration. * @see #hasCloseButton @@ -140,33 +141,33 @@ public: void markSelected(int state); protected: - /// to catch move keyEvents when QLineEdit has keyFocus - virtual bool eventFilter(QObject *o, QEvent *e ); + /// to catch move keyEvents when TQLineEdit has keyFocus + virtual bool eventFilter(TQObject *o, TQEvent *e ); /// the resize event - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); /// the year forward button - QToolButton *yearForward; + TQToolButton *yearForward; /// the year backward button - QToolButton *yearBackward; + TQToolButton *yearBackward; /// the month forward button - QToolButton *monthForward; + TQToolButton *monthForward; /// the month backward button - QToolButton *monthBackward; + TQToolButton *monthBackward; /// the button for selecting the month directly - QToolButton *selectMonth; + TQToolButton *selectMonth; /// the button for selecting the year directly - QToolButton *selectYear; + TQToolButton *selectYear; /// the line edit to enter the date directly - QLineEdit *line; + TQLineEdit *line; /// the validator for the line edit: DateValidator *val; /// the date table DateTable *table; // the widest month string in pixels: - QSize maxMonthRect; + TQSize maxMonthRect; protected slots: - void dateChangedSlot(QDate); + void dateChangedSlot(TQDate); void tableClickedSlot(); void monthForwardClicked(); void monthBackwardClicked(); @@ -188,17 +189,17 @@ signals: * selected. * @see dateSelected */ - void dateChanged(QDate); + void dateChanged(TQDate); /** This signal is emitted each time a day has been selected by * clicking on the table (hitting a day in the current month). */ - void dateSelected(QDate); + void dateSelected(TQDate); /** This signal is emitted when enter is pressed and a VALID date * has been entered before into the line edit. Connect to both * dateEntered() and dateSelected() to receive all events where the * user really enters a date. */ - void dateEntered(QDate); + void dateEntered(TQDate); /** This signal is emitted when the day has been selected by * clicking on it in the table. */ @@ -220,11 +221,11 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - void init( const QDate &dt ); + void init( const TQDate &dt ); class CalendarPanelPrivate; CalendarPanelPrivate *d; // calculate ISO 8601 week number - int weekOfYear(QDate); + int weekOfYear(TQDate); }; } //KPlato namespace |