From 1c93fca14d9ce37499bcfdf994c660186a0b6f17 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 14 Apr 2011 20:16:30 +0000 Subject: Enable kdepim compilation under Qt4 This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kgantt/kgantt/KGanttItem.cpp | 2 +- kgantt/kgantt/xQGanttBarView.cpp | 8 ++++---- kgantt/kgantt/xQGanttBarViewPort.cpp | 24 ++++++++++++------------ kgantt/kgantt/xQGanttBarViewPort_Events.cpp | 18 +++++++++--------- kgantt/kgantt/xQGanttListViewPort.h | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) (limited to 'kgantt/kgantt') diff --git a/kgantt/kgantt/KGanttItem.cpp b/kgantt/kgantt/KGanttItem.cpp index 7939d49c..35af0c7a 100644 --- a/kgantt/kgantt/KGanttItem.cpp +++ b/kgantt/kgantt/KGanttItem.cpp @@ -90,7 +90,7 @@ KGanttRelation* KGanttItem::addRelation(KGanttItem* from, KGanttItem* to, const TQString& text) { - if(_subitems.containsRef(from) > 0 && _subitems.containsRef(to) >0) { + if(_subitems.tqcontainsRef(from) > 0 && _subitems.tqcontainsRef(to) >0) { KGanttRelation* rel = new KGanttRelation(from,to,text); _relations.append(rel); diff --git a/kgantt/kgantt/xQGanttBarView.cpp b/kgantt/kgantt/xQGanttBarView.cpp index dc931499..f85fea6b 100644 --- a/kgantt/kgantt/xQGanttBarView.cpp +++ b/kgantt/kgantt/xQGanttBarView.cpp @@ -100,7 +100,7 @@ xQGanttBarView::drawHeader() TQDate t = startDate.addDays(-startDate.dayOfWeek()+1); - tmp = _toplevelitem->getStart().secsTo(t)/60; + tmp = _toplevelitem->getStart().secsTo(TQDateTime(t))/60; a = _viewport->screenX(tmp) - contentsX(); p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240))); @@ -110,7 +110,7 @@ xQGanttBarView::drawHeader() t = startDate.addDays(-startDate.day()+1); - tmp = _toplevelitem->getStart().secsTo(t)/60; + tmp = _toplevelitem->getStart().secsTo(TQDateTime(t))/60; a = _viewport->screenX(tmp) - contentsX(); e = t.daysInMonth(); @@ -124,7 +124,7 @@ xQGanttBarView::drawHeader() // draw snapgrid for first month - tmp = _toplevelitem->getStart().secsTo(startDate)/60; + tmp = _toplevelitem->getStart().secsTo(TQDateTime(startDate))/60; a = _viewport->screenX(tmp) - contentsX()+1; double dx = (double) ((_viewport->screenX(_viewport->_snapgrid*1000) - _viewport->screenX(0))/1000.); @@ -143,7 +143,7 @@ xQGanttBarView::drawHeader() for(int i=0; igetStart().secsTo(t)/60; + tmp = _toplevelitem->getStart().secsTo(TQDateTime(t))/60; a = _viewport->screenX(tmp) - contentsX(); p.setPen( TQPen(TQColor(black)) ); diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp index c1dc60d6..005ca596 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort.cpp @@ -88,7 +88,7 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem, recalc(); adjustSize(); - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(Qt::StrongFocus); _mode = Init; } @@ -117,7 +117,7 @@ xQGanttBarViewPort::toolbar(TQMainWindow* mw) _toolbar->insertButton("ganttSelect.png", 0, TQT_SIGNAL(clicked()), - this, TQT_SLOT(setSelect()), + TQT_TQOBJECT(this), TQT_SLOT(setSelect()), true, i18n("Select") ); KPopupMenu *selectMenu = new KPopupMenu(_toolbar); @@ -128,7 +128,7 @@ xQGanttBarViewPort::toolbar(TQMainWindow* mw) */ TQPixmap pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttSelecttask.png not found !\n"); - selectMenu->insertItem(pix, i18n("Select All"), this, TQT_SLOT(selectAll()) ); + selectMenu->insertItem(pix, i18n("Select All"), TQT_TQOBJECT(this), TQT_SLOT(selectAll()) ); /* @@ -136,7 +136,7 @@ xQGanttBarViewPort::toolbar(TQMainWindow* mw) */ pix = _iconloader->loadIcon("ganttUnselecttask", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttUnselecttask.png not found !\n"); - selectMenu->insertItem(pix, i18n("Unselect All"), this, TQT_SLOT(unselectAll()) ); + selectMenu->insertItem(pix, i18n("Unselect All"), TQT_TQOBJECT(this), TQT_SLOT(unselectAll()) ); KToolBarButton* b = _toolbar->getButton(0); @@ -145,30 +145,30 @@ xQGanttBarViewPort::toolbar(TQMainWindow* mw) _toolbar->insertButton("viewmag.png", 1, TQT_SIGNAL(clicked()), - this, TQT_SLOT(setZoom()), + TQT_TQOBJECT(this), TQT_SLOT(setZoom()), true, i18n("Zoom") ); KPopupMenu* zoomMenu = new KPopupMenu(_toolbar); pix = _iconloader->loadIcon("viewmag.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag.png not found !\n"); - zoomMenu->insertItem(pix, i18n("Zoom All"), this, TQT_SLOT(zoomAll()) ); + zoomMenu->insertItem(pix, i18n("Zoom All"), TQT_TQOBJECT(this), TQT_SLOT(zoomAll()) ); zoomMenu->insertSeparator(); pix = _iconloader->loadIcon("viewmag+.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag+.png not found !\n"); - zoomMenu->insertItem(pix, i18n("Zoom In +"), this, TQT_SLOT(zoomIn()) ); + zoomMenu->insertItem(pix, i18n("Zoom In +"), TQT_TQOBJECT(this), TQT_SLOT(zoomIn()) ); pix = _iconloader->loadIcon("viewmag-.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag-.png not found !\n"); - zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, TQT_SLOT(zoomOut()) ); + zoomMenu->insertItem(pix, i18n("Zoom Out -"), TQT_TQOBJECT(this), TQT_SLOT(zoomOut()) ); b = _toolbar->getButton(1); b->setDelayedPopup(zoomMenu); _toolbar->insertButton("move.png", 2, TQT_SIGNAL(clicked()), - this, TQT_SLOT(setMove()), + TQT_TQOBJECT(this), TQT_SLOT(setMove()), true, i18n("Move") ); return _toolbar; @@ -338,7 +338,7 @@ xQGanttBarViewPort::drawGrid(TQPainter* p, int x1, int y1, int x2, int y2) for(ptrDate = _holidays.first(); ptrDate != 0; ptrDate = _holidays.next() ) { if(*ptrDate > cmp) { - tmp = _toplevelitem->getStart().secsTo(*ptrDate)/60; + tmp = _toplevelitem->getStart().secsTo(TQDateTime(*ptrDate))/60; a = screenX( tmp ); p->fillRect( a, y1, w, y2, _hol ); } @@ -350,7 +350,7 @@ xQGanttBarViewPort::drawGrid(TQPainter* p, int x1, int y1, int x2, int y2) for(int i=0; i<=end; i++, start = start.addDays(1) ) { int dayOfWeek = start.dayOfWeek(); - tmp = _toplevelitem->getStart().secsTo(start)/60; + tmp = _toplevelitem->getStart().secsTo(TQDateTime(start))/60; a = screenX( tmp ); // draw saturday @@ -674,7 +674,7 @@ xQGanttBarViewPort::drawHeader(TQPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, for(int i=0; i<=end; i++, t = t.addDays(1) ) { - tmp = itemstart.secsTo(t)/60; + tmp = itemstart.secsTo(TQDateTime(t))/60; a = screenX( tmp ); if(t.dayOfWeek() == 1) { diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp index be6d38b5..d7542d1c 100644 --- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp @@ -43,7 +43,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) _itemTextEdit->hide(); // right mousebutton & control -> popup menu - if(e->button() == RightButton && e->state() == ControlButton ) { + if(e->button() == Qt::RightButton && e->state() == ControlButton ) { _menu->popup(e->globalPos()); return; } @@ -64,7 +64,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) /* * edit text */ - if(e->button() == MidButton && _mode == Select) { + if(e->button() == Qt::MidButton && _mode == Select) { xTQTaskPosition* tp = _gItemList.tqfind(_currentItem); TQPainter p(this); @@ -91,7 +91,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) /* * open/close item, move start, end, item */ - if(e->button() == LeftButton && _mode == Select) { + if(e->button() == Qt::LeftButton && _mode == Select) { _timediff = 0; @@ -210,21 +210,21 @@ xQGanttBarViewPort::mouseReleaseEvent(TQMouseEvent* e) if(!_Mousemoved) { - if(e->button() == LeftButton) + if(e->button() == Qt::LeftButton) zoom(1.4, e->x(), e->y() ); - if(e->button() == RightButton) + if(e->button() == Qt::RightButton) zoom(0.7, e->x(), e->y() ); - if(e->button() == MidButton) + if(e->button() == Qt::MidButton) zoomAll(); } else { - if(_currentMButton == LeftButton) { + if(_currentMButton == Qt::LeftButton) { TQPainter p(this); TQPen pen(DashLine); @@ -284,7 +284,7 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) case Select: { - if(_currentMButton == LeftButton && _currentItem) { + if(_currentMButton == Qt::LeftButton && _currentItem) { TQPainter p(this); p.setRasterOp(XorROP); @@ -442,7 +442,7 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) case Zoom: { - if(_currentMButton == LeftButton) { + if(_currentMButton == Qt::LeftButton) { static TQString strpos; diff --git a/kgantt/kgantt/xQGanttListViewPort.h b/kgantt/kgantt/xQGanttListViewPort.h index bb0d1b15..a2e97ca3 100644 --- a/kgantt/kgantt/xQGanttListViewPort.h +++ b/kgantt/kgantt/xQGanttListViewPort.h @@ -114,7 +114,7 @@ protected: void mousePressEvent(TQMouseEvent* e) { - if(e->button() == RightButton && e->state() == ControlButton ) { + if(e->button() == Qt::RightButton && e->state() == ControlButton ) { _menu->popup(e->globalPos()); return; } -- cgit v1.2.3