diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kdgantt/KDGanttViewSubwidgets.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdgantt/KDGanttViewSubwidgets.h')
-rw-r--r-- | kdgantt/KDGanttViewSubwidgets.h | 357 |
1 files changed, 181 insertions, 176 deletions
diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h index 10c3e0bd..c9f37d43 100644 --- a/kdgantt/KDGanttViewSubwidgets.h +++ b/kdgantt/KDGanttViewSubwidgets.h @@ -27,8 +27,8 @@ ** licensing are not clear to you. ** ** As a special exception, permission is given to link this program - ** with any edition of Qt, and distribute the resulting executable, - ** without including the source code for Qt in the source distribution. + ** with any edition of TQt, and distribute the resulting executable, + ** without including the source code for TQt in the source distribution. ** **********************************************************************/ @@ -37,24 +37,24 @@ #define KDGANTTVIEWSUBWIDGETS_H -#include <qwidget.h> -#include <qlistview.h> -#include <qsplitter.h> -#include <qevent.h> -#include <qvaluelist.h> -#include <qcanvas.h> -#include <qwhatsthis.h> -#include <qpopupmenu.h> -#include <qtooltip.h> -#include <qtimer.h> -#include <qgroupbox.h> -#include <qvgroupbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qbrush.h> -#include <qvbox.h> -#include <qdockwindow.h> -#include <qtimer.h> +#include <tqwidget.h> +#include <tqlistview.h> +#include <tqsplitter.h> +#include <tqevent.h> +#include <tqvaluelist.h> +#include <tqcanvas.h> +#include <tqwhatsthis.h> +#include <tqpopupmenu.h> +#include <tqtooltip.h> +#include <tqtimer.h> +#include <tqgroupbox.h> +#include <tqvgroupbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqbrush.h> +#include <tqvbox.h> +#include <tqdockwindow.h> +#include <tqtimer.h> #include "KDGanttView.h" #include "KDGanttViewTaskLink.h" @@ -72,45 +72,46 @@ class KDToolTip; class KDCanvasRectangle; class KDTimeHeaderToolTip; -class KDTimeHeaderWidget : public QWidget +class KDTimeHeaderWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: typedef KDGanttView::Scale Scale; typedef KDGanttView::YearFormat YearFormat; typedef KDGanttView::HourFormat HourFormat; struct DateTimeColor { - QDateTime datetime; - QDateTime end; - QColor color; + TQDateTime datetime; + TQDateTime end; + TQColor color; Scale minScaleView; Scale maxScaleView; //KDCanvasLine* canvasLine; KDCanvasRectangle* canvasRect; }; - typedef QValueList<DateTimeColor> ColumnColorList; - typedef QValueList<DateTimeColor> IntervalColorList; + typedef TQValueList<DateTimeColor> ColumnColorList; + typedef TQValueList<DateTimeColor> IntervalColorList; /* enum Scale { Minute, Hour, Day, Week, Month, Auto }; enum YearFormat { FourDigit, TwoDigit, TwoDigitApostrophe }; enum HourFormat { Hour_24, Hour_12 }; */ - KDTimeHeaderWidget (QWidget* parent,KDGanttView* gant); + KDTimeHeaderWidget (TQWidget* tqparent,KDGanttView* gant); ~KDTimeHeaderWidget(); - QString getToolTipText(QPoint p); + TQString getToolTipText(TQPoint p); void zoomToFit(); void zoom(double, bool absolute = true); - void zoomToSelection( QDateTime startTime, QDateTime endTime); + void zoomToSelection( TQDateTime startTime, TQDateTime endTime); double zoomFactor(); void setAutoScaleMinorTickCount( int count ); int autoScaleMinorTickCount(); - void setHorizonStart( const QDateTime& start ); - QDateTime horizonStart() const; - void setHorizonEnd( const QDateTime& start ); - QDateTime horizonEnd() const; + void setHorizonStart( const TQDateTime& start ); + TQDateTime horizonStart() const; + void setHorizonEnd( const TQDateTime& start ); + TQDateTime horizonEnd() const; void setMaximumScale( Scale ); KDTimeHeaderWidget::Scale maximumScale() const; @@ -132,34 +133,34 @@ public: void setShowMinorTicks( bool ); void setScale( Scale unit); bool showMinorTicks() const; - void setColumnBackgroundColor( const QDateTime& column, - const QColor& color, + void setColumnBackgroundColor( const TQDateTime& column, + const TQColor& color, Scale mini = KDGanttView::Minute , Scale maxi = KDGanttView::Month); - void setIntervalBackgroundColor( const QDateTime& start, - const QDateTime& end, - const QColor& color, + void setIntervalBackgroundColor( const TQDateTime& start, + const TQDateTime& end, + const TQColor& color, Scale mini = KDGanttView::Minute , Scale maxi = KDGanttView::Month); - bool changeBackgroundInterval( const QDateTime& oldstart, - const QDateTime& oldend, - const QDateTime& newstart, - const QDateTime& newend ); - bool deleteBackgroundInterval( const QDateTime& start, - const QDateTime& end ); + bool changeBackgroundInterval( const TQDateTime& oldstart, + const TQDateTime& oldend, + const TQDateTime& newstart, + const TQDateTime& newend ); + bool deleteBackgroundInterval( const TQDateTime& start, + const TQDateTime& end ); void clearBackgroundColor(); - QColor columnBackgroundColor( const QDateTime& column ) const; - void setWeekendBackgroundColor( const QColor& color ); - QColor weekendBackgroundColor() const; - void setWeekdayBackgroundColor( const QColor& color, int weekday ); - QColor weekdayBackgroundColor(int weekday) const; + TQColor columnBackgroundColor( const TQDateTime& column ) const; + void setWeekendBackgroundColor( const TQColor& color ); + TQColor weekendBackgroundColor() const; + void setWeekdayBackgroundColor( const TQColor& color, int weekday ); + TQColor weekdayBackgroundColor(int weekday) const; void setWeekendDays( int start, int end ); void weekendDays( int& start, int& end ) const; void computeTicks(bool doNotComputeRealScale = false); - void paintEvent(QPaintEvent *); - int getCoordX(QDate); - int getCoordX(QDateTime); - QDateTime getDateTimeForIndex(int coordX, bool local = true ); + void paintEvent(TQPaintEvent *); + int getCoordX(TQDate); + int getCoordX(TQDateTime); + TQDateTime getDateTimeForIndex(int coordX, bool local = true ); void setShowPopupMenu( bool show, bool showZoom, bool showScale,bool showTime, bool showYear,bool showGrid, bool showPrint); bool registerStartTime(); @@ -168,10 +169,10 @@ public: ColumnColorList columnBackgroundColorList() const { return ccList; } - QColor weekdayColor[8]; - void repaintMe(int left, int wid, QPainter *p = 0); + TQColor weekdayColor[8]; + void tqrepaintMe(int left, int wid, TQPainter *p = 0); - void centerDateTime( const QDateTime& center ); + void centerDateTime( const TQDateTime& center ); public slots: void setSettings(int); @@ -186,22 +187,22 @@ private: friend class KDTimeTableWidget; friend class KDGanttViewItem; friend class KDGanttView; - virtual void mousePressEvent ( QMouseEvent * e ); - virtual void mouseReleaseEvent ( QMouseEvent * e ); - virtual void mouseDoubleClickEvent ( QMouseEvent * e ); - virtual void mouseMoveEvent ( QMouseEvent * e ); - double secsFromTo( QDateTime begin, QDateTime end ); + virtual void mousePressEvent ( TQMouseEvent * e ); + virtual void mouseReleaseEvent ( TQMouseEvent * e ); + virtual void mouseDoubleClickEvent ( TQMouseEvent * e ); + virtual void mouseMoveEvent ( TQMouseEvent * e ); + double secsFromTo( TQDateTime begin, TQDateTime end ); void updateTimeTable(); void computeIntervals( int height ); - bool getColumnColor(QColor& col,int coordLow, int coordHigh); + bool getColumnColor(TQColor& col,int coordLow, int coordHigh); void moveTimeLineTo(int x); - //void mousePressEvent ( QMouseEvent * ) ; - void resizeEvent ( QResizeEvent * ) ; - QValueList<int> majorTicks; - QValueList<QString> minorText; - QValueList<QString> majorText; - QDateTime myHorizonStart, myHorizonEnd, myRealEnd,myRealStart; - QDateTime myCenterDateTime; + //void mousePressEvent ( TQMouseEvent * ) ; + void resizeEvent ( TQResizeEvent * ) ; + TQValueList<int> majorTicks; + TQValueList<TQString> minorText; + TQValueList<TQString> majorText; + TQDateTime myHorizonStart, myHorizonEnd, myRealEnd,myRealStart; + TQDateTime myCenterDateTime; void saveCenterDateTime(); Scale myScale,myRealScale,myMaxScale,myMinScale; YearFormat myYearFormat; @@ -211,21 +212,21 @@ private: bool flagShowZoom, flagShowScale ,flagShowTime ,flagShowYear; bool flagShowGrid ,flagShowPrint; bool flagStartTimeSet,flagEndTimeSet; - QColor myWeekendBackgroundColor; + TQColor myWeekendBackgroundColor; int myWeekendDaysStart, myWeekendDaysEnd; ColumnColorList ccList; IntervalColorList icList; int myMinorScaleCount,myMajorScaleCount; int myRealMinorScaleCount,myRealMajorScaleCount; bool flagDoNotRecomputeAfterChange,flagDoNotRepaintAfterChange; - QString getYear(QDate); - QString getHour(QTime); - QDateTime getEvenTimeDate(QDateTime ,Scale); - void computeRealScale(QDateTime start); + TQString getYear(TQDate); + TQString getHour(TQTime); + TQDateTime getEvenTimeDate(TQDateTime ,Scale); + void computeRealScale(TQDateTime start); int myGridMinorWidth; int myMajorGridHeight; - QPopupMenu * myPopupMenu, *scalePopupMenu, *timePopupMenu; - QPopupMenu * yearPopupMenu, *gridPopupMenu; + TQPopupMenu * myPopupMenu, *scalePopupMenu, *timePopupMenu; + TQPopupMenu * yearPopupMenu, *gridPopupMenu; KDGanttView* myGanttView; double myZoomFactor; int myAutoScaleMinorTickcount; @@ -238,18 +239,19 @@ private: int beginMouseDown; int endMouseDown; bool autoComputeTimeLine; - QPixmap paintPix; + TQPixmap paintPix; }; /* KDTimeTableWidget */ class KDListView ; -class KDTimeTableWidget : public QCanvas +class KDTimeTableWidget : public TQCanvas { Q_OBJECT + TQ_OBJECT public: - KDTimeTableWidget (QWidget* parent,KDGanttView* my); + KDTimeTableWidget (TQWidget* tqparent,KDGanttView* my); void setBlockUpdating( bool block = true ); bool blockUpdating(); @@ -257,25 +259,25 @@ public: void dec_blockUpdating(); void setShowTaskLinks( bool show ); bool showTaskLinks(); - QPtrList<KDGanttViewTaskLink>taskLinks(); + TQPtrList<KDGanttViewTaskLink>taskLinks(); void clearTaskLinks(); void updateMyContent(); void removeItemFromTasklinks( KDGanttViewItem * ); - void setHorBackgroundLines( int count, QBrush brush ); - int horBackgroundLines( QBrush& brush ); + void setHorBackgroundLines( int count, TQBrush brush ); + int horBackgroundLines( TQBrush& brush ); - void setNoInformationBrush( const QBrush& brush ); - QBrush noInformationBrush() const; + void setNoInformationBrush( const TQBrush& brush ); + TQBrush noInformationBrush() const; - int getCoordX( QDateTime dt ); + int getCoordX( TQDateTime dt ); signals: void heightComputed( int ); public slots: - void expandItem(QListViewItem * ); - void collapseItem(QListViewItem * ); - void highlightItem(QListViewItem * ); + void expandItem(TQListViewItem * ); + void collapseItem(TQListViewItem * ); + void highlightItem(TQListViewItem * ); void resetWidth( int ); void checkHeight( int ); private: @@ -287,15 +289,15 @@ private: bool taskLinksVisible; - QPtrList<KDGanttViewTaskLink> myTaskLinkList; + TQPtrList<KDGanttViewTaskLink> myTaskLinkList; - QPtrList<KDCanvasLine> verGridList; - QPtrList<KDCanvasLine> horGridList; - QPtrList<KDCanvasRectangle> horDenseList; - QPtrList<KDCanvasRectangle> showNoInfoList; + TQPtrList<KDCanvasLine> verGridList; + TQPtrList<KDCanvasLine> horGridList; + TQPtrList<KDCanvasRectangle> horDenseList; + TQPtrList<KDCanvasRectangle> showNoInfoList; int denseLineCount; - QBrush denseLineBrush, noInfoLineBrush; - QPtrList<KDCanvasRectangle> columnColorList; + TQBrush denseLineBrush, noInfoLineBrush; + TQPtrList<KDCanvasRectangle> columnColorList; int computeHeight(); void computeVerticalGrid(); @@ -310,7 +312,7 @@ private: void showMinorGrid(); void hideGrid(); - QPen gridPen; + TQPen gridPen; int maximumComputedGridHeight; int minimumHeight; int int_blockUpdating; @@ -323,66 +325,68 @@ private: class KDLegendWidget : public KDGanttSemiSizingControl { Q_OBJECT + TQ_OBJECT public: - KDLegendWidget ( QWidget* parent, KDGanttMinimizeSplitter* legendParent ); + KDLegendWidget ( TQWidget* tqparent, KDGanttMinimizeSplitter* legendParent ); void showMe(bool); bool isShown(); - void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text ); + void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ); void clearLegend(); - void setFont( QFont ); - void drawToPainter( QPainter *p ); + void setFont( TQFont ); + void drawToPainter( TQPainter *p ); void setAsDockwindow( bool dockwin ); bool asDockwindow(); - QDockWindow* dockwindow(); - QSize legendSize(); - QSize legendSizeHint(); + TQDockWindow* dockwindow(); + TQSize legendSize(); + TQSize legendSizeHint(); private: - QGroupBox * myLegend; - QLabel* myLabel; - QScrollView * scroll; - QDockWindow* dock; + TQGroupBox * myLegend; + TQLabel* myLabel; + TQScrollView * scroll; + TQDockWindow* dock; KDGanttMinimizeSplitter* myLegendParent; }; class KDGanttView; -class KDListView : public QListView +class KDListView : public TQListView { Q_OBJECT + TQ_OBJECT public: - KDListView (QWidget* parent,KDGanttView* gv ); + KDListView (TQWidget* tqparent,KDGanttView* gv ); KDGanttView* myGanttView; - void drawToPainter( QPainter *p, bool drawHeader=false ); + void drawToPainter( TQPainter *p, bool drawHeader=false ); void setCalendarMode( bool mode ); bool calendarMode() { return _calendarMode; }; - QString getWhatsThisText(QPoint p); - void setOpen ( QListViewItem * item, bool open ); - void dragEnterEvent ( QDragEnterEvent * ); - void dragMoveEvent ( QDragMoveEvent * ); - void dragLeaveEvent ( QDragLeaveEvent * ); - void dropEvent ( QDropEvent * ); - QDragObject * dragObject (); + TQString getWhatsThisText(TQPoint p); + void setOpen ( TQListViewItem * item, bool open ); + void dragEnterEvent ( TQDragEnterEvent * ); + void dragMoveEvent ( TQDragMoveEvent * ); + void dragLeaveEvent ( TQDragLeaveEvent * ); + void dropEvent ( TQDropEvent * ); + TQDragObject * dragObject (); void startDrag (); - void paintemptyarea ( QPainter * p, const QRect & rect ){ QListView::paintEmptyArea( p, rect );}; + void paintemptyarea ( TQPainter * p, const TQRect & rect ){ TQListView::paintEmptyArea( p, rect );}; public: class DrawableItem { public: - DrawableItem(int level, int ypos, QListViewItem *item ) { y = ypos; l = level; i = item; }; + DrawableItem(int level, int ypos, TQListViewItem *item ) { y = ypos; l = level; i = item; }; int y; int l; - QListViewItem * i; + TQListViewItem * i; }; protected: - void drawAllContents(QPainter * p, int cx, int cy, int cw, int ch); - int buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int level, int ypos, QListViewItem *item, int ymin, int ymax) const; + void drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch); + int buildDrawables(TQPtrList<KDListView::DrawableItem> &lst, int level, int ypos, TQListViewItem *item, int ymin, int ymax) const; private slots: - void dragItem( QListViewItem * ); + void dragItem( TQListViewItem * ); private: - void resizeEvent ( QResizeEvent * ) ; - void contentsMouseDoubleClickEvent ( QMouseEvent * e ); + void resizeEvent ( TQResizeEvent * ) ; + void contentsMouseDoubleClickEvent ( TQMouseEvent * e ); bool _calendarMode; @@ -390,56 +394,56 @@ private slots: }; -class KDCanvasText : public QCanvasText +class KDCanvasText : public TQCanvasText { public: - KDCanvasText( KDTimeTableWidget* canvas, void* parentItem, int type ); + KDCanvasText( KDTimeTableWidget* canvas, void* tqparentItem, int type ); int myParentType; void* myParentItem; }; -class KDCanvasLine : public QCanvasLine +class KDCanvasLine : public TQCanvasLine { public: - KDCanvasLine( KDTimeTableWidget* canvas, void* parentItem, int type ); + KDCanvasLine( KDTimeTableWidget* canvas, void* tqparentItem, int type ); int myParentType; void* myParentItem; }; -class KDCanvasPolygonItem: public QCanvasPolygonalItem +class KDCanvasPolygonItem: public TQCanvasPolygonalItem { public: - KDCanvasPolygonItem( KDTimeTableWidget* canvas, void* parentItem, + KDCanvasPolygonItem( KDTimeTableWidget* canvas, void* tqparentItem, int type ); int myParentType; void* myParentItem; }; -class KDCanvasPolygon: public QCanvasPolygon +class KDCanvasPolygon: public TQCanvasPolygon { public: - KDCanvasPolygon( KDTimeTableWidget* canvas, void* parentItem, int type ); + KDCanvasPolygon( KDTimeTableWidget* canvas, void* tqparentItem, int type ); int myParentType; void* myParentItem; }; -class KDCanvasEllipse: public QCanvasEllipse +class KDCanvasEllipse: public TQCanvasEllipse { public: - KDCanvasEllipse( KDTimeTableWidget* canvas, void* parentItem, int type ); + KDCanvasEllipse( KDTimeTableWidget* canvas, void* tqparentItem, int type ); int myParentType; void* myParentItem; }; -class KDCanvasRectangle: public QCanvasRectangle +class KDCanvasRectangle: public TQCanvasRectangle { public: - KDCanvasRectangle( KDTimeTableWidget* canvas, void* parentItem, int type ); + KDCanvasRectangle( KDTimeTableWidget* canvas, void* tqparentItem, int type ); int myParentType; void* myParentItem; }; @@ -447,16 +451,17 @@ public: class KDCanvasToolTip; -class KDGanttCanvasView : public QCanvasView +class KDGanttCanvasView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - KDGanttCanvasView(KDGanttView* sender, QCanvas* canvas = 0, QWidget* parent = 0, const char* name = 0 ); + KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = 0, TQWidget* tqparent = 0, const char* name = 0 ); ~KDGanttCanvasView(); - QString getToolTipText(QPoint p); - QString getWhatsThisText(QPoint p); - void drawToPainter ( QPainter * p ); + TQString getToolTipText(TQPoint p); + TQString getWhatsThisText(TQPoint p); + void drawToPainter ( TQPainter * p ); void resetCutPaste( KDGanttViewItem* ); void setShowPopupMenu( bool show ); bool showPopupMenu(); @@ -467,26 +472,26 @@ public: protected: friend class KDGanttView; friend class KDListView; - virtual void contentsMousePressEvent ( QMouseEvent * ) ; - virtual void contentsMouseReleaseEvent ( QMouseEvent * ); - virtual void contentsMouseDoubleClickEvent ( QMouseEvent * ); - virtual void contentsMouseMoveEvent ( QMouseEvent * ) ; - virtual void viewportPaintEvent ( QPaintEvent * pe ); - void resizeEvent ( QResizeEvent * ) ; + virtual void contentsMousePressEvent ( TQMouseEvent * ) ; + virtual void contentsMouseReleaseEvent ( TQMouseEvent * ); + virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * ); + virtual void contentsMouseMoveEvent ( TQMouseEvent * ) ; + virtual void viewportPaintEvent ( TQPaintEvent * pe ); + void resizeEvent ( TQResizeEvent * ) ; void set_MouseTracking(bool on); KDGanttView* mySignalSender; KDGanttViewItem* currentItem, *lastClickedItem, *cuttedItem; KDGanttViewTaskLink* currentLink; - int getType(QCanvasItem*); - KDGanttViewItem* getItem(QCanvasItem*); - KDGanttViewTaskLink* getLink(QCanvasItem*); + int getType(TQCanvasItem*); + KDGanttViewItem* getItem(TQCanvasItem*); + KDGanttViewTaskLink* getLink(TQCanvasItem*); KDCanvasWhatsThis* myWhatsThis; - QPopupMenu* onItem; + TQPopupMenu* onItem; bool _showItemAddPopupMenu; int myMyContentsHeight; KDGanttViewItem *fromItem; bool linkItemsEnabled; - QCanvasLine *linkLine; + TQCanvasLine *linkLine; int fromArea; bool autoScrollEnabled; int getItemArea(KDGanttViewItem *item, int x); @@ -510,26 +515,26 @@ private slots: private: KDCanvasToolTip* myToolTip; - QTimer *myScrollTimer; - QPoint mousePos; - QTimer scrollBarTimer; + TQTimer *myScrollTimer; + TQPoint mousePos; + TQTimer scrollBarTimer; }; -class KDTimeHeaderToolTip :public QToolTip +class KDTimeHeaderToolTip :public TQToolTip { public: - KDTimeHeaderToolTip( QWidget *wid, KDTimeHeaderWidget* header ) : QToolTip( wid ), _wid(wid),_header (header) { + KDTimeHeaderToolTip( TQWidget *wid, KDTimeHeaderWidget* header ) : TQToolTip( wid ), _wid(wid),_header (header) { }; protected: - virtual void maybeTip( const QPoint& p) + virtual void maybeTip( const TQPoint& p) { static bool ishidden = true; - if (QToolTip::isGloballyEnabled () ) { + if (TQToolTip::isGloballyEnabled () ) { if (ishidden) { - tip( QRect( p.x(),p.y(),5,5), _header->getToolTipText(p)); + tip( TQRect( p.x(),p.y(),5,5), _header->getToolTipText(p)); } else hide(); @@ -537,25 +542,25 @@ protected: } } private: - QWidget* _wid; + TQWidget* _wid; KDTimeHeaderWidget * _header; }; -class KDCanvasToolTip :public QToolTip +class KDCanvasToolTip :public TQToolTip { public: - KDCanvasToolTip( QWidget *wid, KDGanttCanvasView* canview ) : QToolTip( wid ), _wid(wid),_canview (canview) { + KDCanvasToolTip( TQWidget *wid, KDGanttCanvasView* canview ) : TQToolTip( wid ), _wid(wid),_canview (canview) { }; protected: - virtual void maybeTip( const QPoint& p) + virtual void maybeTip( const TQPoint& p) { static bool ishidden = true; - if (QToolTip::isGloballyEnabled () ) { + if (TQToolTip::isGloballyEnabled () ) { if (ishidden) { - tip( QRect( p.x()-2,p.y()-2,5,5), _canview->getToolTipText(p)); + tip( TQRect( p.x()-2,p.y()-2,5,5), _canview->getToolTipText(p)); } else hide(); @@ -563,37 +568,37 @@ protected: } } private: - QWidget* _wid; + TQWidget* _wid; KDGanttCanvasView * _canview; }; -class KDCanvasWhatsThis :public QWhatsThis +class KDCanvasWhatsThis :public TQWhatsThis { public: - KDCanvasWhatsThis( QWidget *wid, KDGanttCanvasView* canview ) : QWhatsThis( wid ), _wid(wid),_canview (canview) { }; + KDCanvasWhatsThis( TQWidget *wid, KDGanttCanvasView* canview ) : TQWhatsThis( wid ), _wid(wid),_canview (canview) { }; protected: - virtual QString text( const QPoint& p) + virtual TQString text( const TQPoint& p) { return _canview->getWhatsThisText(p) ; } private: - QWidget* _wid; + TQWidget* _wid; KDGanttCanvasView * _canview; }; -class KDListViewWhatsThis :public QWhatsThis +class KDListViewWhatsThis :public TQWhatsThis { public: - KDListViewWhatsThis( QWidget *wid, KDListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; + KDListViewWhatsThis( TQWidget *wid, KDListView* view ) : TQWhatsThis( wid ), _wid(wid),_view (view) { }; protected: - virtual QString text( const QPoint& p) + virtual TQString text( const TQPoint& p) { return _view->getWhatsThisText(p) ; } private: - QWidget* _wid; + TQWidget* _wid; KDListView * _view; }; |