diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/widgets/kmymoneydatetbl.h | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip |
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/widgets/kmymoneydatetbl.h')
-rw-r--r-- | kmymoney2/widgets/kmymoneydatetbl.h | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/kmymoney2/widgets/kmymoneydatetbl.h b/kmymoney2/widgets/kmymoneydatetbl.h index 7ff6610..f46d661 100644 --- a/kmymoney2/widgets/kmymoneydatetbl.h +++ b/kmymoney2/widgets/kmymoneydatetbl.h @@ -46,8 +46,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qgridview.h> -#include <qdatetime.h> +#include <tqgridview.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,28 +62,29 @@ /** * @author Michael Edwardes */ -class kMyMoneyDateTbl : public QGridView { +class kMyMoneyDateTbl : public TQGridView { Q_OBJECT + TQ_OBJECT public: enum calendarType { WEEKLY, MONTHLY, - QUARTERLY }; + TQUARTERLY }; public: /** * The constructor. */ - kMyMoneyDateTbl(QWidget *parent=0, - QDate date=QDate::currentDate(), + kMyMoneyDateTbl(TQWidget *tqparent=0, + TQDate date=TQDate::tqcurrentDate(), const char* name=0, WFlags f=0); /** * Returns a recommended size for the widget. * To save some time, the size of the largest used cell content is * calculated in each paintCell() call, since all calculations have * to be done there anyway. The size is stored in maxCell. The - * sizeHint() simply returns a multiple of maxCell. + * tqsizeHint() simply returns a multiple of maxCell. */ - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; /** * Set the font size of the date table. */ @@ -91,8 +92,8 @@ public: /** * Select and display this date. */ - virtual bool setDate(const QDate&); - virtual const QDate& getDate() const; + virtual bool setDate(const TQDate&); + virtual const TQDate& getDate() const; virtual void setType(calendarType type); virtual calendarType type(void) const { return m_type; } @@ -101,7 +102,7 @@ signals: /** * The selected date changed. */ - void dateChanged(QDate); + void dateChanged(TQDate); /** * A date has been selected by clicking on the table. */ @@ -110,29 +111,29 @@ signals: /** * **/ - virtual void hoverDate(QDate); + virtual void hoverDate(TQDate); protected: /** * Paint a cell. */ - virtual void paintCell(QPainter*, int, int); + virtual void paintCell(TQPainter*, int, int); /** * Handle the resize events. */ - virtual void viewportResizeEvent(QResizeEvent *); + virtual void viewportResizeEvent(TQResizeEvent *); /** * React on mouse clicks that select a date. */ - virtual void contentsMouseReleaseEvent(QMouseEvent *); - virtual void wheelEvent( QWheelEvent * e ); - virtual void keyPressEvent( QKeyEvent *e ); - virtual void focusInEvent( QFocusEvent *e ); - virtual void focusOutEvent( QFocusEvent *e ); + virtual void contentsMouseReleaseEvent(TQMouseEvent *); + virtual void wheelEvent( TQWheelEvent * e ); + virtual void keyPressEvent( TQKeyEvent *e ); + virtual void focusInEvent( TQFocusEvent *e ); + virtual void focusOutEvent( TQFocusEvent *e ); - virtual void drawCellContents(QPainter *painter, int row, int col, const QDate& theDate) = 0; + virtual void drawCellContents(TQPainter *painter, int row, int col, const TQDate& theDate) = 0; - virtual void contentsMouseMoveEvent(QMouseEvent* e); + virtual void contentsMouseMoveEvent(TQMouseEvent* e); /** * The font size of the displayed text. @@ -141,7 +142,7 @@ protected: /** * The currently selected date. */ - QDate date; + TQDate date; /** * The day of the first day in the month [1..7]. */ @@ -162,7 +163,7 @@ protected: /** * Save the size of the largest used cell content. */ - QRect maxCell; + TQRect maxCell; /** * Type related variables @@ -172,12 +173,9 @@ protected: int m_rowCount; /// - QDate m_drawDateOrig; + TQDate m_drawDateOrig; private: -#if QT_VERSION <= 0x030005 - int weekNumber(const QDate&, int *yr) const; -#endif #if KDE_IS_VERSION(3,2,0) #define WEEK_DAY_NAME(a,b) KGlobal::locale()->calendar()->weekDayName(a,b) |