diff options
Diffstat (limited to 'kgantt/kgantt/xQGanttBarViewPort_Events.cpp')
-rw-r--r-- | kgantt/kgantt/xQGanttBarViewPort_Events.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp index 8609962b..1791689e 100644 --- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp @@ -23,11 +23,11 @@ static int _timediff; static bool _changeEnd, _changeStart; static int oldw = -1, oldx = -1; -QDateTime _tmpStartDateTime, _tmpEndDateTime; +TQDateTime _tmpStartDateTime, _tmpEndDateTime; void -xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) +xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) { // set _currentItem to pushed mousebutton _currentMButton = e->button(); @@ -67,9 +67,9 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) if(e->button() == MidButton && _mode == Select) { xQTaskPosition* tp = _gItemList.find(_currentItem); - QPainter p(this); + TQPainter p(this); - QRect rect = p.boundingRect(tp->_textPosX, + TQRect rect = p.boundingRect(tp->_textPosX, tp->_textPosY, 200, tp->_screenH, AlignLeft, _currentItem->getText() ); @@ -109,7 +109,7 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) if(e->state() == ShiftButton) { - QString tmp; tmp.sprintf("%s\n", _currentItem->getText().latin1() ); + TQString tmp; tmp.sprintf("%s\n", _currentItem->getText().latin1() ); tmp += _currentItem->getStart().toString(); tmp += " - "; @@ -154,7 +154,7 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) void -xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) +xQGanttBarViewPort::mouseReleaseEvent(TQMouseEvent* e) { switch(_mode) { @@ -176,7 +176,7 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) oldx = -1; oldw = -1; recalc(); - QWidget::update(); + TQWidget::update(); } } @@ -193,7 +193,7 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) _currentItem->select( !state ); } - QWidget::update(); + TQWidget::update(); _selectItem = false; } @@ -226,8 +226,8 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) if(_currentMButton == LeftButton) { - QPainter p(this); - QPen pen(DashLine); + TQPainter p(this); + TQPen pen(DashLine); pen.setColor(red); p.setRasterOp(XorROP); p.setPen( pen ); @@ -269,14 +269,14 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) void -xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) +xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) { if(fabs((float)(_startPoint->x() - e->x())) < 2 && fabs((float)(_startPoint->y() - e->y())) < 2 ) return; - static QPen _dashPen(QColor(255,0,0),DashLine); - static QPen _solidPen(QColor(200,200,200)); + static TQPen _dashPen(TQColor(255,0,0),DashLine); + static TQPen _solidPen(TQColor(200,200,200)); _Mousemoved = true; @@ -286,13 +286,13 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_currentMButton == LeftButton && _currentItem) { - QPainter p(this); + TQPainter p(this); p.setRasterOp(XorROP); - // QPen pen(DashLine); + // TQPen pen(DashLine); // pen.setColor(red); p.setPen( _dashPen ); - QString stmp; + TQString stmp; stmp.sprintf("%s\n", _currentItem->getText().latin1() ); int pixeldiff = e->x() - _startPoint->x(); @@ -318,10 +318,10 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_changeStart) { - QDateTime movedStart( _currentItem->getStart().addSecs(_timediff*60) ); + TQDateTime movedStart( _currentItem->getStart().addSecs(_timediff*60) ); _tmpStartDateTime.setDate( movedStart.date() ); - _tmpStartDateTime.setTime(QTime(0,0,0,0)); + _tmpStartDateTime.setTime(TQTime(0,0,0,0)); double diff = _tmpStartDateTime.secsTo(movedStart)/60; @@ -341,10 +341,10 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_changeEnd) { - QDateTime movedEnd( _currentItem->getEnd().addSecs(_timediff*60) ); + TQDateTime movedEnd( _currentItem->getEnd().addSecs(_timediff*60) ); _tmpEndDateTime.setDate( movedEnd.date() ); - _tmpEndDateTime.setTime(QTime(0,0,0,0)); + _tmpEndDateTime.setTime(TQTime(0,0,0,0)); double diff = _tmpEndDateTime.secsTo(movedEnd)/60; @@ -372,7 +372,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(oldx > 0) { p.fillRect(oldx, _gItemList.find(_currentItem)->_screenY, oldw, _gItemList.find(_currentItem)->_screenH, - QBrush(QColor(50,50,50), Dense4Pattern)); + TQBrush(TQColor(50,50,50), Dense4Pattern)); p.drawRect(oldx, _gItemList.find(_currentItem)->_screenY, oldw, _gItemList.find(_currentItem)->_screenH); @@ -388,7 +388,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) p.setPen(_dashPen); p.fillRect(x, _gItemList.find(_currentItem)->_screenY, w, _gItemList.find(_currentItem)->_screenH, - QBrush(QColor(50,50,50), Dense4Pattern) ); + TQBrush(TQColor(50,50,50), Dense4Pattern) ); p.drawRect(x, _gItemList.find(_currentItem)->_screenY, w, _gItemList.find(_currentItem)->_screenH); @@ -444,15 +444,15 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_currentMButton == LeftButton) { - static QString strpos; + static TQString strpos; strpos = ""; int s = worldX(_startPoint->x()); - QDateTime d1 = _toplevelitem->getStart().addSecs(s*60); + TQDateTime d1 = _toplevelitem->getStart().addSecs(s*60); s = worldX(e->x()); - QDateTime d2 = _toplevelitem->getStart().addSecs(s*60); + TQDateTime d2 = _toplevelitem->getStart().addSecs(s*60); strpos += d1.date().toString(); strpos += " - "; @@ -460,8 +460,8 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) emit message(strpos); - QPainter p(this); - QPen pen(DashLine); + TQPainter p(this); + TQPen pen(DashLine); pen.setColor(red); p.setRasterOp(XorROP); @@ -473,7 +473,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) _endPoint->x()-_startPoint->x(), _endPoint->y() - _startPoint->y()); - QBrush _selectedbrush( QColor(50,50,50), Dense4Pattern ); + TQBrush _selectedbrush( TQColor(50,50,50), Dense4Pattern ); p.fillRect( _startPoint->x(), _startPoint->y(), _endPoint->x()-_startPoint->x(), _endPoint->y() - _startPoint->y(), @@ -509,7 +509,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) void -xQGanttBarViewPort::keyPressEvent(QKeyEvent* e) +xQGanttBarViewPort::keyPressEvent(TQKeyEvent* e) { printf("xQGanttBarViewPort::keyPressEvent() key = %d \n", e->key() ); @@ -577,7 +577,7 @@ xQGanttBarViewPort::keyPressEvent(QKeyEvent* e) void -xQGanttBarViewPort::paintEvent(QPaintEvent * e) +xQGanttBarViewPort::paintEvent(TQPaintEvent * e) ///////////////////////////////////////////////// { update(e->rect().left(), e->rect().top(), |