From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kgantt/COPYING | 4 +- kgantt/kgantt/KGantt.cpp | 4 +- kgantt/kgantt/KGantt.h | 9 ++-- kgantt/kgantt/KGanttBarConfig.cpp | 4 +- kgantt/kgantt/KGanttBarConfig.h | 5 +- kgantt/kgantt/KGanttItem.cpp | 24 +++++----- kgantt/kgantt/KGanttItem.h | 21 ++++---- kgantt/kgantt/KGanttRelation.cpp | 2 +- kgantt/kgantt/KGanttRelation.h | 7 +-- kgantt/kgantt/itemedit.ui | 74 ++++++++++++++--------------- kgantt/kgantt/itemedit2.ui | 36 +++++++------- kgantt/kgantt/xQGanttBarView.cpp | 4 +- kgantt/kgantt/xQGanttBarView.h | 9 ++-- kgantt/kgantt/xQGanttBarViewPort.cpp | 34 ++++++------- kgantt/kgantt/xQGanttBarViewPort.h | 17 +++---- kgantt/kgantt/xQGanttBarViewPort_Events.cpp | 26 +++++----- kgantt/kgantt/xQGanttListView.cpp | 4 +- kgantt/kgantt/xQGanttListView.h | 9 ++-- kgantt/kgantt/xQGanttListViewPort.cpp | 6 +-- kgantt/kgantt/xQGanttListViewPort.h | 9 ++-- 20 files changed, 158 insertions(+), 150 deletions(-) (limited to 'kgantt') diff --git a/kgantt/COPYING b/kgantt/COPYING index 54754ab4b..b55fa1466 100644 --- a/kgantt/COPYING +++ b/kgantt/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains + 0. This License applies to any program or other work which tqcontains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any +code means all the source code for all modules it tqcontains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kgantt/kgantt/KGantt.cpp b/kgantt/kgantt/KGantt.cpp index 249f11ad9..a3360c7a5 100644 --- a/kgantt/kgantt/KGantt.cpp +++ b/kgantt/kgantt/KGantt.cpp @@ -15,8 +15,8 @@ KGantt::KGantt(KGanttItem* toplevelitem, - TQWidget* parent, const char * name, WFlags f) - : TQWidget(parent,name,f) + TQWidget* tqparent, const char * name, WFlags f) + : TQWidget(tqparent,name,f) { #ifdef _DEBUG_ printf("KGantt::KGantt()\n"); diff --git a/kgantt/kgantt/KGantt.h b/kgantt/kgantt/KGantt.h index 5cfe559c1..7448e01a3 100644 --- a/kgantt/kgantt/KGantt.h +++ b/kgantt/kgantt/KGantt.h @@ -49,7 +49,7 @@ /** * \mainpage KGantt Module
* - * The kgantt module tqcontains several classes (KGanttItem, KGantt) + * The kgantt module contains several classes (KGanttItem, KGantt) * for drawing and editing gantt-diagramms. * * This example shows how to use the gantt module: @@ -83,15 +83,16 @@ /// Gantt Widget. /*! - * A gantt widget tqcontains two parts, a list view and a + * A gantt widget contains two parts, a list view and a * bar view. */ //////////////////////////////// -class KDE_EXPORT KGantt : public QWidget +class KDE_EXPORT KGantt : public TQWidget //////////////////////////////// { Q_OBJECT + TQ_OBJECT public: @@ -102,7 +103,7 @@ public: * */ KGantt(KGanttItem* toplevelitem = 0, - TQWidget* parent = 0, const char * name=0, WFlags f=0 ); + TQWidget* tqparent = 0, const char * name=0, WFlags f=0 ); /// Destructor. diff --git a/kgantt/kgantt/KGanttBarConfig.cpp b/kgantt/kgantt/KGanttBarConfig.cpp index ff5f4ee8e..e41dc7c60 100644 --- a/kgantt/kgantt/KGanttBarConfig.cpp +++ b/kgantt/kgantt/KGanttBarConfig.cpp @@ -13,9 +13,9 @@ KGanttBarConfig::KGanttBarConfig(xQGanttBarView* barview, - TQWidget* parent, + TQWidget* tqparent, const char * name, WFlags f) - : TQWidget(parent,name,f) + : TQWidget(tqparent,name,f) { _barview = barview; KColorButton* b = new KColorButton(this); diff --git a/kgantt/kgantt/KGanttBarConfig.h b/kgantt/kgantt/KGanttBarConfig.h index 88049feae..e12475b1d 100644 --- a/kgantt/kgantt/KGanttBarConfig.h +++ b/kgantt/kgantt/KGanttBarConfig.h @@ -34,15 +34,16 @@ class xQGanttBarView; -class KGanttBarConfig : public QWidget +class KGanttBarConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: KGanttBarConfig(xQGanttBarView* barview, - TQWidget* parent = 0, const char* name=0, WFlags f=0); + TQWidget* tqparent = 0, const char* name=0, WFlags f=0); protected slots: diff --git a/kgantt/kgantt/KGanttItem.cpp b/kgantt/kgantt/KGanttItem.cpp index 3632e1706..7939d49ca 100644 --- a/kgantt/kgantt/KGanttItem.cpp +++ b/kgantt/kgantt/KGanttItem.cpp @@ -12,28 +12,28 @@ TQBrush KGanttItem::_selectBrush(TQColor(255,0,0)); -KGanttItem::KGanttItem(KGanttItem* parentItem, const TQString& text, +KGanttItem::KGanttItem(KGanttItem* tqparentItem, const TQString& text, const TQDateTime& start, const TQDateTime& end) : TQObject() //////////////////////////////////////////////////////// { - init(parentItem,text, start,end); + init(tqparentItem,text, start,end); } -KGanttItem::KGanttItem(KGanttItem* parentItem, const TQString& text, +KGanttItem::KGanttItem(KGanttItem* tqparentItem, const TQString& text, const TQDateTime& start, long durationMin) : TQObject() //////////////////////////////////////////////////////// { - init(parentItem, text, start, start.addSecs( durationMin * 60)); + init(tqparentItem, text, start, start.addSecs( durationMin * 60)); } void -KGanttItem::init(KGanttItem* parentItem, const TQString& text, +KGanttItem::init(KGanttItem* tqparentItem, const TQString& text, const TQDateTime& start, const TQDateTime& end) /////////////////////////////////////////////////////////////// { @@ -55,10 +55,10 @@ KGanttItem::init(KGanttItem* parentItem, const TQString& text, _start = start; _minDateTime = start; _end = end; _maxDateTime = end; - _parentItem = parentItem; + _tqparentItem = tqparentItem; - if(_parentItem) - _parentItem->registerItem(this); + if(_tqparentItem) + _tqparentItem->registerItem(this); } @@ -71,8 +71,8 @@ KGanttItem::~KGanttItem() printf("-> delete %s \n", getText().latin1() ); #endif - if(_parentItem) - _parentItem->unregisterItem(this); + if(_tqparentItem) + _tqparentItem->unregisterItem(this); _subitems.setAutoDelete(true); _subitems.clear(); @@ -90,7 +90,7 @@ KGanttRelation* KGanttItem::addRelation(KGanttItem* from, KGanttItem* to, const TQString& text) { - if(_subitems.tqcontainsRef(from) > 0 && _subitems.tqcontainsRef(to) >0) { + if(_subitems.containsRef(from) > 0 && _subitems.containsRef(to) >0) { KGanttRelation* rel = new KGanttRelation(from,to,text); _relations.append(rel); @@ -595,7 +595,7 @@ KGanttItem::dump(TQTextOStream& cout, const TQString& pre) } -QString +TQString KGanttItem::ChangeAsString(Change c) ////////////////////////////////// { diff --git a/kgantt/kgantt/KGanttItem.h b/kgantt/kgantt/KGanttItem.h index fb7feb04d..a49c825b7 100644 --- a/kgantt/kgantt/KGanttItem.h +++ b/kgantt/kgantt/KGanttItem.h @@ -25,9 +25,9 @@ changelog : 26 dec 2000, jh - 09 jan 2001, jh - added signal destroyed(xQTask*) + 09 jan 2001, jh - added signal destroyed(xTQTask*) - 11 jan 2001, jh changed to kde : xQTask -> KGanttItem + 11 jan 2001, jh changed to kde : xTQTask -> KGanttItem */ @@ -46,16 +46,17 @@ /// KGanttItem. /*! - * This class describes a item. It tqcontains dates on which the item starts and - * ends. It also tqcontains attributes that gouverns the graphical representation + * This class describes a item. It contains dates on which the item starts and + * ends. It also contains attributes that gouverns the graphical representation * in a gantt diagramm. */ ////////////////////////////////// -class KDE_EXPORT KGanttItem : public QObject +class KDE_EXPORT KGanttItem : public TQObject ////////////////////////////////// { Q_OBJECT + TQ_OBJECT public: @@ -121,7 +122,7 @@ public: // Draw handlke for opening/closing item. DrawHandle = 16, - /// Draw handle only if item tqcontains subitems + /// Draw handle only if item contains subitems DrawHandleWSubitems = 32, DrawAll = 255 @@ -138,7 +139,7 @@ public: /*! * */ - KGanttItem(KGanttItem* parentItem, const TQString& text, + KGanttItem(KGanttItem* tqparentItem, const TQString& text, const TQDateTime& start, const TQDateTime& end); @@ -147,7 +148,7 @@ public: /*! * */ - KGanttItem(KGanttItem* parentItem, const TQString& text, + KGanttItem(KGanttItem* tqparentItem, const TQString& text, const TQDateTime& start, long durationMin); @@ -501,7 +502,7 @@ private: void registerItem(KGanttItem* item); void unregisterItem(KGanttItem* item); - void init(KGanttItem* parentItem, const TQString& text, + void init(KGanttItem* tqparentItem, const TQString& text, const TQDateTime& start, const TQDateTime& end); @@ -525,7 +526,7 @@ private: int _height, _style, _mode; - KGanttItem* _parentItem; + KGanttItem* _tqparentItem; TQPtrList _subitems; TQPtrList _relations; diff --git a/kgantt/kgantt/KGanttRelation.cpp b/kgantt/kgantt/KGanttRelation.cpp index f95deea10..e5eab3b4f 100644 --- a/kgantt/kgantt/KGanttRelation.cpp +++ b/kgantt/kgantt/KGanttRelation.cpp @@ -138,7 +138,7 @@ KGanttRelation::dump(TQTextOStream& cout, const TQString& pre) } -QString +TQString KGanttRelation::ChangeAsString(Change c) ////////////////////////////////// { diff --git a/kgantt/kgantt/KGanttRelation.h b/kgantt/kgantt/KGanttRelation.h index 8ab96c5df..a75cec9be 100644 --- a/kgantt/kgantt/KGanttRelation.h +++ b/kgantt/kgantt/KGanttRelation.h @@ -40,16 +40,17 @@ class KGanttItem; /// KGanttRelation. /*! - * This class describes a item. It tqcontains dates on which the item starts and - * ends. It also tqcontains attributes that gouverns the graphical representation + * This class describes a item. It contains dates on which the item starts and + * ends. It also contains attributes that gouverns the graphical representation * in a gantt diagramm. */ ////////////////////////////////// -class KGanttRelation : public QObject +class KGanttRelation : public TQObject ////////////////////////////////// { Q_OBJECT + TQ_OBJECT friend class KGanttItem; diff --git a/kgantt/kgantt/itemedit.ui b/kgantt/kgantt/itemedit.ui index 3be22f9e4..2b2e2a675 100644 --- a/kgantt/kgantt/itemedit.ui +++ b/kgantt/kgantt/itemedit.ui @@ -1,6 +1,6 @@ Form1 - + Form1 @@ -26,7 +26,7 @@ 6 - + _itemTextLabel @@ -53,7 +53,7 @@ - + groupBox10 @@ -81,7 +81,7 @@ - + _minStartMinuetEdit @@ -95,7 +95,7 @@ 2 - + _minStartHourEdit @@ -109,12 +109,12 @@ 2 - + _minStartDateEdit - + _minStartDateLabel @@ -130,7 +130,7 @@ Date: - + _minStartTimeSepatatorLabel @@ -144,7 +144,7 @@ : - + _minStartTimeLabel @@ -162,7 +162,7 @@ - + groupBox11 @@ -173,7 +173,7 @@ unnamed - + _maxStartHourEdit @@ -187,12 +187,12 @@ 2 - + _maxStartDateEdit - + _maxStartTimeSepatatorLabel @@ -206,7 +206,7 @@ : - + _maxStartMinuetEdit @@ -237,7 +237,7 @@ - + _maxStartTimeLabel @@ -253,7 +253,7 @@ Time: - + _maxStartDateLabel @@ -271,7 +271,7 @@ - + groupBox8 @@ -282,7 +282,7 @@ unnamed - + _startTimeLabel @@ -315,7 +315,7 @@ - + _startTimeSepatatorLabel @@ -329,7 +329,7 @@ : - + _startDateLabel @@ -345,12 +345,12 @@ Date: - + _startDateEdit - + _startHourEdit @@ -364,7 +364,7 @@ 2 - + _startMinuetEdit @@ -380,7 +380,7 @@ - + groupBox9 @@ -391,7 +391,7 @@ unnamed - + _endMinuetEdit @@ -422,12 +422,12 @@ - + _endDateEdit - + _endTimeLabel @@ -443,7 +443,7 @@ Time: - + _endDateLabel @@ -459,7 +459,7 @@ Date: - + _endTimeSeparator @@ -473,7 +473,7 @@ : - + _endHourEdit @@ -489,7 +489,7 @@ - + groupBox7 @@ -500,7 +500,7 @@ unnamed - + mode1 @@ -528,7 +528,7 @@ 20 - + style1 @@ -548,7 +548,7 @@ _styleStyleCombo - + _styleStyleLabel @@ -564,7 +564,7 @@ Style: - + _styleModeLabel @@ -580,7 +580,7 @@ Mode: - + _styleHeightLabel @@ -598,7 +598,7 @@ - + _itemTextEdit diff --git a/kgantt/kgantt/itemedit2.ui b/kgantt/kgantt/itemedit2.ui index bdcc0eb70..d77d2f5f5 100644 --- a/kgantt/kgantt/itemedit2.ui +++ b/kgantt/kgantt/itemedit2.ui @@ -1,6 +1,6 @@ Form1 - + Form1 @@ -26,12 +26,12 @@ 6 - + _itemTextEdit - + groupBox5 @@ -42,7 +42,7 @@ unnamed - + style1 @@ -70,7 +70,7 @@ 20 - + mode1 @@ -90,7 +90,7 @@ _styleModeCombo - + _styleHeightLabel @@ -106,7 +106,7 @@ Height: - + _styleModeLabel @@ -122,7 +122,7 @@ Mode: - + _styleStyleLabel @@ -140,7 +140,7 @@ - + groupBox6 @@ -151,7 +151,7 @@ unnamed - + Start @@ -176,7 +176,7 @@ _dateTimeEditCombo - + _dateTimeTimeLabel @@ -192,7 +192,7 @@ Time: - + _dateTimeDateLabel @@ -208,12 +208,12 @@ Date: - + _startDateEdit - + _dateTimeHourEdit @@ -227,7 +227,7 @@ 2 - + _startTimeSepatatorLabel @@ -241,7 +241,7 @@ : - + _dateTimeMinuetEdit @@ -272,7 +272,7 @@ - + _dateTimeEditLabel @@ -290,7 +290,7 @@ - + _itemTextLabel diff --git a/kgantt/kgantt/xQGanttBarView.cpp b/kgantt/kgantt/xQGanttBarView.cpp index 7cc410d11..dc9314996 100644 --- a/kgantt/kgantt/xQGanttBarView.cpp +++ b/kgantt/kgantt/xQGanttBarView.cpp @@ -12,9 +12,9 @@ xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem, - TQWidget* parent, + TQWidget* tqparent, const char * name, WFlags f) - : TQScrollView(parent,name,f) + : TQScrollView(tqparent,name,f) { _config = NULL; diff --git a/kgantt/kgantt/xQGanttBarView.h b/kgantt/kgantt/xQGanttBarView.h index 08105727c..d9037b404 100644 --- a/kgantt/kgantt/xQGanttBarView.h +++ b/kgantt/kgantt/xQGanttBarView.h @@ -1,5 +1,5 @@ -#ifndef _XQGANTTBARVIEW_H_ -#define _XQGANTTBARVIEW_H_ +#ifndef _XTQGANTTBARVIEW_H_ +#define _XTQGANTTBARVIEW_H_ /* @@ -47,11 +47,12 @@ class KGanttBarConfig; */ ////////////////////////////////////////// -class xQGanttBarView : public QScrollView +class xQGanttBarView : public TQScrollView ////////////////////////////////////////// { Q_OBJECT + TQ_OBJECT public: @@ -61,7 +62,7 @@ public: /*! * */ - xQGanttBarView(KGanttItem* toplevelitem, TQWidget* parent = 0, + xQGanttBarView(KGanttItem* toplevelitem, TQWidget* tqparent = 0, const char * name=0, WFlags f=0 ); diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp index 2ee7ad02f..c1dc60d6e 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort.cpp @@ -22,12 +22,12 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem, - xQGanttBarView* parent, + xQGanttBarView* tqparent, const char * name, WFlags f) - : TQFrame(parent,name,f) + : TQFrame(tqparent,name,f) ///////////////////////////////////////////////////////////////////////////// { - _parent = parent; + _tqparent = tqparent; closedIcon = TQPixmap(open_xpm); openedIcon = TQPixmap(close_xpm); @@ -35,7 +35,7 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem, _observedList = NULL; _toolbar = NULL; - _gItemList = TQPtrDict(449); + _gItemList = TQPtrDict(449); _gItemList.setAutoDelete(true); _toplevelitem = toplevelitem; @@ -107,7 +107,7 @@ xQGanttBarViewPort::toolbar(TQMainWindow* mw) { if(_toolbar || mw == 0) return _toolbar; - _toolbar = new KToolBar(mw,TQMainWindow::DockTop); + _toolbar = new KToolBar(mw,TQMainWindow::TQt::DockTop); mw->addToolBar(_toolbar); @@ -239,7 +239,7 @@ xQGanttBarViewPort::initMenu() pix = _iconloader->loadIcon("configure.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("configure.png not found !\n"); - _menu->insertItem(pix, i18n("Configure Gantt..."), _parent, TQT_SLOT(showConfig())); + _menu->insertItem(pix, i18n("Configure Gantt..."), _tqparent, TQT_SLOT(showConfig())); } @@ -420,8 +420,8 @@ xQGanttBarViewPort::recalc(KGanttItem* item, int xPos, int yPos, int _textPosY = yPos + (int) (0.7 * (double) tmpHeight * _scaleY); int _textPosX = xPos + dd + 18; - xQTaskPosition* tpos = - new xQTaskPosition(nr, xPos, yPos, _screenW, _screenH, _screenHS, + xTQTaskPosition* tpos = + new xTQTaskPosition(nr, xPos, yPos, _screenW, _screenH, _screenHS, _textPosX, _textPosY, depth); _gItemList.tqreplace(item, tpos ); @@ -459,7 +459,7 @@ void xQGanttBarViewPort::drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect ) { - xQTaskPosition* tpos = _gItemList[item]; + xTQTaskPosition* tpos = _gItemList[item]; if(!tpos) return; @@ -589,8 +589,8 @@ xQGanttBarViewPort::drawRelation(TQPainter* p, KGanttItem* from = rel->getFrom(); KGanttItem* to = rel->getTo(); - xQTaskPosition* tpos_from = _gItemList[from]; - xQTaskPosition* tpos_to = _gItemList[to]; + xTQTaskPosition* tpos_from = _gItemList[from]; + xTQTaskPosition* tpos_to = _gItemList[to]; p->setPen(rel->getPen()); @@ -839,7 +839,7 @@ xQGanttBarViewPort::zoom(double sfactor, int sx, int sy) recalc(); adjustSize(); - _parent->center(screenX(wx), screenY(wy) ); + _tqparent->center(screenX(wx), screenY(wy) ); TQWidget::update(); @@ -854,12 +854,12 @@ xQGanttBarViewPort::zoom(double sfactor) { printf("zoom %f \n", sfactor ); - int x = (int) (_parent->visibleWidth()/2 + 0.5); - int y = (int) (_parent->visibleHeight()/2 + 0.5); + int x = (int) (_tqparent->visibleWidth()/2 + 0.5); + int y = (int) (_tqparent->visibleHeight()/2 + 0.5); printf("dx/2 = %d, dy/2 = %d \n", x,y); - zoom(sfactor, x + _parent->contentsX(), y + _parent->contentsY() ); + zoom(sfactor, x + _tqparent->contentsX(), y + _tqparent->contentsY() ); } @@ -872,7 +872,7 @@ xQGanttBarViewPort::zoomAll() printf("zoom all. scaleX = %f\n", _scaleX ); #endif - _scaleX = ((double) _parent->visibleWidth()*60)/ + _scaleX = ((double) _tqparent->visibleWidth()*60)/ ((double) (_toplevelitem->getStart().secsTo(_toplevelitem->getEnd()) + _marginX*120)); recalc(); @@ -910,7 +910,7 @@ xQGanttBarViewPort::addHoliday(int y, int m, int d) xQGanttBarViewPort::Position xQGanttBarViewPort::check(KGanttItem** founditem, int x, int y) { - TQPtrDictIterator it(_gItemList); + TQPtrDictIterator it(_gItemList); static int ty, ty2, tx, tx2, hx, hx2, hy, hy2; bool increased; diff --git a/kgantt/kgantt/xQGanttBarViewPort.h b/kgantt/kgantt/xQGanttBarViewPort.h index 1b3de985f..e84761e14 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.h +++ b/kgantt/kgantt/xQGanttBarViewPort.h @@ -1,5 +1,5 @@ -#ifndef _XQGANTTBARVIEWPORT_H_ -#define _XQGANTTBARVIEWPORT_H_ +#ifndef _XTQGANTTBARVIEWPORT_H_ +#define _XTQGANTTBARVIEWPORT_H_ /* @@ -51,13 +51,13 @@ class xQGanttBarView; // This is an internal class. // helper for drawing items -class xQTaskPosition +class xTQTaskPosition //////////////////// { public : - xQTaskPosition(int nr, int x, int y, int w, int h, int hiSub, + xTQTaskPosition(int nr, int x, int y, int w, int h, int hiSub, int tPx, int tPy, int d) : _nr(nr), _screenX(x), _screenY(y), _screenW(w), _screenH(h), _screenHS(hiSub), _textPosX(tPx), _textPosY(tPy), _depth(d) @@ -85,11 +85,12 @@ public : */ ///////////////////////////////////////// -class KDE_EXPORT xQGanttBarViewPort : public QFrame +class KDE_EXPORT xQGanttBarViewPort : public TQFrame //////////////////////////////////////// { Q_OBJECT + TQ_OBJECT friend class xQGanttBarView; friend class KGantt; @@ -103,7 +104,7 @@ public: /*! * */ - xQGanttBarViewPort(KGanttItem* toplevelitem, xQGanttBarView* parent = 0, + xQGanttBarViewPort(KGanttItem* toplevelitem, xQGanttBarView* tqparent = 0, const char * name=0, WFlags f=0 ); @@ -123,7 +124,7 @@ public: - TQPtrDict _gItemList; + TQPtrDict _gItemList; /// Add holiday. @@ -244,7 +245,7 @@ private: // this will be set by setParentScrollView() - xQGanttBarView* _parent; + xQGanttBarView* _tqparent; int _grid, _snapgrid; bool _drawGrid, _drawHeader; diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp index 1791689e3..be6d38b54 100644 --- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp @@ -66,7 +66,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) */ if(e->button() == MidButton && _mode == Select) { - xQTaskPosition* tp = _gItemList.find(_currentItem); + xTQTaskPosition* tp = _gItemList.tqfind(_currentItem); TQPainter p(this); TQRect rect = p.boundingRect(tp->_textPosX, @@ -118,7 +118,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) _itemInfo->setText( tmp ); _itemInfo->adjustSize(); - _itemInfo->move(e->x() + 25, _gItemList.find(_currentItem)->_screenY - 50 ); + _itemInfo->move(e->x() + 25, _gItemList.tqfind(_currentItem)->_screenY - 50 ); _itemInfo->show(); } else @@ -245,7 +245,7 @@ xQGanttBarViewPort::mouseReleaseEvent(TQMouseEvent* e) double sys_width = fabs(x2 - x1); - double mass = (_parent->visibleWidth()/ sys_width); + double mass = (_tqparent->visibleWidth()/ sys_width); zoom(mass, (int) (x1+(x2-x1)/2), (int) (y1+(y2-y1)/2) ); @@ -298,7 +298,7 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) int pixeldiff = e->x() - _startPoint->x(); _timediff = (int) ((double) pixeldiff / _scaleX + 0.5 ); - xQTaskPosition* tpos = _gItemList[_currentItem]; + xTQTaskPosition* tpos = _gItemList[_currentItem]; int x = tpos->_screenX; int w = tpos->_screenW; @@ -366,15 +366,15 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) _itemInfo->setText( stmp ); _itemInfo->adjustSize(); - _itemInfo->move(e->x() + 25, _gItemList.find(_currentItem)->_screenY - 50); + _itemInfo->move(e->x() + 25, _gItemList.tqfind(_currentItem)->_screenY - 50); _itemInfo->show(); if(oldx > 0) { - p.fillRect(oldx, _gItemList.find(_currentItem)->_screenY, - oldw, _gItemList.find(_currentItem)->_screenH, + p.fillRect(oldx, _gItemList.tqfind(_currentItem)->_screenY, + oldw, _gItemList.tqfind(_currentItem)->_screenH, TQBrush(TQColor(50,50,50), Dense4Pattern)); - p.drawRect(oldx, _gItemList.find(_currentItem)->_screenY, - oldw, _gItemList.find(_currentItem)->_screenH); + p.drawRect(oldx, _gItemList.tqfind(_currentItem)->_screenY, + oldw, _gItemList.tqfind(_currentItem)->_screenH); p.setPen(_solidPen); if(_changeStart) @@ -386,11 +386,11 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) } p.setPen(_dashPen); - p.fillRect(x, _gItemList.find(_currentItem)->_screenY, - w, _gItemList.find(_currentItem)->_screenH, + p.fillRect(x, _gItemList.tqfind(_currentItem)->_screenY, + w, _gItemList.tqfind(_currentItem)->_screenH, TQBrush(TQColor(50,50,50), Dense4Pattern) ); - p.drawRect(x, _gItemList.find(_currentItem)->_screenY, - w, _gItemList.find(_currentItem)->_screenH); + p.drawRect(x, _gItemList.tqfind(_currentItem)->_screenY, + w, _gItemList.tqfind(_currentItem)->_screenH); p.setPen(_solidPen); if(_changeStart) diff --git a/kgantt/kgantt/xQGanttListView.cpp b/kgantt/kgantt/xQGanttListView.cpp index 3f5f44c28..f5a587dab 100644 --- a/kgantt/kgantt/xQGanttListView.cpp +++ b/kgantt/kgantt/xQGanttListView.cpp @@ -10,9 +10,9 @@ #include #include -xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent, +xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, TQWidget* tqparent, const char * name, WFlags f) - : TQScrollView(parent,name,f) + : TQScrollView(tqparent,name,f) ///////////////////////////////////////////////////////// { _toplevelitem = toplevelitem; diff --git a/kgantt/kgantt/xQGanttListView.h b/kgantt/kgantt/xQGanttListView.h index ff002a7b1..fa0f973da 100644 --- a/kgantt/kgantt/xQGanttListView.h +++ b/kgantt/kgantt/xQGanttListView.h @@ -1,5 +1,5 @@ -#ifndef _XQGANTTLISTVIEW_H_ -#define _XQGANTTLISTVIEW_H_ +#ifndef _XTQGANTTLISTVIEW_H_ +#define _XTQGANTTLISTVIEW_H_ /* @@ -44,11 +44,12 @@ */ ////////////////////////////////////////////// -class xQGanttListView : public QScrollView +class xQGanttListView : public TQScrollView ////////////////////////////////////////////// { Q_OBJECT + TQ_OBJECT public: @@ -58,7 +59,7 @@ public: /*! * */ - xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent = 0, + xQGanttListView(KGanttItem* toplevelitem, TQWidget* tqparent = 0, const char * name=0, WFlags f=0 ); diff --git a/kgantt/kgantt/xQGanttListViewPort.cpp b/kgantt/kgantt/xQGanttListViewPort.cpp index a792ad992..2549c8807 100644 --- a/kgantt/kgantt/xQGanttListViewPort.cpp +++ b/kgantt/kgantt/xQGanttListViewPort.cpp @@ -13,9 +13,9 @@ int xQGanttListViewPort::_ListViewCounter = 0; -xQGanttListViewPort::xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent, +xQGanttListViewPort::xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* tqparent, const char * name, WFlags f ) - : TQFrame(parent,name,f) + : TQFrame(tqparent,name,f) { _toplevelitem = toplevelitem; @@ -109,7 +109,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect { static int margin = 2; - xQTaskPosition* tpos = _barviewport->_gItemList[item]; + xTQTaskPosition* tpos = _barviewport->_gItemList[item]; if(!tpos) return; diff --git a/kgantt/kgantt/xQGanttListViewPort.h b/kgantt/kgantt/xQGanttListViewPort.h index cc16ca8c8..bb0d1b156 100644 --- a/kgantt/kgantt/xQGanttListViewPort.h +++ b/kgantt/kgantt/xQGanttListViewPort.h @@ -1,5 +1,5 @@ -#ifndef _XQGANTTLISTVIEWPORT_H_ -#define _XQGANTTLISTVIEWPORT_H_ +#ifndef _XTQGANTTLISTVIEWPORT_H_ +#define _XTQGANTTLISTVIEWPORT_H_ /* @@ -44,11 +44,12 @@ */ //////////////////////////////////////////// -class xQGanttListViewPort : public QFrame +class xQGanttListViewPort : public TQFrame //////////////////////////////////////////// { Q_OBJECT + TQ_OBJECT friend class xQGanttListView; @@ -60,7 +61,7 @@ public: /*! * */ - xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent = 0, + xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* tqparent = 0, const char * name=0, WFlags f=0 ); -- cgit v1.2.1