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 | |
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')
29 files changed, 2885 insertions, 2909 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index 790b381a..f3bc91a2 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -3,7 +3,7 @@ */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -26,32 +26,25 @@ ** 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. ** **********************************************************************/ #include "KDGanttMinimizeSplitter.h" -#ifndef QT_NO_SPLITTER - -#include "qpainter.h" -#include "qdrawutil.h" -#include "qbitmap.h" -#if QT_VERSION >= 300 -#include "qptrlist.h" -#include "qmemarray.h" -#else -#include <qlist.h> -#include <qarray.h> -#define QPtrList QList -#define QMemArray QArray -#endif -#include "qlayoutengine_p.h" -#include "qobjectlist.h" -#include "qstyle.h" -#include "qapplication.h" //sendPostedEvents -#include <qvaluelist.h> -#include <qcursor.h> +#ifndef TQT_NO_SPLITTER + +#include "tqpainter.h" +#include "tqdrawutil.h" +#include "tqbitmap.h" +#include "tqptrlist.h" +#include "tqmemarray.h" +#include "tqlayoutengine_p.h" +#include "tqobjectlist.h" +#include "tqstyle.h" +#include "tqapplication.h" //sendPostedEvents +#include <tqvaluelist.h> +#include <tqcursor.h> #ifndef KDGANTT_MASTER_CVS #include "KDGanttMinimizeSplitter.moc" #endif @@ -59,30 +52,29 @@ #ifndef DOXYGEN_SKIP_INTERNAL -#if QT_VERSION >= 300 static int mouseOffset; static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o, - KDGanttMinimizeSplitter *parent, const char * name ) - : QWidget( parent, name ), _activeButton( 0 ), _collapsed( false ) + KDGanttMinimizeSplitter *tqparent, const char * name ) + : TQWidget( tqparent, name ), _activeButton( 0 ), _collapsed( false ) { - s = parent; + s = tqparent; setOrientation(o); setMouseTracking( true ); } -QSize KDGanttSplitterHandle::sizeHint() const +TQSize KDGanttSplitterHandle::tqsizeHint() const { - return QSize(8,8); + return TQSize(8,8); } void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) { orient = o; -#ifndef QT_NO_CURSOR - if ( o == KDGanttMinimizeSplitter::Horizontal ) +#ifndef TQT_NO_CURSOR + if ( o == Qt::Horizontal ) setCursor( splitHCursor ); else setCursor( splitVCursor ); @@ -90,45 +82,45 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) } -void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) +void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e ) { updateCursor( e->pos() ); - if ( !(e->state()&LeftButton) ) + if ( !(e->state()&Qt::LeftButton) ) return; if ( _activeButton != 0) return; - QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) + TQCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos())) - mouseOffset; if ( opaque() ) { s->moveSplitter( pos, id() ); } else { int min = pos; int max = pos; s->getRange( id(), &min, &max ); - s->setRubberband( QMAX( min, QMIN(max, pos ))); + s->setRubberband( TQMAX( min, TQMIN(max, pos ))); } _collapsed = false; } -void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e ) +void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { _activeButton = onButton( e->pos() ); mouseOffset = s->pick(e->pos()); if ( _activeButton != 0) - repaint(); + tqrepaint(); updateCursor( e->pos() ); } } -void KDGanttSplitterHandle::updateCursor( const QPoint& p) +void KDGanttSplitterHandle::updateCursor( const TQPoint& p) { if ( onButton( p ) != 0 ) { setCursor( arrowCursor ); } else { - if ( orient == KDGanttMinimizeSplitter::Horizontal ) + if ( orient == Qt::Horizontal ) setCursor( splitHCursor ); else setCursor( splitVCursor ); @@ -136,7 +128,7 @@ void KDGanttSplitterHandle::updateCursor( const QPoint& p) } -void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) +void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e ) { if ( _activeButton != 0 ) { if ( onButton( e->pos() ) == _activeButton ) @@ -153,7 +145,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) pos = max; } - _origPos = s->pick(mapToParent( QPoint( 0,0 ) )); + _origPos = s->pick(mapToParent( TQPoint( 0,0 ) )); s->moveSplitter( pos, id() ); _collapsed = true; } @@ -167,27 +159,27 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) updateCursor( e->pos() ); } else { - if ( !opaque() && e->button() == LeftButton ) { - QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) + if ( !opaque() && e->button() == Qt::LeftButton ) { + TQCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos())) - mouseOffset; s->setRubberband( -1 ); s->moveSplitter( pos, id() ); } } - repaint(); + tqrepaint(); } -int KDGanttSplitterHandle::onButton( const QPoint& p ) +int KDGanttSplitterHandle::onButton( const TQPoint& p ) { - QValueList<QPointArray> list = buttonRegions(); + TQValueList<TQPointArray> list = buttonRegions(); int index = 1; - for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { - QRect rect = (*it).boundingRect(); + for( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { + TQRect rect = (*it).boundingRect(); rect.setLeft( rect.left()- 4 ); rect.setRight( rect.right() + 4); rect.setTop( rect.top()- 4 ); rect.setBottom( rect.bottom() + 4); - if ( rect.contains( p ) ) { + if ( rect.tqcontains( p ) ) { return index; } index++; @@ -196,14 +188,14 @@ int KDGanttSplitterHandle::onButton( const QPoint& p ) } -QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() +TQValueList<TQPointArray> KDGanttSplitterHandle::buttonRegions() { - QValueList<QPointArray> list; + TQValueList<TQPointArray> list; int sw = 8; int voffset[] = { (int) -sw*3, (int) sw*3 }; for ( int i = 0; i < 2; i++ ) { - QPointArray arr; + TQPointArray arr; if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right || _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) { int mid = height()/2 + voffset[i]; @@ -241,37 +233,37 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() return list; } -void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) +void KDGanttSplitterHandle::paintEvent( TQPaintEvent * ) { - QPixmap buffer( size() ); - QPainter p( &buffer ); + TQPixmap buffer( size() ); + TQPainter p( &buffer ); // Draw the splitter rectangle - p.setBrush( colorGroup().background() ); - p.setPen( colorGroup().foreground() ); + p.setBrush( tqcolorGroup().background() ); + p.setPen( tqcolorGroup().foreground() ); p.drawRect( rect() ); - parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(), - parentWidget()->colorGroup()); + tqparentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, rect(), + tqparentWidget()->tqcolorGroup()); int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size // arrow color - QColor col = colorGroup().background().dark( 200 ); + TQColor col = tqcolorGroup().background().dark( 200 ); p.setBrush( col ); p.setPen( col ); - QValueList<QPointArray> list = buttonRegions(); + TQValueList<TQPointArray> list = buttonRegions(); int index = 1; - for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQValueList<TQPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { if ( index == _activeButton ) { p.save(); - p.translate( parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftHorizontal ), - parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftVertical ) ); - p.drawPolygon( *it, true ); + p.translate( tqparentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ), + tqparentWidget()->tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) ); + p.tqdrawPolygon( *it, true ); p.restore(); } else { - p.drawPolygon( *it, true ); + p.tqdrawPolygon( *it, true ); } index++; } @@ -291,28 +283,27 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) } bitBlt( this, 0, 0, &buffer ); } -#endif -class QSplitterLayoutStruct +class TQSplitterLayoutStruct { public: KDGanttMinimizeSplitter::ResizeMode mode; - QCOORD sizer; + TQCOORD sizer; bool isSplitter; - QWidget *wid; + TQWidget *wid; }; -class QSplitterData +class TQSplitterData { public: - QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} + TQSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} - QPtrList<QSplitterLayoutStruct> list; + TQPtrList<TQSplitterLayoutStruct> list; bool opaque; bool firstShow; }; -void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, +void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, int pos, int space, int spacer ); #endif // DOXYGEN_SKIP_INTERNAL @@ -322,34 +313,34 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int \brief The KDGanttMinimizeSplitter class implements a splitter widget with minimize buttons. - This class (and its documentation) is largely a copy of Qt's - QSplitter; the copying was necessary because QSplitter is not - extensible at all. QSplitter and its documentation are licensed - according to the GPL and the Qt Professional License (if you hold + This class (and its documentation) is largely a copy of TQt's + TQSplitter; the copying was necessary because TQSplitter is not + extensible at all. TQSplitter and its documentation are licensed + according to the GPL and the TQt Professional License (if you hold such a license) and are (C) Trolltech AS. A splitter lets the user control the size of child widgets by - dragging the boundary between the children. Any number of widgets + dragging the boundary between the tqchildren. Any number of widgets may be controlled. - To show a QListBox, a QListView and a QTextEdit side by side: + To show a TQListBox, a TQListView and a TQTextEdit side by side: \code - KDGanttMinimizeSplitter *split = new KDGanttMinimizeSplitter( parent ); - QListBox *lb = new QListBox( split ); - QListView *lv = new QListView( split ); - QTextEdit *ed = new QTextEdit( split ); + KDGanttMinimizeSplitter *split = new KDGanttMinimizeSplitter( tqparent ); + TQListBox *lb = new TQListBox( split ); + TQListView *lv = new TQListView( split ); + TQTextEdit *ed = new TQTextEdit( split ); \endcode In KDGanttMinimizeSplitter, the boundary can be either horizontal or - vertical. The default is horizontal (the children are side by side) - but you can use setOrientation( QSplitter::Vertical ) to set it to + vertical. The default is horizontal (the tqchildren are side by side) + but you can use setOrientation( TQSplitter::Vertical ) to set it to vertical. Use setResizeMode() to specify that a widget should keep its size when the splitter is resized. - Although KDGanttMinimizeSplitter normally resizes the children only + Although KDGanttMinimizeSplitter normally resizes the tqchildren only at the end of a resize operation, if you call setOpaqueResize( TRUE ) the widgets are resized as often as possible. @@ -359,82 +350,74 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int sizes set by the user. If you hide() a child, its space will be distributed among the other - children. It will be reinstated when you show() it again. It is also + tqchildren. It will be reinstated when you show() it again. It is also possible to reorder the widgets within the splitter using moveToFirst() and moveToLast(). */ -static QSize minSize( const QWidget* /*w*/ ) +static TQSize minSize( const TQWidget* /*w*/ ) { - return QSize(0,0); + return TQSize(0,0); } // This is the original version of minSize -static QSize minSizeHint( const QWidget* w ) +static TQSize minSizeHint( const TQWidget* w ) { - QSize min = w->minimumSize(); - QSize s; + TQSize min = w->tqminimumSize(); + TQSize s; if ( min.height() <= 0 || min.width() <= 0 ) - s = w->minimumSizeHint(); + s = w->tqminimumSizeHint(); if ( min.height() > 0 ) s.setHeight( min.height() ); if ( min.width() > 0 ) s.setWidth( min.width() ); - return s.expandedTo(QSize(0,0)); + return s.expandedTo(TQSize(0,0)); } /*! - Constructs a horizontal splitter with the \a parent and \a - name arguments being passed on to the QFrame constructor. + Constructs a horizontal splitter with the \a tqparent and \a + name arguments being passed on to the TQFrame constructor. */ -KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name ) - :QFrame(parent,name,WPaintUnclipped) +KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *tqparent, const char *name ) + :TQFrame(tqparent,name,WPaintUnclipped) { -#if QT_VERSION >= 300 - orient = Horizontal; + orient =Qt::Horizontal; init(); -#endif } /*! - Constructs a splitter with orientation \a o with the \a parent - and \a name arguments being passed on to the QFrame constructor. + Constructs a splitter with orientation \a o with the \a tqparent + and \a name arguments being passed on to the TQFrame constructor. */ -KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name ) - :QFrame(parent,name,WPaintUnclipped) +KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, TQWidget *tqparent, const char *name ) + :TQFrame(tqparent,name,WPaintUnclipped) { -#if QT_VERSION >= 300 orient = o; init(); -#endif } /*! - Destroys the splitter and any children. + Destroys the splitter and any tqchildren. */ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter() { -#if QT_VERSION >= 300 data->list.setAutoDelete( TRUE ); delete data; -#endif } -#if QT_VERSION >= 300 void KDGanttMinimizeSplitter::init() { - data = new QSplitterData; - if ( orient == Horizontal ) - setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) ); + data = new TQSplitterData; + if ( orient ==Qt::Horizontal ) + tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) ); else - setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) ); + tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) ); } -#endif @@ -442,36 +425,33 @@ void KDGanttMinimizeSplitter::init() \brief the orientation of the splitter By default the orientation is horizontal (the widgets are side by side). - The possible orientations are Qt:Vertical and Qt::Horizontal (the default). + The possible orientations are TQt:Vertical and Qt::Horizontal (the default). */ -void KDGanttMinimizeSplitter::setOrientation( Orientation o ) +void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o ) { -#if QT_VERSION >= 300 if ( orient == o ) return; orient = o; - if ( orient == Horizontal ) - setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + if ( orient ==Qt::Horizontal ) + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) ); else - setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->isSplitter ) ((KDGanttSplitterHandle*)s->wid)->setOrientation( o ); s = data->list.next(); // ### next at end of loop, no iterator } recalc( isVisible() ); -#endif } -#if QT_VERSION >= 300 /*! Reimplemented from superclass. */ -void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * ) +void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * ) { doResize(); } @@ -486,30 +466,30 @@ void KDGanttMinimizeSplitter::resizeEvent( QResizeEvent * ) needed. (If \a first is TRUE, then recalcId is very probably needed.) */ -QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool first ) +TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first ) { - QSplitterLayoutStruct *s; + TQSplitterLayoutStruct *s; KDGanttSplitterHandle *newHandle = 0; if ( data->list.count() > 0 ) { - s = new QSplitterLayoutStruct; + s = new TQSplitterLayoutStruct; s->mode = KeepSize; - QString tmp = "qt_splithandle_"; + TQString tmp = "qt_splithandle_"; tmp += w->name(); newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() ); s->wid = newHandle; newHandle->setId(data->list.count()); s->isSplitter = TRUE; - s->sizer = pick( newHandle->sizeHint() ); + s->sizer = pick( newHandle->tqsizeHint() ); if ( first ) data->list.insert( 0, s ); else data->list.append( s ); } - s = new QSplitterLayoutStruct; + s = new TQSplitterLayoutStruct; s->mode = Stretch; s->wid = w; - if ( !testWState( WState_Resized ) && w->sizeHint().isValid() ) - s->sizer = pick( w->sizeHint() ); + if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() ) + s->sizer = pick( w->tqsizeHint() ); else s->sizer = pick( w->size() ); s->isSplitter = FALSE; @@ -527,29 +507,29 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs Tells the splitter that a child widget has been inserted or removed. The event is passed in \a c. */ -void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) +void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c ) { - if ( c->type() == QEvent::ChildInserted ) { + if ( c->type() == TQEvent::ChildInserted ) { if ( !c->child()->isWidgetType() ) return; - if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) ) + if ( ((TQWidget*)c->child())->testWFlags( WType_TopLevel ) ) return; - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->wid == c->child() ) return; s = data->list.next(); } - addWidget( (QWidget*)c->child() ); + addWidget( (TQWidget*)c->child() ); recalc( isVisible() ); - } else if ( c->type() == QEvent::ChildRemoved ) { - QSplitterLayoutStruct *p = 0; + } else if ( c->type() == TQEvent::ChildRemoved ) { + TQSplitterLayoutStruct *p = 0; if ( data->list.count() > 1 ) p = data->list.at(1); //remove handle _after_ first widget. - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->wid == c->child() ) { data->list.removeRef( s ); @@ -576,14 +556,14 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) */ void KDGanttMinimizeSplitter::setRubberband( int p ) { - QPainter paint( this ); + TQPainter paint( this ); paint.setPen( gray ); paint.setBrush( gray ); paint.setRasterOp( XorROP ); - QRect r = contentsRect(); + TQRect r = contentsRect(); const int rBord = 3; //Themable???? - int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); - if ( orient == Horizontal ) { + int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this); + if ( orient ==Qt::Horizontal ) { if ( opaqueOldPos >= 0 ) paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), 2*rBord, r.height() ); @@ -601,14 +581,14 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) /*! Reimplemented from superclass. */ -bool KDGanttMinimizeSplitter::event( QEvent *e ) +bool KDGanttMinimizeSplitter::event( TQEvent *e ) { - if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) { + if ( e->type() == TQEvent::LayoutHint || ( e->type() == TQEvent::Show && data->firstShow ) ) { recalc( isVisible() ); - if ( e->type() == QEvent::Show ) + if ( e->type() == TQEvent::Show ) data->firstShow = FALSE; } - return QWidget::event( e ); + return TQWidget::event( e ); } @@ -617,14 +597,14 @@ bool KDGanttMinimizeSplitter::event( QEvent *e ) Draws the splitter handle in the rectangle described by \a x, \a y, \a w, \a h using painter \a p. - \sa QStyle::drawPrimitive() + \sa TQStyle::drawPrimitive() */ -void KDGanttMinimizeSplitter::drawSplitter( QPainter *p, - QCOORD x, QCOORD y, QCOORD w, QCOORD h ) +void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p, + TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h ) { - style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(), + tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(), (orientation() == Qt::Horizontal ? - QStyle::Style_Horizontal : 0)); + TQStyle::Style_Horizontal : 0)); } @@ -633,9 +613,9 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p, or 0 if there is no such splitter (i.e. it is either not in this KDGanttMinimizeSplitter or it is at the end). */ -int KDGanttMinimizeSplitter::idAfter( QWidget* w ) const +int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const { - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); bool seen_w = FALSE; while ( s ) { if ( s->isSplitter && seen_w ) @@ -653,21 +633,21 @@ int KDGanttMinimizeSplitter::idAfter( QWidget* w ) const close as possible to position \a p, which is the distance from the left (or top) edge of the widget. - For Arabic and Hebrew the layout is reversed, and using this + For Arabic and Hebrew the tqlayout is reversed, and using this function to set the position of the splitter might lead to unexpected results, since in Arabic and Hebrew the position of splitter one is to the left of the position of splitter zero. \sa idAfter() */ -void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id ) +void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id ) { p = adjustPos( p, id ); - QSplitterLayoutStruct *s = data->list.at(id); - int oldP = orient == Horizontal ? s->wid->x() : s->wid->y(); + TQSplitterLayoutStruct *s = data->list.at(id); + int oldP = orient ==Qt::Horizontal ? s->wid->x() : s->wid->y(); bool upLeft; - if ( QApplication::reverseLayout() && orient == Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { p += s->wid->width(); upLeft = p > oldP; } else @@ -680,10 +660,10 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id ) } -void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter ) +void KDGanttMinimizeSplitter::setG( TQWidget *w, int p, int s, bool isSplitter ) { - if ( orient == Horizontal ) { - if ( QApplication::reverseLayout() && orient == Horizontal && !isSplitter ) + if ( orient ==Qt::Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal && !isSplitter ) p = contentsRect().width() - p - s; w->setGeometry( p, contentsRect().y(), s, contentsRect().height() ); } else @@ -700,16 +680,16 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) { if( id < 0 ) return; - QSplitterLayoutStruct *s = data->list.at(id); + TQSplitterLayoutStruct *s = data->list.at(id); if ( !s ) return; - QWidget *w = s->wid; + TQWidget *w = s->wid; if ( w->isHidden() ) { moveBefore( pos, id-1, upLeft ); } else if ( s->isSplitter ) { int pos1, pos2; int dd = s->sizer; - if( QApplication::reverseLayout() && orient == Horizontal ) { + if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { pos1 = pos; pos2 = pos + dd; } else { @@ -725,14 +705,14 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) } } else { int dd, newLeft, nextPos; - if( QApplication::reverseLayout() && orient == Horizontal ) { - dd = w->geometry().right() - pos; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { + dd = w->tqgeometry().right() - pos; + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos+1; nextPos = newLeft + dd; } else { dd = pos - pick( w->pos() ) + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos-dd+1; nextPos = newLeft - 1; } @@ -749,11 +729,11 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) */ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) { - QSplitterLayoutStruct *s = id < int(data->list.count()) ? + TQSplitterLayoutStruct *s = id < int(data->list.count()) ? data->list.at(id) : 0; if ( !s ) return; - QWidget *w = s->wid; + TQWidget *w = s->wid; if ( w->isHidden() ) { moveAfter( pos, id+1, upLeft ); } else if ( pick( w->pos() ) == pos ) { @@ -762,7 +742,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) } else if ( s->isSplitter ) { int dd = s->sizer; int pos1, pos2; - if( QApplication::reverseLayout() && orient == Horizontal ) { + if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { pos2 = pos - dd; pos1 = pos2 + 1; } else { @@ -779,15 +759,15 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) } else { int left = pick( w->pos() ); int right, dd,/* newRight,*/ newLeft, nextPos; - if ( QApplication::reverseLayout() && orient == Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { dd = pos - left + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos-dd+1; nextPos = newLeft - 1; } else { - right = pick( w->geometry().bottomRight() ); + right = pick( w->tqgeometry().bottomRight() ); dd = right - pos + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); /*newRight = pos+dd-1;*/ newLeft = pos; nextPos = newLeft + dd; @@ -801,17 +781,17 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) void KDGanttMinimizeSplitter::expandPos( int id, int* min, int* max ) { - QSplitterLayoutStruct *s = data->list.at(id-1); - QWidget* w = s->wid; - *min = pick( w->mapToParent( QPoint(0,0) ) ); + TQSplitterLayoutStruct *s = data->list.at(id-1); + TQWidget* w = s->wid; + *min = pick( w->mapToParent( TQPoint(0,0) ) ); if ( (uint) id == data->list.count() ) { pick( size() ); } else { - QSplitterLayoutStruct *s = data->list.at(id+1); - QWidget* w = s->wid; - *max = pick( w->mapToParent( QPoint( w->width(), w->height() ) ) ) -8; + TQSplitterLayoutStruct *s = data->list.at(id+1); + TQWidget* w = s->wid; + *max = pick( w->mapToParent( TQPoint( w->width(), w->height() ) ) ) -8; } } @@ -833,7 +813,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) return; int i; for ( i = 0; i < id; i++ ) { - QSplitterLayoutStruct *s = data->list.at(i); + TQSplitterLayoutStruct *s = data->list.at(i); if ( s->wid->isHidden() ) { //ignore } else if ( s->isSplitter ) { @@ -841,11 +821,11 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) maxB += s->sizer; } else { minB += pick( minSize(s->wid) ); - maxB += pick( s->wid->maximumSize() ); + maxB += pick( s->wid->tqmaximumSize() ); } } for ( i = id; i < n; i++ ) { - QSplitterLayoutStruct *s = data->list.at(i); + TQSplitterLayoutStruct *s = data->list.at(i); if ( s->wid->isHidden() ) { //ignore } else if ( s->isSplitter ) { @@ -853,21 +833,21 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) maxA += s->sizer; } else { minA += pick( minSize(s->wid) ); - maxA += pick( s->wid->maximumSize() ); + maxA += pick( s->wid->tqmaximumSize() ); } } - QRect r = contentsRect(); - if ( orient == Horizontal && QApplication::reverseLayout() ) { - int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this); + TQRect r = contentsRect(); + if ( orient ==Qt::Horizontal && TQApplication::reverseLayout() ) { + int splitterWidth = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this); if ( min ) - *min = pick(r.topRight()) - QMIN( maxB, pick(r.size())-minA ) - splitterWidth; + *min = pick(r.topRight()) - TQMIN( maxB, pick(r.size())-minA ) - splitterWidth; if ( max ) - *max = pick(r.topRight()) - QMAX( minB, pick(r.size())-maxA ) - splitterWidth; + *max = pick(r.topRight()) - TQMAX( minB, pick(r.size())-maxA ) - splitterWidth; } else { if ( min ) - *min = pick(r.topLeft()) + QMAX( minB, pick(r.size())-maxA ); + *min = pick(r.topLeft()) + TQMAX( minB, pick(r.size())-maxA ); if ( max ) - *max = pick(r.topLeft()) + QMIN( maxB, pick(r.size())-minA ); + *max = pick(r.topLeft()) + TQMIN( maxB, pick(r.size())-minA ); } } @@ -883,7 +863,7 @@ int KDGanttMinimizeSplitter::adjustPos( int p, int id ) int min = 0; int max = 0; getRange( id, &min, &max ); - p = QMAX( min, QMIN( p, max ) ); + p = TQMAX( min, TQMIN( p, max ) ); return p; } @@ -891,36 +871,36 @@ int KDGanttMinimizeSplitter::adjustPos( int p, int id ) void KDGanttMinimizeSplitter::doResize() { - QRect r = contentsRect(); + TQRect r = contentsRect(); int i; int n = data->list.count(); - QMemArray<QLayoutStruct> a( n ); + TQMemArray<TQLayoutStruct> a( n ); for ( i = 0; i< n; i++ ) { a[i].init(); - QSplitterLayoutStruct *s = data->list.at(i); + TQSplitterLayoutStruct *s = data->list.at(i); if ( s->wid->isHidden() ) { a[i].stretch = 0; - a[i].sizeHint = a[i].minimumSize = 0; - a[i].maximumSize = 0; + a[i].tqsizeHint = a[i].tqminimumSize = 0; + a[i].tqmaximumSize = 0; } else if ( s->isSplitter ) { a[i].stretch = 0; - a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer; + a[i].tqsizeHint = a[i].tqminimumSize = a[i].tqmaximumSize = s->sizer; a[i].empty = FALSE; } else if ( s->mode == KeepSize ) { a[i].stretch = 0; - a[i].minimumSize = pick( minSize(s->wid) ); - a[i].sizeHint = s->sizer; - a[i].maximumSize = pick( s->wid->maximumSize() ); + a[i].tqminimumSize = pick( minSize(s->wid) ); + a[i].tqsizeHint = s->sizer; + a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() ); a[i].empty = FALSE; } else if ( s->mode == FollowSizeHint ) { a[i].stretch = 0; - a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() ); - a[i].maximumSize = pick( s->wid->maximumSize() ); + a[i].tqminimumSize = a[i].tqsizeHint = pick( s->wid->tqsizeHint() ); + a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() ); a[i].empty = FALSE; } else { //proportional a[i].stretch = s->sizer; - a[i].maximumSize = pick( s->wid->maximumSize() ); - a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) ); + a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() ); + a[i].tqsizeHint = a[i].tqminimumSize = pick( minSize(s->wid) ); a[i].empty = FALSE; } } @@ -928,7 +908,7 @@ void KDGanttMinimizeSplitter::doResize() kdganttGeomCalc( a, 0, n, pick( r.topLeft() ), pick( r.size() ), 0 ); for ( i = 0; i< n; i++ ) { - QSplitterLayoutStruct *s = data->list.at(i); + TQSplitterLayoutStruct *s = data->list.at(i); setG( s->wid, a[i].pos, a[i].size ); } @@ -940,7 +920,7 @@ void KDGanttMinimizeSplitter::recalc( bool update ) int fi = 2*frameWidth(); int maxl = fi; int minl = fi; - int maxt = QWIDGETSIZE_MAX; + int maxt = TQWIDGETSIZE_MAX; int mint = fi; int n = data->list.count(); bool first = TRUE; @@ -950,9 +930,9 @@ void KDGanttMinimizeSplitter::recalc( bool update ) The splitter before any other visible widget is visible. */ for ( int i = 0; i< n; i++ ) { - QSplitterLayoutStruct *s = data->list.at(i); + TQSplitterLayoutStruct *s = data->list.at(i); if ( !s->isSplitter ) { - QSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0; + TQSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0; if ( p && p->isSplitter ) if ( first || s->wid->isHidden() ) p->wid->hide(); //may trigger new recalc @@ -965,38 +945,38 @@ void KDGanttMinimizeSplitter::recalc( bool update ) bool empty=TRUE; for ( int j = 0; j< n; j++ ) { - QSplitterLayoutStruct *s = data->list.at(j); + TQSplitterLayoutStruct *s = data->list.at(j); if ( !s->wid->isHidden() ) { empty = FALSE; if ( s->isSplitter ) { minl += s->sizer; maxl += s->sizer; } else { - QSize minS = minSize(s->wid); + TQSize minS = minSize(s->wid); minl += pick( minS ); - maxl += pick( s->wid->maximumSize() ); - mint = QMAX( mint, trans( minS )); - int tm = trans( s->wid->maximumSize() ); + maxl += pick( s->wid->tqmaximumSize() ); + mint = TQMAX( mint, trans( minS )); + int tm = trans( s->wid->tqmaximumSize() ); if ( tm > 0 ) - maxt = QMIN( maxt, tm ); + maxt = TQMIN( maxt, tm ); } } } if ( empty ) { - if ( parentWidget() != 0 && parentWidget()->inherits("KDGanttMinimizeSplitter") ) { + if ( tqparentWidget() != 0 && tqparentWidget()->inherits("KDGanttMinimizeSplitter") ) { // nested splitters; be nice maxl = maxt = 0; } else { - // KDGanttMinimizeSplitter with no children yet - maxl = QWIDGETSIZE_MAX; + // KDGanttMinimizeSplitter with no tqchildren yet + maxl = TQWIDGETSIZE_MAX; } } else { - maxl = QMIN( maxl, QWIDGETSIZE_MAX ); + maxl = TQMIN( maxl, TQWIDGETSIZE_MAX ); } if ( maxt < mint ) maxt = mint; - if ( orient == Horizontal ) { + if ( orient ==Qt::Horizontal ) { setMaximumSize( maxl, maxt ); setMinimumSize( minl, mint ); } else { @@ -1013,10 +993,10 @@ void KDGanttMinimizeSplitter::recalc( bool update ) \sa ResizeMode */ -void KDGanttMinimizeSplitter::setResizeMode( QWidget *w, ResizeMode mode ) +void KDGanttMinimizeSplitter::setResizeMode( TQWidget *w, ResizeMode mode ) { processChildEvents(); - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->wid == w ) { s->mode = mode; @@ -1059,15 +1039,15 @@ void KDGanttMinimizeSplitter::setOpaqueResize( bool on ) Moves widget \a w to the leftmost/top position. */ -void KDGanttMinimizeSplitter::moveToFirst( QWidget *w ) +void KDGanttMinimizeSplitter::moveToFirst( TQWidget *w ) { processChildEvents(); bool found = FALSE; - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->wid == w ) { found = TRUE; - QSplitterLayoutStruct *p = data->list.prev(); + TQSplitterLayoutStruct *p = data->list.prev(); if ( p ) { // not already at first place data->list.take(); //take p data->list.take(); // take s @@ -1088,16 +1068,16 @@ void KDGanttMinimizeSplitter::moveToFirst( QWidget *w ) Moves widget \a w to the rightmost/bottom position. */ -void KDGanttMinimizeSplitter::moveToLast( QWidget *w ) +void KDGanttMinimizeSplitter::moveToLast( TQWidget *w ) { processChildEvents(); bool found = FALSE; - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->wid == w ) { found = TRUE; data->list.take(); // take s - QSplitterLayoutStruct *p = data->list.current(); + TQSplitterLayoutStruct *p = data->list.current(); if ( p ) { // the splitter handle after s data->list.take(); //take p data->list.append( p ); @@ -1117,7 +1097,7 @@ void KDGanttMinimizeSplitter::recalcId() { int n = data->list.count(); for ( int i = 0; i < n; i++ ) { - QSplitterLayoutStruct *s = data->list.at(i); + TQSplitterLayoutStruct *s = data->list.at(i); if ( s->isSplitter ) ((KDGanttSplitterHandle*)s->wid)->setId(i); } @@ -1126,29 +1106,29 @@ void KDGanttMinimizeSplitter::recalcId() /*! Reimplemented from superclass. */ -QSize KDGanttMinimizeSplitter::sizeHint() const +TQSize KDGanttMinimizeSplitter::tqsizeHint() const { constPolish(); int l = 0; int t = 0; - if ( children() ) { - const QObjectList * c = children(); - QObjectListIt it( *c ); - QObject * o; + TQObjectList clo = childrenListObject(); + if ( !clo.isEmpty() ) { + TQObjectListIt it( clo ); + TQObject * o; while( (o=it.current()) != 0 ) { ++it; if ( o->isWidgetType() && - !((QWidget*)o)->isHidden() ) { - QSize s = ((QWidget*)o)->sizeHint(); + !((TQWidget*)o)->isHidden() ) { + TQSize s = ((TQWidget*)o)->tqsizeHint(); if ( s.isValid() ) { l += pick( s ); - t = QMAX( t, trans( s ) ); + t = TQMAX( t, trans( s ) ); } } } } - return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); + return orientation() ==Qt::Horizontal ? TQSize( l, t ) : TQSize( t, l ); } @@ -1156,29 +1136,29 @@ QSize KDGanttMinimizeSplitter::sizeHint() const \reimp */ -QSize KDGanttMinimizeSplitter::minimumSizeHint() const +TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const { constPolish(); int l = 0; int t = 0; - if ( children() ) { - const QObjectList * c = children(); - QObjectListIt it( *c ); - QObject * o; + TQObjectList clo = childrenListObject(); + if ( !clo.isEmpty() ) { + TQObjectListIt it( clo ); + TQObject * o; while( (o=it.current()) != 0 ) { ++it; if ( o->isWidgetType() && - !((QWidget*)o)->isHidden() ) { - QSize s = minSizeHint((QWidget*)o); + !((TQWidget*)o)->isHidden() ) { + TQSize s = minSizeHint((TQWidget*)o); if ( s.isValid() ) { l += pick( s ); - t = QMAX( t, trans( s ) ); + t = TQMAX( t, trans( s ) ); } } } } - return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); + return orientation() ==Qt::Horizontal ? TQSize( l, t ) : TQSize( t, l ); } @@ -1188,7 +1168,7 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const void KDGanttMinimizeSplitter::storeSizes() { - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( !s->isSplitter ) s->sizer = pick( s->wid->size() ); @@ -1203,17 +1183,17 @@ void KDGanttMinimizeSplitter::storeSizes() Hides \a w if \a hide is TRUE and updates the splitter. \warning Due to a limitation in the current implementation, - calling QWidget::hide() will not work. + calling TQWidget::hide() will not work. */ -void KDGanttMinimizeSplitter::setHidden( QWidget *w, bool hide ) +void KDGanttMinimizeSplitter::setHidden( TQWidget *w, bool hide ) { if ( w == w1 ) { w1show = !hide; } else if ( w == w2 ) { w2show = !hide; } else { -#ifdef QT_CHECK_RANGE +#ifdef TQT_CHECK_RANGE qWarning( "KDGanttMinimizeSplitter::setHidden(), unknown widget" ); #endif return; @@ -1230,13 +1210,13 @@ void KDGanttMinimizeSplitter::setHidden( QWidget *w, bool hide ) Returns the hidden status of \a w */ -bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const +bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const { if ( w == w1 ) return !w1show; else if ( w == w2 ) return !w2show; -#ifdef QT_CHECK_RANGE +#ifdef TQT_CHECK_RANGE else qWarning( "KDGanttMinimizeSplitter::isHidden(), unknown widget" ); #endif @@ -1250,13 +1230,13 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const splitter. Giving the values to another splitter's setSizes() function will - produce a splitter with the same layout as this one. + produce a splitter with the same tqlayout as this one. Note that if you want to iterate over the list, you should iterate over a copy, e.g. \code - QValueList<int> list = mySplitter.sizes(); - QValueList<int>::Iterator it = list.begin(); + TQValueList<int> list = mySplitter.sizes(); + TQValueList<int>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; @@ -1266,14 +1246,14 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const \sa setSizes() */ -QValueList<int> KDGanttMinimizeSplitter::sizes() const +TQValueList<int> KDGanttMinimizeSplitter::sizes() const { if ( !testWState(WState_Polished) ) { - QWidget* that = (QWidget*) this; + TQWidget* that = (TQWidget*) this; that->polish(); } - QValueList<int> list; - QSplitterLayoutStruct *s = data->list.first(); + TQValueList<int> list; + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( !s->isSplitter ) list.append( s->sizer ); @@ -1297,11 +1277,11 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const \sa sizes() */ -void KDGanttMinimizeSplitter::setSizes( QValueList<int> list ) +void KDGanttMinimizeSplitter::setSizes( TQValueList<int> list ) { processChildEvents(); - QValueList<int>::Iterator it = list.begin(); - QSplitterLayoutStruct *s = data->list.first(); + TQValueList<int>::Iterator it = list.begin(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s && it != list.end() ) { if ( !s->isSplitter ) { s->sizer = *it; @@ -1320,7 +1300,7 @@ void KDGanttMinimizeSplitter::setSizes( QValueList<int> list ) void KDGanttMinimizeSplitter::processChildEvents() { - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); } @@ -1328,21 +1308,19 @@ void KDGanttMinimizeSplitter::processChildEvents() Reimplemented from superclass. */ -void KDGanttMinimizeSplitter::styleChange( QStyle& old ) +void KDGanttMinimizeSplitter::styleChange( TQStyle& old ) { - int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); - QSplitterLayoutStruct *s = data->list.first(); + int sw = tqstyle().tqpixelMetric(TQStyle::PM_SplitterWidth, this); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->isSplitter ) s->sizer = sw; s = data->list.next(); } doResize(); - QFrame::styleChange( old ); + TQFrame::styleChange( old ); } -#endif - /*! Specifies the direction of the minimize buttons. If the orientation of the splitter is horizontal then with @@ -1364,14 +1342,14 @@ KDGanttMinimizeSplitter::Direction KDGanttMinimizeSplitter::minimizeDirection() } /* - This is a copy of qGeomCalc() in qlayoutengine.cpp which + This is a copy of qGeomCalc() in qtqlayoutengine.cpp which unfortunately isn't exported. */ static inline int toFixed( int i ) { return i * 256; } static inline int fRound( int i ) { return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256; } -void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, +void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, int pos, int space, int spacer ) { typedef int fixed; @@ -1387,9 +1365,9 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int int i; for ( i = start; i < start + count; i++ ) { chain[i].done = FALSE; - cHint += chain[i].sizeHint; - cMin += chain[i].minimumSize; - cMax += chain[i].maximumSize; + cHint += chain[i].tqsizeHint; + cMin += chain[i].tqminimumSize; + cMax += chain[i].tqmaximumSize; sumStretch += chain[i].stretch; if ( !chain[i].empty ) spacerCount++; @@ -1402,22 +1380,22 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int if ( space < cMin + spacerCount * spacer ) { // qDebug("not enough space"); for ( i = start; i < start+count; i++ ) { - chain[i].size = chain[i].minimumSize; + chain[i].size = chain[i].tqminimumSize; chain[i].done = TRUE; } } else if ( space < cHint + spacerCount*spacer ) { - // Less space than sizeHint, but more than minimum. - // Currently take space equally from each, like in Qt 2.x. + // Less space than tqsizeHint, but more than minimum. + // Currently take space equally from each, like in TQt 2.x. // Commented-out lines will give more space to stretchier items. int n = count; int space_left = space - spacerCount*spacer; int overdraft = cHint - space_left; //first give to the fixed ones: for ( i = start; i < start+count; i++ ) { - if ( !chain[i].done && chain[i].minimumSize >= chain[i].sizeHint) { - chain[i].size = chain[i].sizeHint; + if ( !chain[i].done && chain[i].tqminimumSize >= chain[i].tqsizeHint) { + chain[i].size = chain[i].tqsizeHint; chain[i].done = TRUE; - space_left -= chain[i].sizeHint; + space_left -= chain[i].tqsizeHint; // sumStretch -= chain[i].stretch; n--; } @@ -1436,13 +1414,13 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int // else // fp_w += (fp_over * chain[i].stretch) / sumStretch; int w = fRound( fp_w ); - chain[i].size = chain[i].sizeHint - w; + chain[i].size = chain[i].tqsizeHint - w; fp_w -= toFixed( w ); //give the difference to the next - if ( chain[i].size < chain[i].minimumSize ) { + if ( chain[i].size < chain[i].tqminimumSize ) { chain[i].done = TRUE; - chain[i].size = chain[i].minimumSize; + chain[i].size = chain[i].tqminimumSize; finished = FALSE; - overdraft -= chain[i].sizeHint - chain[i].minimumSize; + overdraft -= chain[i].tqsizeHint - chain[i].tqminimumSize; // sumStretch -= chain[i].stretch; n--; break; @@ -1454,11 +1432,11 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int int space_left = space - spacerCount*spacer; // first give to the fixed ones, and handle non-expansiveness for ( i = start; i < start + count; i++ ) { - if ( !chain[i].done && (chain[i].maximumSize <= chain[i].sizeHint + if ( !chain[i].done && (chain[i].tqmaximumSize <= chain[i].tqsizeHint || wannaGrow && !chain[i].expansive) ) { - chain[i].size = chain[i].sizeHint; + chain[i].size = chain[i].tqsizeHint; chain[i].done = TRUE; - space_left -= chain[i].sizeHint; + space_left -= chain[i].tqsizeHint; sumStretch -= chain[i].stretch; n--; } @@ -1490,20 +1468,20 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int int w = fRound( fp_w ); chain[i].size = w; fp_w -= toFixed( w ); // give the difference to the next - if ( w < chain[i].sizeHint ) { - deficit += chain[i].sizeHint - w; - } else if ( w > chain[i].maximumSize ) { - surplus += w - chain[i].maximumSize; + if ( w < chain[i].tqsizeHint ) { + deficit += chain[i].tqsizeHint - w; + } else if ( w > chain[i].tqmaximumSize ) { + surplus += w - chain[i].tqmaximumSize; } } if ( deficit > 0 && surplus <= deficit ) { // give to the ones that have too little for ( i = start; i < start+count; i++ ) { if ( !chain[i].done && - chain[i].size < chain[i].sizeHint ) { - chain[i].size = chain[i].sizeHint; + chain[i].size < chain[i].tqsizeHint ) { + chain[i].size = chain[i].tqsizeHint; chain[i].done = TRUE; - space_left -= chain[i].sizeHint; + space_left -= chain[i].tqsizeHint; sumStretch -= chain[i].stretch; n--; } @@ -1513,10 +1491,10 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int // take from the ones that have too much for ( i = start; i < start+count; i++ ) { if ( !chain[i].done && - chain[i].size > chain[i].maximumSize ) { - chain[i].size = chain[i].maximumSize; + chain[i].size > chain[i].tqmaximumSize ) { + chain[i].size = chain[i].tqmaximumSize; chain[i].done = TRUE; - space_left -= chain[i].maximumSize; + space_left -= chain[i].tqmaximumSize; sumStretch -= chain[i].stretch; n--; } @@ -1554,7 +1532,7 @@ void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int */ /*! - \fn Orientation KDGanttMinimizeSplitter::orientation() const + \fn Qt::Orientation KDGanttMinimizeSplitter::orientation() const Returns the orientation of the splitter. */ diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h index 1581d615..3ac0d0b7 100644 --- a/kdgantt/KDGanttMinimizeSplitter.h +++ b/kdgantt/KDGanttMinimizeSplitter.h @@ -3,7 +3,7 @@ */ /**************************************************************************** - ** Copyright (C) 2001-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2001-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -26,73 +26,73 @@ ** 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. ** **********************************************************************/ #ifndef KDGANTTMINIMIZESPLITTER_H #define KDGANTTMINIMIZESPLITTER_H -#ifndef QT_H -#include "qframe.h" -#include "qvaluelist.h" -#endif // QT_H +#ifndef TQT_H +#include "tqframe.h" +#include "tqvaluelist.h" +#endif // TQT_H -#ifndef QT_NO_SPLITTER +#ifndef TQT_NO_SPLITTER -class QSplitterData; -class QSplitterLayoutStruct; +class TQSplitterData; +class TQSplitterLayoutStruct; -class KDGanttMinimizeSplitter : public QFrame +class KDGanttMinimizeSplitter : public TQFrame { Q_OBJECT + TQ_OBJECT Q_ENUMS( Direction ) - Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) - Q_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection ) + TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation ) + TQ_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection ) public: enum ResizeMode { Stretch, KeepSize, FollowSizeHint }; enum Direction { Left, Right, Up, Down }; - KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 ); - KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 ); + KDGanttMinimizeSplitter( TQWidget* tqparent=0, const char* name=0 ); + KDGanttMinimizeSplitter( Qt::Orientation, TQWidget* tqparent=0, const char* name=0 ); ~KDGanttMinimizeSplitter(); - virtual void setOrientation( Orientation ); - Orientation orientation() const { return orient; } + virtual void setOrientation( Qt::Orientation ); + Qt::Orientation orientation() const { return orient; } void setMinimizeDirection( Direction ); Direction minimizeDirection() const; -#if QT_VERSION >= 300 - virtual void setResizeMode( QWidget *w, ResizeMode ); + virtual void setResizeMode( TQWidget *w, ResizeMode ); virtual void setOpaqueResize( bool = TRUE ); bool opaqueResize() const; - void moveToFirst( QWidget * ); - void moveToLast( QWidget * ); + void moveToFirst( TQWidget * ); + void moveToLast( TQWidget * ); void refresh() { recalc( TRUE ); } - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; - QValueList<int> sizes() const; - void setSizes( QValueList<int> ); + TQValueList<int> sizes() const; + void setSizes( TQValueList<int> ); void expandPos( int id, int* min, int* max ); protected: - void childEvent( QChildEvent * ); + void childEvent( TQChildEvent * ); - bool event( QEvent * ); - void resizeEvent( QResizeEvent * ); + bool event( TQEvent * ); + void resizeEvent( TQResizeEvent * ); - int idAfter( QWidget* ) const; + int idAfter( TQWidget* ) const; - void moveSplitter( QCOORD pos, int id ); - virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, - QCOORD w, QCOORD h ); - void styleChange( QStyle& ); + void moveSplitter( TQCOORD pos, int id ); + virtual void drawSplitter( TQPainter*, TQCOORD x, TQCOORD y, + TQCOORD w, TQCOORD h ); + void styleChange( TQStyle& ); int adjustPos( int , int ); virtual void setRubberband( int ); void getRange( int id, int*, int* ); @@ -103,33 +103,32 @@ private: void doResize(); void storeSizes(); void processChildEvents(); - QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE ); + TQSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE ); void recalcId(); void moveBefore( int pos, int id, bool upLeft ); void moveAfter( int pos, int id, bool upLeft ); - void setG( QWidget *w, int p, int s, bool isSplitter = FALSE ); + void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE ); - QCOORD pick( const QPoint &p ) const - { return orient == Horizontal ? p.x() : p.y(); } - QCOORD pick( const QSize &s ) const - { return orient == Horizontal ? s.width() : s.height(); } + TQCOORD pick( const TQPoint &p ) const + { return orient ==Qt::Horizontal ? p.x() : p.y(); } + TQCOORD pick( const TQSize &s ) const + { return orient ==Qt::Horizontal ? s.width() : s.height(); } - QCOORD trans( const QPoint &p ) const - { return orient == Vertical ? p.x() : p.y(); } - QCOORD trans( const QSize &s ) const - { return orient == Vertical ? s.width() : s.height(); } + TQCOORD trans( const TQPoint &p ) const + { return orient ==Qt::Vertical ? p.x() : p.y(); } + TQCOORD trans( const TQSize &s ) const + { return orient ==Qt::Vertical ? s.width() : s.height(); } - QSplitterData *data; -#endif + TQSplitterData *data; private: - Orientation orient; + Qt::Orientation orient; Direction _direction; #ifndef DOXYGEN_SKIP_INTERNAL friend class KDGanttSplitterHandle; #endif private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & ); KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & ); #endif @@ -137,34 +136,34 @@ private: // Disabled copy constructor and operator= #ifndef DOXYGEN_SKIP_INTERNAL // This class was continued from a verbatim copy of the -// QSplitterHandle pertaining to the Qt Enterprise License and the +// TQSplitterHandle pertaining to the TQt Enterprise License and the // GPL. It has only been renamed to KDGanttSplitterHandler in order to // avoid a symbol clash on some platforms. -class KDGanttSplitterHandle : public QWidget +class KDGanttSplitterHandle : public TQWidget { Q_OBJECT -#if QT_VERSION >= 300 + TQ_OBJECT public: KDGanttSplitterHandle( Qt::Orientation o, - KDGanttMinimizeSplitter *parent, const char* name=0 ); + KDGanttMinimizeSplitter *tqparent, const char* name=0 ); void setOrientation( Qt::Orientation o ); Qt::Orientation orientation() const { return orient; } bool opaque() const { return s->opaqueResize(); } - QSize sizeHint() const; + TQSize tqsizeHint() const; int id() const { return myId; } // data->list.at(id())->wid == this void setId( int i ) { myId = i; } protected: - QValueList<QPointArray> buttonRegions(); - void paintEvent( QPaintEvent * ); - void mouseMoveEvent( QMouseEvent * ); - void mousePressEvent( QMouseEvent * ); - void mouseReleaseEvent( QMouseEvent * ); - int onButton( const QPoint& p ); - void updateCursor( const QPoint& p ); + TQValueList<TQPointArray> buttonRegions(); + void paintEvent( TQPaintEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void mousePressEvent( TQMouseEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); + int onButton( const TQPoint& p ); + void updateCursor( const TQPoint& p ); private: Qt::Orientation orient; @@ -175,10 +174,9 @@ private: int _activeButton; bool _collapsed; int _origPos; -#endif }; #endif -#endif // QT_NO_SPLITTER +#endif // TQT_NO_SPLITTER #endif // KDGANTTMINIMIZESPLITTER_H diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp index 91629662..1daa1409 100644 --- a/kdgantt/KDGanttSemiSizingControl.cpp +++ b/kdgantt/KDGanttSemiSizingControl.cpp @@ -26,19 +26,19 @@ ** 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. ** **********************************************************************/ #include "KDGanttSemiSizingControl.h" -#include <qpushbutton.h> -#include <qpointarray.h> -#include <qpainter.h> -#include <qbitmap.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqpushbutton.h> +#include <tqpointarray.h> +#include <tqpainter.h> +#include <tqbitmap.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> /*! \class KDGanttSemiSizingControl KDGanttSemiSizingControl.h This class provides exactly one child widget with a button for @@ -57,15 +57,15 @@ orientation and the control arrow button on top of the controlled widget. - \param parent the parent widget. This parameter is passed to the + \param tqparent the tqparent widget. This parameter is passed to the base class. \param name the internal widget name. This parameter is passed to the base class. */ -KDGanttSemiSizingControl::KDGanttSemiSizingControl( QWidget* parent, +KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* tqparent, const char* name ) : - KDGanttSizingControl( parent, name ), _orient( Horizontal ), + KDGanttSizingControl( tqparent, name ), _orient(Qt::Horizontal ), _arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0) { init(); @@ -78,16 +78,16 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( QWidget* parent, the controlled widget (depending on the orientation). \param orientation the orientation of the splitter - \param parent the parent widget. This parameter is passed to the + \param tqparent the tqparent widget. This parameter is passed to the base class. \param name the internal widget name. This parameter is passed to the base class. */ -KDGanttSemiSizingControl::KDGanttSemiSizingControl( Orientation orientation, - QWidget* parent, +KDGanttSemiSizingControl::KDGanttSemiSizingControl( Qt::Orientation orientation, + TQWidget* tqparent, const char* name ) : - KDGanttSizingControl( parent, name ), _orient( orientation ), + KDGanttSizingControl( tqparent, name ), _orient( orientation ), _arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0) { init(); @@ -101,17 +101,17 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( Orientation orientation, \param arrowPosition specifies whether the control arrow button should appear before or after the controlled widget \param orientation the orientation of the splitter - \param parent the parent widget. This parameter is passed to the + \param tqparent the tqparent widget. This parameter is passed to the base class. \param name the internal widget name. This parameter is passed to the base class. */ KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition, - Orientation orientation, - QWidget* parent, + Qt::Orientation orientation, + TQWidget* tqparent, const char* name ) : - KDGanttSizingControl( parent, name ), _orient( orientation ), + KDGanttSizingControl( tqparent, name ), _orient( orientation ), _arrowPos( arrowPosition ), _minimizedWidget(0), _maximizedWidget(0) { init(); @@ -127,7 +127,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition, \sa minimizedWidget() */ -void KDGanttSemiSizingControl::setMinimizedWidget( QWidget* widget ) +void KDGanttSemiSizingControl::setMinimizedWidget( TQWidget* widget ) { _minimizedWidget = widget; if( _minimizedWidget ) _minimizedWidget->hide(); @@ -143,7 +143,7 @@ void KDGanttSemiSizingControl::setMinimizedWidget( QWidget* widget ) \sa setMinimizedWidget() */ -QWidget* KDGanttSemiSizingControl::minimizedWidget() const +TQWidget* KDGanttSemiSizingControl::minimizedWidget() const { return _minimizedWidget; } @@ -157,7 +157,7 @@ QWidget* KDGanttSemiSizingControl::minimizedWidget() const \sa maximizedWidget() */ -void KDGanttSemiSizingControl::setMaximizedWidget( QWidget* widget ) +void KDGanttSemiSizingControl::setMaximizedWidget( TQWidget* widget ) { _maximizedWidget = widget; //if( _maximizedWidget ) _maximizedWidget->show(); @@ -172,7 +172,7 @@ void KDGanttSemiSizingControl::setMaximizedWidget( QWidget* widget ) \sa setMaximizedWidget() */ -QWidget* KDGanttSemiSizingControl::maximizedWidget() const +TQWidget* KDGanttSemiSizingControl::maximizedWidget() const { return _maximizedWidget; } @@ -246,31 +246,31 @@ KDGanttSemiSizingControl::ArrowPosition KDGanttSemiSizingControl::arrowPosition( void KDGanttSemiSizingControl::init() { - _but = new QPushButton( this ); - _but->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - connect( _but, SIGNAL( clicked() ), this, SLOT(changeState()) ); + _but = new TQPushButton( this ); + _but->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) ); _layout = 0; - QWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget"); - QToolTip::add( _but, "Show / hide legend"); + TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget"); + TQToolTip::add( _but, "Show / hide legend"); } void KDGanttSemiSizingControl::setup() { - //-------------------------------------------------- Setup layout + //-------------------------------------------------- Setup tqlayout delete _layout; - QBoxLayout* butLayout; // _layout will delete me + TQBoxLayout* butLayout; // _layout will delete me - if ( _orient == Horizontal || isMinimized() ) - _layout = new QHBoxLayout( this ); + if ( _orient ==Qt::Horizontal || isMinimized() ) + _layout = new TQHBoxLayout( this ); else - _layout = new QVBoxLayout( this ); + _layout = new TQVBoxLayout( this ); - if ( _orient == Vertical && !isMinimized() ) - butLayout = new QHBoxLayout( _layout ); + if ( _orient ==Qt::Vertical && !isMinimized() ) + butLayout = new TQHBoxLayout( _layout ); else - butLayout = new QVBoxLayout( _layout ); + butLayout = new TQVBoxLayout( _layout ); @@ -288,24 +288,24 @@ void KDGanttSemiSizingControl::setup() } //------------------------------ Setup the button at the correct possition - if ( _arrowPos == After && _orient == Vertical && !isMinimized() ) { + if ( _arrowPos == After && _orient ==Qt::Vertical && !isMinimized() ) { butLayout->addStretch( 1 ); - butLayout->addWidget( _but, 0, Qt::AlignLeft ); + butLayout->addWidget( _but, 0, TQt::AlignLeft ); } else { - butLayout->addWidget( _but, 0, Qt::AlignRight ); + butLayout->addWidget( _but, 0, TQt::AlignRight ); butLayout->addStretch( 1 ); } // Set widget in the correct possition - QWidget* widget; + TQWidget* widget; /* ************************** old code *************** if ( isMinimized() ) widget = _minimizedWidget; else widget = _maximizedWidget; if( widget ) { - if ( _arrowPos == Before || _orient == Vertical && !isMinimized() ) + if ( _arrowPos == Before || _orient ==Qt::Vertical && !isMinimized() ) _layout->addWidget( widget, 1 ); else _layout->insertWidget( 0, widget, 1 ); @@ -313,25 +313,25 @@ void KDGanttSemiSizingControl::setup() ************************************************** */ // hack for the usage in KDGantt as pop-up legend widget // for this purpose, - // the _maximizedWidget must be a child of the parent of this widget + // the _maximizedWidget must be a child of the tqparent of this widget if ( isMinimized() ) { widget = _minimizedWidget; if( widget ) { - if ( _arrowPos == Before || _orient == Vertical && !isMinimized() ) + if ( _arrowPos == Before || _orient ==Qt::Vertical && !isMinimized() ) _layout->addWidget( widget, 1 ); else _layout->insertWidget( 0, widget, 1 ); } } else { - if ( _arrowPos == Before || _orient == Vertical && !isMinimized() ) + if ( _arrowPos == Before || _orient ==Qt::Vertical && !isMinimized() ) _layout->addStretch( 1 ); else _layout->insertStretch( 0, 1 ); widget = _maximizedWidget; // the following is only the special case - // arrowPos == Before and _orient == Vertical + // arrowPos == Before and _orient ==Qt::Vertical //widget->move( 0+x(), _but->height()+y()); } } @@ -380,12 +380,12 @@ void KDGanttSemiSizingControl::minimize( bool minimize ) } } -QPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) { +TQPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) { int s = 10; - QPixmap pix( s, s ); + TQPixmap pix( s, s ); pix.fill( blue ); - QPointArray arr; + TQPointArray arr; switch ( direction ) { case Up: arr.setPoints( 3, 0, s-1, s-1, s-1, 0, s/2 ); ;break; case Down: arr.setPoints( 3, 0, 0, s-1, 0, s/2, s-1 ); break; @@ -393,14 +393,14 @@ QPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) { case Right: arr.setPoints( 3, 0,0, s-1, s/2, 0, s-1 ); break; } - QPainter p( &pix ); + TQPainter p( &pix ); p.setPen( black ); - p.setBrush( colorGroup().button() ); + p.setBrush( tqcolorGroup().button() ); p.drawPolygon( arr ); - QBitmap bit( s, s ); + TQBitmap bit( s, s ); bit.fill( color0 ); - QPainter p2( &bit ); + TQPainter p2( &bit ); p2.setPen( color1 ); p2.setBrush( color1 ); p2.drawPolygon( arr ); diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h index 6fb56e32..6e7fec6a 100644 --- a/kdgantt/KDGanttSemiSizingControl.h +++ b/kdgantt/KDGanttSemiSizingControl.h @@ -26,8 +26,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. ** **********************************************************************/ @@ -36,30 +36,31 @@ #define KDGANTTSEMISIZINGCONTROL_H #include "KDGanttSizingControl.h" -#include <qlayout.h> -class QPushButton; -class QBoxLayout; +#include <tqlayout.h> +class TQPushButton; +class TQBoxLayout; class KDGanttSemiSizingControl : public KDGanttSizingControl { - Q_PROPERTY( ArrowPosition arrowPosition READ arrowPosition WRITE setArrowPosition ) + TQ_PROPERTY( ArrowPosition arrowPosition READ arrowPosition WRITE setArrowPosition ) Q_ENUMS( ArrowPosition ) Q_OBJECT + TQ_OBJECT public: enum ArrowPosition { Before, After }; - KDGanttSemiSizingControl( QWidget* parent = 0, const char* name = 0 ); - KDGanttSemiSizingControl( Orientation orientation, QWidget* parent = 0, + KDGanttSemiSizingControl( TQWidget* tqparent = 0, const char* name = 0 ); + KDGanttSemiSizingControl( Qt::Orientation orientation, TQWidget* tqparent = 0, const char* name = 0 ); KDGanttSemiSizingControl( ArrowPosition arrowPosition, - Orientation orientation, QWidget* parent = 0, + Qt::Orientation orientation, TQWidget* tqparent = 0, const char* name = 0 ); - void setMinimizedWidget( QWidget* widget ); - void setMaximizedWidget( QWidget* widget ); - QWidget* minimizedWidget() const; - QWidget* maximizedWidget() const; + void setMinimizedWidget( TQWidget* widget ); + void setMaximizedWidget( TQWidget* widget ); + TQWidget* minimizedWidget() const; + TQWidget* maximizedWidget() const; void setOrientation( Qt::Orientation orientation ); Qt::Orientation orientation() const; @@ -75,15 +76,15 @@ protected: void setup(); void init(); enum Direction {Left, Right, Up, Down }; - QPixmap pixmap( Direction ); + TQPixmap pixmap( Direction ); private: - Orientation _orient; + Qt::Orientation _orient; ArrowPosition _arrowPos; - QWidget* _minimizedWidget; - QWidget* _maximizedWidget; - QBoxLayout* _layout; - QPushButton* _but; + TQWidget* _minimizedWidget; + TQWidget* _maximizedWidget; + TQBoxLayout* _layout; + TQPushButton* _but; }; diff --git a/kdgantt/KDGanttSizingControl.cpp b/kdgantt/KDGanttSizingControl.cpp index 5f4c004a..a51f9f4f 100644 --- a/kdgantt/KDGanttSizingControl.cpp +++ b/kdgantt/KDGanttSizingControl.cpp @@ -25,8 +25,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. ** **********************************************************************/ @@ -48,7 +48,7 @@ /*! Constructs an empty KDGanttSizing Control. - \param parent the parent widget. This parameter is passed to the + \param tqparent the tqparent widget. This parameter is passed to the base class. \param name the internal widget name. This parameter is passed to the base class. @@ -56,8 +56,8 @@ */ -KDGanttSizingControl::KDGanttSizingControl( QWidget* parent, const char* name, WFlags f ) - :QWidget( parent, name, f ), _isMinimized( false ) +KDGanttSizingControl::KDGanttSizingControl( TQWidget* tqparent, const char* name, WFlags f ) + :TQWidget( tqparent, name, f ), _isMinimized( false ) { } diff --git a/kdgantt/KDGanttSizingControl.h b/kdgantt/KDGanttSizingControl.h index 12fa075e..cbea0c58 100644 --- a/kdgantt/KDGanttSizingControl.h +++ b/kdgantt/KDGanttSizingControl.h @@ -25,25 +25,26 @@ ** 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. ** **********************************************************************/ #ifndef KDGANTTSIZINGCONTROL_H #define KDGANTTSIZINGCONTROL_H -#include <qwidget.h> +#include <tqwidget.h> -class KDGanttSizingControl : public QWidget +class KDGanttSizingControl : public TQWidget { Q_OBJECT + TQ_OBJECT public: bool isMinimized() const; protected: - KDGanttSizingControl( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + KDGanttSizingControl( TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0 ); public slots: virtual void minimize( bool minimize ); diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 62f8dc9b..98bd0782 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -4,7 +4,7 @@ */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -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. ** **********************************************************************/ @@ -39,19 +39,19 @@ #include "KDGanttViewItem.h" #include "KDGanttXMLTools.h" #include "itemAttributeDialog.h" -#include <qprinter.h> -#include <qpainter.h> -#include <qlayout.h> -#include <qpaintdevicemetrics.h> -#include <qfile.h> -#include <qheader.h> -#include <qscrollview.h> -#include <qapplication.h> -#include <qevent.h> -#include <qiconview.h> - -#include <qmessagebox.h> -#include <qfileinfo.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqpaintdevicemetrics.h> +#include <tqfile.h> +#include <tqheader.h> +#include <tqscrollview.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqiconview.h> + +#include <tqmessagebox.h> +#include <tqfileinfo.h> #ifndef KDGANTT_MASTER_CVS #include "KDGanttView.moc" @@ -69,19 +69,19 @@ In order to set up a Gantt view, create an object of this class, and populate it with a number of \a KDGanttViewItem objects. - If you experience problems with the repainting of the content of the + If you experience problems with the tqrepainting of the content of the Gantt View after scrolling, call \a setRepaintMode(). */ /*! Constructs an empty KDGanttView. - \param parent the widget parent + \param tqparent the widget tqparent \param name the internal debugging name */ -KDGanttView::KDGanttView( QWidget* parent, const char* name ) - : KDGanttMinimizeSplitter( Qt::Vertical, parent, name ), +KDGanttView::KDGanttView( TQWidget* tqparent, const char* name ) + : KDGanttMinimizeSplitter( Qt::Vertical, tqparent, name ), myCanvasView(0), myTimeHeaderScroll(0) { @@ -92,42 +92,42 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); mySplitter = new KDGanttMinimizeSplitter( this ); mySplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left ); - leftWidget = new QVBox( mySplitter ); - rightWidget = new QVBox( mySplitter ); + leftWidget = new TQVBox( mySplitter ); + rightWidget = new TQVBox( mySplitter ); myLegend = new KDLegendWidget( leftWidget, this ); - spacerLeft = new QHBox( leftWidget ); + spacerLeft = new TQHBox( leftWidget ); myListView = new KDListView(leftWidget, this); - myListView->setVScrollBarMode (QScrollView::AlwaysOff ); - connect( myListView, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( slotSelectionChanged( QListViewItem* ) ) ); + myListView->setVScrollBarMode (TQScrollView::AlwaysOff ); + connect( myListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) ); - connect( myListView, SIGNAL( mouseButtonClicked ( int, QListViewItem * , const QPoint &, int ) ), this, SLOT( slotmouseButtonClicked ( int , QListViewItem * , const QPoint &, int ) ) ); - connect( myListView, SIGNAL( contextMenuRequested ( QListViewItem * , const QPoint &, int ) ), this, SLOT( slotcontextMenuRequested ( QListViewItem * , const QPoint & , int ) ) ); - connect( myListView, SIGNAL(doubleClicked ( QListViewItem * ) ), this, SLOT(slotdoubleClicked ( QListViewItem * ) ) ); + connect( myListView, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotmouseButtonClicked ( int , TQListViewItem * , const TQPoint &, int ) ) ); + connect( myListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotcontextMenuRequested ( TQListViewItem * , const TQPoint & , int ) ) ); + connect( myListView, TQT_SIGNAL(doubleClicked ( TQListViewItem * ) ), this, TQT_SLOT(slotdoubleClicked ( TQListViewItem * ) ) ); - connect( myListView, SIGNAL(currentChanged( QListViewItem * ) ), this, SLOT(slotCurrentChanged ( QListViewItem * ) ) ); - connect( myListView, SIGNAL(itemRenamed ( QListViewItem * , int , const QString & ) ), this, SLOT(slotItemRenamed ( QListViewItem *, int , const QString & ) ) ); - connect( myListView, SIGNAL(mouseButtonPressed( int, QListViewItem * , const QPoint &, int ) ), this, SLOT(slotMouseButtonPressed ( int , QListViewItem * , const QPoint & , int ) ) ); + connect( myListView, TQT_SIGNAL(currentChanged( TQListViewItem * ) ), this, TQT_SLOT(slotCurrentChanged ( TQListViewItem * ) ) ); + connect( myListView, TQT_SIGNAL(itemRenamed ( TQListViewItem * , int , const TQString & ) ), this, TQT_SLOT(slotItemRenamed ( TQListViewItem *, int , const TQString & ) ) ); + connect( myListView, TQT_SIGNAL(mouseButtonPressed( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT(slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) ); - //connect( myListView, SIGNAL( ), this, SLOT( ) ); + //connect( myListView, TQT_SIGNAL( ), this, TQT_SLOT( ) ); myTimeTable = new KDTimeTableWidget (rightWidget,this); - spacerRight = new QWidget( rightWidget ); + spacerRight = new TQWidget( rightWidget ); - myTimeHeaderContainer = new QHBox( rightWidget ); - myTimeHeaderContainer->setFrameStyle( QFrame::NoFrame ); + myTimeHeaderContainer = new TQHBox( rightWidget ); + myTimeHeaderContainer->setFrameStyle( TQFrame::NoFrame ); myTimeHeaderContainer->setMargin( 0 ); - myTimeHeaderScroll = new QScrollView ( myTimeHeaderContainer ); - myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff ); - myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOff ); - timeHeaderSpacerWidget = new QWidget( myTimeHeaderContainer ); + myTimeHeaderScroll = new TQScrollView ( myTimeHeaderContainer ); + myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff ); + myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOff ); + timeHeaderSpacerWidget = new TQWidget( myTimeHeaderContainer ); /* - myTimeHeaderScroll = new QScrollView ( rightWidget ); - myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff ); - myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOn ); + myTimeHeaderScroll = new TQScrollView ( rightWidget ); + myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff ); + myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOn ); */ //myTimeHeader = new KDTimeHeaderWidget (rightWidget,this); myTimeHeader = new KDTimeHeaderWidget (myTimeHeaderScroll->viewport(),this); @@ -135,18 +135,18 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) myTimeHeaderScroll->viewport()->setBackgroundColor( myTimeHeader->backgroundColor() ); timeHeaderSpacerWidget->setBackgroundColor( myTimeHeader->backgroundColor() ); myCanvasView = new KDGanttCanvasView (this,myTimeTable,rightWidget); - myTimeHeaderScroll->setFrameStyle( QFrame::NoFrame ); + myTimeHeaderScroll->setFrameStyle( TQFrame::NoFrame ); // - myCanvasView->setFrameStyle( QFrame::NoFrame ); + myCanvasView->setFrameStyle( TQFrame::NoFrame ); myCanvasView->setMargin( 0 ); // myTimeHeaderScroll->setMargin( 0 );//myCanvasView->frameWidth() ); setFrameStyle(myListView->frameStyle()); setLineWidth( 2 ); - myListView->setFrameStyle( QFrame::NoFrame ); + myListView->setFrameStyle( TQFrame::NoFrame ); myListView->setMargin( 0 ); - QObject::connect(myListView, SIGNAL ( expanded ( QListViewItem * ) ) , myTimeTable , SLOT( expandItem(QListViewItem * ))) ; - QObject::connect(myListView, SIGNAL (collapsed ( QListViewItem * ) ) , myTimeTable , SLOT(collapseItem(QListViewItem * ))) ; + TQObject::connect(myListView, TQT_SIGNAL ( expanded ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT( expandItem(TQListViewItem * ))) ; + TQObject::connect(myListView, TQT_SIGNAL (collapsed ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT(collapseItem(TQListViewItem * ))) ; timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() ); listViewIsVisible = true; @@ -156,9 +156,9 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) initDefaults(); _showHeader = false; - myTextColor = Qt::black; - myLegendItems = new QPtrList<legendItem>; - //QObject::connect( this, SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, SLOT( editItem( KDGanttViewItem* ))) ; + myTextColor = TQt::black; + myLegendItems = new TQPtrList<legendItem>; + //TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ; myItemAttributeDialog = new itemAttributeDialog(); setRepaintMode( KDGanttView::Medium ); //setRepaintMode( KDGanttView::Always ); @@ -166,19 +166,19 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) setHeaderVisible( false ); // now connecting the widgets - connect(myCanvasView->horizontalScrollBar(), SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), SLOT( setValue ( int))) ; - connect(myCanvasView, SIGNAL ( heightResized( int )) ,myTimeTable, SLOT( checkHeight ( int))) ; - connect(myCanvasView, SIGNAL ( widthResized( int )) ,myTimeHeader, SLOT( checkWidth ( int))) ; - - QObject::connect(myCanvasView->verticalScrollBar(), SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), SLOT( setValue ( int ))) ; - connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,this, SLOT(slotHeaderSizeChanged() )) ; - connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,myTimeTable, SLOT(resetWidth( int ) )) ; - connect(myListView, SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, SLOT( moveMyContent( int, int ))) ; - connect(myTimeTable, SIGNAL ( heightComputed ( int ) ) ,myCanvasView, SLOT( setMyContentsHeight( int ))) ; + connect(myCanvasView->horizontalScrollBar(), TQT_SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), TQT_SLOT( setValue ( int))) ; + connect(myCanvasView, TQT_SIGNAL ( heightResized( int )) ,myTimeTable, TQT_SLOT( checkHeight ( int))) ; + connect(myCanvasView, TQT_SIGNAL ( widthResized( int )) ,myTimeHeader, TQT_SLOT( checkWidth ( int))) ; + + TQObject::connect(myCanvasView->verticalScrollBar(), TQT_SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), TQT_SLOT( setValue ( int ))) ; + connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,this, TQT_SLOT(slotHeaderSizeChanged() )) ; + connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,myTimeTable, TQT_SLOT(resetWidth( int ) )) ; + connect(myListView, TQT_SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, TQT_SLOT( moveMyContent( int, int ))) ; + connect(myTimeTable, TQT_SIGNAL ( heightComputed ( int ) ) ,myCanvasView, TQT_SLOT( setMyContentsHeight( int ))) ; // the next three are for adding new ticks at left/right - connect( myCanvasView->horizontalScrollBar(), SIGNAL (prevLine () ) ,this, SLOT(addTickLeft())); - connect( myCanvasView->horizontalScrollBar(), SIGNAL (nextLine () ) ,this, SLOT(addTickRight())); - connect( myCanvasView->horizontalScrollBar(), SIGNAL (valueChanged ( int ) ) ,this, SLOT( enableAdding( int ))); + connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(addTickLeft())); + connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(addTickRight())); + connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT( enableAdding( int ))); // now initing fCenterTimeLineAfterShow = false; @@ -186,9 +186,9 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) fDropEnabled = false; closingBlocked = false; myTimeHeader->computeTicks(); - centerTimelineAfterShow( QDateTime::currentDateTime () ); + centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () ); setDisplayEmptyTasksAsLine( false ); - QValueList<int> list; + TQValueList<int> list; list.append(240); list.append(530); mySplitter->setSizes( list ); @@ -287,7 +287,7 @@ void KDGanttView::show() else myCanvasView->horizontalScrollBar()->setValue(1 ); myTimeTable->updateMyContent(); - QWidget::show(); + TQWidget::show(); myCanvasView->setMyContentsHeight( 0 ); if ( fCenterTimeLineAfterShow ) { fCenterTimeLineAfterShow = false; @@ -296,7 +296,7 @@ void KDGanttView::show() } /*! Closes the widget. - The closing is rejected, if a repainting is currently being done. + The closing is rejected, if a tqrepainting is currently being done. \param alsoDelete if true, the widget is deleted \return true, if the widget was closed */ @@ -306,29 +306,29 @@ bool KDGanttView::close ( bool alsoDelete ) //qDebug("close "); if ( closingBlocked ) return false; - return QWidget::close ( alsoDelete ); + return TQWidget::close ( alsoDelete ); } /*! Returns a useful size for the view. Returned width: - sizeHint().width() of the list view + width of TimeTable + tqsizeHint().width() of the list view + width of TimeTable Returned height: height() of TimeHeader + height() of TimeTable + height() of Legend (if shown) */ -QSize KDGanttView::sizeHint() const +TQSize KDGanttView::tqsizeHint() const { bool block = myTimeTable->blockUpdating(); myTimeTable->setBlockUpdating( false ); myTimeTable->updateMyContent(); /* The below causes recursive calls to various size updating methods, which - * cause QCanvas to hide and show items like mad, which is very slow. If + * cause TQCanvas to hide and show items like mad, which is very slow. If * there is a legitimate gui updating issue here somewhere, it will need * to be solved differently. */ - //qApp->processEvents(); + //tqApp->processEvents(); int hintHeight = myTimeHeader->height(); int legendHeight = 0; if ( showLegendButton() ) @@ -342,13 +342,13 @@ QSize KDGanttView::sizeHint() const if ( myLegend->isShown() ) hintHeight += myLegend->legendSizeHint().height() +10; hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2; - int hintWid = myListView->sizeHint().width(); + int hintWid = myListView->tqsizeHint().width(); //hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width(); - hintWid += myCanvasView->sizeHint().width(); + hintWid += myCanvasView->tqsizeHint().width(); // add 10 for the splitter-bars // qDebug("sizehint %d %d ",hintWid+10, hintHeight ); myTimeTable->setBlockUpdating( block ); - return QSize( hintWid+10, hintHeight ); + return TQSize( hintWid+10, hintHeight ); } @@ -418,7 +418,7 @@ bool KDGanttView::headerVisible() const \param global true if coordX is a global position, false otherwise \return the date and time at coordinate X in the Gantt view. */ -QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const +TQDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const { // default for myTimeHeader->getDateTimeForIndex() is local return myTimeHeader->getDateTimeForIndex(coordX, !global ); @@ -428,7 +428,7 @@ QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const /*! Implements a casted pass-through of the selectionChanged() signal. */ -void KDGanttView::slotSelectionChanged( QListViewItem* item ) +void KDGanttView::slotSelectionChanged( TQListViewItem* item ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); Q_ASSERT( gItem ); @@ -440,8 +440,8 @@ void KDGanttView::slotSelectionChanged( QListViewItem* item ) Implements a casted pass-through of the mouseButtonClicked() signal. Signals itemLeftClicked() , itemMidClicked() are emitted as well. */ -void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item, - const QPoint & pos, int c ) +void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item, + const TQPoint & pos, int c ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvMouseButtonClicked ( button , gItem, pos, c ); @@ -458,11 +458,11 @@ void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item, //emit mouseButtonClicked ( button , gItem, pos, c ); { switch ( button ) { - case LeftButton: + case Qt::LeftButton: emit lvItemLeftClicked( gItem ); emit itemLeftClicked( gItem ); break; - case MidButton: + case Qt::MidButton: emit lvItemMidClicked( gItem ); emit itemMidClicked( gItem ); break; @@ -476,7 +476,7 @@ void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item, The signal itemRightClicked() is emitted as well; the position is the global position. */ -void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col ) +void KDGanttView::slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvContextMenuRequested ( gItem, pos, col ); @@ -488,7 +488,7 @@ void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint /* Implements a casted pass-through of the doubleClicked() signal. */ -void KDGanttView::slotdoubleClicked ( QListViewItem * item ) +void KDGanttView::slotdoubleClicked ( TQListViewItem * item ) { { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); @@ -501,7 +501,7 @@ void KDGanttView::slotdoubleClicked ( QListViewItem * item ) /* Implements a casted pass-through of the currentChanged() signal. */ -void KDGanttView::slotCurrentChanged ( QListViewItem * item ) +void KDGanttView::slotCurrentChanged ( TQListViewItem * item ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); myCurrentItem = gItem; @@ -512,8 +512,8 @@ void KDGanttView::slotCurrentChanged ( QListViewItem * item ) /* Implements a casted pass-through of the itemRenamed() signal. */ -void KDGanttView::slotItemRenamed ( QListViewItem * item , int col, - const QString & text ) +void KDGanttView::slotItemRenamed ( TQListViewItem * item , int col, + const TQString & text ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvItemRenamed( gItem, col, text ); @@ -523,8 +523,8 @@ void KDGanttView::slotItemRenamed ( QListViewItem * item , int col, /* Implements a casted pass-through of the mouseButtonPressed() signal. */ -void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item, - const QPoint & pos, int c ) +void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item, + const TQPoint & pos, int c ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvMouseButtonPressed( button, gItem, pos, c ); @@ -532,14 +532,14 @@ void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item, /*! - Specifies whether the content should be repainted after scrolling or + Specifies whether the content should be tqrepainted after scrolling or not. - \param mode If No, there is no repainting after scrolling. This is + \param mode If No, there is no tqrepainting after scrolling. This is the fastest mode. - If Medium, there is extra repainting after releasing the + If Medium, there is extra tqrepainting after releasing the scrollbar. This provides fast scrolling with updated content - after scrolling. Recommended, when repaint problems occur. + after scrolling. Recommended, when tqrepaint problems occur. This is the default value after startup. If Always, there is an extra update after every move of the scrollbar. This entails slow scrolling with updated @@ -548,7 +548,7 @@ void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item, void KDGanttView::setRepaintMode( RepaintMode mode ) { - QScrollBar *cvh, *cvv; + TQScrollBar *cvh, *cvv; cvh = myCanvasView->horizontalScrollBar(); cvv = myCanvasView->verticalScrollBar(); // first disconnect @@ -560,18 +560,18 @@ void KDGanttView::setRepaintMode( RepaintMode mode ) break; case Medium: - connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); - connect( cvv, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint())); - connect( cvv, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint())); break; case Always: - connect( cvv, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int ))); - connect( cvh, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int ))); - connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int ))); + connect( cvh, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int ))); + connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); break; } } @@ -622,7 +622,7 @@ void KDGanttView::slotHeaderSizeChanged() // legend is cleared - reinit legend with list legendItem* li; for ( li = myLegendItems->first(); li; li = myLegendItems->next() ) { - myLegend->addLegendItem(li->shape, li->color, li->text ); + myLegend->addLegendItem(li->tqshape, li->color, li->text ); } } } @@ -651,7 +651,7 @@ void KDGanttView::slotHeaderSizeChanged() DO NOT DELETE THIS POINTER! \sa setShowLegend(), setLegendIsDockwindow(),legendIsDockwindow() */ -QDockWindow* KDGanttView::legendDockwindow() const +TQDockWindow* KDGanttView::legendDockwindow() const { return myLegend->dockwindow(); } @@ -698,9 +698,9 @@ void KDGanttView::setShowListView( bool show ) if(listViewIsVisible == show) return; listViewIsVisible = show; if (listViewIsVisible) - myListView->parentWidget()->show(); + myListView->tqparentWidget()->show(); else - myListView->parentWidget()->hide(); + myListView->tqparentWidget()->hide(); } @@ -783,15 +783,15 @@ bool KDGanttView::editable() const \sa loadProject() */ -bool KDGanttView::saveProject( QIODevice* device ) +bool KDGanttView::saveProject( TQIODevice* device ) { Q_ASSERT( device ); - QDomDocument doc = saveXML(); + TQDomDocument doc = saveXML(); if( device->isOpen() ) device->close(); if( device->open( IO_WriteOnly ) ) { - QTextStream ts( device ); + TQTextStream ts( device ); ts << doc.toString(); return true; } else @@ -810,15 +810,15 @@ bool KDGanttView::saveProject( QIODevice* device ) \sa saveProject() */ -bool KDGanttView::loadProject( QIODevice* device ) +bool KDGanttView::loadProject( TQIODevice* device ) { Q_ASSERT( device ); if( device->isOpen() ) device->close(); if( device->open( IO_ReadOnly ) ) { - QDomDocument doc( "GanttView" ); - QString err; + TQDomDocument doc( "GanttView" ); + TQString err; int errline, errcol; if ( !doc.setContent( device, &err, &errline, &errcol ) ) { qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline ); @@ -835,8 +835,8 @@ bool KDGanttView::loadProject( QIODevice* device ) /*! Sends a Gantt view to a printer. The printer should already be set - up for printing (by calling QPrinter::setup()). - If the printer is not set up, QPrinter::setup() is called before printing + up for printing (by calling TQPrinter::setup()). + If the printer is not set up, TQPrinter::setup() is called before printing You can specify, whether the ListView, TimeLine, or Legend will be printed. All combinations of these three widgets are allowed. @@ -851,13 +851,13 @@ bool KDGanttView::loadProject( QIODevice* device ) \sa drawContents() */ -void KDGanttView::print( QPrinter* printer , +void KDGanttView::print( TQPrinter* printer , bool printListView, bool printTimeLine, bool printLegend ) { bool deletePrinter = false; if (! printer ) { - printer = new QPrinter(); + printer = new TQPrinter(); deletePrinter = true; if ( !printer->setup()) { delete printer; @@ -865,18 +865,18 @@ void KDGanttView::print( QPrinter* printer , } } // now we have a printer to print on - QPainter p( printer ); + TQPainter p( printer ); // get the paper metrics - QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); + TQPaintDeviceMetrics m = TQPaintDeviceMetrics ( printer ); float dx, dy; // get the size of the desired output for scaling. // here we want to print all: ListView, TimeLine, and Legend // for this purpose, we call drawContents() with a 0 pointer as painter - QSize size = drawContents( 0, printListView, printTimeLine, printLegend ); + TQSize size = drawContents( 0, printListView, printTimeLine, printLegend ); // at the top, we want to print current time/date - QString date = "Printing Time: " + QDateTime::currentDateTime().toString(); - int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); + TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString(); + int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height(); p.drawText( 0, 0, date ); // compute the scale @@ -905,7 +905,7 @@ void KDGanttView::print( QPrinter* printer , /*! - Paints a Gantt view on a QPainter. + Paints a Gantt view on a TQPainter. You can specify, whether the list view, the time line, or the legend is painted. All combinations of these three widgets are allowed. @@ -918,7 +918,7 @@ void KDGanttView::print( QPrinter* printer , the scale of the painter, before calling this method with a painter. In order to get the output fitted to your paper and your printer, call first - QSize size = drawContents( 0, printListView, printTimeLine, printLegend ); + TQSize size = drawContents( 0, printListView, printTimeLine, printLegend ); //then compute the scale dx = paper.width() / size.width(); dy = paper.height() / size.height(); @@ -943,10 +943,10 @@ void KDGanttView::print( QPrinter* printer , \return the size of the painted area \sa print() */ -QSize KDGanttView::drawContents( QPainter* p, +TQSize KDGanttView::drawContents( TQPainter* p, bool drawListView , bool drawTimeLine, bool drawLegend ) { - QSize size; + TQSize size; int lvX, lvY, thX, thY, tlX, tlY, lwX, lwY, allX, allY; lvX = myListView->contentsWidth(); lvY = myCanvasView->canvas()->height() + 20; @@ -971,7 +971,7 @@ QSize KDGanttView::drawContents( QPainter* p, if ( allX < lwX ) allX = lwX ; } - size = QSize( allX, allY ); + size = TQSize( allX, allY ); int temp = 0; if ( p ) { if ( drawListView ) { @@ -986,7 +986,7 @@ QSize KDGanttView::drawContents( QPainter* p, } if ( drawTimeLine ) { p->translate( myCanvasView->frameWidth(), 0); - myTimeHeader->repaintMe( 0, myTimeHeader->width(), p ); + myTimeHeader->tqrepaintMe( 0, myTimeHeader->width(), p ); p->translate( -myCanvasView->frameWidth(), thY); myCanvasView->drawToPainter( p ); if ( drawListView ) @@ -1062,7 +1062,7 @@ void KDGanttView::zoomToFit() \sa zoomToFit() */ -void KDGanttView::zoomToSelection( const QDateTime& start, const QDateTime& end ) +void KDGanttView::zoomToSelection( const TQDateTime& start, const TQDateTime& end ) { myTimeHeader->zoomToSelection( start, end); @@ -1083,21 +1083,21 @@ void KDGanttView::ensureVisible( KDGanttViewItem* item ) /*! - Makes sure that the specified QDateTime is in the center of the + Makes sure that the specified TQDateTime is in the center of the visible Gantt chart (if possible). If you want to center the timeline when the KDGanttView is hidden, calling centerTimelineAfterShow() is the better alternative. \sa center(), centerTimelineAfterShow() */ -void KDGanttView::centerTimeline( const QDateTime& center ) +void KDGanttView::centerTimeline( const TQDateTime& center ) { myTimeHeader->centerDateTime( center ); } /*! - Makes sure that the specified QDateTime is in the center of the + Makes sure that the specified TQDateTime is in the center of the visible Gantt chart (if possible). If the KDGanttView is currently hidden, this method resets the center once again after the next show() call. Use this method if you want to center the timeline when @@ -1109,7 +1109,7 @@ void KDGanttView::centerTimeline( const QDateTime& center ) \sa center(), centerTimeline() */ -void KDGanttView::centerTimelineAfterShow( const QDateTime& center ) +void KDGanttView::centerTimelineAfterShow( const TQDateTime& center ) { myTimeHeader->centerDateTime( center ); if ( ! isVisible() ) { @@ -1213,13 +1213,13 @@ bool KDGanttView::showTaskLinks() const \param font the new font of the widget */ -void KDGanttView::setFont(const QFont& font) +void KDGanttView::setFont(const TQFont& font) { myListView->setFont(font); - myListView->repaint(); + myListView->tqrepaint(); myTimeHeader->setFont(font); myLegend->setFont( font ); - QWidget::setFont( font ); + TQWidget::setFont( font ); setScale(scale()); } @@ -1306,21 +1306,21 @@ bool KDGanttView::showTimeTablePopupMenu() const /*! - Sets the shapes for a certain type of Gantt item. Not all items use - all three shapes (e.g., only summary items use the middle shape). + Sets the tqshapes for a certain type of Gantt item. Not all items use + all three tqshapes (e.g., only summary items use the middle tqshape). - This setting overrides any shape settings made on individual items. + This setting overrides any tqshape settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the documentation of the KDGanttViewItem class. - \param type the type of Gantt items for which to set the shapes - \param start the shape to use for the beginning of the item - \param middle the shape to use for the middle of the item - \param end the shape to use for the end of the item - \param overwriteExisting if true, overwrites existing shape settings + \param type the type of Gantt items for which to set the tqshapes + \param start the tqshape to use for the beginning of the item + \param middle the tqshape to use for the middle of the item + \param end the tqshape to use for the end of the item + \param overwriteExisting if true, overwrites existing tqshape settings in the individual items - \sa shapes() + \sa tqshapes() */ void KDGanttView::setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, @@ -1329,7 +1329,7 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setShapes(start,middle, end ); @@ -1344,18 +1344,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, /*! - Queries the shapes for a particular type of Gantt item. + Queries the tqshapes for a particular type of Gantt item. - \param type the type of Gantt items for which to query the shapes - \param start the start shape is returned in this parameter - \param middle the middle shape is returned in this parameter - \param end the end shape is returned in this parameter - \return true if there was a general shape set for the specified - type. If the return value is false, the values of the three shape + \param type the type of Gantt items for which to query the tqshapes + \param start the start tqshape is returned in this parameter + \param middle the middle tqshape is returned in this parameter + \param end the end tqshape is returned in this parameter + \return true if there was a general tqshape set for the specified + type. If the return value is false, the values of the three tqshape parameters are undefined. \sa setShapes() */ -bool KDGanttView::shapes( KDGanttViewItem::Type type, +bool KDGanttView::tqshapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape& start, KDGanttViewItem::Shape& middle, KDGanttViewItem::Shape& end ) const @@ -1386,12 +1386,12 @@ bool KDGanttView::shapes( KDGanttViewItem::Type type, \sa colors(), setDefaultColors(), defaultColors() */ void KDGanttView::setColors( KDGanttViewItem::Type type, - const QColor& start, const QColor& middle, - const QColor& end, + const TQColor& start, const TQColor& middle, + const TQColor& end, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setColors(start,middle, end ); @@ -1418,7 +1418,7 @@ void KDGanttView::setColors( KDGanttViewItem::Type type, \sa setColors(), setDefaultColor(), defaultColor() */ bool KDGanttView::colors( KDGanttViewItem::Type type, - QColor& start, QColor& middle, QColor& end ) const + TQColor& start, TQColor& middle, TQColor& end ) const { int index = getIndex( type ); start = myColor [index*3]; @@ -1448,13 +1448,13 @@ bool KDGanttView::colors( KDGanttViewItem::Type type, \sa highlightColors(), setDefaultHighlightColor(), defaultHighlightColor() */ void KDGanttView::setHighlightColors( KDGanttViewItem::Type type, - const QColor& start, - const QColor& middle, - const QColor& end, + const TQColor& start, + const TQColor& middle, + const TQColor& end, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setHighlightColors(start,middle, end ); @@ -1484,8 +1484,8 @@ void KDGanttView::setHighlightColors( KDGanttViewItem::Type type, defaultHighlightColor() */ bool KDGanttView::highlightColors( KDGanttViewItem::Type type, - QColor& start, QColor& middle, - QColor& end ) const + TQColor& start, TQColor& middle, + TQColor& end ) const { int index = getIndex( type ); start = myColorHL [index*3]; @@ -1502,9 +1502,9 @@ bool KDGanttView::highlightColors( KDGanttViewItem::Type type, \param color the text color to use \sa textColor() */ -void KDGanttView::setTextColor( const QColor& color ) +void KDGanttView::setTextColor( const TQColor& color ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { ((KDGanttViewItem*)it.current())->setTextColor(color); } @@ -1518,7 +1518,7 @@ void KDGanttView::setTextColor( const QColor& color ) \return the color used for texts in the Gantt chart. \sa setTextColor() */ -QColor KDGanttView::textColor() const +TQColor KDGanttView::textColor() const { return myTextColor; } @@ -1534,7 +1534,7 @@ QColor KDGanttView::textColor() const KDGanttView::noInformationBrush() */ -void KDGanttView::setNoInformationBrush( const QBrush& brush ) +void KDGanttView::setNoInformationBrush( const TQBrush& brush ) { myTimeTable->setNoInformationBrush( brush ); } @@ -1546,7 +1546,7 @@ void KDGanttView::setNoInformationBrush( const QBrush& brush ) \sa KDGanttViewItem::showNoInformation(), KDGanttViewItem::setShowNoInformation(), setNoInformationBrush() */ -QBrush KDGanttView::noInformationBrush() const +TQBrush KDGanttView::noInformationBrush() const { return myTimeTable->noInformationBrush(); } @@ -1562,26 +1562,26 @@ void KDGanttView::clearLegend( ) myLegend->clearLegend(); myLegendItems->setAutoDelete( true ); delete myLegendItems; - myLegendItems = new QPtrList<legendItem>; + myLegendItems = new TQPtrList<legendItem>; } /*! Adds an item to the legend. - \param shape the shape to display - \param shapeColor the color in which to display the shape + \param tqshape the tqshape to display + \param tqshapeColor the color in which to display the tqshape \param text the text to display \sa clearLegend() */ -void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, - const QColor& shapeColor, - const QString& text ) +void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, + const TQString& text ) { - myLegend->addLegendItem( shape,shapeColor,text ); + myLegend->addLegendItem( tqshape,tqshapeColor,text ); legendItem* item = new legendItem; - item->shape = shape; - item->color = shapeColor; + item->tqshape = tqshape; + item->color = tqshapeColor; item->text = text; myLegendItems->append( item ); } @@ -1594,7 +1594,7 @@ void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, \param start the start of the horizon \sa horizonStart() */ -void KDGanttView::setHorizonStart( const QDateTime& start ) +void KDGanttView::setHorizonStart( const TQDateTime& start ) { myTimeHeader->setHorizonStart(start); } @@ -1606,7 +1606,7 @@ void KDGanttView::setHorizonStart( const QDateTime& start ) \return the start of the horizon of the Gantt chart \sa setHorizonStart() */ -QDateTime KDGanttView::horizonStart() const +TQDateTime KDGanttView::horizonStart() const { return myTimeHeader->horizonStart(); } @@ -1619,7 +1619,7 @@ QDateTime KDGanttView::horizonStart() const \param end the end of the horizon \sa setHorizonEnd() */ -void KDGanttView::setHorizonEnd( const QDateTime& end ) +void KDGanttView::setHorizonEnd( const TQDateTime& end ) { myTimeHeader->setHorizonEnd(end); } @@ -1632,7 +1632,7 @@ void KDGanttView::setHorizonEnd( const QDateTime& end ) \sa setHorizonEnd() */ -QDateTime KDGanttView::horizonEnd() const +TQDateTime KDGanttView::horizonEnd() const { return myTimeHeader->horizonEnd(); } @@ -1891,8 +1891,8 @@ bool KDGanttView::showMinorTicks() const \sa columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -void KDGanttView::setColumnBackgroundColor( const QDateTime& column, - const QColor& color , +void KDGanttView::setColumnBackgroundColor( const TQDateTime& column, + const TQColor& color , Scale mini, Scale maxi ) { myTimeHeader->setColumnBackgroundColor( column, color,mini,maxi ); @@ -1903,7 +1903,7 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column, Sets the background color for a time interval given by \a start and \a end. \a start may be later than \a end. If there is already a background interval with the same \a start and \a end values - defined, the values (i.e. const QColor& color , Scale mini, Scale + defined, the values (i.e. const TQColor& color , Scale mini, Scale maxi) of this background interval are changed. Change the times of an already defined interval with \a changeBackgroundInterval(). Delete an already defined interval with \a @@ -1925,9 +1925,9 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column, columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -void KDGanttView::setIntervalBackgroundColor( const QDateTime& start, - const QDateTime& end, - const QColor& color , +void KDGanttView::setIntervalBackgroundColor( const TQDateTime& start, + const TQDateTime& end, + const TQColor& color , Scale mini, Scale maxi ) { myTimeHeader->setIntervalBackgroundColor( start, end, color,mini,maxi ); @@ -1952,10 +1952,10 @@ void KDGanttView::setIntervalBackgroundColor( const QDateTime& start, columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart, - const QDateTime& oldend, - const QDateTime& newstart, - const QDateTime& newend ) +bool KDGanttView::changeBackgroundInterval( const TQDateTime& oldstart, + const TQDateTime& oldend, + const TQDateTime& newstart, + const TQDateTime& newend ) { return myTimeHeader->changeBackgroundInterval( oldstart, oldend, newstart, newend ); @@ -1970,8 +1970,8 @@ bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart, \a start and \a end found (and hence deleted). \sa changeBackgroundInterval(), columnBackgroundColor() */ -bool KDGanttView::deleteBackgroundInterval( const QDateTime& start, - const QDateTime& end) +bool KDGanttView::deleteBackgroundInterval( const TQDateTime& start, + const TQDateTime& end) { return myTimeHeader->deleteBackgroundInterval( start, end ); } @@ -1999,7 +1999,7 @@ void KDGanttView::clearBackgroundColor() \sa setColumnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const +TQColor KDGanttView::columnBackgroundColor( const TQDateTime& column ) const { return myTimeHeader->columnBackgroundColor( column ) ; } @@ -2013,7 +2013,7 @@ QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const \param color the background color to use for weekend days. \sa weekendBackgroundColor(), setWeekendDays(), weekendDays() */ -void KDGanttView::setWeekendBackgroundColor( const QColor& color ) +void KDGanttView::setWeekendBackgroundColor( const TQColor& color ) { myTimeHeader->setWeekendBackgroundColor( color ); } @@ -2025,7 +2025,7 @@ void KDGanttView::setWeekendBackgroundColor( const QColor& color ) \return the background color for weekend days \sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays() */ -QColor KDGanttView::weekendBackgroundColor() const +TQColor KDGanttView::weekendBackgroundColor() const { return myTimeHeader->weekendBackgroundColor(); } @@ -2041,7 +2041,7 @@ QColor KDGanttView::weekendBackgroundColor() const \param weekday the day of the week (Monday = 1, Sunday = 7) \sa weekendBackgroundColor(), setWeekendDays(), weekendDays() */ -void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday ) +void KDGanttView::setWeekdayBackgroundColor( const TQColor& color, int weekday ) { myTimeHeader->setWeekdayBackgroundColor( color, weekday ); } @@ -2054,7 +2054,7 @@ void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday ) \return the background color for weekend days \sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays() */ -QColor KDGanttView::weekdayBackgroundColor(int weekday) const +TQColor KDGanttView::weekdayBackgroundColor(int weekday) const { return myTimeHeader->weekdayBackgroundColor( weekday); } @@ -2246,11 +2246,11 @@ int KDGanttView::minorScaleCount() const \sa defaultColor(), setColors(), colors() */ void KDGanttView::setDefaultColor( KDGanttViewItem::Type type, - const QColor& color, + const TQColor& color, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setDefaultColor(color ); @@ -2272,7 +2272,7 @@ void KDGanttView::setDefaultColor( KDGanttViewItem::Type type, \return color the default color used \sa setDefaultColor(), setColors(), colors() */ -QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const +TQColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const { int index = getIndex( type ); return myDefaultColor [index]; @@ -2292,11 +2292,11 @@ QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const \sa defaultHighlightColor(), setHighlightColors(), highlightColors() */ void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type, - const QColor& color, + const TQColor& color, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setDefaultHighlightColor(color ); @@ -2318,7 +2318,7 @@ void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type, \return color the default highlighting color used \sa setDefaultHighlightColor(), setHighlightColors(), highlightColors() */ -QColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const +TQColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const { int index = getIndex( type ); return myDefaultColorHL [index]; @@ -2343,7 +2343,7 @@ KDGanttViewItem* KDGanttView::firstChild() const GanttView as a calendar view, you have to call setDisplaySubitemsAsGroup( true ); to use the root items as calendar items. To create new calendar entries for these root items, create - a new KDGanttViewTaskItem with this root item as a parent. If you + a new KDGanttViewTaskItem with this root item as a tqparent. If you want an item with subitems to behave like a calendar (which is possibly empty at startup), please call setIsCalendar( true ); for this item. @@ -2383,7 +2383,7 @@ bool KDGanttView::calendarMode() const */ void KDGanttView::setDisplaySubitemsAsGroup( bool show ) { - QListViewItemIterator it( myListView ); + TQListViewItemIterator it( myListView ); for ( ; it.current(); ++it ) { KDGanttViewItem* currentItem = ( KDGanttViewItem* )it.current(); currentItem->setDisplaySubitemsAsGroup( show ); @@ -2434,7 +2434,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const /*! Defines the horizontal background lines of the Gantt chart. Call setHorBackgroundLines() - (equivalent to setHorBackgroundLines( 2, QBrush( QColor ( 240,240,240 )) ) ) + (equivalent to setHorBackgroundLines( 2, TQBrush( TQColor ( 240,240,240 )) ) ) to draw a light grey horizontal background line for every second Gantt item. Call setHorBackgroundLines(0) in order to not show horizontal background lines. @@ -2445,7 +2445,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const for count < 2, no background lines are drawn \param brush the brush of the lines */ -void KDGanttView::setHorBackgroundLines( int count, QBrush brush ) +void KDGanttView::setHorBackgroundLines( int count, TQBrush brush ) { myTimeTable->setHorBackgroundLines( count, brush ); } @@ -2460,7 +2460,7 @@ void KDGanttView::setHorBackgroundLines( int count, QBrush brush ) if 0 is returned, no backgroud lines are drawn */ -int KDGanttView::horBackgroundLines( QBrush& brush ) +int KDGanttView::horBackgroundLines( TQBrush& brush ) { return myTimeTable->horBackgroundLines( brush ); } @@ -2482,7 +2482,7 @@ KDGanttViewItem* KDGanttView::lastItem() const \return the list of task links in the Gantt view */ -QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const +TQPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const { return myTimeTable->taskLinks(); @@ -2494,7 +2494,7 @@ QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const \return the list of task link groups in the Gantt view */ -QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const +TQPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const { return myTaskLinkGroupList; } @@ -2507,14 +2507,14 @@ QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const format error occurred \sa saveXML */ -bool KDGanttView::loadXML( const QDomDocument& doc ) +bool KDGanttView::loadXML( const TQDomDocument& doc ) { - QDomElement docRoot = doc.documentElement(); // ChartParams element - QDomNode node = docRoot.firstChild(); + TQDomElement docRoot = doc.documentElement(); // ChartParams element + TQDomNode node = docRoot.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "ShowLegend" ) { bool value; if( KDGanttXML::readBoolNode( element, value ) ) @@ -2548,35 +2548,35 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readBoolNode( element, value ) ) setDisplayEmptyTasksAsLine( value ); } else if( tagName == "GlobalFont" ) { - QFont font; + TQFont font; if( KDGanttXML::readFontNode( element, font ) ) setFont( font ); } else if( tagName == "HorizonStart" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) setHorizonStart( value ); } else if( tagName == "HorizonEnd" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) setHorizonEnd( value ); } else if( tagName == "Scale" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setScale( stringToScale( value ) ); } else if( tagName == "MinimumScale" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setMinimumScale( stringToScale( value ) ); } else if( tagName == "MaximumScale" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setMaximumScale( stringToScale( value ) ); } else if( tagName == "YearFormat" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setYearFormat( stringToYearFormat( value ) ); } else if( tagName == "HourFormat" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setHourFormat( stringToHourFormat( value ) ); } else if( tagName == "ShowMinorTicks" ) { @@ -2604,7 +2604,7 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readBoolNode( element, value ) ) setEditable( value ); } else if( tagName == "TextColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setTextColor( value ); } else if( tagName == "MajorScaleCount" ) { @@ -2628,43 +2628,43 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readIntNode( element, value ) ) setGanttMaximumWidth( value ); } else if( tagName == "NoInformationBrush" ) { - QBrush value; + TQBrush value; if( KDGanttXML::readBrushNode( element, value ) ) setNoInformationBrush( value ); } else if( tagName == "GanttViewBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setGvBackgroundColor( value ); } else if( tagName == "ListViewBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setLvBackgroundColor( value ); } else if( tagName == "TimeHeaderBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setTimeHeaderBackgroundColor( value ); } else if( tagName == "LegendHeaderBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setLegendHeaderBackgroundColor( value ); } else if( tagName == "WeekendBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setWeekendBackgroundColor( value ); } else if( tagName == "WeekdayBackgroundColor" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); int day = 0; - QColor color; + TQColor color; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Day" ) { int value; if( KDGanttXML::readIntNode( element, value ) ) day = value; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) color = value; } else { @@ -2678,8 +2678,8 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( day && color.isValid() ) setWeekdayBackgroundColor( color, day ); } else if( tagName == "WeekendDays" ) { - QString startString = element.attribute( "Start" ); - QString endString = element.attribute( "End" ); + TQString startString = element.attribute( "Start" ); + TQString endString = element.attribute( "End" ); bool startOk = false, endOk = false; int start = startString.toInt( &startOk ); int end = startString.toInt( &endOk ); @@ -2698,36 +2698,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readBoolNode( element, value ) ) setShowTimeTablePopupMenu( value ); } else if( tagName == "Shapes" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); bool undefinedShape = false; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { KDGanttViewItem::Shape startShape, middleShape, endShape; startShape = KDGanttViewItem::TriangleDown; middleShape = KDGanttViewItem::TriangleDown; endShape = KDGanttViewItem::TriangleDown; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "Middle" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "End" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) @@ -2748,25 +2748,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startShape = KDGanttViewItem::TriangleDown; middleShape = KDGanttViewItem::TriangleDown; endShape = KDGanttViewItem::TriangleDown; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull()) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "Middle" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "End" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) @@ -2786,25 +2786,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startShape = KDGanttViewItem::TriangleDown; middleShape = KDGanttViewItem::TriangleDown; endShape = KDGanttViewItem::TriangleDown; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "Middle" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "End" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) @@ -2828,28 +2828,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "Colors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull()) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2862,22 +2862,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) setColors( KDGanttViewItem::Event, startColor, middleColor, endColor, false ); } else if( tagName == "Task" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2890,22 +2890,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) setColors( KDGanttViewItem::Task, startColor, middleColor, endColor, false ); } else if( tagName == "Summary" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2925,23 +2925,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "DefaultColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( KDGanttViewItem::Event, value, false ); } else if( tagName == "Task" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( KDGanttViewItem::Task, value, false ); } else if( tagName == "Summary" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( KDGanttViewItem::Summary, value , false); @@ -2954,28 +2954,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "HighlightColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2989,22 +2989,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startColor, middleColor, endColor, false ); } else if( tagName == "Task" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -3018,22 +3018,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startColor, middleColor, endColor , false); } else if( tagName == "Summary" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -3054,23 +3054,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "DefaultHighlightColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( KDGanttViewItem::Event, value , false); } else if( tagName == "Task" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( KDGanttViewItem::Task, value, false ); } else if( tagName == "Summary" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( KDGanttViewItem::Summary, value, false ); @@ -3083,12 +3083,12 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "Items" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); KDGanttViewItem* previous = 0; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Item" ) { KDGanttViewItem* newItem; if( previous ) @@ -3110,11 +3110,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "TaskLinks" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "TaskLink" ) KDGanttViewTaskLink::createFromDomElement( element ); else { @@ -3126,11 +3126,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "TaskLinkGroups" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "TaskLink" ) KDGanttViewTaskLinkGroup::createFromDomElement( element ); } else { @@ -3141,27 +3141,27 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "ColumnBackgroundColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "ColumnBackgroundColor" ) { - QDomNode node = element.firstChild(); - QDateTime dateTime; - QColor color; + TQDomNode node = element.firstChild(); + TQDateTime dateTime; + TQColor color; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was // really an // element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "DateTime" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) dateTime = value; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) color = value; } else { @@ -3182,36 +3182,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) } } else if( tagName == "LegendItems" ) { clearLegend(); - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "LegendItem" ) { KDGanttViewItem::Shape tempLegendShape; tempLegendShape = KDGanttViewItem::TriangleDown; - QColor tempLegendColor; - QString tempLegendString; + TQColor tempLegendColor; + TQString tempLegendString; bool ok = true; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Shape" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) tempLegendShape = KDGanttViewItem::stringToShape( value ); else ok = false; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) tempLegendColor = value; else ok = false; } else if( tagName == "Text" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) tempLegendString = value; else @@ -3256,19 +3256,19 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) \return the XML document that represents the parameters \sa loadXML */ -QDomDocument KDGanttView::saveXML( bool withPI ) const +TQDomDocument KDGanttView::saveXML( bool withPI ) const { // Create an inital DOM document - QString docstart = "<GanttView/>"; + TQString docstart = "<GanttView/>"; - QDomDocument doc( "GanttView" ); + TQDomDocument doc( "GanttView" ); doc.setContent( docstart ); if( withPI ) { - QDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ; + TQDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ; doc.appendChild ( pin ); } - QDomElement docRoot = doc.documentElement(); + TQDomElement docRoot = doc.documentElement(); docRoot.setAttribute( "xmlns", "http://www.klaralvdalens-datakonsult.se/kdgantt" ); docRoot.setAttribute( "xmlns:xsi", "http://www.w3.org/2000/10/XMLSchema-instance" ); docRoot.setAttribute( "xsi:schemaLocation", "http://www.klaralvdalens-datakonsult.se/kdgantt" ); @@ -3380,9 +3380,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const // the WeekdayBackgroundColor elements for( int weekday = 1; weekday <= 7; weekday++ ) { - QColor color = weekdayBackgroundColor( weekday ); + TQColor color = weekdayBackgroundColor( weekday ); if( color.isValid() ) { - QDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" ); + TQDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" ); docRoot.appendChild( weekendBackgroundColorElement ); KDGanttXML::createIntNode( doc, weekendBackgroundColorElement, "Day", weekday ); @@ -3392,7 +3392,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const } // the WeekendDays element - QDomElement weekendDaysElement = doc.createElement( "WeekendDays" ); + TQDomElement weekendDaysElement = doc.createElement( "WeekendDays" ); docRoot.appendChild( weekendDaysElement ); int weekendStart, weekendEnd; weekendDays( weekendStart, weekendEnd ); @@ -3412,78 +3412,78 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const showTimeTablePopupMenu() ); // the Shapes element - QDomElement shapesElement = doc.createElement( "Shapes" ); - docRoot.appendChild( shapesElement ); - QDomElement shapesEventElement = doc.createElement( "Event" ); - shapesElement.appendChild( shapesEventElement ); + TQDomElement tqshapesElement = doc.createElement( "Shapes" ); + docRoot.appendChild( tqshapesElement ); + TQDomElement tqshapesEventElement = doc.createElement( "Event" ); + tqshapesElement.appendChild( tqshapesEventElement ); KDGanttViewItem::Shape start, middle, end; - if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", - KDGanttViewItem::shapeToString( end ) ); + if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", "Undefined" ); } - QDomElement shapesTaskElement = doc.createElement( "Task" ); - shapesElement.appendChild( shapesTaskElement ); - if( shapes( KDGanttViewItem::Task, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", - KDGanttViewItem::shapeToString( end ) ); + TQDomElement tqshapesTaskElement = doc.createElement( "Task" ); + tqshapesElement.appendChild( tqshapesTaskElement ); + if( tqshapes( KDGanttViewItem::Task, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", "Undefined" ); } - QDomElement shapesSummaryElement = doc.createElement( "Summary" ); - shapesElement.appendChild( shapesSummaryElement ); - if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", - KDGanttViewItem::shapeToString( end ) ); + TQDomElement tqshapesSummaryElement = doc.createElement( "Summary" ); + tqshapesElement.appendChild( tqshapesSummaryElement ); + if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", "Undefined" ); } // the Colors element - QDomElement colorsElement = doc.createElement( "Colors" ); + TQDomElement colorsElement = doc.createElement( "Colors" ); docRoot.appendChild( colorsElement ); - QDomElement colorsEventElement = doc.createElement( "Event" ); + TQDomElement colorsEventElement = doc.createElement( "Event" ); colorsElement.appendChild( colorsEventElement ); - QColor startColor, middleColor, endColor; + TQColor startColor, middleColor, endColor; colors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, colorsEventElement, "Start", startColor ); KDGanttXML::createColorNode( doc, colorsEventElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, colorsEventElement, "End", endColor ); - QDomElement colorsTaskElement = doc.createElement( "Task" ); + TQDomElement colorsTaskElement = doc.createElement( "Task" ); colorsElement.appendChild( colorsTaskElement ); colors( KDGanttViewItem::Task, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, colorsTaskElement, "Start", startColor ); KDGanttXML::createColorNode( doc, colorsTaskElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, colorsTaskElement, "End", endColor ); - QDomElement colorsSummaryElement = doc.createElement( "Summary" ); + TQDomElement colorsSummaryElement = doc.createElement( "Summary" ); colorsElement.appendChild( colorsSummaryElement ); colors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, colorsSummaryElement, "Start", startColor ); @@ -3491,7 +3491,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const KDGanttXML::createColorNode( doc, colorsSummaryElement, "End", endColor ); // the DefaultColor element - QDomElement defaultColorsElement = doc.createElement( "DefaultColors" ); + TQDomElement defaultColorsElement = doc.createElement( "DefaultColors" ); docRoot.appendChild( defaultColorsElement ); KDGanttXML::createColorNode( doc, defaultColorsElement, "Event", defaultColor( KDGanttViewItem::Event ) ); @@ -3502,21 +3502,21 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const // the HighlightColors element - QDomElement highlightColorsElement = doc.createElement( "HighlightColors" ); + TQDomElement highlightColorsElement = doc.createElement( "HighlightColors" ); docRoot.appendChild( highlightColorsElement ); - QDomElement highlightColorsEventElement = doc.createElement( "Event" ); + TQDomElement highlightColorsEventElement = doc.createElement( "Event" ); highlightColorsElement.appendChild( highlightColorsEventElement ); highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Start", startColor ); KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, highlightColorsEventElement, "End", endColor ); - QDomElement highlightColorsTaskElement = doc.createElement( "Task" ); + TQDomElement highlightColorsTaskElement = doc.createElement( "Task" ); highlightColorsElement.appendChild( highlightColorsTaskElement ); highlightColors( KDGanttViewItem::Task, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Start", startColor ); KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "End", endColor ); - QDomElement highlightColorsSummaryElement = doc.createElement( "Summary" ); + TQDomElement highlightColorsSummaryElement = doc.createElement( "Summary" ); highlightColorsElement.appendChild( highlightColorsSummaryElement ); highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", startColor ); @@ -3530,13 +3530,13 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", endColor ); } else { - KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", QColor() ); - KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", QColor() ); - KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", QColor() ); + KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", TQColor() ); + KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", TQColor() ); + KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", TQColor() ); } */ // the DefaultHighlightColor element - QDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" ); + TQDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" ); docRoot.appendChild( defaultHighlightColorsElement ); KDGanttXML::createColorNode( doc, defaultHighlightColorsElement, "Event", defaultHighlightColor( KDGanttViewItem::Event ) ); @@ -3547,7 +3547,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const // the Items element - QDomElement itemsElement = doc.createElement( "Items" ); + TQDomElement itemsElement = doc.createElement( "Items" ); docRoot.appendChild( itemsElement ); KDGanttViewItem* currentItem = firstChild(); while( currentItem ) { @@ -3556,32 +3556,32 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const } // the TaskLinks element - QDomElement taskLinksElement = doc.createElement( "TaskLinks" ); + TQDomElement taskLinksElement = doc.createElement( "TaskLinks" ); docRoot.appendChild( taskLinksElement ); - QPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks(); + TQPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks(); KDGanttViewTaskLink* currentTL = 0; for( currentTL = taskLinkList.first(); currentTL; currentTL = taskLinkList.next() ) currentTL->createNode( doc, taskLinksElement ); // the TaskLinkGroups element - QDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" ); + TQDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" ); docRoot.appendChild( taskLinkGroupsElement ); - QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups(); + TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups(); KDGanttViewTaskLinkGroup* currentTLG = 0; for( currentTLG = taskLinkGroupList.first(); currentTLG; currentTLG = taskLinkGroupList.next() ) currentTLG->createNode( doc, taskLinkGroupsElement ); // the ColumnBackgroundColors element - QDomElement columnBackgroundColorsElement = + TQDomElement columnBackgroundColorsElement = doc.createElement( "ColumnBackgroundColors" ); docRoot.appendChild( columnBackgroundColorsElement ); KDTimeHeaderWidget::ColumnColorList ccList = myTimeHeader->columnBackgroundColorList(); for( KDTimeHeaderWidget::ColumnColorList::iterator it = ccList.begin(); it != ccList.end(); ++it ) { - QDomElement columnBackgroundColorElement = + TQDomElement columnBackgroundColorElement = doc.createElement( "ColumnBackgroundColor" ); columnBackgroundColorsElement.appendChild( columnBackgroundColorElement ); KDGanttXML::createDateTimeNode( doc, columnBackgroundColorElement, @@ -3591,17 +3591,17 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const } // the LegendItems element - QDomElement legendItemsElement = + TQDomElement legendItemsElement = doc.createElement( "LegendItems" ); docRoot.appendChild( legendItemsElement ); legendItem* current; - QPtrListIterator<legendItem> lit( *myLegendItems ); + TQPtrListIterator<legendItem> lit( *myLegendItems ); while( ( current = lit.current() ) ) { ++lit; - QDomElement legendItemElement = doc.createElement( "LegendItem" ); + TQDomElement legendItemElement = doc.createElement( "LegendItem" ); legendItemsElement.appendChild( legendItemElement ); KDGanttXML::createStringNode( doc, legendItemElement, "Shape", - KDGanttViewItem::shapeToString( current->shape ) ); + KDGanttViewItem::tqshapeToString( current->tqshape ) ); KDGanttXML::createColorNode( doc, legendItemElement, "Color", current->color ); KDGanttXML::createStringNode( doc, legendItemElement, "Text", @@ -3622,7 +3622,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const -QString KDGanttView::scaleToString( Scale scale ) +TQString KDGanttView::scaleToString( Scale scale ) { switch( scale ) { case Minute: @@ -3642,7 +3642,7 @@ QString KDGanttView::scaleToString( Scale scale ) } -KDGanttView::Scale KDGanttView::stringToScale( const QString& string ) +KDGanttView::Scale KDGanttView::stringToScale( const TQString& string ) { if( string == "Minute" ) return Minute; @@ -3661,7 +3661,7 @@ KDGanttView::Scale KDGanttView::stringToScale( const QString& string ) } -QString KDGanttView::yearFormatToString( YearFormat format ) +TQString KDGanttView::yearFormatToString( YearFormat format ) { switch( format ) { case FourDigit: @@ -3677,7 +3677,7 @@ QString KDGanttView::yearFormatToString( YearFormat format ) } -KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string ) +KDGanttView::YearFormat KDGanttView::stringToYearFormat( const TQString& string ) { if( string == "FourDigit" ) return FourDigit; @@ -3692,7 +3692,7 @@ KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string ) } -QString KDGanttView::hourFormatToString( HourFormat format ) +TQString KDGanttView::hourFormatToString( HourFormat format ) { switch( format ) { case Hour_12: @@ -3706,7 +3706,7 @@ QString KDGanttView::hourFormatToString( HourFormat format ) } -KDGanttView::HourFormat KDGanttView::stringToHourFormat( const QString& string ) +KDGanttView::HourFormat KDGanttView::stringToHourFormat( const TQString& string ) { if( string == "Hour_12" ) return Hour_12; @@ -3724,7 +3724,7 @@ void KDGanttView::addTaskLinkGroup(KDGanttViewTaskLinkGroup* group) myTaskLinkGroupList.append(group); return; } - if (myTaskLinkGroupList.find(group) == -1) + if (myTaskLinkGroupList.tqfind(group) == -1) myTaskLinkGroupList.append(group); } @@ -3754,33 +3754,33 @@ void KDGanttView::editItem( KDGanttViewItem* item) /*! - This method returns the pixmap used for a certain shape, in the + This method returns the pixmap used for a certain tqshape, in the selected color and size. - \param shape the shape to generate - \param shapeColor the foreground color of the shape - \param backgroundColor the background color of the shape - \param itemSize the size of the shape - \return the generated shape pixmap + \param tqshape the tqshape to generate + \param tqshapeColor the foreground color of the tqshape + \param backgroundColor the background color of the tqshape + \param itemSize the size of the tqshape + \return the generated tqshape pixmap */ -QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, - const QColor& shapeColor, - const QColor& backgroundColor, int itemSize) +TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, + const TQColor& backgroundColor, int itemSize) { // 10 is a good value as size int size = itemSize+2; int hei = ( itemSize/3 ) / 2; - QPixmap p = QPixmap( size+4, size+4 ); + TQPixmap p = TQPixmap( size+4, size+4 ); p.fill( backgroundColor ); - QPainter paint (&p); - QBrush b = QBrush ( Qt::SolidPattern ); - b.setColor( shapeColor ); + TQPainter paint (&p); + TQBrush b = TQBrush ( TQt::SolidPattern ); + b.setColor( tqshapeColor ); paint.setBrush( b ); - QPen pen( Qt::black, 1 ) ; + TQPen pen( TQt::black, 1 ) ; paint.setPen( pen ); - switch (shape) { + switch (tqshape) { case KDGanttViewItem::TriangleDown:{ - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,-hei); arr.setPoint(1,size/2,-hei); arr.setPoint(2,0,((size/2)-hei)); @@ -3789,7 +3789,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, break; } case KDGanttViewItem::TriangleUp :{ - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,hei); arr.setPoint(1,size/2,hei); arr.setPoint(2,0,(-size/2)+hei); @@ -3798,7 +3798,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, break; } case KDGanttViewItem::Diamond :{ - QPointArray arr = QPointArray(4); + TQPointArray arr = TQPointArray(4); arr.setPoint(0,0,-size/2); arr.setPoint(1,size/2,0); arr.setPoint(2,0,size/2); @@ -3808,7 +3808,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, break; } case KDGanttViewItem::Square :{ - QPointArray arr = QPointArray(4); + TQPointArray arr = TQPointArray(4); arr.setPoint(0,-size/2,-size/2); arr.setPoint(1,size/2,-size/2); arr.setPoint(2,size/2,size/2); @@ -3854,15 +3854,15 @@ void KDGanttView::initDefaults() undefinedColorHL[i] = true; } // setting the default colors - myDefaultColor [ getIndex( KDGanttViewItem::Event ) ] = Qt::blue; //event - myDefaultColorHL [ getIndex( KDGanttViewItem::Event ) ] = Qt::red; - myDefaultColor [ getIndex( KDGanttViewItem::Task ) ] = Qt::green;//task - myDefaultColorHL [ getIndex( KDGanttViewItem::Task ) ] = Qt::red; - myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = Qt::cyan;//summary - myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = Qt::red; - - // setting the default shape types - // currently, we take for each item for all three shapes (start, middle, end) the same default shape + myDefaultColor [ getIndex( KDGanttViewItem::Event ) ] = TQt::blue; //event + myDefaultColorHL [ getIndex( KDGanttViewItem::Event ) ] = TQt::red; + myDefaultColor [ getIndex( KDGanttViewItem::Task ) ] = TQt::green;//task + myDefaultColorHL [ getIndex( KDGanttViewItem::Task ) ] = TQt::red; + myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = TQt::cyan;//summary + myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = TQt::red; + + // setting the default tqshape types + // currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape for (i = 0;i<3;++i) { myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task @@ -3874,19 +3874,19 @@ void KDGanttView::initDefaults() /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ -int KDGanttView::addColumn( const QString& label, int width ) +int KDGanttView::addColumn( const TQString& label, int width ) { return myListView->addColumn( label, width ); } /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ -int KDGanttView::addColumn( const QIconSet& iconset, const QString& label, +int KDGanttView::addColumn( const TQIconSet& iconset, const TQString& label, int width ) { return myListView->addColumn( iconset, label, width ); @@ -3894,7 +3894,7 @@ int KDGanttView::addColumn( const QIconSet& iconset, const QString& label, /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ void KDGanttView::removeColumn( int index ) { @@ -3903,7 +3903,7 @@ void KDGanttView::removeColumn( int index ) /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ KDGanttViewItem* KDGanttView::selectedItem() const { @@ -3912,7 +3912,7 @@ KDGanttViewItem* KDGanttView::selectedItem() const /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected ) { @@ -3932,7 +3932,7 @@ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected ) in the Gantt view with this name. */ -KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const +KDGanttViewItem* KDGanttView::getItemByName( const TQString& name ) const { KDGanttViewItem* temp = firstChild(),* ret; while (temp != 0) { @@ -3955,7 +3955,7 @@ KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const no item in the list view at this position. */ -KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const +KDGanttViewItem* KDGanttView::getItemByListViewPos( const TQPoint& pos ) const { return static_cast<KDGanttViewItem*>( myListView->itemAt(myListView->mapFromGlobal(pos) )); } @@ -3975,13 +3975,13 @@ KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const in the Gantt view at this position. */ -KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const +KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const TQPoint& pos ) const { KDGanttViewItem* item; - QPoint local = myCanvasView->mapFromGlobal(pos); + TQPoint local = myCanvasView->mapFromGlobal(pos); - QCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local )); - QCanvasItemList::Iterator it; + TQCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local )); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { if ( myCanvasView->getType(*it) == Type_is_KDGanttViewItem) { item = myCanvasView->getItem(*it); @@ -4007,10 +4007,10 @@ KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const in the Gantt view at this position. */ -KDGanttViewItem* KDGanttView::getItemAt( const QPoint& pos, bool global ) const +KDGanttViewItem* KDGanttView::getItemAt( const TQPoint& pos, bool global ) const { /* buggy code - commented out - QPoint myPos; + TQPoint myPos; if ( global ) myPos = myListView->contentsToViewport( myListView->mapFromGlobal(pos) ); else @@ -4096,7 +4096,7 @@ void KDGanttView::clear() /*! Passes on the signal from the list view. */ -void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ) +void KDGanttView::slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ) { emit dropped( e, droppedItem, itemBelowMouse); } @@ -4104,7 +4104,7 @@ void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KD /*! Implements a pass-through to the list view. */ -QDragObject * KDGanttView::dragObject () +TQDragObject * KDGanttView::dragObject () { return myListView->dragObject (); } @@ -4122,9 +4122,9 @@ void KDGanttView::startDrag () /*! This method is overridden for internal purposes. */ -void KDGanttView::setPaletteBackgroundColor( const QColor& col) +void KDGanttView::setPaletteBackgroundColor( const TQColor& col) { - QWidget::setPaletteBackgroundColor( col ); + TQWidget::setPaletteBackgroundColor( col ); timeHeaderSpacerWidget->setPaletteBackgroundColor( col ); } @@ -4135,7 +4135,7 @@ void KDGanttView::setPaletteBackgroundColor( const QColor& col) \param c the background color of the Gantt view. \sa gvBackgroundColor() */ -void KDGanttView::setGvBackgroundColor ( const QColor & c ) +void KDGanttView::setGvBackgroundColor ( const TQColor & c ) { myTimeTable->setBackgroundColor( c ); } @@ -4147,7 +4147,7 @@ void KDGanttView::setGvBackgroundColor ( const QColor & c ) \param c the background color of the time header. \sa timeHeaderBackgroundColor() */ -void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c ) +void KDGanttView::setTimeHeaderBackgroundColor ( const TQColor & c ) { myTimeHeader->setPaletteBackgroundColor( c ); //rightWidget->setPaletteBackgroundColor( c ); @@ -4161,7 +4161,7 @@ void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c ) \param c the background color of the legend header \sa legendHeaderBackgroundColor() */ -void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c ) +void KDGanttView::setLegendHeaderBackgroundColor ( const TQColor & c ) { myLegend->setPaletteBackgroundColor( c ); leftWidget->setPaletteBackgroundColor( c ); @@ -4174,7 +4174,7 @@ void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c ) \param c the background color of the list view \sa lvBackgroundColor() */ -void KDGanttView::setLvBackgroundColor ( const QColor & c ) +void KDGanttView::setLvBackgroundColor ( const TQColor & c ) { myListView->viewport()->setPaletteBackgroundColor( c ); } @@ -4186,7 +4186,7 @@ void KDGanttView::setLvBackgroundColor ( const QColor & c ) \return the background color of the list view \sa setLvBackgroundColor() */ -QColor KDGanttView::lvBackgroundColor ( )const +TQColor KDGanttView::lvBackgroundColor ( )const { return myListView->viewport()->paletteBackgroundColor( ); } @@ -4198,7 +4198,7 @@ QColor KDGanttView::lvBackgroundColor ( )const \return the background color of the Gantt view \sa setGvBackgroundColor() */ -QColor KDGanttView::gvBackgroundColor () const +TQColor KDGanttView::gvBackgroundColor () const { return myTimeTable->backgroundColor( ); } @@ -4210,7 +4210,7 @@ QColor KDGanttView::gvBackgroundColor () const \return the background color of the time header \sa setTimeHeaderBackgroundColor() */ -QColor KDGanttView::timeHeaderBackgroundColor () const +TQColor KDGanttView::timeHeaderBackgroundColor () const { return myTimeHeader->paletteBackgroundColor( ); } @@ -4222,7 +4222,7 @@ QColor KDGanttView::timeHeaderBackgroundColor () const \return the background color of the legend header \sa setLegendHeaderBackgroundColor() */ -QColor KDGanttView::legendHeaderBackgroundColor () const +TQColor KDGanttView::legendHeaderBackgroundColor () const { return myLegend->paletteBackgroundColor( ); } @@ -4232,20 +4232,20 @@ QColor KDGanttView::legendHeaderBackgroundColor () const Adds a widget to the spacer widget above the list view part and below the ShowLegendButton. To assign all the space above the Listview to the spacer widget, hide the ShowLegendButton by calling - setShowLegendButton( false ). The spacer widget is a QHBox. You + setShowLegendButton( false ). The spacer widget is a TQHBox. You may add as many widgets as you want. They are ordered horizontally from left to right. To remove a widget from the spacer widget, call widget->reparent(newParent,...) or delete the widget. Since the spacer - is a QHBox, the layout of the added widgets is managed by this - QHBox. + is a TQHBox, the tqlayout of the added widgets is managed by this + TQHBox. \param w A pointer to the widget to be added. \sa setShowLegendButton( ) */ -void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w ) +void KDGanttView::addUserdefinedLegendHeaderWidget( TQWidget * w ) { if ( w ) { - w->reparent ( spacerLeft, 0, QPoint(0,0) ); + w->reparent ( spacerLeft, 0, TQPoint(0,0) ); } } @@ -4261,7 +4261,7 @@ void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w ) void KDGanttView::setDragEnabled( bool b ) { fDragEnabled = b; - QListViewItemIterator it( myListView ); + TQListViewItemIterator it( myListView ); for ( ; it.current(); ++it ) { (( KDGanttViewItem* )it.current())->setDragEnabled(b); } @@ -4282,7 +4282,7 @@ void KDGanttView::setDropEnabled( bool b ) fDropEnabled = b; //myListView->setAcceptDrops( b ); - QListViewItemIterator it( myListView ); + TQListViewItemIterator it( myListView ); for ( ; it.current(); ++it ) { (( KDGanttViewItem* )it.current())->setDropEnabled(b); } @@ -4354,7 +4354,7 @@ bool KDGanttView::dropEnabled() const order to specify user-defined drop handling, subclass KDGanttView and reimplement this method. - \param e The QDropEvent + \param e The TQDropEvent Note: e->source() is a pointer to the KDGanttView from which the drag started. I.e., if e->source() == this, this drag is an internal drag. \param droppedItem 0, if this is a drag operation from another @@ -4372,7 +4372,7 @@ bool KDGanttView::dropEnabled() const true, when the internal drop handling should not be executed \sa lvDropEvent(), lvStartDrag() */ -bool KDGanttView::lvDropEvent ( QDropEvent* e, +bool KDGanttView::lvDropEvent ( TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ) { @@ -4388,20 +4388,20 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e, // ************** begin example ************ /* - if ( QUriDrag::canDecode( e ) ) { - QStrList lst; - QUriDrag::decode( e, lst ); + if ( TQUriDrag::canDecode( e ) ) { + TQStrList lst; + TQUriDrag::decode( e, lst ); // we try the first file of icon-url-list - QString str = lst.at ( 0 ); + TQString str = lst.at ( 0 ); // remove file: at beginning of string str = str.right( str.length() - 5 ); - QFileInfo info; + TQFileInfo info; info.setFile( str ) ; if ( info.isFile() ) { - if (!QMessageBox::information( this, "KDGantt Drag&Drop test", + if (!TQMessageBox::information( this, "KDGantt Drag&Drop test", "Try to insert file: "+ str + " ?", "&Okay", "&Cancel",0,1 ) ) { - QFile file( str ); + TQFile file( str ); // store current updating status bool uen = myTimeTable->blockUpdating(); // block updating while insertion of items @@ -4430,13 +4430,13 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e, In order to define accepting drops for particular items yourself, subclass KDGanttView and reimplement this method. - \param e The QDragMoveEvent + \param e The TQDragMoveEvent Note: e->source() is a pointer to the KDGanttView, the drag started from. I.e., if e->source() == this, this drag is an internal drag. \sa lvDropEvent(), lvStartDrag(), lvDragMoveEvent() */ -void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) +void KDGanttView::lvDragEnterEvent ( TQDragEnterEvent * e) { // the standard behaviour: // accept drag enter events, if KDGanttViewItemDrag can decode the event @@ -4453,7 +4453,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) // Please uncomment the following lines for this behaviour // You have to uncomment lines in lvDragMoveEvent() and lvDropEvent () as well - // if ( QUriDrag::canDecode( e ) ) { + // if ( TQUriDrag::canDecode( e ) ) { // e->accept(true); // return; // } @@ -4472,7 +4472,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) In order to specify user-defined drop acceptance for particular items, subclass KDGanttView and reimplement this method. - \param e The QDragMoveEvent + \param e The TQDragMoveEvent Note: e->source() is a pointer to the KDGanttView, the drag started from. I.e. if e->source() == this, this drag is an internal drag. draggedItem 0, if this is a drag operation from another KDGanttView instance. @@ -4490,7 +4490,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) if you have called e->accept( true ) before. \sa lvDropEvent(), lvStartDrag() */ -bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, +bool KDGanttView::lvDragMoveEvent ( TQDragMoveEvent* /*e*/, KDGanttViewItem* /* draggedItem*/, KDGanttViewItem* /*itemBelowMouse*/) { @@ -4510,7 +4510,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, // a saved Gantt file, subclass KDGanttView // and reimplement this method with to following code uncommented: - // if ( QUriDrag::canDecode( e ) ) { + // if ( TQUriDrag::canDecode( e ) ) { // e->accept(true); // return true; // } @@ -4522,7 +4522,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, /*! - This virtual method creates a QDragObject and starts a drag for a + This virtual method creates a TQDragObject and starts a drag for a KDGanttViewItem. In order to prevent drags of particular items, subclass from KDGanttView and reimplement this method. @@ -4532,14 +4532,14 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, */ void KDGanttView::lvStartDrag (KDGanttViewItem* item) { - QDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" ); + TQDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" ); // call d->drag() to start the dragging // d->drag() returns true, if a move was requested as a drag // if a copy (by pressing the <Ctrl>-key) was performed, d->drag() returns false // In order to avoid starting drags for particular items, subclass KDGanttView // an reimplement this method. // insert here some code like - // if ( item->parent() ) + // if ( item->tqparent() ) // return; // This particular code will make it impossible to drag other items but root items. if ( d->drag() ) { @@ -4558,7 +4558,7 @@ void KDGanttView::lvStartDrag (KDGanttViewItem* item) void KDGanttView::setListViewWidth( int w ) { int sw = mySplitter->width(); - QValueList<int> list; + TQValueList<int> list; list.append(w); list.append(sw-w); mySplitter->setSizes( list ); @@ -4586,7 +4586,7 @@ int KDGanttView::listViewWidth( ) \param m the scrollbar mode. \sa setGvVScrollBarMode( ) */ -void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m ) +void KDGanttView::setLvVScrollBarMode( TQScrollView::ScrollBarMode m ) { myListView->setVScrollBarMode ( m ); } @@ -4601,14 +4601,14 @@ void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m ) \param m The scrollbar mode. \sa setLvVScrollBarMode( ) */ -void KDGanttView::setGvVScrollBarMode( QScrollView::ScrollBarMode m ) +void KDGanttView::setGvVScrollBarMode( TQScrollView::ScrollBarMode m ) { - if ( m == QScrollView::Auto ) - qDebug("KDGanttView::setListViewVScrollBarMode: QScrollView::Auto not supported. Nothing changed. "); + if ( m == TQScrollView::Auto ) + qDebug("KDGanttView::setListViewVScrollBarMode: TQScrollView::Auto not supported. Nothing changed. "); else { myCanvasView->setVScrollBarMode ( m ); - if ( m == QScrollView::AlwaysOn ) + if ( m == TQScrollView::AlwaysOn ) timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() ); else timeHeaderSpacerWidget->setFixedWidth( 0 ); @@ -4647,17 +4647,17 @@ bool KDGanttView::isLinkItemsEnabled() const } /*! - \fn void KDGanttView::timeIntervalSelected( const QDateTime& start, const QDateTime& end); + \fn void KDGanttView::timeIntervalSelected( const TQDateTime& start, const TQDateTime& end); This signal is emitted when the user selects a time interval with the mouse on the time header connect this signal to - the slot void zoomToSelection( const QDateTime& start, const - QDateTime& end) to obtain automatic zooming. + the slot void zoomToSelection( const TQDateTime& start, const + TQDateTime& end) to obtain automatic zooming. */ /*! - \fn void KDGanttView::timeIntervallSelected( const QDateTime& start, const QDateTime& end); + \fn void KDGanttView::timeIntervallSelected( const TQDateTime& start, const TQDateTime& end); \deprecated This signal is deprecated, do not use it in new code; use timeIntervalSelected() instead. timeIntervallSelected() will be @@ -4712,7 +4712,7 @@ bool KDGanttView::isLinkItemsEnabled() const */ /*! - \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos) + \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos) This signal is emitted when the user clicks into the Gantt view with any mouse button. Notice that \a pos is the absolute mouse position. @@ -4725,7 +4725,7 @@ bool KDGanttView::isLinkItemsEnabled() const */ /*! - \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos ) + \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos ) This signal is emitted when the user requests a context menu in the Gantt view. Notice that \a pos is the absolute mouse position. @@ -4771,7 +4771,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvMouseButtonPressed ( int button, - KDGanttViewItem* item, const QPoint & pos, int col) + KDGanttViewItem* item, const TQPoint & pos, int col) This signal is emitted when the user presses any mouse button in the list view. Notice that \a pos is the absolute mouse position. @@ -4779,7 +4779,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvMouseButtonClicked ( int button, - KDGanttViewItem* item, const QPoint & pos, int col) + KDGanttViewItem* item, const TQPoint & pos, int col) This signal is emitted when the user clicks into the list view with any mouse button . Notice that \a pos is the absolute @@ -4794,7 +4794,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvItemRenamed( KDGanttViewItem*, int col, - const QString& text ) + const TQString& text ) This signal is emitted whenever the user changes the name of an item in the list view using in-place editing. \a text contains the new @@ -4803,7 +4803,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvContextMenuRequested( KDGanttViewItem * - item, const QPoint & pos, int col ) + item, const TQPoint & pos, int col ) This signal is emitted when the user requests a context menu in the list view. Notice that \a pos is the absolute mouse position. @@ -4818,7 +4818,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! - \fn void KDGanttView::dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse) + \fn void KDGanttView::dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse) This signal is emitted whenever a Gantt item is dropped onto the Gantt view. \a droppedItem is 0, if this is a drag operation from diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h index a9424873..6498d971 100644 --- a/kdgantt/KDGanttView.h +++ b/kdgantt/KDGanttView.h @@ -27,22 +27,22 @@ ** 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. ** **********************************************************************/ #ifndef KDGANTTVIEW_H #define KDGANTTVIEW_H -#include <qptrlist.h> -#include <qwidget.h> -#include <qlistview.h> -#include <qsplitter.h> -#include <qlayout.h> -#include <qfont.h> -#include <qdom.h> -#include <qvbox.h> +#include <tqptrlist.h> +#include <tqwidget.h> +#include <tqlistview.h> +#include <tqsplitter.h> +#include <tqlayout.h> +#include <tqfont.h> +#include <tqdom.h> +#include <tqvbox.h> #include "KDGanttViewItem.h" @@ -51,8 +51,8 @@ #include "KDGanttViewItemDrag.h" class KDGanttViewTaskLink; -class QPrinter; -class QIODevice; +class TQPrinter; +class TQIODevice; class itemAttributeDialog; class KDListView; class KDGanttViewItem; @@ -69,43 +69,44 @@ class KDGanttMinimizeSplitter; class KDGanttView : public KDGanttMinimizeSplitter { Q_OBJECT - - Q_PROPERTY( bool showLegend READ showLegend WRITE setShowLegend ) - Q_PROPERTY( bool showListView READ showListView WRITE setShowListView ) - Q_PROPERTY( bool showTaskLinks READ showTaskLinks WRITE setShowTaskLinks ) - Q_PROPERTY( bool editorEnabled READ editorEnabled WRITE setEditorEnabled ) - Q_PROPERTY( QDateTime horizonStart READ horizonStart WRITE setHorizonStart ) - Q_PROPERTY( QDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd ) - Q_PROPERTY( Scale scale READ scale WRITE setScale ) - Q_PROPERTY( YearFormat yearFormat READ yearFormat WRITE setYearFormat ) - Q_PROPERTY( HourFormat hourFormat READ hourFormat WRITE setHourFormat ) - Q_PROPERTY( bool showMinorTicks READ showMinorTicks WRITE setShowMinorTicks ) - Q_PROPERTY( bool showMajorTicks READ showMajorTicks WRITE setShowMajorTicks ) - Q_PROPERTY( bool editable READ editable WRITE setEditable ) - Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) - Q_PROPERTY( int majorScaleCount READ majorScaleCount WRITE setMajorScaleCount ) - Q_PROPERTY( int minorScaleCount READ minorScaleCount WRITE setMinorScaleCount ) - Q_PROPERTY( int autoScaleMinorTickCount READ autoScaleMinorTickCount WRITE setAutoScaleMinorTickCount ) - Q_PROPERTY( Scale maximumScale READ maximumScale WRITE setMaximumScale ) - Q_PROPERTY( Scale minimumScale READ minimumScale WRITE setMinimumScale ) - Q_PROPERTY( int minimumColumnWidth READ minimumColumnWidth WRITE setMinimumColumnWidth ) - Q_PROPERTY( int ganttMaximumWidth READ ganttMaximumWidth WRITE setGanttMaximumWidth ) - Q_PROPERTY( QColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor ) - Q_PROPERTY( QColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor ) - Q_PROPERTY( QColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor ) - Q_PROPERTY( QColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor ) - Q_PROPERTY( QColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor ) - Q_PROPERTY( double zoomFactor READ zoomFactor ) - Q_PROPERTY( bool showHeaderPopupMenu READ showHeaderPopupMenu WRITE setShowHeaderPopupMenu ) - Q_PROPERTY( bool showTimeTablePopupMenu READ showTimeTablePopupMenu WRITE setShowTimeTablePopupMenu ) - Q_PROPERTY( bool headerVisible READ headerVisible WRITE setHeaderVisible ) - Q_PROPERTY( bool showLegendButton READ showLegendButton WRITE setShowLegendButton ) - Q_PROPERTY( bool legendIsDockwindow READ legendIsDockwindow WRITE setLegendIsDockwindow ) - Q_PROPERTY( bool displayEmptyTasksAsLine READ displayEmptyTasksAsLine WRITE setDisplayEmptyTasksAsLine ) - Q_PROPERTY( QBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush ) - Q_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled ) - Q_PROPERTY( bool dropEnabled READ dropEnabled WRITE setDropEnabled ) - Q_PROPERTY( bool calendarMode READ calendarMode WRITE setCalendarMode ) + TQ_OBJECT + + TQ_PROPERTY( bool showLegend READ showLegend WRITE setShowLegend ) + TQ_PROPERTY( bool showListView READ showListView WRITE setShowListView ) + TQ_PROPERTY( bool showTaskLinks READ showTaskLinks WRITE setShowTaskLinks ) + TQ_PROPERTY( bool editorEnabled READ editorEnabled WRITE setEditorEnabled ) + TQ_PROPERTY( TQDateTime horizonStart READ horizonStart WRITE setHorizonStart ) + TQ_PROPERTY( TQDateTime horizonEnd READ horizonEnd WRITE setHorizonEnd ) + TQ_PROPERTY( Scale scale READ scale WRITE setScale ) + TQ_PROPERTY( YearFormat yearFormat READ yearFormat WRITE setYearFormat ) + TQ_PROPERTY( HourFormat hourFormat READ hourFormat WRITE setHourFormat ) + TQ_PROPERTY( bool showMinorTicks READ showMinorTicks WRITE setShowMinorTicks ) + TQ_PROPERTY( bool showMajorTicks READ showMajorTicks WRITE setShowMajorTicks ) + TQ_PROPERTY( bool editable READ editable WRITE setEditable ) + TQ_PROPERTY( TQColor textColor READ textColor WRITE setTextColor ) + TQ_PROPERTY( int majorScaleCount READ majorScaleCount WRITE setMajorScaleCount ) + TQ_PROPERTY( int minorScaleCount READ minorScaleCount WRITE setMinorScaleCount ) + TQ_PROPERTY( int autoScaleMinorTickCount READ autoScaleMinorTickCount WRITE setAutoScaleMinorTickCount ) + TQ_PROPERTY( Scale maximumScale READ maximumScale WRITE setMaximumScale ) + TQ_PROPERTY( Scale minimumScale READ minimumScale WRITE setMinimumScale ) + TQ_PROPERTY( int minimumColumnWidth READ minimumColumnWidth WRITE setMinimumColumnWidth ) + TQ_PROPERTY( int ganttMaximumWidth READ ganttMaximumWidth WRITE setGanttMaximumWidth ) + TQ_PROPERTY( TQColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor ) + TQ_PROPERTY( TQColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor ) + TQ_PROPERTY( TQColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor ) + TQ_PROPERTY( TQColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor ) + TQ_PROPERTY( TQColor legendHeaderBackgroundColor READ legendHeaderBackgroundColor WRITE setLegendHeaderBackgroundColor ) + TQ_PROPERTY( double zoomFactor READ zoomFactor ) + TQ_PROPERTY( bool showHeaderPopupMenu READ showHeaderPopupMenu WRITE setShowHeaderPopupMenu ) + TQ_PROPERTY( bool showTimeTablePopupMenu READ showTimeTablePopupMenu WRITE setShowTimeTablePopupMenu ) + TQ_PROPERTY( bool headerVisible READ headerVisible WRITE setHeaderVisible ) + TQ_PROPERTY( bool showLegendButton READ showLegendButton WRITE setShowLegendButton ) + TQ_PROPERTY( bool legendIsDockwindow READ legendIsDockwindow WRITE setLegendIsDockwindow ) + TQ_PROPERTY( bool displayEmptyTasksAsLine READ displayEmptyTasksAsLine WRITE setDisplayEmptyTasksAsLine ) + TQ_PROPERTY( TQBrush noInformationBrush READ noInformationBrush WRITE setNoInformationBrush ) + TQ_PROPERTY( bool dragEnabled READ dragEnabled WRITE setDragEnabled ) + TQ_PROPERTY( bool dropEnabled READ dropEnabled WRITE setDropEnabled ) + TQ_PROPERTY( bool calendarMode READ calendarMode WRITE setCalendarMode ) Q_ENUMS( Scale ) Q_ENUMS( YearFormat ) @@ -117,7 +118,7 @@ public: enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit }; enum RepaintMode { No, Medium, Always }; - KDGanttView( QWidget* parent = 0, const char* name = 0 ); + KDGanttView( TQWidget* tqparent = 0, const char* name = 0 ); ~KDGanttView(); virtual void show(); @@ -132,7 +133,7 @@ public: bool showLegend() const; void setLegendIsDockwindow( bool dock ); bool legendIsDockwindow( ) const; - QDockWindow* legendDockwindow( ) const; + TQDockWindow* legendDockwindow( ) const; void setShowListView( bool show ); bool showListView() const; void setEditorEnabled( bool enable ); @@ -149,16 +150,16 @@ public: bool displayEmptyTasksAsLine() const; void setHorBackgroundLines( int count = 2, - QBrush brush = - QBrush( QColor ( 200,200,200 ), - Qt::Dense6Pattern )); - int horBackgroundLines( QBrush& brush ); - bool saveProject( QIODevice* ); - bool loadProject( QIODevice* ); - void print( QPrinter* printer = 0 , + TQBrush brush = + TQBrush( TQColor ( 200,200,200 ), + TQt::Dense6Pattern )); + int horBackgroundLines( TQBrush& brush ); + bool saveProject( TQIODevice* ); + bool loadProject( TQIODevice* ); + void print( TQPrinter* printer = 0 , bool printListView = true, bool printTimeLine = true, bool printLegend = false ); - QSize drawContents( QPainter* p = 0, + TQSize drawContents( TQPainter* p = 0, bool drawListView = true, bool drawTimeLine = true, bool drawLegend = false ); void setZoomFactor( double factor, bool absolute ); @@ -166,8 +167,8 @@ public: void zoomToFit(); void ensureVisible( KDGanttViewItem* ); void center( KDGanttViewItem* ); - void centerTimeline( const QDateTime& center ); - void centerTimelineAfterShow( const QDateTime& center ); + void centerTimeline( const TQDateTime& center ); + void centerTimelineAfterShow( const TQDateTime& center ); void setTimelineToStart(); void setTimelineToEnd(); void addTicksLeft( int num = 1 ); @@ -175,7 +176,7 @@ public: void setShowTaskLinks( bool show ); bool showTaskLinks() const; - void setFont(const QFont& f); + void setFont(const TQFont& f); void setShowHeaderPopupMenu( bool show = true, bool showZoom = true, bool showScale = true, @@ -191,48 +192,48 @@ public: KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end, bool overwriteExisting = true ); - bool shapes( KDGanttViewItem::Type type, + bool tqshapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape& start, KDGanttViewItem::Shape& middle, KDGanttViewItem::Shape& end ) const; void setColors( KDGanttViewItem::Type type, - const QColor& start, const QColor& middle, - const QColor& end, + const TQColor& start, const TQColor& middle, + const TQColor& end, bool overwriteExisting = true ); bool colors( KDGanttViewItem::Type type, - QColor& start, QColor& middle, QColor& end ) const; + TQColor& start, TQColor& middle, TQColor& end ) const; void setDefaultColor( KDGanttViewItem::Type type, - const QColor&, + const TQColor&, bool overwriteExisting = true ); - QColor defaultColor( KDGanttViewItem::Type type ) const; + TQColor defaultColor( KDGanttViewItem::Type type ) const; void setHighlightColors( KDGanttViewItem::Type type, - const QColor& start, const QColor& middle, - const QColor& end, + const TQColor& start, const TQColor& middle, + const TQColor& end, bool overwriteExisting = true ); bool highlightColors( KDGanttViewItem::Type type, - QColor& start, QColor& middle, QColor& end ) const; + TQColor& start, TQColor& middle, TQColor& end ) const; void setDefaultHighlightColor( KDGanttViewItem::Type type, - const QColor&, + const TQColor&, bool overwriteExisting = true ); - QColor defaultHighlightColor( KDGanttViewItem::Type type ) const; - void setTextColor( const QColor& color ); - QColor textColor() const; + TQColor defaultHighlightColor( KDGanttViewItem::Type type ) const; + void setTextColor( const TQColor& color ); + TQColor textColor() const; - void setNoInformationBrush( const QBrush& brush ); - QBrush noInformationBrush() const; + void setNoInformationBrush( const TQBrush& brush ); + TQBrush noInformationBrush() const; // Link-related stuff - QPtrList<KDGanttViewTaskLink> taskLinks() const; - QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const; + TQPtrList<KDGanttViewTaskLink> taskLinks() const; + TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroups() const; // Legend-related stuff - void addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text ); + void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ); void clearLegend(); // Header-related stuff - 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 setScale( Scale ); Scale scale() const; void setMaximumScale( Scale ); @@ -255,44 +256,44 @@ public: bool showMajorTicks() const; void setShowMinorTicks( bool ); 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; - - - void setPaletteBackgroundColor(const QColor& col); - void setGvBackgroundColor ( const QColor & ); - void setLvBackgroundColor ( const QColor & ); - void setTimeHeaderBackgroundColor ( const QColor & ); - void setLegendHeaderBackgroundColor ( const QColor & ); - QColor gvBackgroundColor () const ; - QColor lvBackgroundColor () const ; - QColor timeHeaderBackgroundColor () const ; - QColor legendHeaderBackgroundColor () const ; - void addUserdefinedLegendHeaderWidget( QWidget * w ); + 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 setPaletteBackgroundColor(const TQColor& col); + void setGvBackgroundColor ( const TQColor & ); + void setLvBackgroundColor ( const TQColor & ); + void setTimeHeaderBackgroundColor ( const TQColor & ); + void setLegendHeaderBackgroundColor ( const TQColor & ); + TQColor gvBackgroundColor () const ; + TQColor lvBackgroundColor () const ; + TQColor timeHeaderBackgroundColor () const ; + TQColor legendHeaderBackgroundColor () const ; + void addUserdefinedLegendHeaderWidget( TQWidget * w ); void setWeekendDays( int start, int end ); void weekendDays( int& start, int& end ) const; - static QPixmap getPixmap( KDGanttViewItem::Shape shape, const QColor& shapeColor,const QColor& backgroundColor, int itemSize); + static TQPixmap getPixmap( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor,const TQColor& backgroundColor, int itemSize); void setHeaderVisible( bool ); bool headerVisible() const; @@ -300,9 +301,9 @@ public: void setShowLegendButton( bool show ); bool showLegendButton() const; - // Pass-through methods from QListView - virtual int addColumn( const QString& label, int width = -1 ); - virtual int addColumn( const QIconSet& iconset, const QString& label, + // Pass-through methods from TQListView + virtual int addColumn( const TQString& label, int width = -1 ); + virtual int addColumn( const TQIconSet& iconset, const TQString& label, int width = -1 ); virtual void removeColumn( int index ); KDGanttViewItem* selectedItem() const; @@ -320,32 +321,32 @@ public: bool isDragEnabled() const; bool isDropEnabled() const; - virtual bool lvDropEvent ( QDropEvent *e, KDGanttViewItem*, KDGanttViewItem*); + virtual bool lvDropEvent ( TQDropEvent *e, KDGanttViewItem*, KDGanttViewItem*); virtual void lvStartDrag (KDGanttViewItem*); - virtual bool lvDragMoveEvent (QDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*); - virtual void lvDragEnterEvent (QDragEnterEvent * e ); - virtual QSize sizeHint() const; - KDGanttViewItem* getItemByName( const QString& name ) const; - QDateTime getDateTimeForCoordX(int coordX, bool global = true ) const; - KDGanttViewItem* getItemByListViewPos( const QPoint& pos ) const; - KDGanttViewItem* getItemByGanttViewPos( const QPoint& pos ) const; - KDGanttViewItem* getItemAt( const QPoint& pos , bool global = true ) const; + virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*); + virtual void lvDragEnterEvent (TQDragEnterEvent * e ); + virtual TQSize tqsizeHint() const; + KDGanttViewItem* getItemByName( const TQString& name ) const; + TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const; + KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const; + KDGanttViewItem* getItemByGanttViewPos( const TQPoint& pos ) const; + KDGanttViewItem* getItemAt( const TQPoint& pos , bool global = true ) const; // setting the vertical scrollbars of the listview and the timetable // default values: always off for the listview, always on for the timetable - void setLvVScrollBarMode( QScrollView::ScrollBarMode ); - void setGvVScrollBarMode( QScrollView::ScrollBarMode ); + void setLvVScrollBarMode( TQScrollView::ScrollBarMode ); + void setGvVScrollBarMode( TQScrollView::ScrollBarMode ); void setLinkItemsEnabled(bool on); bool isLinkItemsEnabled() const; public slots: void editItem( KDGanttViewItem* ); - void zoomToSelection( const QDateTime& start, const QDateTime& end); + void zoomToSelection( const TQDateTime& start, const TQDateTime& end); signals: - void timeIntervallSelected( const QDateTime& start, const QDateTime& end); - void timeIntervalSelected( const QDateTime& start, const QDateTime& end); + void timeIntervallSelected( const TQDateTime& start, const TQDateTime& end); + void timeIntervalSelected( const TQDateTime& start, const TQDateTime& end); void rescaling( Scale ); // the following signals are emitted if an item is clicked in the @@ -367,20 +368,20 @@ signals: void gvItemMidClicked( KDGanttViewItem* ); void gvItemRightClicked( KDGanttViewItem* ); // the point is the global position!! - void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos); + void gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos); void gvItemDoubleClicked( KDGanttViewItem* ); // the point is the global position!! - void gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos ); + void gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos ); // lv... means item in listview clicked void lvCurrentChanged( KDGanttViewItem* ); - void lvItemRenamed( KDGanttViewItem* , int col, const QString & text ); - void lvMouseButtonPressed( int button, KDGanttViewItem * item, const QPoint & pos, int c ); + void lvItemRenamed( KDGanttViewItem* , int col, const TQString & text ); + void lvMouseButtonPressed( int button, KDGanttViewItem * item, const TQPoint & pos, int c ); void lvItemLeftClicked( KDGanttViewItem* ); void lvItemMidClicked( KDGanttViewItem* ); void lvItemRightClicked( KDGanttViewItem* ); - void lvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos, int col ); - void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos, int c ); + void lvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos, int col ); + void lvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos, int c ); void lvItemDoubleClicked( KDGanttViewItem* ); void lvSelectionChanged( KDGanttViewItem* ); @@ -391,36 +392,36 @@ signals: void taskLinkRightClicked( KDGanttViewTaskLink* ); void taskLinkDoubleClicked( KDGanttViewTaskLink* ); - void dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse); + void dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse); private slots: void forceRepaint( int val = 0 ); - void slotSelectionChanged( QListViewItem* item ); - void slotCurrentChanged ( QListViewItem * item ); - void slotItemRenamed ( QListViewItem * item, int col, const QString & text ); - void slotMouseButtonPressed ( int button, QListViewItem * item, const QPoint & pos, int c ); - void slotmouseButtonClicked ( int button, QListViewItem * item, const QPoint & pos, int c ); - void slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col ); - void slotdoubleClicked ( QListViewItem * item ); + void slotSelectionChanged( TQListViewItem* item ); + void slotCurrentChanged ( TQListViewItem * item ); + void slotItemRenamed ( TQListViewItem * item, int col, const TQString & text ); + void slotMouseButtonPressed ( int button, TQListViewItem * item, const TQPoint & pos, int c ); + void slotmouseButtonClicked ( int button, TQListViewItem * item, const TQPoint & pos, int c ); + void slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col ); + void slotdoubleClicked ( TQListViewItem * item ); void slotHeaderSizeChanged(); void addTickRight(); void addTickLeft(); void enableAdding( int ); - void slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ); + void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ); private: struct legendItem { - KDGanttViewItem::Shape shape; - QColor color; - QString text; + KDGanttViewItem::Shape tqshape; + TQColor color; + TQString text; }; - bool loadXML( const QDomDocument& doc ); - QDomDocument saveXML( bool withPI = true ) const; + bool loadXML( const TQDomDocument& doc ); + TQDomDocument saveXML( bool withPI = true ) const; - static QString scaleToString( Scale scale ); - static QString yearFormatToString( YearFormat format ); - static QString hourFormatToString( HourFormat format ); - static Scale stringToScale( const QString& string ); - static YearFormat stringToYearFormat( const QString& string ); - static HourFormat stringToHourFormat( const QString& string ); + static TQString scaleToString( Scale scale ); + static TQString yearFormatToString( YearFormat format ); + static TQString hourFormatToString( HourFormat format ); + static Scale stringToScale( const TQString& string ); + static YearFormat stringToYearFormat( const TQString& string ); + static HourFormat stringToHourFormat( const TQString& string ); // PENDING(lutz) Review these friend class KDGanttCanvasView; @@ -442,12 +443,12 @@ private: KDTimeTableWidget * myTimeTable; KDLegendWidget * myLegend; itemAttributeDialog* myItemAttributeDialog; - QVBox * leftWidget, * rightWidget; - QHBox * spacerLeft; - QScrollView* myTimeHeaderScroll; - QHBox* myTimeHeaderContainer ; - QWidget* timeHeaderSpacerWidget; - QWidget *spacerRight; + TQVBox * leftWidget, * rightWidget; + TQHBox * spacerLeft; + TQScrollView* myTimeHeaderScroll; + TQHBox* myTimeHeaderContainer ; + TQWidget* timeHeaderSpacerWidget; + TQWidget *spacerRight; bool listViewIsVisible; bool chartIsEditable; @@ -461,14 +462,14 @@ private: bool fDragEnabled; bool fDropEnabled; bool closingBlocked; - QDateTime dtCenterTimeLineAfterShow; + TQDateTime dtCenterTimeLineAfterShow; KDGanttViewItem::Shape myDefaultShape [9]; - QColor myColor[9],myColorHL[9]; + TQColor myColor[9],myColorHL[9]; bool undefinedShape[3],undefinedColor[3],undefinedColorHL[3]; - QColor myTextColor; - QColor myDefaultColor[3],myDefaultColorHL[3]; - QPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList; - QPtrList<legendItem> *myLegendItems; + TQColor myTextColor; + TQColor myDefaultColor[3],myDefaultColorHL[3]; + TQPtrList<KDGanttViewTaskLinkGroup> myTaskLinkGroupList; + TQPtrList<legendItem> *myLegendItems; void addTaskLinkGroup(KDGanttViewTaskLinkGroup*); void removeTaskLinkGroup(KDGanttViewTaskLinkGroup*); int getIndex( KDGanttViewItem::Type ) const; @@ -477,7 +478,7 @@ private: KDGanttViewItem* myCurrentItem; KDGanttMinimizeSplitter *mySplitter; protected: - virtual QDragObject * dragObject (); + virtual TQDragObject * dragObject (); virtual void startDrag (); }; diff --git a/kdgantt/KDGanttViewEventItem.cpp b/kdgantt/KDGanttViewEventItem.cpp index e7c548ac..38c1e767 100644 --- a/kdgantt/KDGanttViewEventItem.cpp +++ b/kdgantt/KDGanttViewEventItem.cpp @@ -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. ** **********************************************************************/ @@ -53,8 +53,8 @@ is specified, a unique name will be generated */ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view, - const QString& lvtext, - const QString& name ) : + const TQString& lvtext, + const TQString& name ) : KDGanttViewItem( Event, view, lvtext, name ) { initItem(); @@ -64,15 +64,15 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view, /*! Constructs an empty Gantt item of type event. - \param parent a parent item under which this one goes + \param tqparent a tqparent item under which this one goes \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent, - const QString& lvtext, - const QString& name ) : - KDGanttViewItem( Event, parent, lvtext, name ) +KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* tqparent, + const TQString& lvtext, + const TQString& name ) : + KDGanttViewItem( Event, tqparent, lvtext, name ) { initItem(); @@ -90,8 +90,8 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent, */ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : + const TQString& lvtext, + const TQString& name ) : KDGanttViewItem( Event, view, after, lvtext, name ) { @@ -102,17 +102,17 @@ KDGanttViewEventItem::KDGanttViewEventItem( KDGanttView* view, /*! Constructs an empty Gantt item of type event. - \param parent a parent item under which this one goes + \param tqparent a tqparent item under which this one goes \param after another item at the same level behind which this one should go \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* parent, +KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* tqparent, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : - KDGanttViewItem( Event, parent, after, lvtext, name ) + const TQString& lvtext, + const TQString& name ) : + KDGanttViewItem( Event, tqparent, after, lvtext, name ) { initItem(); @@ -136,7 +136,7 @@ KDGanttViewEventItem::~KDGanttViewEventItem() \param start the start time \sa startTime() */ -void KDGanttViewEventItem::setStartTime( const QDateTime& start ) +void KDGanttViewEventItem::setStartTime( const TQDateTime& start ) { if (! start.isValid() ) { qDebug("KDGanttViewEventItem::setStartTime():Invalid parameter-no time set"); @@ -160,13 +160,13 @@ void KDGanttViewEventItem::setStartTime( const QDateTime& start ) the start time is set to this lead time automatically. \param leadTimeStart the start time of the lead time; pass an - invalid QDateTime object in order to turn the lead time off. + invalid TQDateTime object in order to turn the lead time off. \sa leadTime() */ -void KDGanttViewEventItem::setLeadTime( const QDateTime& leadTimeStart ) +void KDGanttViewEventItem::setLeadTime( const TQDateTime& leadTimeStart ) { - if (!myLeadTime) myLeadTime = new QDateTime; + if (!myLeadTime) myLeadTime = new TQDateTime; *myLeadTime = leadTimeStart; if ( startTime() < leadTime() ) setStartTime( leadTimeStart ); @@ -182,11 +182,11 @@ void KDGanttViewEventItem::setLeadTime( const QDateTime& leadTimeStart ) yes, when the lead time starts. \return if the event item is shown with a lead time line, returns - the QDateTime object representing the start of the lead time, - otherwise returns an invalid QDateTime object + the TQDateTime object representing the start of the lead time, + otherwise returns an invalid TQDateTime object \sa setLeadTime() */ -QDateTime KDGanttViewEventItem::leadTime() const +TQDateTime KDGanttViewEventItem::leadTime() const { if(myLeadTime) return *myLeadTime; @@ -209,7 +209,7 @@ void KDGanttViewEventItem::hideMe() void KDGanttViewEventItem::showItem(bool show, int coordY) { isVisibleInGanttView = show; - invalidateHeight () ; + tqinvalidateHeight () ; if (!show) { hideMe(); return; @@ -255,9 +255,9 @@ void KDGanttViewEventItem::showItem(bool show, int coordY) int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime); int hei = startShape->boundingRect().height(); // FIXME: Configurable colors - QBrush b(startShape->brush().color(), Dense4Pattern); + TQBrush b(startShape->brush().color(), Dense4Pattern); floatStartTemp->setBrush(b); - floatStartTemp->setPen(QPen(gray)); + floatStartTemp->setPen(TQPen(gray)); if (floatStartX < startX) { floatStartTemp->setSize(startX - floatStartX, hei/2); floatStartTemp->move(floatStartX, allY-hei/4); @@ -272,9 +272,9 @@ void KDGanttViewEventItem::showItem(bool show, int coordY) int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime); int hei = startShape->boundingRect().height(); // FIXME: Configurable colors - QBrush b(startShape->brush().color(), Dense4Pattern); + TQBrush b(startShape->brush().color(), Dense4Pattern); floatEndTemp->setBrush(b); - floatEndTemp->setPen(QPen(gray)); + floatEndTemp->setPen(TQPen(gray)); if (floatEndX > startX) { floatEndTemp->setSize(floatEndX - startX, hei/2); floatEndTemp->move(startX, allY-hei/4); diff --git a/kdgantt/KDGanttViewEventItem.h b/kdgantt/KDGanttViewEventItem.h index 9099d0e8..0ea9162c 100644 --- a/kdgantt/KDGanttViewEventItem.h +++ b/kdgantt/KDGanttViewEventItem.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. ** **********************************************************************/ @@ -41,26 +41,26 @@ class KDGanttViewEventItem : public KDGanttViewItem { public: KDGanttViewEventItem( KDGanttView* view, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewEventItem( KDGanttViewItem* parent, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewEventItem( KDGanttViewItem* tqparent, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); KDGanttViewEventItem( KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewEventItem( KDGanttViewItem* parent, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewEventItem( KDGanttViewItem* tqparent, KDGanttViewItem* after, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); virtual ~KDGanttViewEventItem(); - void setLeadTime( const QDateTime& leadTimeStart ); - void setStartTime( const QDateTime& start ); - QDateTime leadTime() const; + void setLeadTime( const TQDateTime& leadTimeStart ); + void setStartTime( const TQDateTime& start ); + TQDateTime leadTime() const; private: void showItem( bool show = true, int coordY = 0 ); - QDateTime* myLeadTime; + TQDateTime* myLeadTime; void initItem(); void hideMe(); }; diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp index 090c4c8c..4421517a 100644 --- a/kdgantt/KDGanttViewItem.cpp +++ b/kdgantt/KDGanttViewItem.cpp @@ -4,7 +4,7 @@ */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -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. ** **********************************************************************/ @@ -39,7 +39,7 @@ #include "KDGanttViewEventItem.h" #include "itemAttributeDialog.h" -#include "qpainter.h" +#include "tqpainter.h" #include "KDGanttXMLTools.h" @@ -52,32 +52,32 @@ directly. Instead, you should create items of one of the subclasses. This class provides methods common to all Gantt items. - The initialization of the shapes/colors of the item works as follows: + The initialization of the tqshapes/colors of the item works as follows: Shapes: - When a new item is created, the shapes are set to the default values + When a new item is created, the tqshapes are set to the default values for items of the type of this item, defined in the KDGanttView class with void setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end ); If there is no default value defined for this type, - the shapes are set as follows: - For TaskViewItems all three shapes are set to Square. - For SummaryViewItems all three shapes are set to TriangleDown. - For EventViewItems all three shapes are set to Diamond. + the tqshapes are set as follows: + For TaskViewItems all three tqshapes are set to Square. + For SummaryViewItems all three tqshapes are set to TriangleDown. + For EventViewItems all three tqshapes are set to Diamond. Colors: When a new item is created, the colors are set to the default values for items of the type of this item, defined in the KDGanttView class with void setColors( KDGanttViewItem::Type type, - const QColor& start, - const QColor& middle, - const QColor& end ); + const TQColor& start, + const TQColor& middle, + const TQColor& end ); If there is no default value defined for this type, - the colors of the shapes are set to the default color for items of this type, + the colors of the tqshapes are set to the default color for items of this type, defined in the KDGanttView class with: - void setDefaultColor( KDGanttViewItem::Type type, const QColor& ); + void setDefaultColor( KDGanttViewItem::Type type, const TQColor& ); The initial default color in the KDGanttView class is set to blue for KDGanttViewItem::Event, green for KDGanttViewItem::Task, @@ -88,13 +88,13 @@ values for items of the type of this item, defined in the KDGanttView class with: void setHighlightColors( KDGanttViewItem::Type type, - const QColor& start, - const QColor& middle, - const QColor& end ); + const TQColor& start, + const TQColor& middle, + const TQColor& end ); If there is no default value defined for this type, - the highlight colors of the shapes are set to the default color for + the highlight colors of the tqshapes are set to the default color for items of this type, defined in the KDGanttView class with: - void setDefaultHighlightColor( KDGanttViewItem::Type type, const QColor& ); + void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& ); The initial default highlight color in the KDGanttView class is set to red for all types. @@ -122,23 +122,23 @@ shown or not. In the other mode (set with setDisplaySubitemsAsGroup( true ); ), called "calendar mode", the item is displayed as follows: - If the item has no children, it is displayed as usual. - If the item is opened (i.e., its children are displayed), the + If the item has no tqchildren, it is displayed as usual. + If the item is opened (i.e., its tqchildren are displayed), the start/end time of this item is computed automatically according to - the earliest start time/latest end time of its children. The item - and its children are displayed as usual. - If the item is closed (i.e., its children are hidden in the left - list view), the item itself is hidden, and its children are displayed + the earliest start time/latest end time of its tqchildren. The item + and its tqchildren are displayed as usual. + If the item is closed (i.e., its tqchildren are hidden in the left + list view), the item itself is hidden, and its tqchildren are displayed on the timeline of this item instead. To control the painting of - overlapping children, call \a setPriority() for the childs. + overlapping tqchildren, call \a setPriority() for the childs. Blocking of user interaction to open item: - If you want to block users to open items used as parents of calendar items, + If you want to block users to open items used as tqparents of calendar items, call \a KDGanttView::setCalendarMode( true ); Example 1, Color: If you create an instance of a KDGanttView class and add a SummaryViewItem - without setting any color/shape values, you get an item with three shapes + without setting any color/tqshape values, you get an item with three tqshapes of the form TriangleDown in the color magenta. If the item is highlighted, the color will change to the highlight color red. @@ -147,17 +147,17 @@ \a KDGanttView::setCalendarMode( true ); \a KDGanttView::setDisplaySubitemsAsGroup( true ); Insert root items in the Gantt view. - Insert items as children of these root item in the Gantt view. - You may use any item type as parent and child; there are no limitations. + Insert items as tqchildren of these root item in the Gantt view. + You may use any item type as tqparent and child; there are no limitations. It is, however, recommended to use KDGanttViewTaskItems - Actually, you may add child items to the children themselves. - Such a child behaves then like a parent. - Now set the start/end time of the children to specify a time + Actually, you may add child items to the tqchildren themselves. + Such a child behaves then like a tqparent. + Now set the start/end time of the tqchildren to specify a time interval for these items. */ -QDict<KDGanttViewItem> KDGanttViewItem::sItemDict; +TQDict<KDGanttViewItem> KDGanttViewItem::sItemDict; /*! Constructs an empty Gantt item. @@ -169,9 +169,9 @@ QDict<KDGanttViewItem> KDGanttViewItem::sItemDict; is specified, a unique name will be generated */ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view, - const QString& lvtext, - const QString& name ) : - QListViewItem(view->myListView,lvtext) + const TQString& lvtext, + const TQString& name ) : + TQListViewItem(view->myListView,lvtext) { initColorAndShapes(type); generateAndInsertName( name ); @@ -182,16 +182,16 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view, Constructs an empty Gantt item. \param type the type of the item to insert - \param parentItem a parent item under which this one goes + \param tqparentItem a tqparent item under which this one goes \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem, - const QString& lvtext, - const QString& name ) : - QListViewItem(parentItem,lvtext) +KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* tqparentItem, + const TQString& lvtext, + const TQString& name ) : + TQListViewItem(tqparentItem,lvtext) { initColorAndShapes(type); generateAndInsertName( name ); @@ -211,9 +211,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem, KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : - QListViewItem(view->myListView,after, lvtext) + const TQString& lvtext, + const TQString& name ) : + TQListViewItem(view->myListView,after, lvtext) { initColorAndShapes(type); generateAndInsertName( name ); @@ -224,18 +224,18 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view, Constructs an empty Gantt item. \param type the type of the item to insert - \param parentItem a parent item under which this one goes + \param tqparentItem a tqparent item under which this one goes \param after another item at the same level behind which this one should go \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem, +KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* tqparentItem, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : - QListViewItem( parentItem, after, lvtext ) + const TQString& lvtext, + const TQString& name ) : + TQListViewItem( tqparentItem, after, lvtext ) { initColorAndShapes(type); generateAndInsertName( name ); @@ -268,8 +268,8 @@ KDGanttViewItem::~KDGanttViewItem() if ( listView() ) { if ( isOpen() ) setOpen( false ); - if ( parent() ) - parent()->takeItem( this ); + if ( tqparent() ) + tqparent()->takeItem( this ); else myGanttView->myListView->takeItem( this ); myGanttView->myTimeTable->updateMyContent(); @@ -283,7 +283,7 @@ KDGanttViewItem::~KDGanttViewItem() Generates a unique name if necessary and inserts it into the item dictionary. */ -void KDGanttViewItem::generateAndInsertName( const QString& name ) +void KDGanttViewItem::generateAndInsertName( const TQString& name ) { // First check if we already had a name. This can be the case if // the item was reconstructed from an XML file. @@ -291,11 +291,11 @@ void KDGanttViewItem::generateAndInsertName( const QString& name ) // We had a name, remove it sItemDict.remove( _name ); - QString newName; - if ( name.isEmpty() || sItemDict.find( name ) ) { + TQString newName; + if ( name.isEmpty() || sItemDict.tqfind( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sItemDict.find( newName ) ) { + while( sItemDict.tqfind( newName ) ) { newName += "_0"; } } else { @@ -311,7 +311,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name ) \return the unique item name */ -QString KDGanttViewItem::name() const +TQString KDGanttViewItem::name() const { return _name; } @@ -325,11 +325,11 @@ QString KDGanttViewItem::name() const with that name exists */ -KDGanttViewItem* KDGanttViewItem::find( const QString& name ) +KDGanttViewItem* KDGanttViewItem::tqfind( const TQString& name ) { - if (name.isEmpty()) // avoid error msg from QDict + if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sItemDict.find( name ); + return sItemDict.tqfind( name ); } @@ -369,7 +369,7 @@ void KDGanttViewItem::setEnabled( bool on ) temp->setEnabled( on ); temp = temp->nextSibling(); } - QListViewItem::setEnabled( on ); + TQListViewItem::setEnabled( on ); myGanttView->myTimeTable->dec_blockUpdating(); } updateCanvasItems(); @@ -414,7 +414,7 @@ void KDGanttViewItem::setItemVisible( bool on ) */ bool KDGanttViewItem::itemVisible () const { - return QListViewItem::isVisible(); + return TQListViewItem::isVisible(); } @@ -451,7 +451,7 @@ bool KDGanttViewItem::editable() const Useful to get a so called "calendar view" with many items in one row. When \a displaySubitemsAsGroup() is set to true, this item has a normal view, when it is expanded. If it is not expanded (and has at least one child), - the item itself is hidden, and all children are displayed instead. + the item itself is hidden, and all tqchildren are displayed instead. To manage the painting priority of the childs (if overlapping), you may set \a priority() of these items. @@ -463,9 +463,9 @@ void KDGanttViewItem::setDisplaySubitemsAsGroup( bool show ) if ( !show && _displaySubitemsAsGroup) isVisibleInGanttView = true; _displaySubitemsAsGroup = show; - if ( parent() ) - if ( parent()->isOpen() ) - parent()->setOpen( true ); + if ( tqparent() ) + if ( tqparent()->isOpen() ) + tqparent()->setOpen( true ); if ( isOpen() ) setOpen( true ); updateCanvasItems(); @@ -534,7 +534,7 @@ int KDGanttViewItem::priority() \param start the start time \sa startTime(), setEndTime(), endTime() */ -void KDGanttViewItem::setStartTime( const QDateTime& ) +void KDGanttViewItem::setStartTime( const TQDateTime& ) { } @@ -545,7 +545,7 @@ void KDGanttViewItem::setStartTime( const QDateTime& ) \return the start time of this item \sa setStartTime(), setEndTime(), endTime() */ -QDateTime KDGanttViewItem::startTime() const +TQDateTime KDGanttViewItem::startTime() const { return myStartTime; } @@ -559,7 +559,7 @@ QDateTime KDGanttViewItem::startTime() const \param end the end time \sa endTime(), setStartTime(), startTime() */ -void KDGanttViewItem::setEndTime( const QDateTime& end ) +void KDGanttViewItem::setEndTime( const TQDateTime& end ) { switch( type() ) { case Event: @@ -583,7 +583,7 @@ void KDGanttViewItem::setEndTime( const QDateTime& end ) \return the end time of this item \sa setEndTime(), setStartTime(), startTime() */ -QDateTime KDGanttViewItem::endTime() const +TQDateTime KDGanttViewItem::endTime() const { return myEndTime; } @@ -600,7 +600,7 @@ QDateTime KDGanttViewItem::endTime() const \sa text(), setTextColor(), textColor(), setListViewText(), listViewText() */ -void KDGanttViewItem::setText( const QString& text ) +void KDGanttViewItem::setText( const TQString& text ) { textCanvas->setText(text); textCanvasText = text; @@ -615,18 +615,18 @@ void KDGanttViewItem::setText( const QString& text ) \sa setText(), setTextColor(), textColor(), setListViewText(), listViewText() */ -QString KDGanttViewItem::text() const +TQString KDGanttViewItem::text() const { return textCanvasText; } /*! - \deprecated Use setListViewTest( int, const QString& ) instead + \deprecated Use setListViewTest( int, const TQString& ) instead */ -void KDGanttViewItem::setListViewText( const QString& text, int column ) +void KDGanttViewItem::setListViewText( const TQString& text, int column ) { - QListViewItem::setText( column, text ); + TQListViewItem::setText( column, text ); } @@ -637,9 +637,9 @@ void KDGanttViewItem::setListViewText( const QString& text, int column ) \param text the text to be shown \sa text(), setTextColor(), textColor(), setText(), listViewText() */ -void KDGanttViewItem::setListViewText( int column, const QString& text ) +void KDGanttViewItem::setListViewText( int column, const TQString& text ) { - QListViewItem::setText( column, text ); + TQListViewItem::setText( column, text ); } @@ -651,9 +651,9 @@ void KDGanttViewItem::setListViewText( int column, const QString& text ) \sa setText(), setTextColor(), textColor(), text(), setListViewText() */ -QString KDGanttViewItem::listViewText( int column ) const +TQString KDGanttViewItem::listViewText( int column ) const { - return QListViewItem::text( column ); + return TQListViewItem::text( column ); } @@ -663,7 +663,7 @@ QString KDGanttViewItem::listViewText( int column ) const \param font the font to be shown \sa font() */ -void KDGanttViewItem::setFont( const QFont& font ) +void KDGanttViewItem::setFont( const TQFont& font ) { textCanvas->setFont(font); updateCanvasItems(); @@ -676,7 +676,7 @@ void KDGanttViewItem::setFont( const QFont& font ) \return the font used for the text in this item \sa setFont() */ -QFont KDGanttViewItem::font() const +TQFont KDGanttViewItem::font() const { return textCanvas->font(); } @@ -688,7 +688,7 @@ QFont KDGanttViewItem::font() const \param text the tooltip text \sa tooltipText() */ -void KDGanttViewItem::setTooltipText( const QString& text ) +void KDGanttViewItem::setTooltipText( const TQString& text ) { myToolTipText = text; } @@ -700,7 +700,7 @@ void KDGanttViewItem::setTooltipText( const QString& text ) \return the tooltip text \sa setTooltipText() */ -QString KDGanttViewItem::tooltipText() const +TQString KDGanttViewItem::tooltipText() const { return myToolTipText; @@ -713,7 +713,7 @@ QString KDGanttViewItem::tooltipText() const \param text the what's this text \sa whatsThisText() */ -void KDGanttViewItem::setWhatsThisText( const QString& text ) +void KDGanttViewItem::setWhatsThisText( const TQString& text ) { myWhatsThisText = text; } @@ -726,7 +726,7 @@ void KDGanttViewItem::setWhatsThisText( const QString& text ) \sa setWhatsThisText() */ -QString KDGanttViewItem::whatsThisText() const +TQString KDGanttViewItem::whatsThisText() const { return myWhatsThisText; } @@ -735,7 +735,7 @@ QString KDGanttViewItem::whatsThisText() const /*! Specifies whether this item should be shown highlighted. The user can also highlight items with the mouse. - If the item displays its subitems (children) as a group + If the item displays its subitems (tqchildren) as a group (displaySubitemsAsGroup() == true), all changes apply to all subitems as well. @@ -773,16 +773,16 @@ bool KDGanttViewItem::highlight() const /*! - Specifies the shapes to be used for this item. + Specifies the tqshapes to be used for this item. - It is advisable not to use this method, but rather set the shapes + It is advisable not to use this method, but rather set the tqshapes for all items of a type with KDGanttView::setShapes() in order to get a uniform Gantt view. - \param start the start shape - \param middle the middle shape - \param end the end shape - \sa shapes(), setColors(), colors() + \param start the start tqshape + \param middle the middle tqshape + \param end the end tqshape + \sa tqshapes(), setColors(), colors() */ void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end ) { @@ -799,45 +799,45 @@ void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end ) /*! - Creates shapes of the specified type \a shape. - The background shape color is set to black and the background shape - is slightly bit bigger than the foreground shape to have a black border - around the foreground shape. + Creates tqshapes of the specified type \a tqshape. + The background tqshape color is set to black and the background tqshape + is slightly bit bigger than the foreground tqshape to have a black border + around the foreground tqshape. - \param itemShape the foreground shape - \param middle itemShapeBack the background shape - \param shape the type of the shape + \param itemShape the foreground tqshape + \param middle itemShapeBack the background tqshape + \param tqshape the type of the tqshape (may be TriangleDown, TriangleUp, Diamond, Square, Circle) - \sa shapes(), setColors(), colors() + \sa tqshapes(), setColors(), colors() */ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, KDCanvasPolygonItem* &itemShapeBack, - Shape shape ) + Shape tqshape ) { if ( itemShape && type() == Task ) return; if (itemShape) delete itemShape; if (itemShapeBack) delete itemShapeBack; - QCanvasPolygonalItem * item; - QCanvasPolygonalItem * itemBack; + TQCanvasPolygonalItem * item; + TQCanvasPolygonalItem * itemBack; int size = myItemSize+2; int hei = (myItemSize/3)/2; - switch (shape) { + switch (tqshape) { case TriangleDown: { item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,-hei); arr.setPoint(1,size/2,-hei); arr.setPoint(2,0,((size/2)-hei)); - ((QCanvasPolygon*)item)->setPoints(arr); + ((TQCanvasPolygon*)item)->setPoints(arr); size += 4;hei +=1; itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); arr.setPoint(0,-size/2,-hei); arr.setPoint(1,size/2,-hei); arr.setPoint(2,0,((size/2)-hei)); - ((QCanvasPolygon*)itemBack)->setPoints(arr); + ((TQCanvasPolygon*)itemBack)->setPoints(arr); break; } @@ -847,17 +847,17 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, // of the same size as a TriangleDown-icon, if we increment the size by 2 size+=2; item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,hei); arr.setPoint(1,size/2,hei); arr.setPoint(2,0,(-size/2)+hei); - ((QCanvasPolygon*)item)->setPoints(arr); + ((TQCanvasPolygon*)item)->setPoints(arr); size += 4;hei +=1; itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); arr.setPoint(0,-size/2,hei); arr.setPoint(1,size/2,hei); arr.setPoint(2,0,(-size/2)+hei); - ((QCanvasPolygon*)itemBack)->setPoints(arr); + ((TQCanvasPolygon*)itemBack)->setPoints(arr); break; } @@ -865,19 +865,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, case Diamond: { item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); - QPointArray arr = QPointArray(4); + TQPointArray arr = TQPointArray(4); arr.setPoint(0,0,-size/2); arr.setPoint(1,size/2,0); arr.setPoint(2,0,size/2); arr.setPoint(3,-size/2,0); - ((QCanvasPolygon*)item)->setPoints(arr); + ((TQCanvasPolygon*)item)->setPoints(arr); size += 2;hei +=1; itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); arr.setPoint(0,0,-size/2); arr.setPoint(1,size/2,0); arr.setPoint(2,0,size/2); arr.setPoint(3,-size/2,0); - ((QCanvasPolygon*)itemBack)->setPoints(arr); + ((TQCanvasPolygon*)itemBack)->setPoints(arr); break; } @@ -885,19 +885,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, { size -=2; item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); - QPointArray arr = QPointArray(4); + TQPointArray arr = TQPointArray(4); arr.setPoint(0,-size/2,-size/2); arr.setPoint(1,size/2,-size/2); arr.setPoint(2,size/2,size/2); arr.setPoint(3,-size/2,size/2); - ((QCanvasPolygon*)item)->setPoints(arr); + ((TQCanvasPolygon*)item)->setPoints(arr); size += 2;hei +=1; itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); arr.setPoint(0,-size/2,-size/2); arr.setPoint(1,size/2,-size/2); arr.setPoint(2,size/2,size/2); arr.setPoint(3,-size/2,size/2); - ((QCanvasPolygon*)itemBack)->setPoints(arr); + ((TQCanvasPolygon*)itemBack)->setPoints(arr); break; } @@ -912,8 +912,8 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, break; } default: - // Uninitialized shape, can e.g. be the case with free-busy - // items which don't have any shapes + // Uninitialized tqshape, can e.g. be the case with free-busy + // items which don't have any tqshapes return; } item->setBrush(Qt::SolidPattern); @@ -927,14 +927,14 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, /*! - Returns the shapes used for this item + Returns the tqshapes used for this item - \param start returns the start shape - \param middle returns the middle shape - \param end returns the end shape + \param start returns the start tqshape + \param middle returns the middle tqshape + \param end returns the end tqshape \sa setShapes(), setColors(), colors() */ -void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const +void KDGanttViewItem::tqshapes( Shape& start, Shape& middle, Shape& end ) const { start = myStartShape; middle = myMiddleShape; @@ -943,19 +943,19 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const /*! - Specifies the colors in which to draw the shapes of this item. + Specifies the colors in which to draw the tqshapes of this item. It is advisable not to use this method, but rather set the colors for all items of a type with KDGanttView::setColors() in order to get a uniform Gantt view. - \param start the color for the start shape - \param middle the color for the middle shape - \param end the color for the end shape - \sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor() + \param start the color for the start tqshape + \param middle the color for the middle tqshape + \param end the color for the end tqshape + \sa colors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor() */ -void KDGanttViewItem::setColors( const QColor& start, const QColor& middle, - const QColor& end ) +void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle, + const TQColor& end ) { myStartColor=start ; @@ -980,9 +980,9 @@ void KDGanttViewItem::setColors( const QColor& start, const QColor& middle, \param start returns the start color \param middle returns the middle color \param end returns the end color - \sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor() + \sa setColors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor() */ -void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const +void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const { start = myStartColor ; middle = myMiddleColor; @@ -992,23 +992,23 @@ void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const /*! - Specifies the highlight colors in which to draw the shapes of this item. + Specifies the highlight colors in which to draw the tqshapes of this item. It is advisable not to use this method, but rather set the highlight colors for all items of a type with KDGanttView::setHighlightColors() in order to get a uniform Gantt view. - If the item displays its subitems (children) as a group, + If the item displays its subitems (tqchildren) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well. - \param start the highlight color for the start shape - \param middle the highlight color for the middle shape - \param end the highlight color for the end shape - \sa highlightColors(), setShapes(), shapes() + \param start the highlight color for the start tqshape + \param middle the highlight color for the middle tqshape + \param end the highlight color for the end tqshape + \sa highlightColors(), setShapes(), tqshapes() */ -void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& middle, const QColor& end ) +void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end ) { myStartColorHL=start ; myMiddleColorHL= middle; @@ -1032,9 +1032,9 @@ void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& mid \param start returns the start highlight color \param middle returns the middle highlight color \param end returns the end highlight color - \sa setHighlightColors(), setShapes(), shapes() + \sa setHighlightColors(), setShapes(), tqshapes() */ -void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& end ) const +void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const { start = myStartColorHL ; middle = myMiddleColorHL; @@ -1048,13 +1048,13 @@ void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& en It is advisable not to use this method, but rather set the text color for all items with KDGanttView::setTextColor() in order to get a uniform Gantt view. - If the item displays its subitems (children) as a group, + If the item displays its subitems (tqchildren) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well. \param color the text color \sa textColor(), setText(), text() */ -void KDGanttViewItem::setTextColor( const QColor& color ) +void KDGanttViewItem::setTextColor( const TQColor& color ) { myTextColor = color; @@ -1077,7 +1077,7 @@ void KDGanttViewItem::setTextColor( const QColor& color ) \return the text color \sa setTextColor(), setText(), text() */ -QColor KDGanttViewItem::textColor() const +TQColor KDGanttViewItem::textColor() const { return myTextColor; } @@ -1086,7 +1086,7 @@ QColor KDGanttViewItem::textColor() const /*! \enum KDGanttViewItem::Shape - This enum is used in order to specify the shapes of a Gantt chart + This enum is used in order to specify the tqshapes of a Gantt chart item. */ @@ -1105,17 +1105,17 @@ QColor KDGanttViewItem::textColor() const \param pixmap the pixmap to show \sa pixmap() */ -void KDGanttViewItem::setPixmap( int column, const QPixmap& pixmap ) +void KDGanttViewItem::setPixmap( int column, const TQPixmap& pixmap ) { - QListViewItem::setPixmap( column, pixmap ); + TQListViewItem::setPixmap( column, pixmap ); } /*! - \deprecated use setPixmap( int, const QPixmap& ) instead + \deprecated use setPixmap( int, const TQPixmap& ) instead */ -void KDGanttViewItem::setPixmap( const QPixmap& pixmap ) +void KDGanttViewItem::setPixmap( const TQPixmap& pixmap ) { - QListViewItem::setPixmap( 0, pixmap ); + TQListViewItem::setPixmap( 0, pixmap ); } @@ -1126,9 +1126,9 @@ void KDGanttViewItem::setPixmap( const QPixmap& pixmap ) \return a pointer to the pixmap shown \sa setPixmap() */ -const QPixmap* KDGanttViewItem::pixmap( int column ) const +const TQPixmap* KDGanttViewItem::pixmap( int column ) const { - return QListViewItem::pixmap( column ); + return TQListViewItem::pixmap( column ); } @@ -1140,14 +1140,14 @@ const QPixmap* KDGanttViewItem::pixmap( int column ) const for all items of a type with KDGanttView::setDefaultColor() in order to get a uniform Gantt view. - If the item displays its subitems (children) as a group, + If the item displays its subitems (tqchildren) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well. \param color the default color to use \sa defaultColor(), setColors(), colors() */ -void KDGanttViewItem::setDefaultColor( const QColor& color ) +void KDGanttViewItem::setDefaultColor( const TQColor& color ) { myDefaultColor = color; @@ -1173,7 +1173,7 @@ void KDGanttViewItem::setDefaultColor( const QColor& color ) \return color the default color used \sa setDefaultColor(), setColors(), colors() */ -QColor KDGanttViewItem::defaultColor() const +TQColor KDGanttViewItem::defaultColor() const { return myDefaultColor; } @@ -1187,14 +1187,14 @@ QColor KDGanttViewItem::defaultColor() const for all items of a type with KDGanttView::setDefaultHighlightColor() in order to get a uniform Gantt view. - If the item displays its subitems (children) as a group, + If the item displays its subitems (tqchildren) as a group, (displaySubitemsAsGroup() == true) all changes apply to all subitems as well. \param color the default highlighting color to use \sa defaultHighlightColor(), setHighlightColors(), highlightColors() */ -void KDGanttViewItem::setDefaultHighlightColor( const QColor& color ) +void KDGanttViewItem::setDefaultHighlightColor( const TQColor& color ) { myDefaultColorHL = color; if ( displaySubitemsAsGroup() ) { @@ -1217,7 +1217,7 @@ void KDGanttViewItem::setDefaultHighlightColor( const QColor& color ) \return color the default highlighting color used \sa setDefaultHighlightColor(), setHighlightColors(), highlightColors() */ -QColor KDGanttViewItem::defaultHighlightColor() const +TQColor KDGanttViewItem::defaultHighlightColor() const { return myDefaultColorHL; } @@ -1226,12 +1226,12 @@ QColor KDGanttViewItem::defaultHighlightColor() const /*! Returns the first child of this item. - \return the first child of this item, 0 if this item has no children + \return the first child of this item, 0 if this item has no tqchildren */ KDGanttViewItem* KDGanttViewItem::firstChild() const { - return (KDGanttViewItem* )QListViewItem::firstChild(); + return (KDGanttViewItem* )TQListViewItem::firstChild(); } @@ -1243,19 +1243,19 @@ KDGanttViewItem* KDGanttViewItem::firstChild() const */ KDGanttViewItem* KDGanttViewItem::nextSibling() const { - return (KDGanttViewItem* )QListViewItem::nextSibling(); + return (KDGanttViewItem* )TQListViewItem::nextSibling(); } /*! - Returns the parent item of this item + Returns the tqparent item of this item - \return the parent item of this item, 0 if this item is a top-level + \return the tqparent item of this item, 0 if this item is a top-level item */ -KDGanttViewItem* KDGanttViewItem::parent() const +KDGanttViewItem* KDGanttViewItem::tqparent() const { - return (KDGanttViewItem*)QListViewItem::parent(); + return (KDGanttViewItem*)TQListViewItem::tqparent(); } @@ -1266,7 +1266,7 @@ KDGanttViewItem* KDGanttViewItem::parent() const */ KDGanttViewItem* KDGanttViewItem::itemAbove() { - return (KDGanttViewItem* )QListViewItem::itemAbove(); + return (KDGanttViewItem* )TQListViewItem::itemAbove(); } @@ -1281,7 +1281,7 @@ KDGanttViewItem* KDGanttViewItem::itemAbove() KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled ) { - KDGanttViewItem* retItem = (KDGanttViewItem* )QListViewItem::itemBelow(); + KDGanttViewItem* retItem = (KDGanttViewItem* )TQListViewItem::itemBelow(); if ( !includeDisabled ) { return retItem; } @@ -1290,7 +1290,7 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled ) return retItem; } } - KDGanttViewItem* Item2 = (KDGanttViewItem* )QListViewItem::listView()->itemAt(QPoint (2, QListViewItem::itemPos() + QListViewItem::height() +2) ); + KDGanttViewItem* Item2 = (KDGanttViewItem* )TQListViewItem::listView()->itemAt(TQPoint (2, TQListViewItem::itemPos() + TQListViewItem::height() +2) ); if ( Item2 != 0 ) if (!Item2->enabled() ) return Item2; @@ -1304,8 +1304,8 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled ) void KDGanttViewItem::updateCanvasItems() { if (blockUpdating) return; - QPen p,pBack; - QBrush b; + TQPen p,pBack; + TQBrush b; b.setStyle(Qt::SolidPattern); if ( enabled() ) { textCanvas->setColor(myTextColor); @@ -1338,9 +1338,9 @@ void KDGanttViewItem::updateCanvasItems() endLine->setPen(p); } } else { - //QColor discol = Qt::lightGray; - QColor discol = QColor(232,232,232); - textCanvas->setColor( QColor(150,150,150) ); + //TQColor discol = TQt::lightGray; + TQColor discol = TQColor(232,232,232); + textCanvas->setColor( TQColor(150,150,150) ); b.setStyle(Qt::SolidPattern); b.setColor(discol); startShape->setBrush(b); @@ -1354,7 +1354,7 @@ void KDGanttViewItem::updateCanvasItems() pBack.setWidth((myItemSize/3-1)+2); startLineBack->setPen(pBack); endLineBack->setPen(pBack); - QFont f = textCanvas->font(); + TQFont f = textCanvas->font(); f.setPixelSize(myItemSize); textCanvas->setFont(f); //if (isvisible) { @@ -1380,7 +1380,7 @@ void KDGanttViewItem::setOpen( bool open ) } else { - QListViewItem::setOpen( open ); + TQListViewItem::setOpen( open ); } } @@ -1390,16 +1390,16 @@ void KDGanttViewItem::showItem( bool, int ) } -QPoint KDGanttViewItem::getTaskLinkStartCoord(QPoint p) +TQPoint KDGanttViewItem::getTaskLinkStartCoord(TQPoint p) { textCanvas->move(p.x()+myItemSize, itemPos() + height()/2-myItemSize/2); - return QPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2); + return TQPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2); } -QPoint KDGanttViewItem::getTaskLinkEndCoord() +TQPoint KDGanttViewItem::getTaskLinkEndCoord() { - return QPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2); + return TQPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2); } @@ -1421,7 +1421,7 @@ void KDGanttViewItem::setCallListViewOnSetOpen( bool call ) void KDGanttViewItem::initColorAndShapes(Type t) { - setTextOffset(QPoint(0,0)); + setTextOffset(TQPoint(0,0)); //_isCalendar = false; _callListViewOnSetOpen = true; myType = t; @@ -1443,8 +1443,8 @@ void KDGanttViewItem::initColorAndShapes(Type t) myGanttView->myTimeHeader->saveCenterDateTime(); myStartTime = myGanttView->myTimeHeader->myCenterDateTime; myEndTime = myStartTime; - myToolTipText =QListViewItem::text(0); - myWhatsThisText = QListViewItem::text(0); + myToolTipText =TQListViewItem::text(0); + myWhatsThisText = TQListViewItem::text(0); isHighlighted = false; isEditable = true; _displaySubitemsAsGroup = myGanttView->displaySubitemsAsGroup(); @@ -1456,7 +1456,7 @@ void KDGanttViewItem::initColorAndShapes(Type t) startLineBack->setZ(1);endLineBack->setZ(1); actualEnd = new KDCanvasLine(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); actualEnd->setZ(5); - actualEnd->setPen( QPen ( Qt::red, 3 ) ); + actualEnd->setPen( TQPen ( TQt::red, 3 ) ); textCanvas = new KDCanvasText(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); textCanvas->setText(""); @@ -1467,10 +1467,10 @@ void KDGanttViewItem::initColorAndShapes(Type t) setDefaultColor( myGanttView->defaultColor(myType)); // set default highlight color setDefaultHighlightColor(myGanttView->defaultHighlightColor(myType)); - // set shapes - if (!( shapeDefined = (myGanttView->shapes(myType,myStartShape,myMiddleShape,myEndShape)))) { + // set tqshapes + if (!( tqshapeDefined = (myGanttView->tqshapes(myType,myStartShape,myMiddleShape,myEndShape)))) { - //qDebug("KDGantt::KDGanttViewItem created with not user defined shapes"); + //qDebug("KDGantt::KDGanttViewItem created with not user defined tqshapes"); }; setShapes(myStartShape,myMiddleShape,myEndShape); @@ -1484,19 +1484,19 @@ void KDGanttViewItem::initColorAndShapes(Type t) floatStartShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); floatEndShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); - // set color of shapes + // set color of tqshapes if (!( colorDefined = (myGanttView->colors(myType,myStartColor,myMiddleColor,myEndColor)))) { }; setColors(defaultColor(),defaultColor(), defaultColor()); - // set highlight color of shapes + // set highlight color of tqshapes if (!( colorHLDefined = (myGanttView->highlightColors(myType,myStartColorHL,myMiddleColorHL,myEndColorHL)))) { }; setHighlightColors(defaultHighlightColor(),defaultHighlightColor(), defaultHighlightColor()); setFont(myGanttView->font()); // if (type() == Task) - //setText(QListViewItem::text(0)); // testing only + //setText(TQListViewItem::text(0)); // testing only //isvisible = true; _priority = 150; _showNoInformation = false; @@ -1506,9 +1506,9 @@ void KDGanttViewItem::initColorAndShapes(Type t) } -QString KDGanttViewItem::shapeToString( Shape shape ) +TQString KDGanttViewItem::tqshapeToString( Shape tqshape ) { - switch( shape ) { + switch( tqshape ) { case TriangleDown: return "TriangleDown"; case TriangleUp: @@ -1524,7 +1524,7 @@ QString KDGanttViewItem::shapeToString( Shape shape ) } -KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string ) +KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const TQString& string ) { if( string == "TriangleDown" ) return TriangleDown; @@ -1545,13 +1545,13 @@ KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string ) Creates a DOM node that describes this item. \param doc the DOM document to which the node belongs - \param parentElement the element into which to insert this node + \param tqparentElement the element into which to insert this node */ -void KDGanttViewItem::createNode( QDomDocument& doc, - QDomElement& parentElement ) +void KDGanttViewItem::createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ) { - QDomElement itemElement = doc.createElement( "Item" ); - parentElement.appendChild( itemElement ); + TQDomElement itemElement = doc.createElement( "Item" ); + tqparentElement.appendChild( itemElement ); itemElement.setAttribute( "Type", typeToString( type() ) ); KDGanttXML::createDateTimeNode( doc, itemElement, "StartTime", startTime() ); @@ -1569,15 +1569,15 @@ void KDGanttViewItem::createNode( QDomDocument& doc, KDGanttXML::createBoolNode( doc, itemElement, "Open", isOpen() ); KDGanttXML::createBoolNode( doc, itemElement, "Highlight", highlight() ); Shape startShape, middleShape, endShape; - shapes( startShape, middleShape, endShape ); + tqshapes( startShape, middleShape, endShape ); KDGanttXML::createStringNode( doc, itemElement, "StartShape", - shapeToString( startShape ) ); + tqshapeToString( startShape ) ); KDGanttXML::createStringNode( doc, itemElement, "MiddleShape", - shapeToString( middleShape ) ); + tqshapeToString( middleShape ) ); KDGanttXML::createStringNode( doc, itemElement, "EndShape", - shapeToString( endShape ) ); + tqshapeToString( endShape ) ); KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() ); - QColor startColor, middleColor, endColor; + TQColor startColor, middleColor, endColor; colors( startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, itemElement, "StartColor", startColor ); KDGanttXML::createColorNode( doc, itemElement, "MiddleColor", middleColor ); @@ -1592,7 +1592,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc, KDGanttXML::createColorNode( doc, itemElement, "EndHighlightColor", endColor ); KDGanttXML::createColorNode( doc, itemElement, "TextColor", textColor() ); KDGanttXML::createStringNode( doc, itemElement, "Name", name() ); - QDomElement itemsElement = doc.createElement( "Items" ); + TQDomElement itemsElement = doc.createElement( "Items" ); itemElement.appendChild( itemsElement ); KDGanttViewItem* currentItem = firstChild(); while( currentItem ) { @@ -1613,9 +1613,9 @@ void KDGanttViewItem::createNode( QDomDocument& doc, \return the newly created item */ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view, - QDomElement& element ) + TQDomElement& element ) { - QString typeString = element.attribute( "Type" ); + TQString typeString = element.attribute( "Type" ); Q_ASSERT( !typeString.isEmpty() ); KDGanttViewItem* item; if( typeString == "Task" ) @@ -1645,9 +1645,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view, */ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view, KDGanttViewItem* previous, - QDomElement& element ) + TQDomElement& element ) { - QString typeString = element.attribute( "Type" ); + TQString typeString = element.attribute( "Type" ); Q_ASSERT( !typeString.isEmpty() ); KDGanttViewItem* item; if( typeString == "Task" ) @@ -1672,22 +1672,22 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view, Creates a KDGanttViewItem according to the specification in a DOM element. - \param parent the parent item under which the item will be inserted + \param tqparent the tqparent item under which the item will be inserted \param element the DOM element from which to read the specification \return the newly created element */ -KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent, - QDomElement& element ) +KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* tqparent, + TQDomElement& element ) { - QString typeString = element.attribute( "Type" ); + TQString typeString = element.attribute( "Type" ); Q_ASSERT( !typeString.isEmpty() ); KDGanttViewItem* item; if( typeString == "Task" ) - item = new KDGanttViewTaskItem( parent ); + item = new KDGanttViewTaskItem( tqparent ); else if( typeString == "Summary" ) - item = new KDGanttViewSummaryItem( parent ); + item = new KDGanttViewSummaryItem( tqparent ); else if( typeString == "Event" ) - item = new KDGanttViewEventItem( parent ); + item = new KDGanttViewEventItem( tqparent ); else { qDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" ); return 0; @@ -1702,24 +1702,24 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent, Creates a KDGanttViewItem according to the specification in a DOM element. - \param parent the parent item under which the item will be inserted + \param tqparent the tqparent item under which the item will be inserted \param previous to item behind this one should appear \param element the DOM element from which to read the specification \return the newly created element */ -KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent, +KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* tqparent, KDGanttViewItem* previous, - QDomElement& element ) + TQDomElement& element ) { - QString typeString = element.attribute( "Type" ); + TQString typeString = element.attribute( "Type" ); Q_ASSERT( !typeString.isEmpty() ); KDGanttViewItem* item; if( typeString == "Task" ) - item = new KDGanttViewTaskItem( parent, previous ); + item = new KDGanttViewTaskItem( tqparent, previous ); else if( typeString == "Summary" ) - item = new KDGanttViewSummaryItem( parent, previous ); + item = new KDGanttViewSummaryItem( tqparent, previous ); else if( typeString == "Event" ) - item = new KDGanttViewEventItem( parent, previous ); + item = new KDGanttViewEventItem( tqparent, previous ); else { qDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" ); return 0; @@ -1733,48 +1733,48 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent, /* Fills in the values in the item by reading the DOM element. */ -void KDGanttViewItem::loadFromDomElement( QDomElement& element ) +void KDGanttViewItem::loadFromDomElement( TQDomElement& element ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); Shape startShape = TriangleDown, middleShape = TriangleDown, endShape = TriangleDown; - QColor startColor, middleColor, endColor; - QColor startHighlightColor, middleHighlightColor, endHighlightColor; - QString tempName; + TQColor startColor, middleColor, endColor; + TQColor startHighlightColor, middleHighlightColor, endHighlightColor; + TQString tempName; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "StartTime" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) setStartTime( value ); } else if( tagName == "EndTime" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) setEndTime( value ); } else if( tagName == "Text" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setText( value ); } else if( tagName == "Font" ) { - QFont value; + TQFont value; if( KDGanttXML::readFontNode( element, value ) ) setFont( value ); } else if( tagName == "TooltipText" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setTooltipText( value ); } else if( tagName == "WhatsThisText" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setWhatsThisText( value ); } else if( tagName == "Pixmap" ) { - QPixmap value; + TQPixmap value; if( KDGanttXML::readPixmapNode( element, value ) ) setPixmap( value ); } else if( tagName == "ListViewText" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setListViewText( value ); } else if( tagName == "Open" ) { @@ -1786,64 +1786,64 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element ) if( KDGanttXML::readBoolNode( element, value ) ) setHighlight( value ); } else if( tagName == "StartShape" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = stringToShape( value ); } else if( tagName == "MiddleShape" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = stringToShape( value ); } else if( tagName == "EndShape" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = stringToShape( value ); } else if( tagName == "DefaultColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( value ); } else if( tagName == "StartColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "MiddleColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "EndColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else if( tagName == "DefaultHighlightColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( value ); } else if( tagName == "StartHighlightColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startHighlightColor = value; } else if( tagName == "MiddleHighlightColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleHighlightColor = value; } else if( tagName == "EndHighlightColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endHighlightColor = value; } else if( tagName == "TextColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setTextColor( value ); } else if( tagName == "Name" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) tempName = value; } else if( tagName == "Items" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); KDGanttViewItem* previous = 0; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Item" ) { KDGanttViewItem* newItem; if( previous ) @@ -1881,7 +1881,7 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element ) } -QString KDGanttViewItem::typeToString( Type type ) +TQString KDGanttViewItem::typeToString( Type type ) { switch( type ) { case Event: @@ -1942,13 +1942,13 @@ void KDGanttViewItem::showSubitemTree( int CoordY ) /*! - Returns the start time of the children of this item. + Returns the start time of the tqchildren of this item. - \return the start time of the children of this item + \return the start time of the tqchildren of this item */ -QDateTime KDGanttViewItem::myChildStartTime() +TQDateTime KDGanttViewItem::myChildStartTime() { - QDateTime ret, tempTime; + TQDateTime ret, tempTime; bool set = true; KDGanttViewItem* temp = (KDGanttViewItem*) firstChild(); if (temp) { @@ -1976,13 +1976,13 @@ QDateTime KDGanttViewItem::myChildStartTime() /*! - Returns the end time of the children of this item. + Returns the end time of the tqchildren of this item. - \return the end time of the children of this item + \return the end time of the tqchildren of this item */ -QDateTime KDGanttViewItem::myChildEndTime() +TQDateTime KDGanttViewItem::myChildEndTime() { - QDateTime ret, tempTime; + TQDateTime ret, tempTime; bool set = true; KDGanttViewItem* temp = (KDGanttViewItem*) firstChild(); if (temp) { @@ -2028,7 +2028,7 @@ bool KDGanttViewItem::showNoInformation() The height of the line is the height of the item. The brush of the line is specified by KDGanttView::setNoInformationBrush(). (i.e. the same brush for all items of the Gantt view). - The default brush is QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern ); + The default brush is TQBrush( TQColor ( 100,100,100 ), TQt::FDiagPattern ); \param show if true, the 'showNoInformation' line is shown for this item \sa showNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush() */ @@ -2042,12 +2042,12 @@ void KDGanttViewItem::setShowNoInformation( bool show ) /*! If the name of this item is \a name (i.e., listViewText() == name), the pointer to this item is returned. Otherwise, it looks for an - item with name \a name in the set of children and subchildren of + item with name \a name in the set of tqchildren and subtqchildren of this item. \param name the name of the item \return the pointer to the item with name \a name */ -KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name ) +KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name ) { if ( listViewText() == name ) return this; @@ -2062,7 +2062,7 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name ) /* -void KDGanttViewItem::printinfo( QString s ) +void KDGanttViewItem::printinfo( TQString s ) { KDGanttViewItem* temp = firstChild(); while (temp != 0) { @@ -2103,7 +2103,7 @@ int KDGanttViewItem::computeHeight() showItem( false ); if ( firstChild() ) firstChild()->hideSubtree(); - // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", QListViewItem::text(0).latin1()); + // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", TQListViewItem::text(0).latin1()); return 0; } @@ -2144,7 +2144,7 @@ int KDGanttViewItem::computeHeight() // display closed item as usual // if ( isOpen() ) { - //qDebug("KDGanttViewItem::computeHeight() %s is open ", QListViewItem::text(0).latin1()); + //qDebug("KDGanttViewItem::computeHeight() %s is open ", TQListViewItem::text(0).latin1()); temp = firstChild(); // if item opened, iterate over all subitems int tempHeight; @@ -2167,7 +2167,7 @@ int KDGanttViewItem::computeHeight() temp = temp->nextSibling(); } } else { // closed! - //qDebug("KDGanttViewItem::computeHeight() %s is closed ", QListViewItem::text(0).latin1()); + //qDebug("KDGanttViewItem::computeHeight() %s is closed ", TQListViewItem::text(0).latin1()); if ( !displaySubitemsAsGroup() ) { if ( firstChild() ) { @@ -2185,7 +2185,7 @@ int KDGanttViewItem::computeHeight() showItem( true ); hei += height(); - //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", QListViewItem::text(0).latin1(), hei); + //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", TQListViewItem::text(0).latin1(), hei); return hei; } @@ -2207,10 +2207,10 @@ bool KDGanttViewItem::showNoCross() } -void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg, +void KDGanttViewItem::paintBranches ( TQPainter* p, const TQColorGroup& cg, int w, int y, int h ) { - QListViewItem::paintBranches ( p, cg, w, y, h); + TQListViewItem::paintBranches ( p, cg, w, y, h); if ( !myGanttView->calendarMode() ) return; else { @@ -2222,11 +2222,11 @@ void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg, int hei = temp->height(); //qDebug(" y %d w %d h %d ", y,w,h); //qDebug("yc %d hei %d",y_coord,hei ); - myGanttView->myListView->paintemptyarea( p, QRect( 0,y+y_coord,w,hei)); + myGanttView->myListView->paintemptyarea( p, TQRect( 0,y+y_coord,w,hei)); int x_c = w/2; int y_c = y+y_coord+ temp->height ()/2; int y_ce ; - if ( temp->itemBelow() && temp->itemBelow()->parent() == this ) + if ( temp->itemBelow() && temp->itemBelow()->tqparent() == this ) y_ce =y+y_coord+ temp->height (); else y_ce = y_c; @@ -2253,11 +2253,11 @@ void KDGanttViewItem::resetSubitemVisibility() if ( myGanttView->calendarMode() ) { // in calendarmode only items can be opened which have subitems which have subitems if ( ! temp ) { - if ( !parent() ) - // has no parent, has no child : show! + if ( !tqparent() ) + // has no tqparent, has no child : show! setVisible( true ); else - // has parent, has no child : hide! + // has tqparent, has no child : hide! setVisible( false ); return; } @@ -2292,7 +2292,7 @@ void KDGanttViewItem::resetSubitemVisibility() In calendar mode, only those items can be opened which have subitems which have subitems. An item which has subitems which have no subitems is called a calendar. - I.e., an item that contains + I.e., an item that tqcontains multiple calendars can be opened, while a calendar item itself cannot. But if all calendars of an item do not have any subitem (e.g at startup), the program cannot detect automatically that it should be possible to open @@ -2363,37 +2363,37 @@ bool KDGanttViewItem::isCalendar( ) const /*! \var KDGanttViewItem::startShape - the shape at the beginning of the item + the tqshape at the beginning of the item */ /*! \var KDGanttViewItem::midShape - the shape in the middle of the item + the tqshape in the middle of the item */ /*! \var KDGanttViewItem::endShape - the shape at the end of the item + the tqshape at the end of the item */ /*! \var KDGanttViewItem::startShapeBack - the background shape at the beginning of the item + the background tqshape at the beginning of the item */ /*! \var KDGanttViewItem::midShapeBack - the background shape in the middle of the item + the background tqshape in the middle of the item */ /*! \var KDGanttViewItem::endShapeBack - the background shape at the end of the item + the background tqshape at the end of the item */ @@ -2463,16 +2463,16 @@ bool KDGanttViewItem::isCalendar( ) const /*! Returns the coordinate of this items middle left point */ -QPoint KDGanttViewItem::middleLeft() +TQPoint KDGanttViewItem::middleLeft() { - return QPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2); + return TQPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2); } /*! Returns the coordinate of this items middle right point */ -QPoint KDGanttViewItem::middleRight() +TQPoint KDGanttViewItem::middleRight() { - return QPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2); + return TQPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2); } /*! Moves this items text. @@ -2494,21 +2494,21 @@ void KDGanttViewItem::moveTextCanvas(int x, int y) */ void KDGanttViewItem::moveTextCanvas() { - QPoint m = myTextOffset+middleRight(); + TQPoint m = myTextOffset+middleRight(); textCanvas->move(m.x(), m.y()-myItemSize/2); } /*! Sets with how much the item text is offset. */ -void KDGanttViewItem::setTextOffset(QPoint p) +void KDGanttViewItem::setTextOffset(TQPoint p) { //qDebug("%s: setTextOffset() offset: %d,%d",listViewText(0).latin1(),p.x(),p.y()); myTextOffset.setX(p.x()); myTextOffset.setY(p.y()); } -bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc) +bool KDGanttViewItem::isMyTextCanvas(TQCanvasItem *tc) { return tc == textCanvas; } @@ -2522,8 +2522,8 @@ bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc) void KDGanttViewItem::setProgress(int percent) { - myProgress = QMAX(0, percent); - myProgress = QMIN(100, myProgress); + myProgress = TQMAX(0, percent); + myProgress = TQMIN(100, myProgress); } /*! @@ -2532,7 +2532,7 @@ void KDGanttViewItem::setProgress(int percent) \param start the float start time */ -void KDGanttViewItem::setFloatStartTime(const QDateTime &start) +void KDGanttViewItem::setFloatStartTime(const TQDateTime &start) { myFloatStartTime = start; } @@ -2543,7 +2543,7 @@ void KDGanttViewItem::setFloatStartTime(const QDateTime &start) \param end the float end time */ -void KDGanttViewItem::setFloatEndTime(const QDateTime &end) +void KDGanttViewItem::setFloatEndTime(const TQDateTime &end) { myFloatEndTime = end; } diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h index 51180f76..97f2ce44 100644 --- a/kdgantt/KDGanttViewItem.h +++ b/kdgantt/KDGanttViewItem.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. ** **********************************************************************/ @@ -36,15 +36,15 @@ #ifndef KDGANTTVIEWITEM_H #define KDGANTTVIEWITEM_H -#include <qdatetime.h> -#include <qstring.h> -#include <qcolor.h> -#include <qpixmap.h> -#include <qfont.h> -#include <qlistview.h> -#include <qcanvas.h> -#include <qdom.h> -#include <qdict.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqpixmap.h> +#include <tqfont.h> +#include <tqlistview.h> +#include <tqcanvas.h> +#include <tqdom.h> +#include <tqdict.h> class KDGanttView; class KDTimeTableWidget; @@ -55,7 +55,7 @@ class KDCanvasText; class KDCanvasPolygonItem; class KDGanttViewTaskLinkGroup; -class KDGanttViewItem : public QListViewItem +class KDGanttViewItem : public TQListViewItem { public: enum Type { Event, Task, Summary }; @@ -63,26 +63,26 @@ public: protected: KDGanttViewItem( Type type, KDGanttView* view, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewItem( Type type, KDGanttViewItem* parent, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewItem( Type type, KDGanttViewItem* tqparent, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); KDGanttViewItem( Type type, KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewItem( Type type, KDGanttViewItem* parent, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewItem( Type type, KDGanttViewItem* tqparent, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); //bool _isCalendar; bool isVisibleInGanttView; void updateCanvasItems(); int getCoordY(); - QDateTime myChildStartTime(); - QDateTime myChildEndTime(); - void generateAndInsertName( const QString& name ); + TQDateTime myChildStartTime(); + TQDateTime myChildEndTime(); + void generateAndInsertName( const TQString& name ); KDCanvasLine * startLine, *endLine, * startLineBack, *endLineBack, *actualEnd ; KDCanvasPolygonItem* startShape,* midShape, *endShape, *progressShape, @@ -90,16 +90,16 @@ protected: * floatStartShape, * floatEndShape; KDGanttView* myGanttView; KDCanvasText* textCanvas; - QString textCanvasText; - QDateTime myStartTime, myEndTime; + TQString textCanvasText; + TQDateTime myStartTime, myEndTime; bool isHighlighted, isEditable; int myItemSize; bool blockUpdating; void moveTextCanvas(int x, int y); int myProgress; - QDateTime myFloatStartTime; - QDateTime myFloatEndTime; + TQDateTime myFloatStartTime; + TQDateTime myFloatEndTime; public: virtual ~KDGanttViewItem(); @@ -118,25 +118,25 @@ public: bool displaySubitemsAsGroup() const; void setPriority( int prio ); int priority(); - virtual void setStartTime( const QDateTime& start ); - QDateTime startTime() const; - virtual void setEndTime( const QDateTime& end ); - QDateTime endTime() const; - - void setText( const QString& text ); - QString text() const; - void setListViewText( const QString& text, int column = 0 ); - void setListViewText( int column, const QString& text ); - QString listViewText( int column = 0 ) const; - void setFont( const QFont& font ); - QFont font() const; - void setTooltipText( const QString& text ); - QString tooltipText() const; - void setWhatsThisText( const QString& text ); - QString whatsThisText() const; - void setPixmap( int column, const QPixmap& pixmap ); - void setPixmap( const QPixmap& pixmap ); - const QPixmap* pixmap( int column = 0 ) const; + virtual void setStartTime( const TQDateTime& start ); + TQDateTime startTime() const; + virtual void setEndTime( const TQDateTime& end ); + TQDateTime endTime() const; + + void setText( const TQString& text ); + TQString text() const; + void setListViewText( const TQString& text, int column = 0 ); + void setListViewText( int column, const TQString& text ); + TQString listViewText( int column = 0 ) const; + void setFont( const TQFont& font ); + TQFont font() const; + void setTooltipText( const TQString& text ); + TQString tooltipText() const; + void setWhatsThisText( const TQString& text ); + TQString whatsThisText() const; + void setPixmap( int column, const TQPixmap& pixmap ); + void setPixmap( const TQPixmap& pixmap ); + const TQPixmap* pixmap( int column = 0 ) const; void setHighlight( bool ); bool highlight() const; @@ -146,45 +146,45 @@ public: //bool isCalendar( ) const; void setShapes( Shape start, Shape middle, Shape end ); - void shapes( Shape& start, Shape& middle, Shape& end ) const; - void setDefaultColor( const QColor& ); - QColor defaultColor() const; - void setColors( const QColor& start, const QColor& middle, - const QColor& end ); - void colors( QColor& start, QColor& middle, QColor& end ) const; - void setDefaultHighlightColor( const QColor& ); - QColor defaultHighlightColor() const; - void setHighlightColors( const QColor& start, const QColor& middle, - const QColor& end ); - void highlightColors( QColor& start, QColor& middle, QColor& end ) const; - void setTextColor( const QColor& color ); - QColor textColor() const; + void tqshapes( Shape& start, Shape& middle, Shape& end ) const; + void setDefaultColor( const TQColor& ); + TQColor defaultColor() const; + void setColors( const TQColor& start, const TQColor& middle, + const TQColor& end ); + void colors( TQColor& start, TQColor& middle, TQColor& end ) const; + void setDefaultHighlightColor( const TQColor& ); + TQColor defaultHighlightColor() const; + void setHighlightColors( const TQColor& start, const TQColor& middle, + const TQColor& end ); + void highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const; + void setTextColor( const TQColor& color ); + TQColor textColor() const; void setProgress(int percent); - void setFloatStartTime(const QDateTime &start); - void setFloatEndTime(const QDateTime &end); + void setFloatStartTime(const TQDateTime &start); + void setFloatEndTime(const TQDateTime &end); KDGanttViewItem* firstChild() const; KDGanttViewItem* nextSibling() const; - KDGanttViewItem* parent() const; + KDGanttViewItem* tqparent() const; KDGanttViewItem* itemAbove(); KDGanttViewItem* itemBelow( bool includeDisabled = true ); - KDGanttViewItem* getChildByName( const QString& name ); - QString name() const; - static KDGanttViewItem* find( const QString& name ); + KDGanttViewItem* getChildByName( const TQString& name ); + TQString name() const; + static KDGanttViewItem* tqfind( const TQString& name ); - void createNode( QDomDocument& doc, - QDomElement& parentElement ); + void createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ); static KDGanttViewItem* createFromDomElement( KDGanttView* view, - QDomElement& element ); + TQDomElement& element ); static KDGanttViewItem* createFromDomElement( KDGanttView* view, KDGanttViewItem* previous, - QDomElement& element ); - static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent, - QDomElement& element ); - static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent, + TQDomElement& element ); + static KDGanttViewItem* createFromDomElement( KDGanttViewItem* tqparent, + TQDomElement& element ); + static KDGanttViewItem* createFromDomElement( KDGanttViewItem* tqparent, KDGanttViewItem* previous, - QDomElement& element ); + TQDomElement& element ); private: friend class KDGanttView; friend class KDTimeTableWidget; @@ -196,9 +196,9 @@ private: friend class KDGanttViewItemDrag; friend class itemAttributeDialog; - static QString shapeToString( Shape shape ); - static Shape stringToShape( const QString& string ); - static QString typeToString( Type type ); + static TQString tqshapeToString( Shape tqshape ); + static Shape stringToShape( const TQString& string ); + static TQString typeToString( Type type ); Type myType; void initColorAndShapes(Type t); @@ -212,33 +212,33 @@ private: void setCallListViewOnSetOpen( bool call ); bool showNoCross(); void createShape(KDCanvasPolygonItem* &,KDCanvasPolygonItem* &, Shape); - void loadFromDomElement( QDomElement& element ); + void loadFromDomElement( TQDomElement& element ); - //QFont myFont; - QString myToolTipText,myWhatsThisText; - void paintBranches ( QPainter * p, const QColorGroup & cg, int w, int y, int h ); + //TQFont myFont; + TQString myToolTipText,myWhatsThisText; + void paintBranches ( TQPainter * p, const TQColorGroup & cg, int w, int y, int h ); bool _displaySubitemsAsGroup; bool _showNoInformation; bool _enabled; bool _callListViewOnSetOpen; Shape myStartShape,myMiddleShape,myEndShape; - QColor myStartColor,myMiddleColor,myEndColor; - QColor myStartColorHL,myMiddleColorHL,myEndColorHL; - QColor myDefaultColor,myDefaultColorHL; - QColor myTextColor; + TQColor myStartColor,myMiddleColor,myEndColor; + TQColor myStartColorHL,myMiddleColorHL,myEndColorHL; + TQColor myDefaultColor,myDefaultColorHL; + TQColor myTextColor; bool colorDefined,colorHLDefined; - QPoint getTaskLinkStartCoord(QPoint); - QPoint getTaskLinkEndCoord(); - QPoint middleLeft(); - QPoint middleRight(); + TQPoint getTaskLinkStartCoord(TQPoint); + TQPoint getTaskLinkEndCoord(); + TQPoint middleLeft(); + TQPoint middleRight(); void moveTextCanvas(); - void setTextOffset(QPoint p); - bool isMyTextCanvas(QCanvasItem *tc); - QPoint myTextOffset; - QString _name; - bool shapeDefined; + void setTextOffset(TQPoint p); + bool isMyTextCanvas(TQCanvasItem *tc); + TQPoint myTextOffset; + TQString _name; + bool tqshapeDefined; int _priority; - static QDict<KDGanttViewItem> sItemDict; + static TQDict<KDGanttViewItem> sItemDict; }; diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp index bbc62914..c73eff67 100644 --- a/kdgantt/KDGanttViewItemDrag.cpp +++ b/kdgantt/KDGanttViewItemDrag.cpp @@ -24,15 +24,15 @@ ** 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. ** **********************************************************************/ #include <KDGanttViewItemDrag.h> #include <KDGanttViewItem.h> -#include <qpixmap.h> +#include <tqpixmap.h> #include <KDGanttView.h> /*! @@ -54,28 +54,28 @@ \param source the source widget \param name the internal object name */ -KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , QWidget *source, const char * name ) : QStoredDrag("x-application/x-KDGanttViewItemDrag", source, name ) +KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *source, const char * name ) : TQStoredDrag("x-application/x-KDGanttViewItemDrag", source, name ) { myItem = item; - QPixmap pix; + TQPixmap pix; if (item->pixmap() ) pix = *(item->pixmap()) ; else { KDGanttViewItem::Shape start, middle, end; - item->shapes( start, middle, end ); - QColor st, mi, en; + item->tqshapes( start, middle, end ); + TQColor st, mi, en; item->colors( st, mi, en ); pix =item->myGanttView->getPixmap( start, st, item->myGanttView->lvBackgroundColor(), 11 ); } - setPixmap( pix , QPoint( -10,-10 )); - QDomDocument doc( "GanttView" ); - QString docstart = "<GanttView/>"; + setPixmap( pix , TQPoint( -10,-10 )); + TQDomDocument doc( "GanttView" ); + TQString docstart = "<GanttView/>"; doc.setContent( docstart ); - QDomElement itemsElement = doc.createElement( "Items" ); + TQDomElement itemsElement = doc.createElement( "Items" ); doc.documentElement().appendChild( itemsElement ); item->createNode( doc, itemsElement ); - QDataStream s( array, IO_WriteOnly ); + TQDataStream s( array, IO_WriteOnly ); s << doc.toString(); } @@ -86,13 +86,13 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , QWidget *sourc \param c the format of the data \return the encoded data of the drag object */ -QByteArray KDGanttViewItemDrag::encodedData( const char * c) const +TQByteArray KDGanttViewItemDrag::tqencodedData( const char * c) const { - QString s ( c ); + TQString s ( c ); if ( s == "x-application/x-KDGanttViewItemDrag" ) { return array; } - return QByteArray(); + return TQByteArray(); } /*! @@ -112,9 +112,9 @@ KDGanttViewItem* KDGanttViewItemDrag::getItem() \param e the mime source that has been dragged \return true if KDGanttViewItemDrag can decode the data in \a e. */ -bool KDGanttViewItemDrag::canDecode ( const QMimeSource * e ) +bool KDGanttViewItemDrag::canDecode ( const TQMimeSource * e ) { - if ( QString( e->format() ) == "x-application/x-KDGanttViewItemDrag" ) + if ( TQString( e->format() ) == "x-application/x-KDGanttViewItemDrag" ) return true; return false; @@ -129,11 +129,11 @@ bool KDGanttViewItemDrag::canDecode ( const QMimeSource * e ) \param string the resulting XML string \return true if the operation succeeded */ -bool KDGanttViewItemDrag::decode ( const QMimeSource * e , QString & string) +bool KDGanttViewItemDrag::decode ( const TQMimeSource * e , TQString & string) { - QByteArray arr; - arr = e->encodedData( "x-application/x-KDGanttViewItemDrag"); - QDataStream s( arr, IO_ReadOnly ); + TQByteArray arr; + arr = e->tqencodedData( "x-application/x-KDGanttViewItemDrag"); + TQDataStream s( arr, IO_ReadOnly ); s >> string; return true; } diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h index c017720e..a4d6cb6f 100644 --- a/kdgantt/KDGanttViewItemDrag.h +++ b/kdgantt/KDGanttViewItemDrag.h @@ -23,8 +23,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. ** **********************************************************************/ @@ -32,26 +32,26 @@ #ifndef KDGANTTVIEWITEMGRAG_H #define KDGANTTVIEWITEMGRAG_H -#include <qwidget.h> -#include <qcstring.h> -#include <qdragobject.h> +#include <tqwidget.h> +#include <tqcstring.h> +#include <tqdragobject.h> class KDGanttViewItem; -class KDGanttViewItemDrag :public QStoredDrag +class KDGanttViewItemDrag :public TQStoredDrag { public: - KDGanttViewItemDrag(KDGanttViewItem* item, QWidget *source, const char * name ) ; + KDGanttViewItemDrag(KDGanttViewItem* item, TQWidget *source, const char * name ) ; - QByteArray encodedData( const char * c) const; + TQByteArray tqencodedData( const char * c) const; KDGanttViewItem* getItem(); - static bool canDecode ( const QMimeSource * e ); - static bool decode ( const QMimeSource * e, QString & ); + static bool canDecode ( const TQMimeSource * e ); + static bool decode ( const TQMimeSource * e, TQString & ); protected: private: - QByteArray array; + TQByteArray array; KDGanttViewItem* myItem; }; diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp index 0760a70f..c07e1e6f 100644 --- a/kdgantt/KDGanttViewSubwidgets.cpp +++ b/kdgantt/KDGanttViewSubwidgets.cpp @@ -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. ** **********************************************************************/ @@ -41,43 +41,43 @@ #include "KDGanttViewSubwidgets.moc" #endif -#include <qlabel.h> -#include <qheader.h> -#include <qpainter.h> -#include <qrect.h> -#include <qtooltip.h> -#include <qapplication.h> -#include <qdrawutil.h> -#include <qpalette.h> -#include <qdragobject.h> -#include <qptrlist.h> -#include <qpen.h> +#include <tqlabel.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqtooltip.h> +#include <tqapplication.h> +#include <tqdrawutil.h> +#include <tqpalette.h> +#include <tqdragobject.h> +#include <tqptrlist.h> +#include <tqpen.h> #include <kglobal.h> #include <klocale.h> #include <kcalendarsystem.h> #include <kdebug.h> -KDTimeTableWidget:: KDTimeTableWidget( QWidget* parent,KDGanttView* myGantt) - : QCanvas (parent) +KDTimeTableWidget:: KDTimeTableWidget( TQWidget* tqparent,KDGanttView* myGantt) + : TQCanvas (TQT_TQOBJECT(tqparent)) { myGanttView = myGantt; taskLinksVisible = true; flag_blockUpdating = false; int_blockUpdating = 0; gridPen.setStyle(Qt::DotLine); - gridPen.setColor(QColor(100,100,100)); + gridPen.setColor(TQColor(100,100,100)); maximumComputedGridHeight = 0; denseLineCount = 0; - denseLineBrush = QBrush( QColor ( 240,240,240 )); - noInfoLineBrush = QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern ); + denseLineBrush = TQBrush( TQColor ( 240,240,240 )); + noInfoLineBrush = TQBrush( TQColor ( 100,100,100 ), TQt::FDiagPattern ); pendingHeight = 0; pendingWidth = 0; retune(256); resize(1,1); } -QPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks() +TQPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks() { return myTaskLinkList; } @@ -85,7 +85,7 @@ QPtrList<KDGanttViewTaskLink> KDTimeTableWidget::taskLinks() void KDTimeTableWidget::clearTaskLinks() { // cannot use clear() here, as tasklinks will remove themselves from my list when deleted! - QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); + TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); while (it.current()) { delete it.current(); } @@ -120,38 +120,38 @@ void KDTimeTableWidget::checkHeight( int hei ) } -void KDTimeTableWidget::setNoInformationBrush( const QBrush& brush ) +void KDTimeTableWidget::setNoInformationBrush( const TQBrush& brush ) { noInfoLineBrush = brush; updateMyContent(); } -QBrush KDTimeTableWidget::noInformationBrush() const +TQBrush KDTimeTableWidget::noInformationBrush() const { return noInfoLineBrush; } void KDTimeTableWidget::removeItemFromTasklinks( KDGanttViewItem* item) { - QPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList)); + TQPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList)); for ( ; it.current(); ++it ) { it.current()->removeItemFromList( item ); } } -void KDTimeTableWidget::expandItem( QListViewItem * item) +void KDTimeTableWidget::expandItem( TQListViewItem * item) { - item->invalidateHeight () ; - //qApp->processEvents(); + item->tqinvalidateHeight () ; + //tqApp->processEvents(); updateMyContent(); } -void KDTimeTableWidget::collapseItem( QListViewItem * item) +void KDTimeTableWidget::collapseItem( TQListViewItem * item) { - item->invalidateHeight () ; - //qApp->processEvents(); + item->tqinvalidateHeight () ; + //tqApp->processEvents(); updateMyContent(); } -void KDTimeTableWidget::highlightItem( QListViewItem * item ) +void KDTimeTableWidget::highlightItem( TQListViewItem * item ) { static bool itemwashighlighted; static KDGanttViewItem* highlightedItem = 0; @@ -160,7 +160,7 @@ void KDTimeTableWidget::highlightItem( QListViewItem * item ) highlightedItem = ( KDGanttViewItem*)item; itemwashighlighted = highlightedItem->highlight(); highlightedItem->setHighlight(true); - item->invalidateHeight () ; + item->tqinvalidateHeight () ; myGanttView->myListView->contentsY(); updateMyContent(); } @@ -203,15 +203,15 @@ void KDTimeTableWidget::computeVerticalGrid() wid = width(); KDCanvasLine* templine; KDCanvasRectangle* temprect; - QColor colcol; - QPen colPen; + TQColor colcol; + TQPen colPen; bool colorIterator = true; if (myGanttView->showMinorTicks()){//minor colPen.setWidth(cw); - QPtrListIterator<KDCanvasRectangle> itcol(columnColorList); - QPtrListIterator<KDCanvasLine> itgrid(verGridList); + TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList); + TQPtrListIterator<KDCanvasLine> itgrid(verGridList); for ( ; itgrid.current(); ++itgrid ) { if (i < wid) { itgrid.current()->setPoints(i,0,i,h); @@ -229,8 +229,8 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ - itcol.current()->setPen( QPen::NoPen ); - itcol.current()->setBrush( QBrush( colcol, SolidPattern) ); + itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); itcol.current()->show(); @@ -243,8 +243,8 @@ void KDTimeTableWidget::computeVerticalGrid() templine->setPoints(i+(cw/2),0,i+(cw/2),h); */ temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( QPen::NoPen ); - temprect->setBrush( QBrush( colcol, SolidPattern) ); + temprect->setPen( Qt::NoPen ); + temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); temprect->setZ(-20); @@ -275,16 +275,16 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ - itcol.current()->setPen( QPen::NoPen ); - itcol.current()->setBrush( QBrush( colcol, SolidPattern) ); + itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); itcol.current()->show(); ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( QPen::NoPen ); - temprect->setBrush( QBrush( colcol, SolidPattern) ); + temprect->setPen( Qt::NoPen ); + temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); temprect->setZ(-20); @@ -306,10 +306,10 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->hide(); } else {//major if (myGanttView->showMajorTicks()) { - QValueList<int>::iterator intIt = myGanttView->myTimeHeader->majorTicks.begin(); - QValueList<int>::iterator intItEnd = myGanttView->myTimeHeader->majorTicks.end(); - QPtrListIterator<KDCanvasRectangle> itcol(columnColorList); - QPtrListIterator<KDCanvasLine> itgrid(verGridList); + TQValueList<int>::iterator intIt = myGanttView->myTimeHeader->majorTicks.begin(); + TQValueList<int>::iterator intItEnd = myGanttView->myTimeHeader->majorTicks.end(); + TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList); + TQPtrListIterator<KDCanvasLine> itgrid(verGridList); int left = 0; for ( ; itgrid.current(); ++itgrid ) { if (intIt != intItEnd) { @@ -331,16 +331,16 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+mid,0,mid,h); */ - itcol.current()->setPen( QPen::NoPen ); - itcol.current()->setBrush( QBrush( colcol, SolidPattern) ); + itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); itcol.current()->show(); ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( QPen::NoPen ); - temprect->setBrush( QBrush( colcol, SolidPattern) ); + temprect->setPen( Qt::NoPen ); + temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(mid,h ); temprect->move( left, 0 ); temprect->setZ(-20); @@ -385,16 +385,16 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+mid,0,mid,h); */ - itcol.current()->setPen( QPen::NoPen ); - itcol.current()->setBrush( QBrush( colcol, SolidPattern) ); + itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); itcol.current()->show(); ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( QPen::NoPen ); - temprect->setBrush( QBrush( colcol, SolidPattern) ); + temprect->setPen( Qt::NoPen ); + temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(mid ,h ); temprect->move( left, 0 ); temprect->setZ(-20); @@ -420,11 +420,11 @@ void KDTimeTableWidget::computeVerticalGrid() } else { //hideall - QPtrListIterator<KDCanvasLine> itgrid(verGridList); + TQPtrListIterator<KDCanvasLine> itgrid(verGridList); for ( ; itgrid.current(); ++itgrid ) { itgrid.current()->hide(); } - QPtrListIterator<KDCanvasRectangle> itcol(columnColorList); + TQPtrListIterator<KDCanvasRectangle> itcol(columnColorList); for ( ; itcol.current(); ++itcol ) { itcol.current()->hide(); } @@ -442,7 +442,7 @@ void KDTimeTableWidget::computeHorizontalGrid() else wid = width(); KDCanvasLine* templine; - QPtrListIterator<KDCanvasLine> ithor(horGridList); + TQPtrListIterator<KDCanvasLine> ithor(horGridList); if ( ithor.current() ) { templine = ithor.current(); ++ithor; @@ -467,11 +467,11 @@ void KDTimeTableWidget::computeHorizontalGrid() templine->setZ(0); horGridList.append(templine); } - if ( templine->endPoint() != QPoint(wid,posY )) + if ( templine->endPoint() != TQPoint(wid,posY )) templine->setPoints(0,posY,wid,posY ); if ( !templine->isVisible() ) templine->show(); - //QString ts = "asGroup"; + //TQString ts = "asGroup"; //if (!temp->displaySubitemsAsGroup() ) // ts = " NOT asGroup"; //qDebug("temp name %s %s", temp->listViewText(0).latin1(), ts.latin1()); @@ -493,7 +493,7 @@ void KDTimeTableWidget::computeDenseLines() wid = pendingWidth; else wid = width(); - QPtrListIterator<KDCanvasRectangle> ithordense(horDenseList); + TQPtrListIterator<KDCanvasRectangle> ithordense(horDenseList); KDCanvasRectangle* denseLine; int tempDenseLineCount = 0; while ( temp ) { @@ -509,12 +509,12 @@ void KDTimeTableWidget::computeDenseLines() denseLine->setZ(-2); horDenseList.append( denseLine ); } - if ( denseLine->rect() != QRect(0, temp->itemPos(),wid, temp->height()) ) { + if ( denseLine->rect() != TQRect(0, temp->itemPos(),wid, temp->height()) ) { denseLine->move( 0, temp->itemPos() ); denseLine->setSize( wid, temp->height()); } if (denseLine->brush() != denseLineBrush ) { - denseLine->setPen( QPen( Qt::NoPen ) ); + denseLine->setPen( TQPen( TQt::NoPen ) ); denseLine->setBrush( denseLineBrush); } if (!denseLine->isVisible() ) @@ -541,7 +541,7 @@ void KDTimeTableWidget::computeShowNoInformation() wid = pendingWidth; else wid = width(); - QPtrListIterator<KDCanvasRectangle> itnoinfo(showNoInfoList); + TQPtrListIterator<KDCanvasRectangle> itnoinfo(showNoInfoList); KDCanvasRectangle* noInfoLine; while ( temp ) { if ( temp->showNoInformation() ) { @@ -555,7 +555,7 @@ void KDTimeTableWidget::computeShowNoInformation() } noInfoLine->move( 0, temp->itemPos() ); noInfoLine->setSize( wid, temp->height()); - noInfoLine->setPen( QPen( Qt::NoPen ) ); + noInfoLine->setPen( TQPen( TQt::NoPen ) ); noInfoLine->setBrush( noInfoLineBrush); noInfoLine->show(); } @@ -571,7 +571,7 @@ void KDTimeTableWidget::computeShowNoInformation() void KDTimeTableWidget::computeTaskLinks() { //compute and show tasklinks - QPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList)); + TQPtrListIterator<KDGanttViewTaskLink> it((myTaskLinkList)); for ( ; it.current(); ++it ) { if (it.current()->isVisible()) it.current()->showMe(true); @@ -620,7 +620,7 @@ void KDTimeTableWidget::updateMyContent() maximumComputedGridHeight = hei; // compute the background interval lines myGanttView->myTimeHeader->computeIntervals( hei ); - //compute VerticalGrid and column color + //computeQt::VerticalGrid and column color computeVerticalGrid(); } computeTaskLinks(); @@ -673,7 +673,7 @@ bool KDTimeTableWidget::showTaskLinks() { return taskLinksVisible; } -void KDTimeTableWidget::setHorBackgroundLines( int count, QBrush brush ) +void KDTimeTableWidget::setHorBackgroundLines( int count, TQBrush brush ) { denseLineBrush = brush; denseLineCount = 0; @@ -682,32 +682,32 @@ void KDTimeTableWidget::setHorBackgroundLines( int count, QBrush brush ) } -int KDTimeTableWidget::horBackgroundLines( QBrush& brush ) +int KDTimeTableWidget::horBackgroundLines( TQBrush& brush ) { brush = denseLineBrush; return denseLineCount; } -int KDTimeTableWidget::getCoordX( QDateTime dt ) { +int KDTimeTableWidget::getCoordX( TQDateTime dt ) { return myGanttView->myTimeHeader->getCoordX(dt); } /* *************************************************************** KDTimeHeaderWidget:: KDTimeHeaderWidget ***************************************************************** */ -KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant ) - : QWidget (parent) +KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* tqparent,KDGanttView* gant ) + : TQWidget (tqparent) { myToolTip = new KDTimeHeaderToolTip(this,this); mySizeHint = 0; myGanttView = gant; flagDoNotRecomputeAfterChange = true; - QDateTime start = (QDateTime::currentDateTime ()).addSecs(-3600); + TQDateTime start = (TQDateTime::tqcurrentDateTime ()).addSecs(-3600); setHorizonStart(start); setHorizonEnd( start.addSecs(3600*2)); flagStartTimeSet = false; flagEndTimeSet = false; - myCenterDateTime = QDateTime::currentDateTime (); + myCenterDateTime = TQDateTime::tqcurrentDateTime (); setScale(KDGanttView::Auto); //setScale(KDGanttView::Hour); myMaxScale = KDGanttView::Month; @@ -719,48 +719,48 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant ) setYearFormat(KDGanttView::FourDigit ); setHourFormat( KDGanttView::Hour_12 ); myZoomFactor = 1.0; - setWeekendBackgroundColor(QColor(220,220,220) ); + setWeekendBackgroundColor(TQColor(220,220,220) ); setWeekendDays( 6, 7 ); myGridMinorWidth = 0; - myPopupMenu = new QPopupMenu(this); - QPopupMenu * zoomPopupMenu = new QPopupMenu(this); + myPopupMenu = new TQPopupMenu(this); + TQPopupMenu * zoomPopupMenu = new TQPopupMenu(this); myPopupMenu->insertItem (i18n("Zoom"),zoomPopupMenu, 1); - zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, SLOT(setSettings(int)),0 ,21,21 ); - zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, SLOT(setSettings(int)),0 ,20,20 ); - zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, SLOT(setSettings(int)),0 ,22,22 ); - zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, SLOT(setSettings(int)),0 ,24,24 ); - zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, SLOT(setSettings(int)),0 ,26,26 ); - zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, SLOT(setSettings(int)),0 ,23,23 ); - zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, SLOT(setSettings(int)),0 ,25,25 ); - zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, SLOT(setSettings(int)),0 ,27,27 ); - scalePopupMenu = new QPopupMenu(this); + zoomPopupMenu->insertItem( i18n("Zoom to 100%"),this, TQT_SLOT(setSettings(int)),0 ,21,21 ); + zoomPopupMenu->insertItem( i18n("Zoom to Fit"),this, TQT_SLOT(setSettings(int)),0 ,20,20 ); + zoomPopupMenu->insertItem( i18n("Zoom In (x 2)"),this, TQT_SLOT(setSettings(int)),0 ,22,22 ); + zoomPopupMenu->insertItem( i18n("Zoom In (x 6)"),this, TQT_SLOT(setSettings(int)),0 ,24,24 ); + zoomPopupMenu->insertItem( i18n("Zoom In (x 12)"),this, TQT_SLOT(setSettings(int)),0 ,26,26 ); + zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/2)"),this, TQT_SLOT(setSettings(int)),0 ,23,23 ); + zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/6)"),this, TQT_SLOT(setSettings(int)),0 ,25,25 ); + zoomPopupMenu->insertItem( i18n("Zoom Out (x 1/12)"),this, TQT_SLOT(setSettings(int)),0 ,27,27 ); + scalePopupMenu = new TQPopupMenu(this); myPopupMenu->insertItem (i18n("Scale"),scalePopupMenu, 2); - scalePopupMenu->insertItem( i18n("Minute"),this, SLOT(setSettings(int)),0 ,1,1 ); - scalePopupMenu->insertItem( i18n("Hour"),this, SLOT(setSettings(int)),0 ,2,2 ); - scalePopupMenu->insertItem( i18n("Day"),this, SLOT(setSettings(int)),0 ,3,3 ); - scalePopupMenu->insertItem( i18n("Week"),this, SLOT(setSettings(int)),0 ,4,4 ); - scalePopupMenu->insertItem( i18n("Month"),this, SLOT(setSettings(int)),0 ,5,5 ); - scalePopupMenu->insertItem( i18n("Auto"),this, SLOT(setSettings(int)),0 ,6,6 ); + scalePopupMenu->insertItem( i18n("Minute"),this, TQT_SLOT(setSettings(int)),0 ,1,1 ); + scalePopupMenu->insertItem( i18n("Hour"),this, TQT_SLOT(setSettings(int)),0 ,2,2 ); + scalePopupMenu->insertItem( i18n("Day"),this, TQT_SLOT(setSettings(int)),0 ,3,3 ); + scalePopupMenu->insertItem( i18n("Week"),this, TQT_SLOT(setSettings(int)),0 ,4,4 ); + scalePopupMenu->insertItem( i18n("Month"),this, TQT_SLOT(setSettings(int)),0 ,5,5 ); + scalePopupMenu->insertItem( i18n("Auto"),this, TQT_SLOT(setSettings(int)),0 ,6,6 ); scalePopupMenu->setCheckable ( true ); - timePopupMenu = new QPopupMenu(this); + timePopupMenu = new TQPopupMenu(this); myPopupMenu->insertItem (i18n("Time Format"),timePopupMenu, 3); - timePopupMenu->insertItem( i18n("24 Hour"),this, SLOT(setSettings(int)),0 ,40,40 ); - timePopupMenu->insertItem( i18n("12 PM Hour"),this, SLOT(setSettings(int)),0 ,41,41 ); - timePopupMenu->insertItem( i18n("24:00 Hour"),this, SLOT(setSettings(int)),0 ,42,42 ); - yearPopupMenu = new QPopupMenu(this); + timePopupMenu->insertItem( i18n("24 Hour"),this, TQT_SLOT(setSettings(int)),0 ,40,40 ); + timePopupMenu->insertItem( i18n("12 PM Hour"),this, TQT_SLOT(setSettings(int)),0 ,41,41 ); + timePopupMenu->insertItem( i18n("24:00 Hour"),this, TQT_SLOT(setSettings(int)),0 ,42,42 ); + yearPopupMenu = new TQPopupMenu(this); myPopupMenu->insertItem (i18n("Year Format"),yearPopupMenu, 4); - yearPopupMenu->insertItem( i18n("Four Digit"),this, SLOT(setSettings(int)),0 ,50,50 ); - yearPopupMenu->insertItem( i18n("Two Digit"),this, SLOT(setSettings(int)),0 ,51,51 ); - yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, SLOT(setSettings(int)),0 ,52,52 ); - yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, SLOT(setSettings(int)),0 ,53,53 ); + yearPopupMenu->insertItem( i18n("Four Digit"),this, TQT_SLOT(setSettings(int)),0 ,50,50 ); + yearPopupMenu->insertItem( i18n("Two Digit"),this, TQT_SLOT(setSettings(int)),0 ,51,51 ); + yearPopupMenu->insertItem( i18n("Two Digit Apostrophe"),this, TQT_SLOT(setSettings(int)),0 ,52,52 ); + yearPopupMenu->insertItem( i18n("No Date on Minute/Hour Scale"),this, TQT_SLOT(setSettings(int)),0 ,53,53 ); - gridPopupMenu = new QPopupMenu(this); + gridPopupMenu = new TQPopupMenu(this); myPopupMenu->insertItem (i18n("Grid"),gridPopupMenu,5); - gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, SLOT(setSettings(int)),0 ,10,10 ); - gridPopupMenu->insertItem( i18n("Show Major Grid"),this, SLOT(setSettings(int)),0 ,11,11 ); - gridPopupMenu->insertItem( i18n("Show No Grid"),this, SLOT(setSettings(int)),0 ,12,12 ); - myPopupMenu->insertItem( i18n("Print"),this, SLOT(setSettings(int)),0 ,30,30 ); - connect(myPopupMenu, SIGNAL ( aboutToShow () ) , this, SLOT( preparePopupMenu() )) ; + gridPopupMenu->insertItem( i18n("Show Minor Grid"),this, TQT_SLOT(setSettings(int)),0 ,10,10 ); + gridPopupMenu->insertItem( i18n("Show Major Grid"),this, TQT_SLOT(setSettings(int)),0 ,11,11 ); + gridPopupMenu->insertItem( i18n("Show No Grid"),this, TQT_SLOT(setSettings(int)),0 ,12,12 ); + myPopupMenu->insertItem( i18n("Print"),this, TQT_SLOT(setSettings(int)),0 ,30,30 ); + connect(myPopupMenu, TQT_SIGNAL ( aboutToShow () ) , this, TQT_SLOT( preparePopupMenu() )) ; flagZoomToFit = false; setShowMinorTicks( true ); myRealEnd = myHorizonEnd; @@ -770,7 +770,7 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( QWidget* parent,KDGanttView* gant ) flagDoNotRepaintAfterChange = false; setShowPopupMenu(false,false,false,false,false,false,false); for (int j =1;j<8;++j) - weekdayColor[j] = Qt::white; + weekdayColor[j] = TQt::white; myMinimumWidth = 0; mouseDown = false; beginMouseDown = 0; @@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu() if (flagZoomToFit) myPopupMenu->changeItem( 1, i18n("Zoom (Fit)")); else - myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( QString::number( zoomFactor(), 'f',3) ) ); + myPopupMenu->changeItem( 1, i18n("Zoom (%1)").tqarg( TQString::number( zoomFactor(), 'f',3) ) ); int i = 0; int id; while ( ( id = scalePopupMenu->idAt( i++ )) >= 0 ) { @@ -822,7 +822,7 @@ void KDTimeHeaderWidget::preparePopupMenu() } -QString KDTimeHeaderWidget::getToolTipText(QPoint p) +TQString KDTimeHeaderWidget::getToolTipText(TQPoint p) { return KGlobal::locale()->formatDateTime(getDateTimeForIndex(p.x())); } @@ -830,14 +830,14 @@ void KDTimeHeaderWidget::addTickRight( int num ) { int secs = ((num*getTickTime())-30); setHorizonEnd(getDateTimeForIndex(width()).addSecs(secs)); - //qApp->processEvents(); + //tqApp->processEvents(); } void KDTimeHeaderWidget::addTickLeft( int num ) { int secs = ((num*getTickTime())-30); setHorizonStart(getDateTimeForIndex(0).addSecs(-secs)); - //qApp->processEvents(); + //tqApp->processEvents(); } // the time in secs of one minor grid tick int KDTimeHeaderWidget::getTickTime() @@ -860,7 +860,7 @@ void KDTimeHeaderWidget::checkWidth( int wid ) // Update (horizontal) scrollbar, // We probably come from an external resize and then we must // calculate on basis of myCanvasView. - // (NOTE: we have disconnected the auto QScrollView scrollbar update) + // (NOTE: we have disconnected the auto TQScrollView scrollbar update) if (myGanttView && myGanttView->myCanvasView) myGanttView->myCanvasView->updateScrollBars(); } @@ -868,9 +868,9 @@ void KDTimeHeaderWidget::checkWidth( int wid ) bool KDTimeHeaderWidget::registerStartTime() { - QListViewItemIterator it( myGanttView->myListView ); + TQListViewItemIterator it( myGanttView->myListView ); if (!flagStartTimeSet) { - QDateTime temp , time; + TQDateTime temp , time; KDGanttViewItem* item; bool setNewTime = false; item = (KDGanttViewItem*)myGanttView->myListView->firstChild(); @@ -916,14 +916,14 @@ bool KDTimeHeaderWidget::registerStartTime() bool KDTimeHeaderWidget::registerEndTime() { if (!flagEndTimeSet) { - QDateTime temp , time; + TQDateTime temp , time; KDGanttViewItem* item; bool setNewTime = false; item = (KDGanttViewItem*)myGanttView->myListView->firstChild(); if ( item ) { temp = item->startTime(); time = temp; - QListViewItemIterator it( myGanttView->myListView ); + TQListViewItemIterator it( myGanttView->myListView ); for ( ; it.current(); ++it ) { item = ( KDGanttViewItem* )it.current(); if (item->isVisibleInGanttView) { @@ -1094,9 +1094,9 @@ double KDTimeHeaderWidget::zoomFactor() { return myZoomFactor; } -double KDTimeHeaderWidget::secsFromTo( QDateTime begin, QDateTime end ) +double KDTimeHeaderWidget::secsFromTo( TQDateTime begin, TQDateTime end ) { - QDateTime temp; + TQDateTime temp; double secs, days; days = begin.daysTo(end); temp = begin.addDays((int) days); @@ -1106,7 +1106,7 @@ double KDTimeHeaderWidget::secsFromTo( QDateTime begin, QDateTime end ) } -void KDTimeHeaderWidget::zoomToSelection( QDateTime start, QDateTime end) +void KDTimeHeaderWidget::zoomToSelection( TQDateTime start, TQDateTime end) { if (start < myHorizonStart) { myHorizonStart = start; @@ -1140,7 +1140,7 @@ void KDTimeHeaderWidget::zoomToSelection( QDateTime start, QDateTime end) } flagDoNotRepaintAfterChange = false; updateTimeTable(); - repaint(); + tqrepaint(); moveTimeLineTo((getCoordX(start)-(viewWid-timeWid)/2)); // Since we have disconnected autoupdate of scrollbars, we must do it ourselves if (myGanttView && myGanttView->myCanvasView) @@ -1189,7 +1189,7 @@ void KDTimeHeaderWidget::zoom(double factor, bool absolute) \param start the start of the horizon \sa horizonStart() */ -void KDTimeHeaderWidget::setHorizonStart( const QDateTime& start ) +void KDTimeHeaderWidget::setHorizonStart( const TQDateTime& start ) { myHorizonStart = start; flagStartTimeSet = true; @@ -1203,7 +1203,7 @@ void KDTimeHeaderWidget::setHorizonStart( const QDateTime& start ) \return the start of the horizon of the Gantt chart \sa setHorizonStart() */ -QDateTime KDTimeHeaderWidget::horizonStart() const +TQDateTime KDTimeHeaderWidget::horizonStart() const { return myHorizonStart; } @@ -1216,7 +1216,7 @@ QDateTime KDTimeHeaderWidget::horizonStart() const \param end the end of the horizon \sa setHorizonEnd() */ -void KDTimeHeaderWidget::setHorizonEnd( const QDateTime& start ) +void KDTimeHeaderWidget::setHorizonEnd( const TQDateTime& start ) { myHorizonEnd = start; flagEndTimeSet = true; @@ -1231,7 +1231,7 @@ void KDTimeHeaderWidget::setHorizonEnd( const QDateTime& start ) \return the end of the horizon of the Gantt chart \sa setHorizonEnd() */ -QDateTime KDTimeHeaderWidget::horizonEnd() const +TQDateTime KDTimeHeaderWidget::horizonEnd() const { return myHorizonEnd; } @@ -1436,7 +1436,7 @@ void KDTimeHeaderWidget::setShowMinorTicks( bool show ) flagShowMinorTicks = show; if (show) setShowMajorTicks(false ); - //repaintMe(); + //tqrepaintMe(); updateTimeTable(); } @@ -1461,8 +1461,8 @@ bool KDTimeHeaderWidget::showMinorTicks() const \sa columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -void KDTimeHeaderWidget::setColumnBackgroundColor( const QDateTime& column, - const QColor& color, +void KDTimeHeaderWidget::setColumnBackgroundColor( const TQDateTime& column, + const TQColor& color, Scale mini, Scale maxi ) { ColumnColorList::iterator it; @@ -1494,15 +1494,15 @@ void KDTimeHeaderWidget::computeIntervals( int height ) right = getCoordX((*it).end); if ( right == left ) ++right; - (*it).canvasRect->setPen( QPen::NoPen ); - (*it).canvasRect->setBrush( QBrush( (*it).color, SolidPattern) ); + (*it).canvasRect->setPen( Qt::NoPen ); + (*it).canvasRect->setBrush( TQBrush( (*it).color, SolidPattern) ); (*it).canvasRect->setSize( right - left ,height ); (*it).canvasRect->move( left,0 ); (*it).canvasRect->show(); } else { (*it).canvasRect->hide(); /* - (*it).canvasLine->setPen( QPen( (*it).color, right - left ) ); + (*it).canvasLine->setPen( TQPen( (*it).color, right - left ) ); (*it).canvasLine->setPoints( mid ,0 ,mid ,height ); (*it).canvasLine->show(); } else { @@ -1511,10 +1511,10 @@ void KDTimeHeaderWidget::computeIntervals( int height ) } } } -bool KDTimeHeaderWidget::changeBackgroundInterval( const QDateTime& oldstart, - const QDateTime& oldend, - const QDateTime& newstart, - const QDateTime& newend ) +bool KDTimeHeaderWidget::changeBackgroundInterval( const TQDateTime& oldstart, + const TQDateTime& oldend, + const TQDateTime& newstart, + const TQDateTime& newend ) { IntervalColorList::iterator it; for ( it = icList.begin(); it != icList.end(); ++it ) { @@ -1532,8 +1532,8 @@ bool KDTimeHeaderWidget::changeBackgroundInterval( const QDateTime& oldstart, } return false; } -bool KDTimeHeaderWidget::deleteBackgroundInterval( const QDateTime& start, - const QDateTime& end) +bool KDTimeHeaderWidget::deleteBackgroundInterval( const TQDateTime& start, + const TQDateTime& end) { IntervalColorList::iterator it; for ( it = icList.begin(); it != icList.end(); ++it ) { @@ -1548,9 +1548,9 @@ bool KDTimeHeaderWidget::deleteBackgroundInterval( const QDateTime& start, return false; } -void KDTimeHeaderWidget::setIntervalBackgroundColor( const QDateTime& start, - const QDateTime& end, - const QColor& color, +void KDTimeHeaderWidget::setIntervalBackgroundColor( const TQDateTime& start, + const TQDateTime& end, + const TQColor& color, Scale mini , Scale maxi ) { @@ -1593,11 +1593,11 @@ void KDTimeHeaderWidget::clearBackgroundColor() icList.clear(); updateTimeTable(); } -QDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local ) +TQDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local ) { int coordX = X; if ( !local ) { - QPoint p = QPoint ( X, 1 ); + TQPoint p = TQPoint ( X, 1 ); coordX = myGanttView->myTimeHeaderScroll->viewportToContents(myGanttView->myTimeHeaderScroll->mapFromGlobal( p )).x(); } @@ -1614,11 +1614,11 @@ QDateTime KDTimeHeaderWidget::getDateTimeForIndex(int X, bool local ) // *none* get weekend color (haven't figured out why) // Proposal: Only use weekend color if the whole column is a weekend. // Alt: Color the area that actually is the weekend. -bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh) +bool KDTimeHeaderWidget::getColumnColor(TQColor& col,int coordLow, int coordHigh) { if (!flagShowMajorTicks && !flagShowMinorTicks) return false; - QDateTime start,end; + TQDateTime start,end; start = getDateTimeForIndex(coordLow); end = getDateTimeForIndex(coordHigh).addSecs(-1); Scale tempScale = myRealScale; @@ -1648,7 +1648,7 @@ bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh) start = getDateTimeForIndex((coordLow+coordHigh)/2); int day = start.date().dayOfWeek (); //checkweekdaycolor - if (weekdayColor[day] != Qt::white) { + if (weekdayColor[day] != TQt::white) { col = weekdayColor[day]; return true; } @@ -1675,9 +1675,9 @@ bool KDTimeHeaderWidget::getColumnColor(QColor& col,int coordLow, int coordHigh) \sa setColumnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -QColor KDTimeHeaderWidget::columnBackgroundColor( const QDateTime& column ) const +TQColor KDTimeHeaderWidget::columnBackgroundColor( const TQDateTime& column ) const { - QColor c; + TQColor c; c = white; ColumnColorList::const_iterator ite; for ( ite = ccList.begin(); ite != ccList.end(); ++ite ) { @@ -1697,7 +1697,7 @@ QColor KDTimeHeaderWidget::columnBackgroundColor( const QDateTime& column ) cons \param color the background color to use for weekend days. \sa weekendBackgroundColor(), setWeekendDays(), weekendDays() */ -void KDTimeHeaderWidget::setWeekendBackgroundColor( const QColor& color ) +void KDTimeHeaderWidget::setWeekendBackgroundColor( const TQColor& color ) { myWeekendBackgroundColor = color ; updateTimeTable(); @@ -1710,7 +1710,7 @@ void KDTimeHeaderWidget::setWeekendBackgroundColor( const QColor& color ) \return the background color for weekend days \sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays() */ -QColor KDTimeHeaderWidget::weekendBackgroundColor() const +TQColor KDTimeHeaderWidget::weekendBackgroundColor() const { return myWeekendBackgroundColor; } @@ -1725,7 +1725,7 @@ QColor KDTimeHeaderWidget::weekendBackgroundColor() const \param weekday the day of the week (Monday = 1, Sunday = 7) \sa weekendBackgroundColor(), setWeekendDays(), weekendDays() */ -void KDTimeHeaderWidget::setWeekdayBackgroundColor( const QColor& color, int weekday ) +void KDTimeHeaderWidget::setWeekdayBackgroundColor( const TQColor& color, int weekday ) { weekdayColor[weekday] = color; updateTimeTable(); @@ -1739,7 +1739,7 @@ void KDTimeHeaderWidget::setWeekdayBackgroundColor( const QColor& color, int we \return the background color for weekend days \sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays() */ -QColor KDTimeHeaderWidget::weekdayBackgroundColor(int weekday) const +TQColor KDTimeHeaderWidget::weekdayBackgroundColor(int weekday) const { return weekdayColor[weekday]; } @@ -1829,7 +1829,7 @@ int KDTimeHeaderWidget::minorScaleCount() const } -void KDTimeHeaderWidget::resizeEvent ( QResizeEvent * ) +void KDTimeHeaderWidget::resizeEvent ( TQResizeEvent * ) { // qDebug("KDTimeHeaderWidget:: resizeEvent "); paintPix.resize( 800, height () ); @@ -1843,7 +1843,7 @@ void KDTimeHeaderWidget::updateTimeTable() // setting the scrolling steps int scrollLineStep = myGridMinorWidth; if (showMajorTicks()) { - QValueList<int>::iterator intIt = majorTicks.begin(); + TQValueList<int>::iterator intIt = majorTicks.begin(); scrollLineStep = 5 * myGridMinorWidth; if (intIt != majorTicks.end()) { int left = *intIt; @@ -1873,22 +1873,22 @@ int KDTimeHeaderWidget::autoScaleMinorTickCount() } -void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter) +void KDTimeHeaderWidget::tqrepaintMe(int left,int paintwid, TQPainter* painter) { if (flagDoNotRecomputeAfterChange) return; - QColorGroup qcg =QColorGroup( white, black,white, darkGray,black,gray,gray) ; - QPainter* p; + TQColorGroup qcg =TQColorGroup( white, black,white, darkGray,black,gray,gray) ; + TQPainter* p; int offsetLeft = 0; if ( paintwid > paintPix.width()-100 ) paintPix.resize( paintwid+100, height () ); if ( painter ) p = painter; else { - p = new QPainter( &paintPix ); + p = new TQPainter( &paintPix ); offsetLeft = left-50; } if ( mouseDown ) { - p->fillRect( left-offsetLeft, 0, paintwid, height(), QBrush(paletteBackgroundColor()) ); + p->fillRect( left-offsetLeft, 0, paintwid, height(), TQBrush(paletteBackgroundColor()) ); int start ; int wid; if ( beginMouseDown < endMouseDown ) { @@ -1898,13 +1898,13 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter) start = endMouseDown ; wid = -endMouseDown + beginMouseDown ; } - p->fillRect( start-offsetLeft, 0, wid, height(), QBrush(paletteBackgroundColor().dark()) ); + p->fillRect( start-offsetLeft, 0, wid, height(), TQBrush(paletteBackgroundColor().dark()) ); } else { if (! painter ) - p->fillRect( left-offsetLeft, 0, paintwid, height(), QBrush(paletteBackgroundColor()) ); + p->fillRect( left-offsetLeft, 0, paintwid, height(), TQBrush(paletteBackgroundColor()) ); } - p->setPen(QColor(40,40,40)); - QFont tempFont = p->font(); + p->setPen(TQColor(40,40,40)); + TQFont tempFont = p->font(); tempFont.setWeight(63); p->setFont(tempFont); int hei1 = myMajorGridHeight, @@ -1913,8 +1913,8 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter) int xCoord; int lwid = 1; - QValueList<QString>::iterator it; - QValueList<int>::iterator intIt = majorTicks.begin(); + TQValueList<TQString>::iterator it; + TQValueList<int>::iterator intIt = majorTicks.begin(); for ( it = majorText.begin(); it != majorText.end(); ++it ) { xCoord = (*intIt++); if (((*intIt)>= left && xCoord <= left+paintwid)) { @@ -1927,7 +1927,7 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter) for ( it = minorText.begin(); it != minorText.end(); ++it ) { if (i*wid1 >= left-wid1 && i*wid1 <= left+paintwid) { qDrawShadeLine ( p,i*wid1-offsetLeft ,hei1-1, i*wid1-offsetLeft, hei2, qcg, true, lwid, 1 ); - p->drawText(i*wid1+1-offsetLeft,hei1+1,wid1-1,hei2-hei1,Qt::AlignCenter,(*it)); + p->drawText(i*wid1+1-offsetLeft,hei1+1,wid1-1,hei2-hei1,TQt::AlignCenter,(*it)); } ++i; } @@ -1945,9 +1945,9 @@ void KDTimeHeaderWidget::repaintMe(int left,int paintwid, QPainter* painter) // cuts the secs in the DateTime if scale is Minute , // the minutes and secs if scale is Hour and so on -QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc) +TQDateTime KDTimeHeaderWidget::getEvenTimeDate(TQDateTime tempdatetime ,Scale sc) { - QDate tempdate; + TQDate tempdate; int min, hour; int tempMinorScaleCount = myRealMinorScaleCount; switch (sc) @@ -1958,24 +1958,24 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc) tempdate = tempdate.addDays(-1); //while (tempdate.month ()!= 1 ) //tempdate = tempdate.addMonths(-1); - tempdatetime = QDateTime (tempdate, QTime (0,0)); + tempdatetime = TQDateTime (tempdate, TQTime (0,0)); break; case KDGanttView::Week: tempdate = tempdatetime.date(); while (tempdate.dayOfWeek ()!= KGlobal::locale()->weekStartDay()) tempdate = tempdate.addDays(-1); //tempdate = tempdate.addDays(-7); - tempdatetime = QDateTime (tempdate, QTime (0,0)); + tempdatetime = TQDateTime (tempdate, TQTime (0,0)); break; case KDGanttView::Day: - tempdatetime = QDateTime (tempdatetime.date(), QTime ( 0,0 ) ); + tempdatetime = TQDateTime (tempdatetime.date(), TQTime ( 0,0 ) ); break; case KDGanttView::Hour: hour = tempdatetime.time().hour(); while (24%tempMinorScaleCount > 0 && 24%tempMinorScaleCount < 24) ++tempMinorScaleCount; hour = ( hour /tempMinorScaleCount)*tempMinorScaleCount; - tempdatetime = QDateTime (tempdatetime.date(), QTime (hour, 0 )); + tempdatetime = TQDateTime (tempdatetime.date(), TQTime (hour, 0 )); break; case KDGanttView::Minute: min = tempdatetime.time().minute(); @@ -1983,7 +1983,7 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc) ++tempMinorScaleCount; // qDebug("myMinorScaleCount %d %d %d",myMinorScaleCount, myRealMinorScaleCount, tempMinorScaleCount); min = (min /tempMinorScaleCount)*tempMinorScaleCount; - tempdatetime = QDateTime (tempdatetime.date(), QTime (tempdatetime.time().hour(),min )); + tempdatetime = TQDateTime (tempdatetime.date(), TQTime (tempdatetime.time().hour(),min )); break; case KDGanttView::Auto: @@ -1993,7 +1993,7 @@ QDateTime KDTimeHeaderWidget::getEvenTimeDate(QDateTime tempdatetime ,Scale sc) } -void KDTimeHeaderWidget::computeRealScale(QDateTime start) +void KDTimeHeaderWidget::computeRealScale(TQDateTime start) { if (myScale ==KDGanttView::Auto) { @@ -2095,11 +2095,11 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) int minorItems,minorPerMajor = 1; minorItems = (int) (secsFromTo( myRealStart, myHorizonEnd)/60.0); //qDebug("tempMinorScaleCount %d ", tempMinorScaleCount); - QPainter p(this); + TQPainter p(this); int Width, Height; - QString testTextMinor,testTextMajor, tempStr; - QRect itemRectMinor, itemRectMajor; - QDate tempDate = myRealStart.date(); + TQString testTextMinor,testTextMajor, tempStr; + TQRect tqitemRectMinor, tqitemRectMajor; + TQDate tempDate = myRealStart.date(); myRealEnd = myRealStart; // preparing the testtext for the differennt scales switch (myRealScale) @@ -2121,25 +2121,25 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) testTextMinor = "12 AM"; testTextMajor = "Mon Aug 30, x"; if ( yearFormat() != KDGanttView::NoDate ) - testTextMajor += getYear(QDate::currentDate()); + testTextMajor += getYear(TQDate::tqcurrentDate()); minorPerMajor = 2400; break; case KDGanttView::Day: minorItems = minorItems/(60*24); testTextMinor = "88"; - testTextMajor = "Aug 30, x"+getYear(QDate::currentDate()); + testTextMajor = "Aug 30, x"+getYear(TQDate::tqcurrentDate()); minorPerMajor = 700; break; case KDGanttView::Week: minorItems = minorItems/(60*24*7); testTextMinor = "88"; - testTextMajor = "Aug x"+getYear(QDate::currentDate()); + testTextMajor = "Aug x"+getYear(TQDate::tqcurrentDate()); minorPerMajor = 435; // 435 = 365days/12months/7days * 100 break; case KDGanttView::Month: minorItems = (minorItems*12)/(60*24*365); testTextMinor = "M"; - testTextMajor = "x"+getYear(QDate::currentDate()); + testTextMajor = "x"+getYear(TQDate::tqcurrentDate()); minorPerMajor = 1200; break; case KDGanttView::Auto: @@ -2147,12 +2147,12 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) qDebug(" RealScale == Auto : This may not be! "); break; } - itemRectMinor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMinor); - itemRectMajor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMajor); + tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor); + tqitemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor); p.end(); //qDebug(" tempMinorScaleCount %d ", tempMinorScaleCount); - Height = itemRectMinor.height()+itemRectMajor.height()+11; - Width = (itemRectMinor.width()+5); + Height = tqitemRectMinor.height()+tqitemRectMajor.height()+11; + Width = (tqitemRectMinor.width()+5); if (Width < minimumColumnWidth()) Width = minimumColumnWidth(); // if the desired width is greater than the maximum width of this widget // increase the minorscalecount @@ -2209,7 +2209,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) // checking, if enough space for majorscale // if not, increasing MajorScaleCount - while ((minorPerMajor*Width)/100 < itemRectMajor.width()) { + while ((minorPerMajor*Width)/100 < tqitemRectMajor.width()) { minorPerMajor = minorPerMajor/tempMajorScaleCount; ++tempMajorScaleCount; minorPerMajor = minorPerMajor*tempMajorScaleCount; @@ -2219,15 +2219,15 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) myGridMinorWidth = Width; // the width of this widget is the gridwidth * the amount of items Width *= minorItems; - // if size changed, reset geometry + // if size changed, reset tqgeometry if (width() != Width || height() != Height ) { resize( Width, Height ); emit sizeChanged( Width ); } - myMajorGridHeight = itemRectMajor.height()+5; - QTime tempTime = myRealStart.time(); - QDateTime tempDateTime; + myMajorGridHeight = tqitemRectMajor.height()+5; + TQTime tempTime = myRealStart.time(); + TQDateTime tempDateTime; int i; const KCalendarSystem * calendar = KGlobal::locale()->calendar(); switch (myRealScale) @@ -2292,7 +2292,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) if (tempMinorScaleCount == 1) minorText.append((calendar->weekDayName(tempDate, true)).left(1)); //TODO: BIDI else - minorText.append(QString::number(tempDate.day())); + minorText.append(TQString::number(tempDate.day())); tempDate = tempDate.addDays(tempMinorScaleCount); } tempDate = myRealStart.date(); @@ -2355,7 +2355,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) myGanttView->myTimeTable->setBlockUpdating( block ); updateTimeTable(); centerDateTime(myCenterDateTime); - repaint(); + tqrepaint(); } @@ -2373,7 +2373,7 @@ void KDTimeHeaderWidget::saveCenterDateTime() } -void KDTimeHeaderWidget::centerDateTime( const QDateTime& center ) +void KDTimeHeaderWidget::centerDateTime( const TQDateTime& center ) { moveTimeLineTo(getCoordX( center )-(myGanttView->myCanvasView->viewport()->width() /2)); // qDebug("centerDateTime %s %d %d", center.toString().latin1(),getCoordX( center ),(myGanttView->myCanvasView->viewport()->width() /2) ); @@ -2381,23 +2381,23 @@ void KDTimeHeaderWidget::centerDateTime( const QDateTime& center ) } -void KDTimeHeaderWidget::paintEvent(QPaintEvent *p) +void KDTimeHeaderWidget::paintEvent(TQPaintEvent *p) { - repaintMe(p->rect().x(),p->rect().width()); + tqrepaintMe(p->rect().x(),p->rect().width()); } -int KDTimeHeaderWidget::getCoordX(QDate date) +int KDTimeHeaderWidget::getCoordX(TQDate date) { int wid = width(); int daysAll = myRealStart.daysTo(myRealEnd); if (daysAll == 0) return 0; - int days = myRealStart.daysTo(QDateTime(date)); + int days = myRealStart.daysTo(TQDateTime(date)); return (wid *days) /daysAll; } -int KDTimeHeaderWidget::getCoordX(QDateTime datetime) +int KDTimeHeaderWidget::getCoordX(TQDateTime datetime) { double wid = width(); double secsAll = secsFromTo( myRealStart, myRealEnd ); @@ -2407,9 +2407,9 @@ int KDTimeHeaderWidget::getCoordX(QDateTime datetime) } -QString KDTimeHeaderWidget::getYear(QDate date) +TQString KDTimeHeaderWidget::getYear(TQDate date) { - QString ret; + TQString ret; ret.setNum(date.year()); switch (yearFormat()) { case KDGanttView::FourDigit: @@ -2429,9 +2429,9 @@ QString KDTimeHeaderWidget::getYear(QDate date) } -QString KDTimeHeaderWidget::getHour(QTime time) +TQString KDTimeHeaderWidget::getHour(TQTime time) { - QString ret; + TQString ret; int hour = time.hour(); if (myHourFormat == KDGanttView::Hour_12) { if (hour >= 12) { @@ -2455,20 +2455,20 @@ QString KDTimeHeaderWidget::getHour(QTime time) } -void KDTimeHeaderWidget::mousePressEvent ( QMouseEvent * e ) +void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e ) { mouseDown = false; switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: mouseDown = true; beginMouseDown = e->pos().x(); endMouseDown = e->pos().x(); break; - case RightButton: + case Qt::RightButton: if (flagShowPopupMenu) myPopupMenu->popup(e->globalPos()); break; - case MidButton: + case Qt::MidButton: break; default: break; @@ -2477,7 +2477,7 @@ void KDTimeHeaderWidget::mousePressEvent ( QMouseEvent * e ) } -void KDTimeHeaderWidget::mouseReleaseEvent ( QMouseEvent * ) +void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * ) { if ( mouseDown ) { mouseDown = false; @@ -2501,26 +2501,26 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( QMouseEvent * ) //zoomToSelection( getDateTimeForIndex(start),getDateTimeForIndex(end) ); } mouseDown = false; - repaint(); + tqrepaint(); } -void KDTimeHeaderWidget::mouseDoubleClickEvent ( QMouseEvent * ) +void KDTimeHeaderWidget::mouseDoubleClickEvent ( TQMouseEvent * ) { } -void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e ) +void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e ) { if ( mouseDown ) { if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) { mouseDown = false; - repaint(); + tqrepaint(); return; } endMouseDown = e->pos().x(); - //repaint; + //tqrepaint; int val = -1; if (endMouseDown < -x() ) { val = myGanttView->myCanvasView->horizontalScrollBar()->value() - @@ -2529,19 +2529,19 @@ void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e ) val = 0; } } - if (endMouseDown > -x() +parentWidget()->width() ) { + if (endMouseDown > -x() +tqparentWidget()->width() ) { val = myGanttView->myCanvasView->horizontalScrollBar()->value() + myGanttView->myCanvasView->horizontalScrollBar()->lineStep(); } - repaintMe(-x(),parentWidget()->width()); + tqrepaintMe(-x(),tqparentWidget()->width()); if ( val > -1 ) { if ( val > myGanttView->myCanvasView->horizontalScrollBar()->maxValue() ) { val = myGanttView->myCanvasView->horizontalScrollBar()->maxValue(); } myGanttView->myCanvasView->horizontalScrollBar()->setValue( val ); } - //qDebug("mousemove %d %d %d %d",endMouseDown, -x(),parentWidget()->width() , e->pos().y()); + //qDebug("mousemove %d %d %d %d",endMouseDown, -x(),tqparentWidget()->width() , e->pos().y()); } } @@ -2549,17 +2549,17 @@ void KDTimeHeaderWidget::mouseMoveEvent ( QMouseEvent * e ) /* *************************************************************** KDLegendWidget:: KDLegendWidget ***************************************************************** */ -KDLegendWidget:: KDLegendWidget( QWidget* parent, +KDLegendWidget:: KDLegendWidget( TQWidget* tqparent, KDGanttMinimizeSplitter* legendParent ) : - KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Vertical, - parent) + KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before,Qt::Vertical, + tqparent) { myLegendParent = legendParent; dock = 0; - scroll = new QScrollView( legendParent ); + scroll = new TQScrollView( legendParent ); setMaximizedWidget( scroll ); - setMinimizedWidget( myLabel = new QLabel( i18n( " Legend is hidden" ), this) ); + setMinimizedWidget( myLabel = new TQLabel( i18n( " Legend is hidden" ), this) ); setGeometry( 0, 0, 50, 50 ); myLegend = 0; clearLegend(); @@ -2574,7 +2574,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin ) setMaximizedWidget( 0 ); showMe ( false ); if ( dock ) delete dock; - dock = new QDockWindow(QDockWindow:: OutsideDock,0 ); + dock = new TQDockWindow(TQDockWindow:: OutsideDock,0 ); dock->resize( 200, 100 ); dock->setHorizontallyStretchable( true ); dock->setVerticallyStretchable( true ); @@ -2583,7 +2583,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin ) delete myLegend; myLegend = 0; delete scroll; - scroll = new QScrollView( dock ); + scroll = new TQScrollView( dock ); clearLegend(); dock->setWidget(scroll); setMaximizedWidget( dock ); @@ -2597,7 +2597,7 @@ void KDLegendWidget::setAsDockwindow( bool dockwin ) delete scroll; delete dock; dock = 0; - scroll = new QScrollView( myLegendParent ); + scroll = new TQScrollView( myLegendParent ); clearLegend(); setMaximizedWidget( scroll ); showMe ( false ); @@ -2614,36 +2614,36 @@ bool KDLegendWidget::asDockwindow( ) } -QDockWindow* KDLegendWidget::dockwindow( ) +TQDockWindow* KDLegendWidget::dockwindow( ) { return dock; } -void KDLegendWidget::setFont( QFont font) +void KDLegendWidget::setFont( TQFont font) { myLegend->setFont( font); myLabel->setFont( font); - QWidget::setFont( font ); + TQWidget::setFont( font ); } -void KDLegendWidget::drawToPainter( QPainter *p ) +void KDLegendWidget::drawToPainter( TQPainter *p ) { - p->drawPixmap( 0, 0, QPixmap::grabWidget( myLegend ) ); + p->drawPixmap( 0, 0, TQPixmap::grabWidget( myLegend ) ); } -QSize KDLegendWidget::legendSize() +TQSize KDLegendWidget::legendSize() { return myLegend->size(); } -QSize KDLegendWidget::legendSizeHint() +TQSize KDLegendWidget::legendSizeHint() { - QApplication::sendPostedEvents( 0, QEvent::LayoutHint ); - return QSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height()); + TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint ); + return TQSize( myLegend->tqsizeHint().width(), myLegend->tqsizeHint().height()+scroll->horizontalScrollBar()->height()); } @@ -2657,15 +2657,15 @@ void KDLegendWidget::clearLegend ( ) { if ( myLegend ) delete myLegend; if ( dock ) - myLegend = new QGroupBox( 1, Qt::Horizontal, scroll->viewport() ); + myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() ); else - myLegend = new QGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() ); - myLegend->setBackgroundColor( Qt::white ); + myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() ); + myLegend->setBackgroundColor( TQt::white ); myLegend->setFont( font() ); scroll->addChild( myLegend ); - scroll->setResizePolicy( QScrollView::AutoOneFit ); - myLegend->layout()->setMargin( 11 ); - myLegend->setFrameStyle( QFrame::NoFrame ); + scroll->setResizePolicy( TQScrollView::AutoOneFit ); + myLegend->tqlayout()->setMargin( 11 ); + myLegend->setFrameStyle( TQFrame::NoFrame ); if ( dock ) scroll->setMaximumHeight( 32000 ); else @@ -2673,19 +2673,19 @@ void KDLegendWidget::clearLegend ( ) } -void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const QColor& shapeColor, const QString& text ) +void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ) { - QLabel * temp; - QPixmap p = KDGanttView::getPixmap( shape, shapeColor, Qt::white, 10); - QWidget *w = new QWidget( myLegend ); - w->setBackgroundColor( Qt::white ); - QHBoxLayout *lay = new QHBoxLayout( w ,0, 6); - temp = new QLabel ( w ); - lay->addWidget( temp, 0, Qt:: AlignRight); + TQLabel * temp; + TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, TQt::white, 10); + TQWidget *w = new TQWidget( myLegend ); + w->setBackgroundColor( TQt::white ); + TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6); + temp = new TQLabel ( w ); + lay->addWidget( temp, 0, TQt:: AlignRight); temp->setPixmap(p); - temp = new QLabel ( text, w ); - temp->setBackgroundColor( Qt::white ); - lay->addWidget( temp, 0, Qt:: AlignLeft); + temp = new TQLabel ( text, w ); + temp->setBackgroundColor( TQt::white ); + lay->addWidget( temp, 0, TQt:: AlignLeft); lay->addStretch(); if ( dock ) scroll->setMaximumHeight( 32000 ); @@ -2700,7 +2700,7 @@ bool KDLegendWidget::isShown ( ) } -KDListView::KDListView(QWidget* parent, KDGanttView* gantView):QListView (parent) +KDListView::KDListView(TQWidget* tqparent, KDGanttView* gantView):TQListView (tqparent) { myGanttView = gantView; setAcceptDrops(true); @@ -2709,21 +2709,21 @@ KDListView::KDListView(QWidget* parent, KDGanttView* gantView):QListView (parent setAllColumnsShowFocus( true ); addColumn( i18n( "Task Name" ) ); setSorting( -1 ); - //setVScrollBarMode (QScrollView::AlwaysOn ); - setHScrollBarMode (QScrollView::AlwaysOn ); - setDefaultRenameAction(QListView::Accept); + //setVScrollBarMode (TQScrollView::AlwaysOn ); + setHScrollBarMode (TQScrollView::AlwaysOn ); + setDefaultRenameAction(TQListView::Accept); setColumnWidthMode ( 0,Maximum ); _calendarMode = false; - // QObject::connect(this, SIGNAL ( pressed ( QListViewItem * )) , this, SLOT( dragItem( QListViewItem *))) ; + // TQObject::connect(this, TQT_SIGNAL ( pressed ( TQListViewItem * )) , this, TQT_SLOT( dragItem( TQListViewItem *))) ; } -void KDListView::dragItem( QListViewItem * ) +void KDListView::dragItem( TQListViewItem * ) { // qDebug("drag "); // startDrag(); } -QString KDListView::getWhatsThisText(QPoint p) +TQString KDListView::getWhatsThisText(TQPoint p) { KDGanttViewItem* item = ( KDGanttViewItem* ) itemAt( p ); if ( item ) @@ -2737,18 +2737,18 @@ void KDListView::setCalendarMode( bool mode ) // setRootIsDecorated ( ! mode ); } -void KDListView::setOpen(QListViewItem * item, bool open ) +void KDListView::setOpen(TQListViewItem * item, bool open ) { if (! _calendarMode || ! open ) { (( KDGanttViewItem*)item)->setCallListViewOnSetOpen( false ); - QListView::setOpen ( item, open ); + TQListView::setOpen ( item, open ); (( KDGanttViewItem*)item)->setCallListViewOnSetOpen( true ); return; } // we are in calendarmode // in calendarmode only items can be opened which have subitems which have subitems - QListViewItem* temp; + TQListViewItem* temp; temp = item->firstChild(); bool openItem = false; while (temp) { @@ -2764,17 +2764,17 @@ void KDListView::setOpen(QListViewItem * item, bool open ) } if ( openItem ) { (( KDGanttViewItem*)item)->setCallListViewOnSetOpen( false ); - QListView::setOpen ( item, open ); + TQListView::setOpen ( item, open ); (( KDGanttViewItem*)item)->setCallListViewOnSetOpen( true ); } } -void KDListView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) +void KDListView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { - QListView::contentsMouseDoubleClickEvent ( e ); + TQListView::contentsMouseDoubleClickEvent ( e ); //if ( ! _calendarMode ) - // QListView::contentsMouseDoubleClickEvent ( e ); + // TQListView::contentsMouseDoubleClickEvent ( e ); // else { @@ -2785,7 +2785,7 @@ void KDListView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) } -void KDListView::drawToPainter ( QPainter * p, bool drawHeader ) +void KDListView::drawToPainter ( TQPainter * p, bool drawHeader ) { // Draw list drawAllContents ( p, 0, 0, contentsWidth(), contentsHeight() ); @@ -2793,16 +2793,16 @@ void KDListView::drawToPainter ( QPainter * p, bool drawHeader ) return; } // Draw headers - QPen pen = QPen(Qt::lightGray, 1); + TQPen pen = TQPen(TQt::lightGray, 1); p->save(); - QHeader *h = header(); + TQHeader *h = header(); for (int s = 0; s < h->count(); ++s) { - QRect r = h->sectionRect(s); + TQRect r = h->sectionRect(s); if (s==0) { p->translate(0, -r.height()); } //kdDebug()<<s<<": "<<h->label(s)<<" "<<r<<endl; - p->drawText(r.x()+2, r.y(), r.width()-2, r.height(), columnAlignment(s)|Qt::AlignVCenter, h->label(s), -1); + p->drawText(r.x()+2, r.y(), r.width()-2, r.height(), columnAlignment(s)|TQt::AlignVCenter, h->label(s), -1); p->save(); p->setPen(pen); p->drawRect(r.x(), r.y()+1, r.width(), r.height()-2); @@ -2812,7 +2812,7 @@ void KDListView::drawToPainter ( QPainter * p, bool drawHeader ) p->restore(); } -int KDListView::buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int level, int ypos, QListViewItem *item, int ymin, int ymax) const { +int KDListView::buildDrawables(TQPtrList<KDListView::DrawableItem> &lst, int level, int ypos, TQListViewItem *item, int ymin, int ymax) const { int y = ypos; int ih = item->height(); if (y < ymin && y+ih > ymin) { @@ -2825,26 +2825,26 @@ int KDListView::buildDrawables(QPtrList<KDListView::DrawableItem> &lst, int leve } y += ih; if (item->isOpen()) { - QListViewItem *child = item->firstChild(); + TQListViewItem *child = item->firstChild(); for (; child; child = child->nextSibling()) { y = buildDrawables(lst, level+1, y, child, ymin, ymax); } } return y; } -// This is a copy of QListView::drawContentsOffset(), with a few changes +// This is a copy of TQListView::drawContentsOffset(), with a few changes // because drawContentsOffset() only draws *visible* items, // we want to draw *all* items. // FIXME: Haven't got paintBraches() to work, atm live without it. -void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { +void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) { if ( columns() == 0 ) { - paintEmptyArea( p, QRect( cx, cy, cw, ch ) ); + paintEmptyArea( p, TQRect( cx, cy, cw, ch ) ); return; } - //kdDebug()<<k_funcinfo<<QRect(cx, cy, cw, ch)<<endl; - QPtrList<KDListView::DrawableItem> drawables; + //kdDebug()<<k_funcinfo<<TQRect(cx, cy, cw, ch)<<endl; + TQPtrList<KDListView::DrawableItem> drawables; drawables.setAutoDelete(true); - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); int level = 0; int ypos = 0; for (; child; child = child->nextSibling()) { @@ -2853,9 +2853,9 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { p->setFont( font() ); - QPtrListIterator<KDListView::DrawableItem> it(drawables); + TQPtrListIterator<KDListView::DrawableItem> it(drawables); - QRect r; + TQRect r; int fx = -1, x, fc = 0, lc = 0; int tx = -1; KDListView::DrawableItem * current; @@ -2896,7 +2896,7 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { c = fc; // draw to last interesting column - const QColorGroup &cg = ( palette().inactive() ); + const TQColorGroup &cg = ( tqpalette().inactive() ); while ( c < lc && !drawables.isEmpty() ) { int i = header()->mapToLogical( c ); @@ -2933,7 +2933,7 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { if ( tx < 0 ) tx = header()->cellPos( cell ); - // do any children of current need to be painted? + // do any tqchildren of current need to be painted? /* FIXME: painting branches doesn't work for some reason... if ( ih != ith && rootIsDecorated() && @@ -2948,10 +2948,10 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { int rleft = tx + current->l*treeStepSize(); int rright = rleft + treeStepSize(); - int crtop = QMAX( rtop, cy ); - int crbottom = QMIN( rbottom, cy+ch ); - int crleft = QMAX( rleft, cx ); - int crright = QMIN( rright, cx+cw ); + int crtop = TQMAX( rtop, cy ); + int crbottom = TQMIN( rbottom, cy+ch ); + int crleft = TQMAX( rleft, cx ); + int crright = TQMIN( rright, cx+cw ); r.setRect( crleft, crtop, crright-crleft, crbottom-crtop ); @@ -2961,7 +2961,7 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { p->translate( rleft, crtop ); //kdDebug()<<k_funcinfo<<"paintBranches: "<<current->i->text(0)<<endl; - current->i->paintBranches( p, colorGroup(), treeStepSize(), + current->i->paintBranches( p, tqcolorGroup(), treeStepSize(), rtop - crtop, r.height() ); p->restore(); } @@ -2969,11 +2969,11 @@ void KDListView::drawAllContents(QPainter * p, int cx, int cy, int cw, int ch) { } } -void KDListView::resizeEvent(QResizeEvent *) +void KDListView::resizeEvent(TQResizeEvent *) { triggerUpdate (); } -void KDListView::dragEnterEvent ( QDragEnterEvent * e) +void KDListView::dragEnterEvent ( TQDragEnterEvent * e) { if ( !myGanttView->dropEnabled() ) { e->accept( false ); @@ -2983,7 +2983,7 @@ void KDListView::dragEnterEvent ( QDragEnterEvent * e) //e->accept(KDGanttViewItemDrag::canDecode(e) ); } -void KDListView::dragMoveEvent ( QDragMoveEvent * e) +void KDListView::dragMoveEvent ( TQDragMoveEvent * e) { if ( !myGanttView->dropEnabled() ) { e->accept( false ); @@ -3003,13 +3003,13 @@ void KDListView::dragMoveEvent ( QDragMoveEvent * e) } if ( e->source() == myGanttView && gItem ){ // internal drag - do not allow to drag the item to a subitem of itself - KDGanttViewItem* pItem = gItem->parent(); + KDGanttViewItem* pItem = gItem->tqparent(); while ( pItem ) { if ( pItem == myGanttView->myCanvasView->lastClickedItem ) { e->accept( false ); return; } - pItem = pItem->parent(); + pItem = pItem->tqparent(); } if ( gItem == myGanttView->myCanvasView->lastClickedItem ) { e->accept( false ); @@ -3019,11 +3019,11 @@ void KDListView::dragMoveEvent ( QDragMoveEvent * e) e->accept( true ); } -void KDListView::dragLeaveEvent ( QDragLeaveEvent * ) +void KDListView::dragLeaveEvent ( TQDragLeaveEvent * ) { //qDebug("contentsDragLeaveEvent "); } -void KDListView::dropEvent ( QDropEvent *e ) +void KDListView::dropEvent ( TQDropEvent *e ) { if ( !myGanttView->dropEnabled() ) { e->accept( false ); @@ -3035,7 +3035,7 @@ void KDListView::dropEvent ( QDropEvent *e ) draggedItem = myGanttView->myCanvasView->lastClickedItem; if (myGanttView->lvDropEvent ( e, draggedItem, gItem )) return; - QString string; + TQString string; KDGanttViewItemDrag::decode( e, string ); KDGanttViewItem* newItem = 0; @@ -3044,22 +3044,22 @@ void KDListView::dropEvent ( QDropEvent *e ) return; } - QDomDocument doc( "GanttView" ); + TQDomDocument doc( "GanttView" ); doc.setContent( string ); - QDomElement docRoot = doc.documentElement(); // ChartParams element - QDomNode node = docRoot.firstChild(); + TQDomElement docRoot = doc.documentElement(); // ChartParams element + TQDomNode node = docRoot.firstChild(); bool enable = myGanttView->myTimeTable->blockUpdating( ); myGanttView->myTimeTable->setBlockUpdating( true ); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Items" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Item" ) { if ( gItem ) newItem = KDGanttViewItem::createFromDomElement( gItem, @@ -3088,9 +3088,9 @@ void KDListView::dropEvent ( QDropEvent *e ) return; } -QDragObject * KDListView::dragObject () +TQDragObject * KDListView::dragObject () { - return QListView::dragObject (); + return TQListView::dragObject (); } void KDListView::startDrag () @@ -3103,72 +3103,72 @@ void KDListView::startDrag () } KDCanvasText::KDCanvasText( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : - QCanvasText(canvas) + TQCanvasText(canvas) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasLine::KDCanvasLine( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : - QCanvasLine(canvas) + TQCanvasLine(canvas) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasPolygonItem::KDCanvasPolygonItem( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : - QCanvasPolygonalItem( canvas ) + TQCanvasPolygonalItem( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasPolygon::KDCanvasPolygon( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : - QCanvasPolygon( canvas ) + TQCanvasPolygon( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasEllipse::KDCanvasEllipse( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : - QCanvasEllipse( canvas ) + TQCanvasEllipse( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : - QCanvasRectangle( canvas ) + TQCanvasRectangle( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } -KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,QCanvas* canvas, QWidget* parent, const - char* name ) : QCanvasView ( canvas, parent, name ), scrollBarTimer( 0, "scrollBarTimer" ) +KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWidget* tqparent, const + char* name ) : TQCanvasView ( canvas, tqparent, name ), scrollBarTimer( 0, "scrollBarTimer" ) { - setHScrollBarMode (QScrollView::AlwaysOn ); - setVScrollBarMode( QScrollView::AlwaysOn ); + setHScrollBarMode (TQScrollView::AlwaysOn ); + setVScrollBarMode( TQScrollView::AlwaysOn ); myToolTip = new KDCanvasToolTip(viewport(),this); mySignalSender = sender; currentItem = 0; @@ -3177,61 +3177,61 @@ KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,QCanvas* canvas, QWidg fromItem = 0; fromArea = 0; linkItemsEnabled = false; - linkLine = new QCanvasLine(canvas); + linkLine = new TQCanvasLine(canvas); linkLine->hide(); linkLine->setZ(1000); //set_Mouse_Tracking(true); new KDCanvasWhatsThis(viewport(),this); - onItem = new QPopupMenu( this ); - QPopupMenu * newMenu = new QPopupMenu( this ); - QPopupMenu * onView = new QPopupMenu( this ); + onItem = new TQPopupMenu( this ); + TQPopupMenu * newMenu = new TQPopupMenu( this ); + TQPopupMenu * onView = new TQPopupMenu( this ); onView->insertItem( i18n( "Summary" ), this, - SLOT ( newRootItem( int ) ), 0, 0 ); + TQT_SLOT ( newRootItem( int ) ), 0, 0 ); onView->insertItem( i18n( "Event" ), this, - SLOT ( newRootItem( int ) ), 0, 1); + TQT_SLOT ( newRootItem( int ) ), 0, 1); onView->insertItem( i18n( "Task" ), this, - SLOT ( newRootItem( int ) ), 0, 2 ); + TQT_SLOT ( newRootItem( int ) ), 0, 2 ); onItem->insertItem( i18n( "New Root" ), onView ); newMenu->insertItem( i18n( "Summary" ), - this, SLOT ( newChildItem( int) ), 0, 0 ); + this, TQT_SLOT ( newChildItem( int) ), 0, 0 ); newMenu->insertItem( i18n( "Event" ), - this, SLOT ( newChildItem( int ) ), 0, 1 ); + this, TQT_SLOT ( newChildItem( int ) ), 0, 1 ); newMenu->insertItem( i18n( "Task" ), - this, SLOT ( newChildItem( int ) ), 0, 2 ); + this, TQT_SLOT ( newChildItem( int ) ), 0, 2 ); onItem->insertItem( i18n( "New Child" ), newMenu ); - QPopupMenu * afterMenu = new QPopupMenu( this ); + TQPopupMenu * afterMenu = new TQPopupMenu( this ); afterMenu->insertItem( i18n( "Summary" ), - this, SLOT ( newChildItem( int) ), 0, 0+4 ); + this, TQT_SLOT ( newChildItem( int) ), 0, 0+4 ); afterMenu->insertItem( i18n( "Event" ), - this, SLOT ( newChildItem( int ) ), 0, 1+4 ); + this, TQT_SLOT ( newChildItem( int ) ), 0, 1+4 ); afterMenu->insertItem( i18n( "Task" ), - this, SLOT ( newChildItem( int ) ), 0, 2+4 ); + this, TQT_SLOT ( newChildItem( int ) ), 0, 2+4 ); onItem->insertItem( i18n( "New After" ), afterMenu ); - QPopupMenu *pasteMenu = new QPopupMenu( this ); + TQPopupMenu *pasteMenu = new TQPopupMenu( this ); pasteMenu->insertItem( i18n( "As Root" ), - this, SLOT ( pasteItem( int ) ), 0, 0 ); + this, TQT_SLOT ( pasteItem( int ) ), 0, 0 ); pasteMenu->insertItem( i18n( "As Child" ), - this, SLOT ( pasteItem( int ) ), 0, 1 ); + this, TQT_SLOT ( pasteItem( int ) ), 0, 1 ); pasteMenu->insertItem( i18n( "After" ), - this, SLOT ( pasteItem( int ) ), 0, 2 ); + this, TQT_SLOT ( pasteItem( int ) ), 0, 2 ); onItem->insertItem( i18n( "Paste" ), pasteMenu, 3 ); - onItem->insertItem( i18n( "Cut Item" ), this, SLOT ( cutItem() ) ); + onItem->insertItem( i18n( "Cut Item" ), this, TQT_SLOT ( cutItem() ) ); onItem->setItemEnabled( 3, false ); myMyContentsHeight = 0; _showItemAddPopupMenu = false; - QObject *scrollViewTimer = child( "scrollview scrollbar timer", "QTimer", false ); + TQObject *scrollViewTimer = child( "scrollview scrollbar timer", TQTIMER_OBJECT_NAME_STRING, false ); Q_ASSERT( scrollViewTimer ); if ( scrollViewTimer ) { - disconnect( scrollViewTimer, SIGNAL(timeout()), this, SLOT(updateScrollBars() ) ); + disconnect( scrollViewTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollBars() ) ); } // If they needed a scrollbar timer in scrollview... - connect( &scrollBarTimer, SIGNAL(timeout()), this, SLOT(myUpdateScrollBars() ) ); + connect( &scrollBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(myUpdateScrollBars() ) ); - myScrollTimer = new QTimer( this, "myScrollTimer" ); - connect( myScrollTimer, SIGNAL( timeout() ), SLOT( slotScrollTimer() ) ); + myScrollTimer = new TQTimer( this, "myScrollTimer" ); + connect( myScrollTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotScrollTimer() ) ); autoScrollEnabled = false; } @@ -3257,22 +3257,22 @@ void KDGanttCanvasView::moveMyContent( int, int y) setContentsPos(contentsX(), y); } -void KDGanttCanvasView::resizeEvent ( QResizeEvent * e ) +void KDGanttCanvasView::resizeEvent ( TQResizeEvent * e ) { int ho = e->oldSize().height(); int wo = e->oldSize().width(); int hi = height(); int wi = width(); - //QScrollView::blockSignals( true ); + //TQScrollView::blockSignals( true ); verticalScrollBar()->setUpdatesEnabled( false ); - QScrollView::resizeEvent ( e ) ; + TQScrollView::resizeEvent ( e ) ; if ( ho != hi ) emit heightResized( viewport()->height()); if ( wo != wi ) emit widthResized( viewport()->width() ); //setMyContentsHeight( 0 ); // via timer - //QScrollView::blockSignals( false ); + //TQScrollView::blockSignals( false ); scrollBarTimer.start(0, true); } @@ -3320,20 +3320,20 @@ void KDGanttCanvasView::insertItemAsRoot( KDGanttViewItem* item ) if ( item == cuttedItem ) cuttedItem = 0; } -void KDGanttCanvasView::insertItemAsChild( KDGanttViewItem* parent, KDGanttViewItem* item ) +void KDGanttCanvasView::insertItemAsChild( KDGanttViewItem* tqparent, KDGanttViewItem* item ) { - parent->insertItem( cuttedItem ); + tqparent->insertItem( cuttedItem ); if ( item == cuttedItem ) cuttedItem = 0; } -void KDGanttCanvasView::insertItemAfter( KDGanttViewItem* parent , KDGanttViewItem* item ) +void KDGanttCanvasView::insertItemAfter( KDGanttViewItem* tqparent , KDGanttViewItem* item ) { - if ( parent->parent() ) { - parent->parent()->insertItem( item ); + if ( tqparent->tqparent() ) { + tqparent->tqparent()->insertItem( item ); } else mySignalSender->myListView->insertItem( item ); - item->moveItem( parent ); + item->moveItem( tqparent ); if ( item == cuttedItem ) cuttedItem = 0; } @@ -3341,9 +3341,9 @@ void KDGanttCanvasView::insertItemAfter( KDGanttViewItem* parent , KDGanttViewI void KDGanttCanvasView::cutItem() { lastClickedItem->hideSubtree(); - //qDebug("last clicked %d parent %d ", lastClickedItem , lastClickedItem->parent()); - if ( lastClickedItem->parent() ) - lastClickedItem->parent()->takeItem(lastClickedItem); + //qDebug("last clicked %d tqparent %d ", lastClickedItem , lastClickedItem->tqparent()); + if ( lastClickedItem->tqparent() ) + lastClickedItem->tqparent()->takeItem(lastClickedItem); else mySignalSender->myListView->takeItem( lastClickedItem ); mySignalSender->myTimeTable->updateMyContent(); @@ -3379,8 +3379,8 @@ void KDGanttCanvasView::pasteItem( int type ) lastClickedItem->insertItem( cuttedItem ); break; case 2://after - if ( lastClickedItem->parent() ) { - lastClickedItem->parent()->insertItem( cuttedItem ); + if ( lastClickedItem->tqparent() ) { + lastClickedItem->tqparent()->insertItem( cuttedItem ); } else mySignalSender->myListView->insertItem( cuttedItem ); @@ -3427,20 +3427,20 @@ void KDGanttCanvasView::newChildItem( int type ) temp = new KDGanttViewTaskItem( lastClickedItem, i18n( "New Task" ) ); break; case 5: - if ( lastClickedItem->parent() ) - temp = new KDGanttViewEventItem( lastClickedItem->parent(), lastClickedItem, i18n( "New Event" ) ); + if ( lastClickedItem->tqparent() ) + temp = new KDGanttViewEventItem( lastClickedItem->tqparent(), lastClickedItem, i18n( "New Event" ) ); else temp = new KDGanttViewEventItem( mySignalSender, lastClickedItem, i18n( "New Event" ) ); break; case 4: - if ( lastClickedItem->parent() ) - temp = new KDGanttViewSummaryItem( lastClickedItem->parent(), lastClickedItem, i18n( "New Summary" ) ); + if ( lastClickedItem->tqparent() ) + temp = new KDGanttViewSummaryItem( lastClickedItem->tqparent(), lastClickedItem, i18n( "New Summary" ) ); else temp = new KDGanttViewSummaryItem( mySignalSender, lastClickedItem, i18n( "New Summary" ) ); break; case 6: - if ( lastClickedItem->parent() ) - temp = new KDGanttViewTaskItem( lastClickedItem->parent(), lastClickedItem, i18n( "New Task" ) ); + if ( lastClickedItem->tqparent() ) + temp = new KDGanttViewTaskItem( lastClickedItem->tqparent(), lastClickedItem, i18n( "New Task" ) ); else temp = new KDGanttViewTaskItem( mySignalSender, lastClickedItem, i18n( "New Task" ) ); break; @@ -3453,14 +3453,14 @@ void KDGanttCanvasView::newChildItem( int type ) mySignalSender->editItem( temp ); } -void KDGanttCanvasView::drawToPainter ( QPainter * p ) +void KDGanttCanvasView::drawToPainter ( TQPainter * p ) { drawContents ( p, 0, 0, canvas()->width(), canvas()->height() ); } -QString KDGanttCanvasView::getToolTipText(QPoint p) +TQString KDGanttCanvasView::getToolTipText(TQPoint p) { - QCanvasItemList il = canvas()->collisions ( viewportToContents( p )); - QCanvasItemList::Iterator it; + TQCanvasItemList il = canvas()->collisions ( viewportToContents( p )); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch (getType(*it)) { case Type_is_KDGanttViewItem: @@ -3476,10 +3476,10 @@ QString KDGanttCanvasView::getToolTipText(QPoint p) return ""; } -QString KDGanttCanvasView::getWhatsThisText(QPoint p) +TQString KDGanttCanvasView::getWhatsThisText(TQPoint p) { - QCanvasItemList il = canvas() ->collisions (viewportToContents( p )); - QCanvasItemList::Iterator it; + TQCanvasItemList il = canvas() ->collisions (viewportToContents( p )); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch (getType(*it)) { case Type_is_KDGanttViewItem: @@ -3503,20 +3503,20 @@ QString KDGanttCanvasView::getWhatsThisText(QPoint p) */ -void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e ) +void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) { //qDebug("mousepress! %d ", this); - //qDebug("focus %d ",qApp->focusWidget()); + //qDebug("focus %d ",tqApp->tqfocusWidget()); setFocus(); currentLink = 0; currentItem = 0; - if (e->button() == RightButton && mySignalSender->editable()) { - lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( QPoint(2,e->pos().y())); + if (e->button() == Qt::RightButton && mySignalSender->editable()) { + lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y())); if ( lastClickedItem ) { if ( lastClickedItem->displaySubitemsAsGroup() && ! lastClickedItem->isOpen() ) { // findSub subitem - QCanvasItemList il = canvas() ->collisions ( e->pos() ); - QCanvasItemList::Iterator it; + TQCanvasItemList il = canvas() ->collisions ( e->pos() ); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { if ( getType(*it) == Type_is_KDGanttViewItem ) { lastClickedItem = getItem(*it); @@ -3527,11 +3527,11 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e ) onItem->popup(e->globalPos()); } } - QCanvasItemList il = canvas() ->collisions ( e->pos() ); - QCanvasItemList::Iterator it; + TQCanvasItemList il = canvas() ->collisions ( e->pos() ); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3554,7 +3554,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e ) break; } break; - case RightButton: + case Qt::RightButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3566,7 +3566,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e ) break; } break; - case MidButton: + case Qt::MidButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3582,10 +3582,10 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e ) break; } } - if (e->button() == RightButton ) { + if (e->button() == Qt::RightButton ) { mySignalSender->gvContextMenuRequested( currentItem, e->globalPos() ); } - if (autoScrollEnabled && e->button() == LeftButton) { + if (autoScrollEnabled && e->button() == Qt::LeftButton) { myScrollTimer->start(50); } } @@ -3596,7 +3596,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( QMouseEvent * e ) */ -void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e ) +void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) { static KDGanttViewItem* lastClicked = 0; mySignalSender->gvMouseButtonClicked( e->button(), currentItem , e->globalPos() ); @@ -3606,7 +3606,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e ) // if ( currentLink || currentItem ) { switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: myScrollTimer->stop(); { mySignalSender->itemLeftClicked( currentItem ); @@ -3617,8 +3617,8 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e ) if (linkItemsEnabled && fromItem) { linkLine->hide(); canvas()->update(); - QCanvasItemList il = canvas() ->collisions ( e->pos() ); - QCanvasItemList::Iterator it; + TQCanvasItemList il = canvas() ->collisions ( e->pos() ); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { if (getType(*it) == Type_is_KDGanttViewItem) { KDGanttViewItem *toItem = getItem(*it); @@ -3634,7 +3634,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e ) } fromItem = 0; break; - case RightButton: + case Qt::RightButton: { mySignalSender->itemRightClicked( currentItem ); mySignalSender->gvItemRightClicked( currentItem ); @@ -3643,7 +3643,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e ) if ( currentLink ) mySignalSender->taskLinkRightClicked( currentLink ); break; - case MidButton: + case Qt::MidButton: { mySignalSender->itemMidClicked( currentItem ); mySignalSender->gvItemMidClicked( currentItem ); @@ -3668,13 +3668,13 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( QMouseEvent * e ) */ -void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) +void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { - QCanvasItemList il = canvas() ->collisions ( e->pos() ); - QCanvasItemList::Iterator it; + TQCanvasItemList il = canvas() ->collisions ( e->pos() ); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: if ( getItem(*it)->enabled() ) @@ -3728,7 +3728,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( QMouseEvent * e ) */ -void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e ) +void KDGanttCanvasView::contentsMouseMoveEvent ( TQMouseEvent *e ) { //qDebug("mousemove! "); static int moves = 0; @@ -3741,7 +3741,7 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e ) currentItem = 0; } if (autoScrollEnabled) - mousePos = e->pos()- QPoint(contentsX(),contentsY()); // make mousePos relative 0 + mousePos = e->pos()- TQPoint(contentsX(),contentsY()); // make mousePos relative 0 if (fromItem) { //qDebug("mousemove: linking %s: %d,%d ",fromItem->listViewText().latin1(), e->pos().x(), e->pos().y()); linkLine->setPoints(linkLine->startPoint().x(), linkLine->startPoint().y(), e->pos().x(), e->pos().y()); @@ -3749,14 +3749,14 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e ) } // no action implemented //qDebug("mousemove "); - //QToolTip::setGloballyEnabled (false); - //QToolTip::remove(viewport()); - // QToolTip::add(viewport(), "hello"); - // QToolTip::setGloballyEnabled (true); + //TQToolTip::setGloballyEnabled (false); + //TQToolTip::remove(viewport()); + // TQToolTip::add(viewport(), "hello"); + // TQToolTip::setGloballyEnabled (true); /* - QCanvasItemList il = canvas() ->collisions ( e->pos() ); + TQCanvasItemList il = canvas() ->collisions ( e->pos() ); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; KDGanttItem* mouseover = 0; for ( it = il.begin(); it != il.end(); ++it ) { @@ -3764,44 +3764,44 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( QMouseEvent *e ) */ } -void KDGanttCanvasView::viewportPaintEvent ( QPaintEvent * pe ) +void KDGanttCanvasView::viewportPaintEvent ( TQPaintEvent * pe ) { - QCanvasView::viewportPaintEvent ( pe ); + TQCanvasView::viewportPaintEvent ( pe ); } void KDGanttCanvasView::set_Mouse_Tracking(bool on) { viewport()->setMouseTracking(on); } -int KDGanttCanvasView::getType(QCanvasItem* it) +int KDGanttCanvasView::getType(TQCanvasItem* it) { switch (it->rtti()) { - case QCanvasItem::Rtti_Line: return ((KDCanvasLine*)it)->myParentType; - case QCanvasItem::Rtti_Ellipse: return ((KDCanvasEllipse *)it)->myParentType; - case QCanvasItem::Rtti_Text: return ((KDCanvasText *)it)->myParentType; - case QCanvasItem::Rtti_Polygon: return ((KDCanvasPolygon *)it)->myParentType; - case QCanvasItem::Rtti_Rectangle: return ((KDCanvasRectangle *)it)->myParentType; + case TQCanvasItem::Rtti_Line: return ((KDCanvasLine*)it)->myParentType; + case TQCanvasItem::Rtti_Ellipse: return ((KDCanvasEllipse *)it)->myParentType; + case TQCanvasItem::Rtti_Text: return ((KDCanvasText *)it)->myParentType; + case TQCanvasItem::Rtti_Polygon: return ((KDCanvasPolygon *)it)->myParentType; + case TQCanvasItem::Rtti_Rectangle: return ((KDCanvasRectangle *)it)->myParentType; } return -1; } -KDGanttViewItem* KDGanttCanvasView::getItem(QCanvasItem* it) +KDGanttViewItem* KDGanttCanvasView::getItem(TQCanvasItem* it) { switch (it->rtti()) { - case QCanvasItem::Rtti_Line: return (KDGanttViewItem*) ((KDCanvasLine*)it)->myParentItem; - case QCanvasItem::Rtti_Ellipse: return (KDGanttViewItem*) ((KDCanvasEllipse *)it)->myParentItem; - case QCanvasItem::Rtti_Text: return (KDGanttViewItem*) ((KDCanvasText *)it)->myParentItem; - case QCanvasItem::Rtti_Polygon: return (KDGanttViewItem*) ((KDCanvasPolygon *)it)->myParentItem; - case QCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem; + case TQCanvasItem::Rtti_Line: return (KDGanttViewItem*) ((KDCanvasLine*)it)->myParentItem; + case TQCanvasItem::Rtti_Ellipse: return (KDGanttViewItem*) ((KDCanvasEllipse *)it)->myParentItem; + case TQCanvasItem::Rtti_Text: return (KDGanttViewItem*) ((KDCanvasText *)it)->myParentItem; + case TQCanvasItem::Rtti_Polygon: return (KDGanttViewItem*) ((KDCanvasPolygon *)it)->myParentItem; + case TQCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem; } return 0; } -KDGanttViewTaskLink* KDGanttCanvasView::getLink(QCanvasItem* it) +KDGanttViewTaskLink* KDGanttCanvasView::getLink(TQCanvasItem* it) { switch (it->rtti()) { - case QCanvasItem::Rtti_Line: return (KDGanttViewTaskLink*) ((KDCanvasLine*)it)->myParentItem; - case QCanvasItem::Rtti_Ellipse: return (KDGanttViewTaskLink*) ((KDCanvasEllipse *)it)->myParentItem; - case QCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem; - case QCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem; + case TQCanvasItem::Rtti_Line: return (KDGanttViewTaskLink*) ((KDCanvasLine*)it)->myParentItem; + case TQCanvasItem::Rtti_Ellipse: return (KDGanttViewTaskLink*) ((KDCanvasEllipse *)it)->myParentItem; + case TQCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem; + case TQCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem; } return 0; } @@ -3818,7 +3818,7 @@ void KDGanttCanvasView::slotScrollTimer() { if (my < 0) dy = -5; else if (my > visibleHeight()) - dy = QMIN(5, verticalScrollBar()->maxValue()-verticalScrollBar()->value()); + dy = TQMIN(5, verticalScrollBar()->maxValue()-verticalScrollBar()->value()); if (dx != 0 || dy != 0) scrollBy(dx, dy); 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; }; diff --git a/kdgantt/KDGanttViewSummaryItem.cpp b/kdgantt/KDGanttViewSummaryItem.cpp index 9580b623..b0ccfac1 100644 --- a/kdgantt/KDGanttViewSummaryItem.cpp +++ b/kdgantt/KDGanttViewSummaryItem.cpp @@ -26,8 +26,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. ** **********************************************************************/ @@ -54,8 +54,8 @@ is specified, a unique name will be generated */ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view, - const QString& lvtext, - const QString& name ) : + const TQString& lvtext, + const TQString& name ) : KDGanttViewItem( Summary, view, lvtext, name ) { initItem(); @@ -65,15 +65,15 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view, /*! Constructs an empty Gantt item of type event. - \param parent a parent item under which this one goes + \param tqparent a tqparent item under which this one goes \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent, - const QString& lvtext, - const QString& name ) : - KDGanttViewItem( Summary, parent, lvtext, name ) +KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* tqparent, + const TQString& lvtext, + const TQString& name ) : + KDGanttViewItem( Summary, tqparent, lvtext, name ) { initItem(); } @@ -90,8 +90,8 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent, */ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : + const TQString& lvtext, + const TQString& name ) : KDGanttViewItem( Summary, view, after, lvtext, name ) { initItem(); @@ -101,17 +101,17 @@ KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttView* view, /*! Constructs an empty Gantt item of type event. - \param parent a parent item under which this one goes + \param tqparent a tqparent item under which this one goes \param after another item at the same level behind which this one should go \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* parent, +KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* tqparent, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : - KDGanttViewItem( Summary, parent, after, lvtext, name ) + const TQString& lvtext, + const TQString& name ) : + KDGanttViewItem( Summary, tqparent, after, lvtext, name ) { initItem(); @@ -135,13 +135,13 @@ KDGanttViewSummaryItem::~KDGanttViewSummaryItem() \param dateTime the middle time \sa middleTime() */ -void KDGanttViewSummaryItem::setMiddleTime( const QDateTime& dateTime ) +void KDGanttViewSummaryItem::setMiddleTime( const TQDateTime& dateTime ) { if (! dateTime.isValid() ) { qDebug("KDGanttViewSummaryItem::setMiddleTime():Invalid parameter-no time set"); return; } - if (!myMiddleTime) myMiddleTime = new QDateTime; + if (!myMiddleTime) myMiddleTime = new TQDateTime; *myMiddleTime = dateTime; if ( myEndTime < middleTime() ) setEndTime( middleTime() ); @@ -158,7 +158,7 @@ void KDGanttViewSummaryItem::setMiddleTime( const QDateTime& dateTime ) \return the middle time of this summary item. If there is no middle time defined, the start time is returned. */ -QDateTime KDGanttViewSummaryItem::middleTime() const +TQDateTime KDGanttViewSummaryItem::middleTime() const { if(myMiddleTime) return *myMiddleTime; @@ -174,7 +174,7 @@ QDateTime KDGanttViewSummaryItem::middleTime() const \param end the end time \sa endTime(), setStartTime(), startTime() */ -void KDGanttViewSummaryItem::setEndTime( const QDateTime& end ) +void KDGanttViewSummaryItem::setEndTime( const TQDateTime& end ) { if (! end.isValid() ) { qDebug("KDGanttViewSummaryItem::setEndTime():Invalid parameter-no time set"); @@ -197,7 +197,7 @@ void KDGanttViewSummaryItem::setEndTime( const QDateTime& end ) \param start the start time \sa startTime(), setEndTime(), endTime() */ -void KDGanttViewSummaryItem::setStartTime( const QDateTime& start ) +void KDGanttViewSummaryItem::setStartTime( const TQDateTime& start ) { if (! start.isValid() ) { qDebug("KDGanttViewSummaryItem::setStartTime():Invalid parameter-no time set"); @@ -221,9 +221,9 @@ void KDGanttViewSummaryItem::setStartTime( const QDateTime& start ) \sa actualEndTime() startTime() */ -void KDGanttViewSummaryItem::setActualEndTime( const QDateTime& end ) +void KDGanttViewSummaryItem::setActualEndTime( const TQDateTime& end ) { - if (!myActualEndTime) myActualEndTime = new QDateTime; + if (!myActualEndTime) myActualEndTime = new TQDateTime; *myActualEndTime = end; updateCanvasItems(); @@ -238,7 +238,7 @@ void KDGanttViewSummaryItem::setActualEndTime( const QDateTime& end ) \sa setActualEndTime() */ -QDateTime KDGanttViewSummaryItem::actualEndTime() const +TQDateTime KDGanttViewSummaryItem::actualEndTime() const { if(myActualEndTime) return *myActualEndTime; @@ -267,12 +267,12 @@ void KDGanttViewSummaryItem::hideMe() void KDGanttViewSummaryItem::showItem( bool show, int coordY ) { isVisibleInGanttView = show; - invalidateHeight () ; + tqinvalidateHeight () ; if (!show) { hideMe(); return; } - if ( displaySubitemsAsGroup() && !parent() && !isOpen() ) { + if ( displaySubitemsAsGroup() && !tqparent() && !isOpen() ) { hideMe(); return; } diff --git a/kdgantt/KDGanttViewSummaryItem.h b/kdgantt/KDGanttViewSummaryItem.h index 3d80e709..67d918dd 100644 --- a/kdgantt/KDGanttViewSummaryItem.h +++ b/kdgantt/KDGanttViewSummaryItem.h @@ -26,8 +26,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. ** **********************************************************************/ @@ -41,28 +41,28 @@ class KDGanttViewSummaryItem : public KDGanttViewItem { public: KDGanttViewSummaryItem( KDGanttView* view, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewSummaryItem( KDGanttViewItem* parent, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewSummaryItem( KDGanttViewItem* tqparent, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); KDGanttViewSummaryItem( KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewSummaryItem( KDGanttViewItem* parent, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewSummaryItem( KDGanttViewItem* tqparent, KDGanttViewItem* after, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); virtual ~KDGanttViewSummaryItem(); - void setMiddleTime( const QDateTime& ); - QDateTime middleTime() const; - void setActualEndTime( const QDateTime& end ); - QDateTime actualEndTime() const; - void setStartTime( const QDateTime& start ); - void setEndTime( const QDateTime& end ); + void setMiddleTime( const TQDateTime& ); + TQDateTime middleTime() const; + void setActualEndTime( const TQDateTime& end ); + TQDateTime actualEndTime() const; + void setStartTime( const TQDateTime& start ); + void setEndTime( const TQDateTime& end ); private: void showItem( bool show = true, int coordY = 0 ); - QDateTime* myActualEndTime,*myMiddleTime; + TQDateTime* myActualEndTime,*myMiddleTime; void initItem(); void hideMe(); diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp index 6428fbdb..4b060013 100644 --- a/kdgantt/KDGanttViewTaskItem.cpp +++ b/kdgantt/KDGanttViewTaskItem.cpp @@ -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. ** **********************************************************************/ @@ -43,7 +43,7 @@ This class represents calendar items in Gantt charts. - A calendar item in a Gantt chart has no start/end shape, + A calendar item in a Gantt chart has no start/end tqshape, it is displayed as a rectangle. You can set the colors as usual, where only the first argument of setColors( col, col, col ) @@ -67,8 +67,8 @@ is specified, a unique name will be generated */ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view, - const QString& lvtext, - const QString& name ) : + const TQString& lvtext, + const TQString& name ) : KDGanttViewItem( Task, view, lvtext, name ) { @@ -79,15 +79,15 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view, /*! Constructs an empty Gantt item of type event. - \param parent a parent item under which this one goes + \param tqparent a tqparent item under which this one goes \param lvtext the text to show in the list view \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent, - const QString& lvtext, - const QString& name ) : - KDGanttViewItem( Task, parent, lvtext, name ) +KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* tqparent, + const TQString& lvtext, + const TQString& name ) : + KDGanttViewItem( Task, tqparent, lvtext, name ) { initItem(); } @@ -104,8 +104,8 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent, */ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : + const TQString& lvtext, + const TQString& name ) : KDGanttViewItem( Task, view, after, lvtext, name ) { initItem(); @@ -115,17 +115,17 @@ KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttView* view, /*! Constructs an empty Gantt item of type event. - \param parent a parent item under which this one goes + \param tqparent a tqparent item under which this one goes \param after another item at the same level behind which this one should go \param lvtext the text to show in the listview \param name the name by which the item can be identified. If no name is specified, a unique name will be generated */ -KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* parent, +KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* tqparent, KDGanttViewItem* after, - const QString& lvtext, - const QString& name ) : - KDGanttViewItem( Task, parent, after, lvtext, name ) + const TQString& lvtext, + const TQString& name ) : + KDGanttViewItem( Task, tqparent, after, lvtext, name ) { initItem(); } @@ -149,7 +149,7 @@ KDGanttViewTaskItem::~KDGanttViewTaskItem() \param end the end time \sa setStartTime(), startTime(), endTime() */ -void KDGanttViewTaskItem::setEndTime( const QDateTime& end ) +void KDGanttViewTaskItem::setEndTime( const TQDateTime& end ) { myEndTime = end; if ( myEndTime < startTime() ) @@ -168,7 +168,7 @@ void KDGanttViewTaskItem::setEndTime( const QDateTime& end ) \param start the start time \sa startTime(), setEndTime(), endTime() */ -void KDGanttViewTaskItem::setStartTime( const QDateTime& start ) +void KDGanttViewTaskItem::setStartTime( const TQDateTime& start ) { if (! start.isValid() ) { qDebug("KDGanttViewTaskItem::setStartTime():Invalid parameter-no time set"); @@ -201,7 +201,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) //qDebug("KDGanttViewTaskItem::showItem() %d %s ", (int) show, listViewText().latin1()); isVisibleInGanttView = show; - invalidateHeight () ; + tqinvalidateHeight () ; if (!show) { hideMe(); return; @@ -216,7 +216,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) floatEndShape->setZ(startShape->z()+0.003); // less than textCanvas floatEndShape->hide(); textCanvas->setZ( prio + 0.005 ); - if ( displaySubitemsAsGroup() && !parent() && !isOpen() ) { + if ( displaySubitemsAsGroup() && !tqparent() && !isOpen() ) { hideMe(); return; } @@ -242,14 +242,14 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) } int hei = height(); if ( ! isVisible() ) { - KDGanttViewItem * par = parent(); + KDGanttViewItem * par = tqparent(); while ( par != 0 && !par->isVisible() ) - par = par->parent(); + par = par->tqparent(); if ( par ) hei = par->height(); } - if (myGanttView->myListView->itemAt( QPoint(2, allY))) - hei = myGanttView->myListView->itemAt( QPoint(2, allY))->height(); + if (myGanttView->myListView->itemAt( TQPoint(2, allY))) + hei = myGanttView->myListView->itemAt( TQPoint(2, allY))->height(); if ( takedefaultHeight ) hei = 16; if ( myStartTime == myEndTime ) { @@ -281,12 +281,12 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) temp->show(); if (progX > 0) { // FIXME: For now, just use inverted color for progress - QColor c = temp->brush().color(); + TQColor c = temp->brush().color(); int h, s, v; c.getHsv(&h, &s, &v); h > 359/2 ? h -= 359/2 : h += 359/2; c.setHsv(h, s, v); - progtemp->setBrush(QBrush(c)); + progtemp->setBrush(TQBrush(c)); progtemp->setSize(progX, hei-3); progtemp->move(temp->x(), temp->y()); @@ -296,9 +296,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) KDCanvasRectangle* floatStartTemp = (KDCanvasRectangle*) floatStartShape; int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime); // FIXME: Configurable colors - QBrush b(temp->brush().color(), Dense4Pattern); + TQBrush b(temp->brush().color(), Dense4Pattern); floatStartTemp->setBrush(b); - floatStartTemp->setPen(QPen(gray)); + floatStartTemp->setPen(TQPen(gray)); if (floatStartX < startX) { floatStartTemp->setSize(startX - floatStartX, temp->size().height()/2); floatStartTemp->move(floatStartX, temp->y() + temp->size().height()/4); @@ -312,9 +312,9 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) KDCanvasRectangle* floatEndTemp = (KDCanvasRectangle*) floatEndShape; int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime); // FIXME: Configurable colors - QBrush b(temp->brush().color(), Dense4Pattern); + TQBrush b(temp->brush().color(), Dense4Pattern); floatEndTemp->setBrush(b); - floatEndTemp->setPen(QPen(gray)); + floatEndTemp->setPen(TQPen(gray)); int ex = startX + temp->size().width(); if (floatEndX > ex) { floatEndTemp->setSize(floatEndX - ex, temp->size().height()/2); @@ -335,7 +335,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) textCanvas->hide(); else { textCanvas->move(startX+3, allY-textCanvas->boundingRect().height()/2); - QString temp = textCanvasText; + TQString temp = textCanvasText; textCanvas->setText(temp); int len = temp.length(); while ( textCanvas->boundingRect().width() > wid ) { @@ -356,9 +356,9 @@ void KDGanttViewTaskItem::initItem() { isVisibleInGanttView = false; - if ( myGanttView->calendarMode() && parent() ) { + if ( myGanttView->calendarMode() && tqparent() ) { setVisible( false ); - parent()->setVisible( true ); + tqparent()->setVisible( true ); } else showItem(true); //qDebug("initItem %s %s", listViewText().latin1(),startShape->brush().color().name().latin1() ); diff --git a/kdgantt/KDGanttViewTaskItem.h b/kdgantt/KDGanttViewTaskItem.h index 73db2a28..c4a56c2f 100644 --- a/kdgantt/KDGanttViewTaskItem.h +++ b/kdgantt/KDGanttViewTaskItem.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. ** **********************************************************************/ @@ -38,33 +38,33 @@ #include "KDGanttViewItem.h" class KDCanvasRectangle; -class QBrush; +class TQBrush; class KDGanttViewTaskItem : public KDGanttViewItem { public: KDGanttViewTaskItem( KDGanttView* view, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewTaskItem( KDGanttViewItem* parent, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewTaskItem( KDGanttViewItem* tqparent, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); KDGanttViewTaskItem( KDGanttView* view, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); - KDGanttViewTaskItem( KDGanttViewItem* parent, KDGanttViewItem* after, - const QString& lvtext = QString::null, - const QString& name = QString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewTaskItem( KDGanttViewItem* tqparent, KDGanttViewItem* after, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); virtual ~KDGanttViewTaskItem(); - void setStartTime( const QDateTime& start ); - void setEndTime( const QDateTime& end ); + void setStartTime( const TQDateTime& start ); + void setEndTime( const TQDateTime& end ); private: void showItem( bool show = true, int coordY = 0 ); void initItem(); void hideMe(); - QBrush myBrush, undefinedBrush; + TQBrush myBrush, undefinedBrush; bool _showUndefinedBrush; }; diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp index 155b83e2..8bbab48f 100644 --- a/kdgantt/KDGanttViewTaskLink.cpp +++ b/kdgantt/KDGanttViewTaskLink.cpp @@ -3,7 +3,7 @@ KDGantt - a multi-platform charting engine */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -26,8 +26,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. ** **********************************************************************/ @@ -62,8 +62,8 @@ \param to the target items \param type the link type for the connection */ -KDGanttViewTaskLink::KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from, - QPtrList<KDGanttViewItem> to, +KDGanttViewTaskLink::KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from, + TQPtrList<KDGanttViewItem> to, LinkType type ) { fromList= from; @@ -109,8 +109,8 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewItem* from, */ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group, - QPtrList<KDGanttViewItem> from, - QPtrList<KDGanttViewItem> to, + TQPtrList<KDGanttViewItem> from, + TQPtrList<KDGanttViewItem> to, LinkType type ) { fromList = from; @@ -166,14 +166,14 @@ KDGanttViewTaskLink::~KDGanttViewTaskLink( ) void KDGanttViewTaskLink::initTaskLink() { - horLineList = new QPtrList<KDCanvasLine>; - verLineList = new QPtrList<KDCanvasLine>; - horLineList2 = new QPtrList<KDCanvasLine>; - verLineList2 = new QPtrList<KDCanvasLine>; - horLineList3 = new QPtrList<KDCanvasLine>; - topList = new QPtrList<KDCanvasPolygon>; - topLeftList = new QPtrList<KDCanvasPolygon>; - topRightList = new QPtrList<KDCanvasPolygon>; + horLineList = new TQPtrList<KDCanvasLine>; + verLineList = new TQPtrList<KDCanvasLine>; + horLineList2 = new TQPtrList<KDCanvasLine>; + verLineList2 = new TQPtrList<KDCanvasLine>; + horLineList3 = new TQPtrList<KDCanvasLine>; + topList = new TQPtrList<KDCanvasPolygon>; + topLeftList = new TQPtrList<KDCanvasPolygon>; + topRightList = new TQPtrList<KDCanvasPolygon>; horLineList->setAutoDelete( true ); verLineList->setAutoDelete( true ); horLineList2->setAutoDelete( true ); @@ -200,7 +200,7 @@ void KDGanttViewTaskLink::initTaskLink() top = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink); topLeft = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink); topRight = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink); - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-4,-5); arr.setPoint(1,4,-5); arr.setPoint(2,0,0); @@ -236,8 +236,8 @@ void KDGanttViewTaskLink::initTaskLink() setWhatsThisText( "Tasklink" ); myTimeTable->myTaskLinkList.append(this); setHighlight( false); - setHighlightColor(Qt::red ); - setColor(Qt::black); + setHighlightColor(TQt::red ); + setColor(TQt::black); setVisible(true); } @@ -265,8 +265,8 @@ void KDGanttViewTaskLink::showMe( bool visible ) isvisible = visible; int wid = 1; - QPen p; - QBrush b; + TQPen p; + TQBrush b; p.setWidth(wid); b.setStyle(Qt::SolidPattern); if (ishighlighted) { @@ -277,17 +277,17 @@ void KDGanttViewTaskLink::showMe( bool visible ) b.setColor(myColor); p.setColor(myColor); } - QPoint start, end; - QPtrListIterator<KDCanvasLine> horIt(*horLineList); - QPtrListIterator<KDCanvasLine> verIt(*verLineList); - QPtrListIterator<KDCanvasPolygon> topIt(*topList); - QPtrListIterator<KDGanttViewItem> fromIt(fromList); - QPtrListIterator<KDGanttViewItem> toIt(toList); + TQPoint start, end; + TQPtrListIterator<KDCanvasLine> horIt(*horLineList); + TQPtrListIterator<KDCanvasLine> verIt(*verLineList); + TQPtrListIterator<KDCanvasPolygon> topIt(*topList); + TQPtrListIterator<KDGanttViewItem> fromIt(fromList); + TQPtrListIterator<KDGanttViewItem> toIt(toList); for ( ; fromIt.current(); ++fromIt ) { - (*fromIt)->setTextOffset(QPoint(0,0)); + (*fromIt)->setTextOffset(TQPoint(0,0)); toIt.toFirst(); for ( ; toIt.current(); ++toIt ) { - (*toIt)->setTextOffset(QPoint(0,0)); + (*toIt)->setTextOffset(TQPoint(0,0)); if (!isvisible || ! (*fromIt)->isVisibleInGanttView || !(*toIt)->isVisibleInGanttView || !myTimeTable->taskLinksVisible) { (*horIt)->hide(); (*verIt)->hide(); @@ -330,8 +330,8 @@ void KDGanttViewTaskLink::showMeType( bool visible ) hide(); isvisible = visible; int wid = 1; - QPen p; - QBrush b; + TQPen p; + TQBrush b; p.setWidth(wid); b.setStyle(Qt::SolidPattern); if (ishighlighted) { @@ -342,19 +342,19 @@ void KDGanttViewTaskLink::showMeType( bool visible ) b.setColor(myColor); p.setColor(myColor); } - QPoint start, end; - QPtrListIterator<KDCanvasLine> horIt(*horLineList); - QPtrListIterator<KDCanvasLine> verIt(*verLineList); - QPtrListIterator<KDCanvasLine> horIt2(*horLineList2); - QPtrListIterator<KDCanvasLine> verIt2(*verLineList2); - QPtrListIterator<KDCanvasLine> horIt3(*horLineList3); - QPtrListIterator<KDCanvasPolygon> topIt(*topList); - QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList); - QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList); - QPtrListIterator<KDGanttViewItem> fromIt(fromList); - QPtrListIterator<KDGanttViewItem> toIt(toList); + TQPoint start, end; + TQPtrListIterator<KDCanvasLine> horIt(*horLineList); + TQPtrListIterator<KDCanvasLine> verIt(*verLineList); + TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2); + TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2); + TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3); + TQPtrListIterator<KDCanvasPolygon> topIt(*topList); + TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList); + TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList); + TQPtrListIterator<KDGanttViewItem> fromIt(fromList); + TQPtrListIterator<KDGanttViewItem> toIt(toList); for ( ; fromIt.current(); ++fromIt ) { - (*fromIt)->setTextOffset(QPoint(30,0)); + (*fromIt)->setTextOffset(TQPoint(30,0)); (*fromIt)->moveTextCanvas(); toIt.toFirst(); for ( ; toIt.current(); ++toIt ) { @@ -368,12 +368,12 @@ void KDGanttViewTaskLink::showMeType( bool visible ) (*topIt)->setBrush(b); (*topLeftIt)->setBrush(b); (*topRightIt)->setBrush(b); - (*toIt)->setTextOffset(QPoint(30,0)); + (*toIt)->setTextOffset(TQPoint(30,0)); (*toIt)->moveTextCanvas(); switch (linkType()) { case StartStart: { start = (*fromIt)->middleLeft(); - end = (*toIt)->middleLeft()-QPoint(12,0); + end = (*toIt)->middleLeft()-TQPoint(12,0); bool down = start.y() < end.y(); (*horIt)->setPoints(start.x()-xOffset(*fromIt),start.y(), start.x()-10, start.y()); @@ -401,7 +401,7 @@ void KDGanttViewTaskLink::showMeType( bool visible ) } case FinishFinish: { start = (*fromIt)->middleRight(); - end = (*toIt)->middleRight()+QPoint(12,0); + end = (*toIt)->middleRight()+TQPoint(12,0); bool down = start.y() < end.y(); (*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(), start.x()+10, start.y()); @@ -429,7 +429,7 @@ void KDGanttViewTaskLink::showMeType( bool visible ) } case FinishStart: { start = (*fromIt)->middleRight(); - end = (*toIt)->middleLeft() - QPoint(12,0); + end = (*toIt)->middleLeft() - TQPoint(12,0); bool down = start.y() < end.y(); (*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(), start.x()+10,start.y()); @@ -459,7 +459,7 @@ void KDGanttViewTaskLink::showMeType( bool visible ) } case StartFinish: { start = (*fromIt)->middleRight(); - end = (*toIt)->middleRight()+QPoint(12,0); + end = (*toIt)->middleRight()+TQPoint(12,0); bool down = start.y() < end.y(); (*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(), start.x()+10, start.y()); @@ -589,7 +589,7 @@ bool KDGanttViewTaskLink::highlight() const \param color the color to draw this task link in \sa color() */ -void KDGanttViewTaskLink::setColor( const QColor& color ) +void KDGanttViewTaskLink::setColor( const TQColor& color ) { myColor = color; //if ( isvisible) setVisible(true ); @@ -603,7 +603,7 @@ void KDGanttViewTaskLink::setColor( const QColor& color ) \return the color in which this task link is drawn \sa setColor() */ -QColor KDGanttViewTaskLink::color() const +TQColor KDGanttViewTaskLink::color() const { return myColor; } @@ -615,7 +615,7 @@ QColor KDGanttViewTaskLink::color() const \param color the highlight color to draw this task link in \sa highlightColor() */ -void KDGanttViewTaskLink::setHighlightColor( const QColor& color ) +void KDGanttViewTaskLink::setHighlightColor( const TQColor& color ) { myColorHL = color; //if ( isvisible) setVisible(true ); @@ -629,7 +629,7 @@ void KDGanttViewTaskLink::setHighlightColor( const QColor& color ) \return the highlight color in which this task link is drawn \sa setHighlightColor() */ -QColor KDGanttViewTaskLink::highlightColor() const +TQColor KDGanttViewTaskLink::highlightColor() const { return myColorHL; } @@ -641,7 +641,7 @@ QColor KDGanttViewTaskLink::highlightColor() const \param text the tooltip text \sa tooltipText() */ -void KDGanttViewTaskLink::setTooltipText( const QString& text ) +void KDGanttViewTaskLink::setTooltipText( const TQString& text ) { myToolTipText = text; } @@ -653,7 +653,7 @@ void KDGanttViewTaskLink::setTooltipText( const QString& text ) \return the tooltip text of this task link \sa setTooltipText() */ -QString KDGanttViewTaskLink::tooltipText() const +TQString KDGanttViewTaskLink::tooltipText() const { return myToolTipText; } @@ -665,7 +665,7 @@ QString KDGanttViewTaskLink::tooltipText() const \param text the what's this text \sa whatsThisText() */ -void KDGanttViewTaskLink::setWhatsThisText( const QString& text ) +void KDGanttViewTaskLink::setWhatsThisText( const TQString& text ) { myWhatsThisText = text; @@ -678,7 +678,7 @@ void KDGanttViewTaskLink::setWhatsThisText( const QString& text ) \return the what's this text of this task link \sa setWhatsThisText() */ -QString KDGanttViewTaskLink::whatsThisText() const +TQString KDGanttViewTaskLink::whatsThisText() const { return myWhatsThisText; } @@ -690,7 +690,7 @@ QString KDGanttViewTaskLink::whatsThisText() const \return the ist of source item of this task link \sa to() */ -QPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const +TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const { return fromList; } @@ -722,7 +722,7 @@ void KDGanttViewTaskLink::removeItemFromList( KDGanttViewItem* item ) \return the list of target item of this task link \sa from() */ -QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const +TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const { return toList; } @@ -732,25 +732,25 @@ QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const Creates a DOM node that describes this task link. \param doc the DOM document to which the node belongs - \param parentElement the element into which to insert this node + \param tqparentElement the element into which to insert this node */ -void KDGanttViewTaskLink::createNode( QDomDocument& doc, - QDomElement& parentElement ) +void KDGanttViewTaskLink::createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ) { - QDomElement taskLinkElement = doc.createElement( "TaskLink" ); - parentElement.appendChild( taskLinkElement ); + TQDomElement taskLinkElement = doc.createElement( "TaskLink" ); + tqparentElement.appendChild( taskLinkElement ); - QDomElement fromItemsElement = doc.createElement( "FromItems" ); + TQDomElement fromItemsElement = doc.createElement( "FromItems" ); taskLinkElement.appendChild( fromItemsElement ); - QPtrList<KDGanttViewItem> fromList = from(); + TQPtrList<KDGanttViewItem> fromList = from(); KDGanttViewItem* item; for( item = fromList.first(); item; item = fromList.next() ) KDGanttXML::createStringNode( doc, fromItemsElement, "Item", item->name() ); - QDomElement toItemsElement = doc.createElement( "ToItems" ); + TQDomElement toItemsElement = doc.createElement( "ToItems" ); taskLinkElement.appendChild( toItemsElement ); - QPtrList<KDGanttViewItem> toList = to(); + TQPtrList<KDGanttViewItem> toList = to(); for( item = toList.first(); item; item = toList.next() ) KDGanttXML::createStringNode( doc, toItemsElement, "Item", item->name() ); @@ -780,26 +780,26 @@ void KDGanttViewTaskLink::createNode( QDomDocument& doc, \param element the DOM element from which to read the specification \return the newly created task link */ -KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& element ) +KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& element ) { - QDomNode node = element.firstChild(); - QStringList fromList, toList; + TQDomNode node = element.firstChild(); + TQStringList fromList, toList; bool highlight = false, visible = false; - QColor color, highlightColor; - QString tooltipText, whatsThisText, group; + TQColor color, highlightColor; + TQString tooltipText, whatsThisText, group; LinkType linktype=None; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "FromItems" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Item" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) fromList << value; } else { @@ -810,13 +810,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele node = node.nextSibling(); } } else if( tagName == "ToItems" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Item" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) toList << value; } else { @@ -835,27 +835,27 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele if( KDGanttXML::readBoolNode( element, value ) ) visible = value; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) color = value; } else if( tagName == "HighlightColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) highlightColor = value; } else if( tagName == "TooltipText" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) tooltipText = value; } else if( tagName == "WhatsThisText" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) whatsThisText = value; } else if( tagName == "Group" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) group = value; } else if( tagName == "Linktype" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) linktype = stringToLinkType( value ); } else { @@ -866,17 +866,17 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele node = node.nextSibling(); } - QPtrList<KDGanttViewItem> fromItemList; - QPtrList<KDGanttViewItem> toItemList; - for( QStringList::const_iterator fromIt = fromList.begin(); + TQPtrList<KDGanttViewItem> fromItemList; + TQPtrList<KDGanttViewItem> toItemList; + for( TQStringList::const_iterator fromIt = fromList.begin(); fromIt != fromList.end(); ++fromIt ) { - KDGanttViewItem* item = KDGanttViewItem::find( *fromIt ); + KDGanttViewItem* item = KDGanttViewItem::tqfind( *fromIt ); if( item ) fromItemList.append( item ); } - for( QStringList::const_iterator toIt = toList.begin(); + for( TQStringList::const_iterator toIt = toList.begin(); toIt != toList.end(); ++toIt ) { - KDGanttViewItem* item = KDGanttViewItem::find( *toIt ); + KDGanttViewItem* item = KDGanttViewItem::tqfind( *toIt ); if( item ) toItemList.append( item ); } @@ -898,7 +898,7 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele tl->setHighlightColor( highlightColor ); tl->setTooltipText( tooltipText ); tl->setWhatsThisText( whatsThisText ); - KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::find( group ); + KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::tqfind( group ); if( gr ) tl->setGroup( gr ); @@ -935,16 +935,16 @@ int KDGanttViewTaskLink::xOffset(KDGanttViewItem *item) void KDGanttViewTaskLink::hide() { - QPtrListIterator<KDCanvasLine> horIt(*horLineList); - QPtrListIterator<KDCanvasLine> verIt(*verLineList); - QPtrListIterator<KDCanvasLine> horIt2(*horLineList2); - QPtrListIterator<KDCanvasLine> verIt2(*verLineList2); - QPtrListIterator<KDCanvasLine> horIt3(*horLineList3); - QPtrListIterator<KDCanvasPolygon> topIt(*topList); - QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList); - QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList); - QPtrListIterator<KDGanttViewItem> fromIt(fromList); - QPtrListIterator<KDGanttViewItem> toIt(toList); + TQPtrListIterator<KDCanvasLine> horIt(*horLineList); + TQPtrListIterator<KDCanvasLine> verIt(*verLineList); + TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2); + TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2); + TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3); + TQPtrListIterator<KDCanvasPolygon> topIt(*topList); + TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList); + TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList); + TQPtrListIterator<KDGanttViewItem> fromIt(fromList); + TQPtrListIterator<KDGanttViewItem> toIt(toList); for ( ; fromIt.current(); ++fromIt ) { toIt.toFirst(); for ( ; toIt.current(); ++toIt ) { @@ -968,7 +968,7 @@ void KDGanttViewTaskLink::hide() } } -QString KDGanttViewTaskLink::linkTypeToString( LinkType type ) +TQString KDGanttViewTaskLink::linkTypeToString( LinkType type ) { switch( type ) { case None: @@ -992,7 +992,7 @@ QString KDGanttViewTaskLink::linkTypeToString( LinkType type ) return ""; } -KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const QString type ) +KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const TQString type ) { if (type == "FinishStart") return FinishStart; diff --git a/kdgantt/KDGanttViewTaskLink.h b/kdgantt/KDGanttViewTaskLink.h index d8a41b4d..f6f58cc9 100644 --- a/kdgantt/KDGanttViewTaskLink.h +++ b/kdgantt/KDGanttViewTaskLink.h @@ -27,18 +27,18 @@ ** 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. ** **********************************************************************/ #ifndef KDGANTTVIEWTASKLINK_H #define KDGANTTVIEWTASKLINK_H -#include <qcolor.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qcanvas.h> +#include <tqcolor.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqcanvas.h> #include "KDGanttViewItem.h" class KDGanttViewTaskLinkGroup; @@ -50,12 +50,12 @@ class KDGanttViewTaskLink public: enum LinkType { None, FinishStart, StartStart, FinishFinish, StartFinish }; - KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from, - QPtrList<KDGanttViewItem> to, + KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from, + TQPtrList<KDGanttViewItem> to, LinkType type=None ); KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group, - QPtrList<KDGanttViewItem> from, - QPtrList<KDGanttViewItem> to, + TQPtrList<KDGanttViewItem> from, + TQPtrList<KDGanttViewItem> to, LinkType type=None ); KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group, KDGanttViewItem* from, @@ -65,8 +65,8 @@ public: KDGanttViewItem* to, LinkType type=None ); ~KDGanttViewTaskLink(); - QPtrList<KDGanttViewItem> from() const; - QPtrList<KDGanttViewItem> to() const; + TQPtrList<KDGanttViewItem> from() const; + TQPtrList<KDGanttViewItem> to() const; void removeItemFromList( KDGanttViewItem* ); void setVisible( bool ); @@ -78,19 +78,19 @@ public: void setHighlight( bool highlight ); bool highlight() const; - void setColor( const QColor& color ); - QColor color() const; - void setHighlightColor( const QColor& color ); - QColor highlightColor() const; + void setColor( const TQColor& color ); + TQColor color() const; + void setHighlightColor( const TQColor& color ); + TQColor highlightColor() const; - void setTooltipText( const QString& text ); - QString tooltipText() const; - void setWhatsThisText( const QString& text ); - QString whatsThisText() const; + void setTooltipText( const TQString& text ); + TQString tooltipText() const; + void setWhatsThisText( const TQString& text ); + TQString whatsThisText() const; - void createNode( QDomDocument& doc, - QDomElement& parentElement ); - static KDGanttViewTaskLink* createFromDomElement( QDomElement& ); + void createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ); + static KDGanttViewTaskLink* createFromDomElement( TQDomElement& ); int linkType(); void setLinkType(int type); @@ -98,22 +98,22 @@ public: private: friend class KDGanttViewTaskLinkGroup; friend class KDTimeTableWidget; - QPtrList<KDGanttViewItem> fromList,toList; - QPtrList<KDCanvasLine>* horLineList; - QPtrList<KDCanvasLine>* verLineList; - QPtrList<KDCanvasPolygon>* topList; + TQPtrList<KDGanttViewItem> fromList,toList; + TQPtrList<KDCanvasLine>* horLineList; + TQPtrList<KDCanvasLine>* verLineList; + TQPtrList<KDCanvasPolygon>* topList; // also used when linkType != None - QPtrList<KDCanvasLine>* horLineList2; - QPtrList<KDCanvasLine>* verLineList2; - QPtrList<KDCanvasLine>* horLineList3; - QPtrList<KDCanvasPolygon>* topLeftList; - QPtrList<KDCanvasPolygon>* topRightList; + TQPtrList<KDCanvasLine>* horLineList2; + TQPtrList<KDCanvasLine>* verLineList2; + TQPtrList<KDCanvasLine>* horLineList3; + TQPtrList<KDCanvasPolygon>* topLeftList; + TQPtrList<KDCanvasPolygon>* topRightList; KDGanttViewTaskLinkGroup* myGroup; bool isvisible,ishighlighted; - QColor myColor, myColorHL; - QString myToolTipText,myWhatsThisText; + TQColor myColor, myColorHL; + TQString myToolTipText,myWhatsThisText; KDTimeTableWidget* myTimeTable; void initTaskLink(); void showMe( bool ); @@ -122,8 +122,8 @@ private: int xOffset(KDGanttViewItem *item); LinkType myLinkType; - static QString linkTypeToString( LinkType type ); - static LinkType stringToLinkType( const QString type ); + static TQString linkTypeToString( LinkType type ); + static LinkType stringToLinkType( const TQString type ); }; #endif diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp index e87bef0b..a7f65aad 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.cpp +++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp @@ -26,8 +26,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. ** **********************************************************************/ @@ -36,7 +36,7 @@ #include "KDGanttXMLTools.h" #include "KDGanttView.h" -QDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict; +TQDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict; /*! \class KDGanttViewTaskLinkGroup KDGanttViewTaskLinkGroup.h A group of task links. @@ -50,7 +50,7 @@ QDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict; */ KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup() { - generateAndInsertName(QString()); + generateAndInsertName(TQString()); } /*! @@ -70,11 +70,11 @@ KDGanttViewTaskLinkGroup::~KDGanttViewTaskLinkGroup() /*! Constructs an empty task link group and records it under the name \a name so that it can later be found again with - KDGanttViewTaskLinkGroup::find(). + KDGanttViewTaskLinkGroup::tqfind(). \param name the search name of this task link group */ -KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const QString& name ) +KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const TQString& name ) { generateAndInsertName( name ); } @@ -121,7 +121,7 @@ bool KDGanttViewTaskLinkGroup::remove (KDGanttViewTaskLink* link) void KDGanttViewTaskLinkGroup::setVisible( bool show ) { isvisible = show; - QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); + TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); for ( ; it.current(); ++it ) { it.current()->setVisible(show); } @@ -151,7 +151,7 @@ bool KDGanttViewTaskLinkGroup::visible() const void KDGanttViewTaskLinkGroup::setHighlight( bool highlight ) { ishighlighted= highlight; - QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); + TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); for ( ; it.current(); ++it ) it.current()->setHighlight(highlight ); @@ -179,10 +179,10 @@ bool KDGanttViewTaskLinkGroup::highlight() const \param color the color to draw the task links in this group in \sa color() */ -void KDGanttViewTaskLinkGroup::setColor( const QColor& color ) +void KDGanttViewTaskLinkGroup::setColor( const TQColor& color ) { myColor = color; - QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); + TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); for ( ; it.current(); ++it ) it.current()->setColor(color); } @@ -198,7 +198,7 @@ void KDGanttViewTaskLinkGroup::setColor( const QColor& color ) \return the color in which the task links in this group are drawn \sa setColor() */ -QColor KDGanttViewTaskLinkGroup::color() const +TQColor KDGanttViewTaskLinkGroup::color() const { return myColor; } @@ -210,11 +210,11 @@ QColor KDGanttViewTaskLinkGroup::color() const \param color the highlight color to draw the task links in this group in \sa color() */ -void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color ) +void KDGanttViewTaskLinkGroup::setHighlightColor( const TQColor& color ) { myColorHL = color; - QPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); + TQPtrListIterator<KDGanttViewTaskLink> it(myTaskLinkList); for ( ; it.current(); ++it ) it.current()->setHighlightColor(color); } @@ -230,7 +230,7 @@ void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color ) are drawn \sa setColor() */ -QColor KDGanttViewTaskLinkGroup::highlightColor() const +TQColor KDGanttViewTaskLinkGroup::highlightColor() const { return myColorHL; } @@ -268,11 +268,11 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link) \return the task link group with the specified name; 0 if no group with that name exists */ -KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name ) +KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::tqfind( const TQString& name ) { - if (name.isEmpty()) // avoid error msg from QDict + if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sGroupDict.find( name ); + return sGroupDict.tqfind( name ); } @@ -280,13 +280,13 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name ) Creates a DOM node that describes this task link group. \param doc the DOM document to which the node belongs - \param parentElement the element into which to insert this node + \param tqparentElement the element into which to insert this node */ -void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc, - QDomElement& parentElement ) +void KDGanttViewTaskLinkGroup::createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ) { - QDomElement taskLinkGroupElement = doc.createElement( "TaskLink" ); - parentElement.appendChild( taskLinkGroupElement ); + TQDomElement taskLinkGroupElement = doc.createElement( "TaskLink" ); + tqparentElement.appendChild( taskLinkGroupElement ); KDGanttXML::createBoolNode( doc, taskLinkGroupElement, "Highlight", highlight() ); @@ -306,16 +306,16 @@ void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc, \param element the DOM element from which to read the specification \return the newly created task link group */ -KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomElement& element ) +KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( TQDomElement& element ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); bool highlight = false, visible = false; - QColor color, highlightColor; - QString name; + TQColor color, highlightColor; + TQString name; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Highlight" ) { bool value; if( KDGanttXML::readBoolNode( element, value ) ) @@ -325,15 +325,15 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl if( KDGanttXML::readBoolNode( element, value ) ) visible = value; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) color = value; } else if( tagName == "HighlightColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) highlightColor = value; } else if( tagName == "Name" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) name = value; } else { @@ -362,7 +362,7 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl Generates a unique name if necessary and inserts it into the group dictionary. */ -void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name ) +void KDGanttViewTaskLinkGroup::generateAndInsertName( const TQString& name ) { // First check if we already had a name. This can be the case if // the item was reconstructed from an XML file. @@ -370,11 +370,11 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name ) // We had a name, remove it sGroupDict.remove( _name ); - QString newName; - if ( name.isEmpty() || sGroupDict.find( name ) ) { + TQString newName; + if ( name.isEmpty() || sGroupDict.tqfind( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sGroupDict.find( newName ) ) { + while( sGroupDict.tqfind( newName ) ) { newName += "_0"; } } else { diff --git a/kdgantt/KDGanttViewTaskLinkGroup.h b/kdgantt/KDGanttViewTaskLinkGroup.h index 1438c03a..1b8bb613 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.h +++ b/kdgantt/KDGanttViewTaskLinkGroup.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. ** **********************************************************************/ @@ -36,16 +36,16 @@ #define KDGANTTVIEWTASKLINKGROUP_H #include "KDGanttViewTaskLink.h" -#include <qptrlist.h> -#include <qdict.h> +#include <tqptrlist.h> +#include <tqdict.h> class KDTimeTableWidget; class KDGanttView; -class KDGanttViewTaskLinkGroup : public QObject +class KDGanttViewTaskLinkGroup : public TQObject { public: - KDGanttViewTaskLinkGroup( const QString& name ); + KDGanttViewTaskLinkGroup( const TQString& name ); KDGanttViewTaskLinkGroup(); ~KDGanttViewTaskLinkGroup(); void insert (KDGanttViewTaskLink*) ; @@ -57,32 +57,32 @@ public: void setHighlight( bool highlight ); bool highlight() const; - void setColor( const QColor& color ); - QColor color() const; - void setHighlightColor( const QColor& color ); - QColor highlightColor() const; + void setColor( const TQColor& color ); + TQColor color() const; + void setHighlightColor( const TQColor& color ); + TQColor highlightColor() const; - static KDGanttViewTaskLinkGroup* find( const QString& name ); + static KDGanttViewTaskLinkGroup* tqfind( const TQString& name ); - void createNode( QDomDocument& doc, - QDomElement& parentElement ); - static KDGanttViewTaskLinkGroup* createFromDomElement( QDomElement& ); + void createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ); + static KDGanttViewTaskLinkGroup* createFromDomElement( TQDomElement& ); - void generateAndInsertName( const QString& name ); + void generateAndInsertName( const TQString& name ); private: friend class KDTimeTableWidget; friend class KDGanttViewTaskLink; bool isvisible,ishighlighted; - QColor myColor, myColorHL; - QPtrList<KDGanttViewTaskLink> myTaskLinkList; - QString _name; + TQColor myColor, myColorHL; + TQPtrList<KDGanttViewTaskLink> myTaskLinkList; + TQString _name; void insertItem(KDGanttViewTaskLink*); void removeItem (KDGanttViewTaskLink*); - static QDict<KDGanttViewTaskLinkGroup> sGroupDict; + static TQDict<KDGanttViewTaskLinkGroup> sGroupDict; }; #endif diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp index 264f7673..28776174 100644 --- a/kdgantt/KDGanttXMLTools.cpp +++ b/kdgantt/KDGanttXMLTools.cpp @@ -4,7 +4,7 @@ */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -27,129 +27,129 @@ ** 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. ** **********************************************************************/ #include "KDGanttXMLTools.h" -#include <qbrush.h> -#include <qbuffer.h> -#include <qimage.h> +#include <tqbrush.h> +#include <tqbuffer.h> +#include <tqimage.h> #include <zlib.h> namespace KDGanttXML { -void createBoolNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, bool value ) +void createBoolNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, bool value ) { - QDomElement newElement = + TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); - QDomText elementContent = + tqparent.appendChild( newElement ); + TQDomText elementContent = doc.createTextNode( value ? "true" : "false" ); newElement.appendChild( elementContent ); } -void createSizeNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QSize& value ) +void createSizeNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQSize& value ) { - QDomElement newElement = + TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); + tqparent.appendChild( newElement ); newElement.setAttribute( "Width", value.width() ); newElement.setAttribute( "Height", value.height() ); } -void createIntNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, int value ) +void createIntNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, int value ) { - QDomElement newElement = + TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); - QDomText elementContent = - doc.createTextNode( QString::number( value ) ); + tqparent.appendChild( newElement ); + TQDomText elementContent = + doc.createTextNode( TQString::number( value ) ); newElement.appendChild( elementContent ); } -void createDoubleNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, double value ) +void createDoubleNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, double value ) { - QDomElement newElement = + TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); - QDomText elementContent = - doc.createTextNode( QString::number( value ) ); + tqparent.appendChild( newElement ); + TQDomText elementContent = + doc.createTextNode( TQString::number( value ) ); newElement.appendChild( elementContent ); } -void createStringNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, - const QString& text ) +void createStringNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, + const TQString& text ) { - QDomElement newElement = + TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); - QDomText elementContent = + tqparent.appendChild( newElement ); + TQDomText elementContent = doc.createTextNode( text ); newElement.appendChild( elementContent ); } -void createColorNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QColor& color ) +void createColorNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQColor& color ) { - QDomElement colorElement = doc.createElement( elementName ); - parent.appendChild( colorElement ); + TQDomElement colorElement = doc.createElement( elementName ); + tqparent.appendChild( colorElement ); colorElement.setAttribute( "Red", - QString::number( color.red() ) ); + TQString::number( color.red() ) ); colorElement.setAttribute( "Green", - QString::number( color.green() ) ); + TQString::number( color.green() ) ); colorElement.setAttribute( "Blue", - QString::number( color.blue() ) ); + TQString::number( color.blue() ) ); } -void createBrushNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QBrush& brush ) +void createBrushNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQBrush& brush ) { - QDomElement brushElement = doc.createElement( elementName ); - parent.appendChild( brushElement ); + TQDomElement brushElement = doc.createElement( elementName ); + tqparent.appendChild( brushElement ); createColorNode( doc, brushElement, "Color", brush.color() ); createStringNode( doc, brushElement, "Style", KDGanttXML::brushStyleToString( brush.style() ) ); - if( brush.style() == Qt::CustomPattern && brush.pixmap() ) + if( brush.style() == TQt::CustomPattern && brush.pixmap() ) createPixmapNode( doc, brushElement, "Pixmap", *brush.pixmap() ); } -void createPixmapNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QPixmap& pixmap ) +void createPixmapNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQPixmap& pixmap ) { - QDomElement pixmapElement = doc.createElement( elementName ); - parent.appendChild( pixmapElement ); + TQDomElement pixmapElement = doc.createElement( elementName ); + tqparent.appendChild( pixmapElement ); // Convert the pixmap to an image, save that image to an in-memory // XPM representation and compress this representation. This - // conforms to the file format Qt Designer uses. - QByteArray ba; - QBuffer buffer( ba ); + // conforms to the file format TQt Designer uses. + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); - QImageIO imgio( &buffer, "XPM" ); - QImage image = pixmap.convertToImage(); + TQImageIO imgio( &buffer, "XPM" ); + TQImage image = pixmap.convertToImage(); imgio.setImage( image ); imgio.write(); buffer.close(); ulong len = ba.size() * 2; - QByteArray bazip( len ); + TQByteArray bazip( len ); ::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() ); - QString dataString; + TQString dataString; static const char hexchars[] = "0123456789abcdef"; for ( int i = 0; i < (int)len; ++i ) { uchar c = (uchar) bazip[i]; @@ -163,114 +163,110 @@ void createPixmapNode( QDomDocument& doc, QDomNode& parent, } -void createRectNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QRect& rect ) +void createRectNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQRect& rect ) { - QDomElement rectElement = doc.createElement( elementName ); - parent.appendChild( rectElement ); - QDomElement xElement = doc.createElement( "X" ); + TQDomElement rectElement = doc.createElement( elementName ); + tqparent.appendChild( rectElement ); + TQDomElement xElement = doc.createElement( "X" ); rectElement.appendChild( xElement ); - QDomText xContent = doc.createTextNode( QString::number( rect.x() ) ); + TQDomText xContent = doc.createTextNode( TQString::number( rect.x() ) ); xElement.appendChild( xContent ); - QDomElement yElement = doc.createElement( "Y" ); + TQDomElement yElement = doc.createElement( "Y" ); rectElement.appendChild( yElement ); - QDomText yContent = doc.createTextNode( QString::number( rect.y() ) ); + TQDomText yContent = doc.createTextNode( TQString::number( rect.y() ) ); yElement.appendChild( yContent ); - QDomElement widthElement = doc.createElement( "Width" ); + TQDomElement widthElement = doc.createElement( "Width" ); rectElement.appendChild( widthElement ); - QDomText widthContent = doc.createTextNode( QString::number( rect.width() ) ); + TQDomText widthContent = doc.createTextNode( TQString::number( rect.width() ) ); widthElement.appendChild( widthContent ); - QDomElement heightElement = doc.createElement( "Height" ); + TQDomElement heightElement = doc.createElement( "Height" ); rectElement.appendChild( heightElement ); - QDomText heightContent = doc.createTextNode( QString::number( rect.height() ) ); + TQDomText heightContent = doc.createTextNode( TQString::number( rect.height() ) ); heightElement.appendChild( heightContent ); } -void createStringListNodes( QDomDocument& doc, QDomNode& parent, - const QString& elementName, - const QStringList* list ) +void createStringListNodes( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, + const TQStringList* list ) { if( !list ) return; - for( QStringList::ConstIterator it = list->begin(); + for( TQStringList::ConstIterator it = list->begin(); it != list->end(); ++it ) { - QDomElement element = doc.createElement( elementName ); - parent.appendChild( element ); - QDomText elementContent = doc.createTextNode( *it ); + TQDomElement element = doc.createElement( elementName ); + tqparent.appendChild( element ); + TQDomText elementContent = doc.createTextNode( *it ); element.appendChild( elementContent ); } } -void createFontNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QFont& font ) +void createFontNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQFont& font ) { - QDomElement fontElement = doc.createElement( elementName ); - parent.appendChild( fontElement ); + TQDomElement fontElement = doc.createElement( elementName ); + tqparent.appendChild( fontElement ); createStringNode( doc, fontElement, "Family", font.family() ); createIntNode( doc, fontElement, "PointSize", font.pointSize() ); createIntNode( doc, fontElement, "PixelSize", font.pixelSize() ); createIntNode( doc, fontElement, "Weight", font.weight() ); createBoolNode( doc, fontElement, "Italic", font.italic() ); -#if QT_VERSION < 300 - // Qt 3 handles the charset internally. - createIntNode( doc, fontElement, "CharSet", font.charSet() ); -#endif } -void createPenNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QPen& pen ) +void createPenNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQPen& pen ) { - QDomElement penElement = doc.createElement( elementName ); - parent.appendChild( penElement ); + TQDomElement penElement = doc.createElement( elementName ); + tqparent.appendChild( penElement ); createIntNode( doc, penElement, "Width", pen.width() ); createColorNode( doc, penElement, "Color", pen.color() ); createStringNode( doc, penElement, "Style", penStyleToString( pen.style() ) ); } -void createDateTimeNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, - const QDateTime& datetime ) +void createDateTimeNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, + const TQDateTime& datetime ) { - QDomElement dateTimeElement = doc.createElement( elementName ); - parent.appendChild( dateTimeElement ); + TQDomElement dateTimeElement = doc.createElement( elementName ); + tqparent.appendChild( dateTimeElement ); createDateNode( doc, dateTimeElement, "Date", datetime.date() ); createTimeNode( doc, dateTimeElement, "Time", datetime.time() ); } -void createDateNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QDate& date ) +void createDateNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQDate& date ) { - QDomElement dateElement = doc.createElement( elementName ); - parent.appendChild( dateElement ); - dateElement.setAttribute( "Year", QString::number( date.year() ) ); - dateElement.setAttribute( "Month", QString::number( date.month() ) ); - dateElement.setAttribute( "Day", QString::number( date.day() ) ); + TQDomElement dateElement = doc.createElement( elementName ); + tqparent.appendChild( dateElement ); + dateElement.setAttribute( "Year", TQString::number( date.year() ) ); + dateElement.setAttribute( "Month", TQString::number( date.month() ) ); + dateElement.setAttribute( "Day", TQString::number( date.day() ) ); } -void createTimeNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QTime& time ) +void createTimeNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQTime& time ) { - QDomElement timeElement = doc.createElement( elementName ); - parent.appendChild( timeElement ); + TQDomElement timeElement = doc.createElement( elementName ); + tqparent.appendChild( timeElement ); timeElement.setAttribute( "Hour", - QString::number( time.hour() ) ); + TQString::number( time.hour() ) ); timeElement.setAttribute( "Minute", - QString::number( time.minute() ) ); + TQString::number( time.minute() ) ); timeElement.setAttribute( "Second", - QString::number( time.second() ) ); + TQString::number( time.second() ) ); timeElement.setAttribute( "Millisecond", - QString::number( time.msec() ) ); + TQString::number( time.msec() ) ); } -QString penStyleToString( Qt::PenStyle style ) +TQString penStyleToString( Qt::PenStyle style ) { switch( style ) { case Qt::NoPen: @@ -292,7 +288,7 @@ QString penStyleToString( Qt::PenStyle style ) -QString brushStyleToString( Qt::BrushStyle style ) +TQString brushStyleToString( Qt::BrushStyle style ) { // PENDING(kalle) Support custom patterns switch( style ) { @@ -332,14 +328,14 @@ QString brushStyleToString( Qt::BrushStyle style ) } -bool readStringNode( const QDomElement& element, QString& value ) +bool readStringNode( const TQDomElement& element, TQString& value ) { value = element.text(); return true; } -bool readIntNode( const QDomElement& element, int& value ) +bool readIntNode( const TQDomElement& element, int& value ) { bool ok = false; int temp = element.text().toInt( &ok ); @@ -349,7 +345,7 @@ bool readIntNode( const QDomElement& element, int& value ) } -bool readDoubleNode( const QDomElement& element, double& value ) +bool readDoubleNode( const TQDomElement& element, double& value ) { bool ok = false; double temp = element.text().toDouble( &ok ); @@ -359,7 +355,7 @@ bool readDoubleNode( const QDomElement& element, double& value ) } -bool readBoolNode( const QDomElement& element, bool& value ) +bool readBoolNode( const TQDomElement& element, bool& value ) { if( element.text() == "true" ) { value = true; @@ -372,7 +368,7 @@ bool readBoolNode( const QDomElement& element, bool& value ) } -bool readColorNode( const QDomElement& element, QColor& value ) +bool readColorNode( const TQDomElement& element, TQColor& value ) { bool ok = true; int red, green, blue; @@ -399,21 +395,21 @@ bool readColorNode( const QDomElement& element, QColor& value ) } -bool readBrushNode( const QDomElement& element, QBrush& brush ) +bool readBrushNode( const TQDomElement& element, TQBrush& brush ) { bool ok = true; - QColor tempColor; + TQColor tempColor; Qt::BrushStyle tempStyle; - QPixmap tempPixmap; - QDomNode node = element.firstChild(); + TQPixmap tempPixmap; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Color" ) { ok = ok & readColorNode( element, tempColor ); } else if( tagName == "Style" ) { - QString value; + TQString value; ok = ok & readStringNode( element, value ); tempStyle = stringToBrushStyle( value ); } else if( tagName == "Pixmap" ) { @@ -436,18 +432,18 @@ bool readBrushNode( const QDomElement& element, QBrush& brush ) } -bool readPixmapNode( const QDomElement& element, QPixmap& pixmap ) +bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap ) { bool ok = true; int tempLengthi; - QString tempData; - QDomNode node = element.firstChild(); + TQString tempData; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Format" ) { - QString formatName; + TQString formatName; ok = ok & readStringNode( element, formatName ); #ifndef NDEBUG if( formatName != "XPM.GZ" ) @@ -466,7 +462,7 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap ) if( ok ) { if( 0 < tempLengthi ) { - // Decode the image file format in the same way Qt Designer does. + // Decode the image file format in the same way TQt Designer does. char *ba = new char[ tempData.length() / 2 ]; for ( int i = 0; i < (int)tempData.length() / 2; ++i ) { char h = tempData[ 2 * i ].latin1(); @@ -487,10 +483,10 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap ) if( tempLengthi < (int)tempData.length() * 5 ) tempLengthi = tempData.length() * 5; unsigned long tempLength = tempLengthi; - QByteArray baunzip( tempLength ); + TQByteArray baunzip( tempLength ); ::uncompress( (uchar*) baunzip.data(), &tempLength, (uchar*) ba, tempData.length()/2 ); - QImage image; + TQImage image; image.loadFromData( (const uchar*)baunzip.data(), tempLength, "XPM" ); if( image.isNull() ) @@ -505,23 +501,23 @@ bool readPixmapNode( const QDomElement& element, QPixmap& pixmap ) } -bool readPenNode( const QDomElement& element, QPen& pen ) +bool readPenNode( const TQDomElement& element, TQPen& pen ) { bool ok = true; int tempWidth; - QColor tempColor; + TQColor tempColor; Qt::PenStyle tempStyle; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Width" ) { ok = ok & readIntNode( element, tempWidth ); } else if( tagName == "Color" ) { ok = ok & readColorNode( element, tempColor ); } else if( tagName == "Style" ) { - QString value; + TQString value; ok = ok & readStringNode( element, value ); tempStyle = stringToPenStyle( value ); } else { @@ -540,18 +536,18 @@ bool readPenNode( const QDomElement& element, QPen& pen ) return ok; } -bool readFontNode( const QDomElement& element, QFont& font ) +bool readFontNode( const TQDomElement& element, TQFont& font ) { bool ok = true; - QString family; + TQString family; int pointSize, pixelSize, weight; bool italic; int charSet; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Family" ) { ok = ok & readStringNode( element, family ); } else if( tagName == "PointSize" ) { @@ -577,24 +573,20 @@ bool readFontNode( const QDomElement& element, QFont& font ) if ( pixelSize > 0 ) font.setPixelSize( pixelSize ); font.setWeight( weight ); font.setItalic( italic ); -#if QT_VERSION < 300 - // Qt 3 handles charsets internally. - font.setCharSet( (QFont::CharSet)charSet ); -#endif } return ok; } -bool readRectNode( const QDomElement& element, QRect& value ) +bool readRectNode( const TQDomElement& element, TQRect& value ) { bool ok = true; int width, height, x, y; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Width" ) { ok = ok & readIntNode( element, width ); } else if( tagName == "Height" ) { @@ -622,16 +614,16 @@ bool readRectNode( const QDomElement& element, QRect& value ) -bool readDateTimeNode( const QDomElement& element, QDateTime& datetime ) +bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime ) { bool ok = true; - QDate tempDate; - QTime tempTime; - QDomNode node = element.firstChild(); + TQDate tempDate; + TQTime tempTime; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Date" ) { ok = ok & readDateNode( element, tempDate ); } else if( tagName == "Time" ) { @@ -652,7 +644,7 @@ bool readDateTimeNode( const QDomElement& element, QDateTime& datetime ) } -bool readDateNode( const QDomElement& element, QDate& value ) +bool readDateNode( const TQDomElement& element, TQDate& value ) { bool ok = true; int year, month, day; @@ -680,7 +672,7 @@ bool readDateNode( const QDomElement& element, QDate& value ) -bool readTimeNode( const QDomElement& element, QTime& value ) +bool readTimeNode( const TQDomElement& element, TQTime& value ) { bool ok = true; int hour, minute, second, msec; @@ -713,7 +705,7 @@ bool readTimeNode( const QDomElement& element, QTime& value ) -Qt::PenStyle stringToPenStyle( const QString& style ) +Qt::PenStyle stringToPenStyle( const TQString& style ) { if( style == "NoPen" ) return Qt::NoPen; @@ -732,7 +724,7 @@ Qt::PenStyle stringToPenStyle( const QString& style ) } -Qt::BrushStyle stringToBrushStyle( const QString& style ) +Qt::BrushStyle stringToBrushStyle( const TQString& style ) { // PENDING(kalle) Support custom patterns if( style == "NoBrush" ) diff --git a/kdgantt/KDGanttXMLTools.h b/kdgantt/KDGanttXMLTools.h index bbb573bb..30d890a2 100644 --- a/kdgantt/KDGanttXMLTools.h +++ b/kdgantt/KDGanttXMLTools.h @@ -4,7 +4,7 @@ */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -27,75 +27,75 @@ ** 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. ** **********************************************************************/ #ifndef __KDGANTTXMLTOOLS_H__ #define __KDGANTTXMLTOOLS_H__ -#include <qpen.h> -#include <qdom.h> -#include <qstring.h> -#include <qcolor.h> -#include <qrect.h> -#include <qfont.h> -#include <qstringlist.h> -#include <qdatetime.h> +#include <tqpen.h> +#include <tqdom.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqrect.h> +#include <tqfont.h> +#include <tqstringlist.h> +#include <tqdatetime.h> namespace KDGanttXML { - QString penStyleToString( Qt::PenStyle style ); - Qt::PenStyle stringToPenStyle( const QString& style ); - QString brushStyleToString( Qt::BrushStyle style ); - Qt::BrushStyle stringToBrushStyle( const QString& style ); + TQString penStyleToString( Qt::PenStyle style ); + Qt::PenStyle stringToPenStyle( const TQString& style ); + TQString brushStyleToString( Qt::BrushStyle style ); + Qt::BrushStyle stringToBrushStyle( const TQString& style ); - void createBoolNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, bool value ); - void createSizeNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QSize& value ); - void createIntNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, int value ); - void createDoubleNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, double value ); - void createStringNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, - const QString& text ); - void createColorNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QColor& color ); - void createBrushNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QBrush& brush ); - void createPixmapNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QPixmap& pixmap ); - void createRectNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QRect& rect ); - void createStringListNodes( QDomDocument& doc, QDomNode& parent, - const QString& elementName, - const QStringList* list ); - void createFontNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QFont& font ); + void createBoolNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, bool value ); + void createSizeNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQSize& value ); + void createIntNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, int value ); + void createDoubleNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, double value ); + void createStringNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, + const TQString& text ); + void createColorNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQColor& color ); + void createBrushNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQBrush& brush ); + void createPixmapNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQPixmap& pixmap ); + void createRectNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQRect& rect ); + void createStringListNodes( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, + const TQStringList* list ); + void createFontNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQFont& font ); - void createPenNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QPen& pen ); - void createDateTimeNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, - const QDateTime& datetime ); - void createDateNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QDate& date ); - void createTimeNode( QDomDocument& doc, QDomNode& parent, - const QString& elementName, const QTime& time ); - bool readIntNode( const QDomElement& element, int& value ); - bool readStringNode( const QDomElement& element, QString& value ); - bool readDoubleNode( const QDomElement& element, double& value ); - bool readBoolNode( const QDomElement& element, bool& value ); - bool readColorNode( const QDomElement& element, QColor& value ); - bool readBrushNode( const QDomElement& element, QBrush& brush ); - bool readPixmapNode( const QDomElement& element, QPixmap& pixmap ); - bool readRectNode( const QDomElement& element, QRect& value ); - bool readFontNode( const QDomElement& element, QFont& font ); - bool readPenNode( const QDomElement& element, QPen& pen ); - bool readDateTimeNode( const QDomElement& element, QDateTime& datetime ); - bool readDateNode( const QDomElement& element, QDate& date ); - bool readTimeNode( const QDomElement& element, QTime& time ); + void createPenNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQPen& pen ); + void createDateTimeNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, + const TQDateTime& datetime ); + void createDateNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQDate& date ); + void createTimeNode( TQDomDocument& doc, TQDomNode& tqparent, + const TQString& elementName, const TQTime& time ); + bool readIntNode( const TQDomElement& element, int& value ); + bool readStringNode( const TQDomElement& element, TQString& value ); + bool readDoubleNode( const TQDomElement& element, double& value ); + bool readBoolNode( const TQDomElement& element, bool& value ); + bool readColorNode( const TQDomElement& element, TQColor& value ); + bool readBrushNode( const TQDomElement& element, TQBrush& brush ); + bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap ); + bool readRectNode( const TQDomElement& element, TQRect& value ); + bool readFontNode( const TQDomElement& element, TQFont& font ); + bool readPenNode( const TQDomElement& element, TQPen& pen ); + bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime ); + bool readDateNode( const TQDomElement& element, TQDate& date ); + bool readTimeNode( const TQDomElement& element, TQTime& time ); } #endif diff --git a/kdgantt/itemAttributeDialog.ui b/kdgantt/itemAttributeDialog.ui index 8b8d5518..a31e0cdb 100644 --- a/kdgantt/itemAttributeDialog.ui +++ b/kdgantt/itemAttributeDialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>itemAttributeDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>itemAttributeDialog</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -39,7 +39,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -47,7 +47,7 @@ <string>Item name:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>itemName</cstring> </property> @@ -64,14 +64,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -85,7 +85,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -93,7 +93,7 @@ <string>ShapeType:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel8</cstring> </property> @@ -101,12 +101,12 @@ <string>Highlight color:</string> </property> </widget> - <widget class="QTimeEdit" row="4" column="5"> + <widget class="TQTimeEdit" row="4" column="5"> <property name="name"> <cstring>TimeEdit5</cstring> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -114,7 +114,7 @@ <string>Lead</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> @@ -122,7 +122,7 @@ <string>ShapeColor:</string> </property> </widget> - <widget class="QDateEdit" row="3" column="2"> + <widget class="TQDateEdit" row="3" column="2"> <property name="name"> <cstring>DateEdit1</cstring> </property> @@ -130,7 +130,7 @@ <bool>true</bool> </property> </widget> - <widget class="QComboBox" row="1" column="3"> + <widget class="TQComboBox" row="1" column="3"> <item> <property name="text"> <string>TriangleDown</string> @@ -160,7 +160,7 @@ <cstring>MiddleBox</cstring> </property> </widget> - <widget class="QDateEdit" row="3" column="3"> + <widget class="TQDateEdit" row="3" column="3"> <property name="name"> <cstring>DateEdit2</cstring> </property> @@ -168,7 +168,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>StartShape</cstring> </property> @@ -176,7 +176,7 @@ <string>Start</string> </property> </widget> - <widget class="QPushButton" row="2" column="2"> + <widget class="TQPushButton" row="2" column="2"> <property name="name"> <cstring>ChangeStart</cstring> </property> @@ -184,7 +184,7 @@ <string>Change</string> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -192,7 +192,7 @@ <string>Middle</string> </property> </widget> - <widget class="QComboBox" row="1" column="2"> + <widget class="TQComboBox" row="1" column="2"> <item> <property name="text"> <string>TriangleDown</string> @@ -222,7 +222,7 @@ <cstring>StartBox</cstring> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -230,12 +230,12 @@ <string>End</string> </property> </widget> - <widget class="QDateEdit" row="3" column="1"> + <widget class="TQDateEdit" row="3" column="1"> <property name="name"> <cstring>DateEdit4</cstring> </property> </widget> - <widget class="QDateEdit" row="3" column="4"> + <widget class="TQDateEdit" row="3" column="4"> <property name="name"> <cstring>DateEdit3</cstring> </property> @@ -243,7 +243,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="5"> + <widget class="TQLabel" row="0" column="5"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -251,7 +251,7 @@ <string>Actual End</string> </property> </widget> - <widget class="QPushButton" row="5" column="3"> + <widget class="TQPushButton" row="5" column="3"> <property name="name"> <cstring>HighMiddle</cstring> </property> @@ -259,7 +259,7 @@ <string>Change</string> </property> </widget> - <widget class="QPushButton" row="5" column="2"> + <widget class="TQPushButton" row="5" column="2"> <property name="name"> <cstring>HighStart</cstring> </property> @@ -267,7 +267,7 @@ <string>Change</string> </property> </widget> - <widget class="QPushButton" row="2" column="3"> + <widget class="TQPushButton" row="2" column="3"> <property name="name"> <cstring>ChangeMiddle</cstring> </property> @@ -275,7 +275,7 @@ <string>Change</string> </property> </widget> - <widget class="QTimeEdit" row="4" column="4"> + <widget class="TQTimeEdit" row="4" column="4"> <property name="name"> <cstring>TimeEdit3</cstring> </property> @@ -283,7 +283,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="2" column="4"> + <widget class="TQPushButton" row="2" column="4"> <property name="name"> <cstring>ChangeEnd</cstring> </property> @@ -291,7 +291,7 @@ <string>Change</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> @@ -299,7 +299,7 @@ <string>Date:</string> </property> </widget> - <widget class="QPushButton" row="5" column="4"> + <widget class="TQPushButton" row="5" column="4"> <property name="name"> <cstring>HighEnd</cstring> </property> @@ -307,7 +307,7 @@ <string>Change</string> </property> </widget> - <widget class="QComboBox" row="1" column="4"> + <widget class="TQComboBox" row="1" column="4"> <item> <property name="text"> <string>TriangleDown</string> @@ -337,17 +337,17 @@ <cstring>EndBox</cstring> </property> </widget> - <widget class="QTimeEdit" row="4" column="1"> + <widget class="TQTimeEdit" row="4" column="1"> <property name="name"> <cstring>TimeEdit4</cstring> </property> </widget> - <widget class="QDateEdit" row="3" column="5"> + <widget class="TQDateEdit" row="3" column="5"> <property name="name"> <cstring>DateEdit5</cstring> </property> </widget> - <widget class="QTimeEdit" row="4" column="2"> + <widget class="TQTimeEdit" row="4" column="2"> <property name="name"> <cstring>TimeEdit1</cstring> </property> @@ -355,7 +355,7 @@ <bool>true</bool> </property> </widget> - <widget class="QTimeEdit" row="4" column="3"> + <widget class="TQTimeEdit" row="4" column="3"> <property name="name"> <cstring>TimeEdit2</cstring> </property> @@ -363,7 +363,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel10</cstring> </property> @@ -383,14 +383,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout3</cstring> </property> @@ -404,7 +404,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -418,7 +418,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel7</cstring> </property> @@ -426,7 +426,7 @@ <string>Displayed text:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>LineEdit1</cstring> </property> @@ -441,7 +441,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout2</cstring> </property> @@ -455,18 +455,18 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel9</cstring> </property> <property name="text"> <string>Text color:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>ChangeText</cstring> </property> @@ -478,7 +478,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout8</cstring> </property> @@ -492,7 +492,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>PrioLabel</cstring> </property> @@ -500,7 +500,7 @@ <string>Priority:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>PrioSpinBox</cstring> </property> @@ -511,7 +511,7 @@ <number>1</number> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>PrioSlider</cstring> </property> @@ -525,7 +525,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>CalBox</cstring> </property> @@ -582,93 +582,93 @@ </connection> <connection> <sender>DateEdit1</sender> - <signal>valueChanged(const QDate&)</signal> + <signal>valueChanged(const TQDate&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>DateEdit1_valueChanged(const QDate&)</slot> + <slot>DateEdit1_valueChanged(const TQDate&)</slot> </connection> <connection> <sender>TimeEdit1</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>TimeEdit1_valueChanged(const QTime&)</slot> + <slot>TimeEdit1_valueChanged(const TQTime&)</slot> </connection> <connection> <sender>DateEdit2</sender> - <signal>valueChanged(const QDate&)</signal> + <signal>valueChanged(const TQDate&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>DateEdit2_valueChanged(const QDate&)</slot> + <slot>DateEdit2_valueChanged(const TQDate&)</slot> </connection> <connection> <sender>TimeEdit2</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>TimeEdit2_valueChanged(const QTime&)</slot> + <slot>TimeEdit2_valueChanged(const TQTime&)</slot> </connection> <connection> <sender>DateEdit3</sender> - <signal>valueChanged(const QDate&)</signal> + <signal>valueChanged(const TQDate&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>DateEdit3_valueChanged(const QDate&)</slot> + <slot>DateEdit3_valueChanged(const TQDate&)</slot> </connection> <connection> <sender>TimeEdit3</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>TimeEdit3_valueChanged(const QTime&)</slot> + <slot>TimeEdit3_valueChanged(const TQTime&)</slot> </connection> <connection> <sender>LineEdit1</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>LineEdit1_textChanged(const QString&)</slot> + <slot>LineEdit1_textChanged(const TQString&)</slot> </connection> <connection> <sender>StartBox</sender> - <signal>activated(const QString&)</signal> + <signal>activated(const TQString&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>StartBox_activated(const QString&)</slot> + <slot>StartBox_activated(const TQString&)</slot> </connection> <connection> <sender>MiddleBox</sender> - <signal>activated(const QString&)</signal> + <signal>activated(const TQString&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>MiddleBox_activated(const QString&)</slot> + <slot>MiddleBox_activated(const TQString&)</slot> </connection> <connection> <sender>EndBox</sender> - <signal>activated(const QString&)</signal> + <signal>activated(const TQString&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>EndBox_activated(const QString&)</slot> + <slot>EndBox_activated(const TQString&)</slot> </connection> <connection> <sender>DateEdit4</sender> - <signal>valueChanged(const QDate&)</signal> + <signal>valueChanged(const TQDate&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>DateEdit4_valueChanged(const QDate&)</slot> + <slot>DateEdit4_valueChanged(const TQDate&)</slot> </connection> <connection> <sender>TimeEdit4</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>TimeEdit4_valueChanged(const QTime&)</slot> + <slot>TimeEdit4_valueChanged(const TQTime&)</slot> </connection> <connection> <sender>DateEdit5</sender> - <signal>valueChanged(const QDate&)</signal> + <signal>valueChanged(const TQDate&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>DateEdit5_valueChanged(const QDate&)</slot> + <slot>DateEdit5_valueChanged(const TQDate&)</slot> </connection> <connection> <sender>TimeEdit5</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>TimeEdit5_valueChanged(const QTime&)</slot> + <slot>TimeEdit5_valueChanged(const TQTime&)</slot> </connection> <connection> <sender>itemName</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>itemAttributeDialog</receiver> - <slot>itemName_textChanged(const QString&)</slot> + <slot>itemName_textChanged(const TQString&)</slot> </connection> <connection> <sender>PrioSpinBox</sender> @@ -702,7 +702,7 @@ <variables> <variable>KDGanttViewItem * myItem</variable> </variables> -<slots> +<Q_SLOTS> <slot>init()</slot> <slot>ChangeText_clicked()</slot> <slot>ChangeStart_clicked()</slot> @@ -713,25 +713,25 @@ <slot>HighStart_clicked()</slot> <slot>HighMiddle_clicked()</slot> <slot>HighEnd_clicked()</slot> - <slot>DateEdit1_valueChanged( const QDate & )</slot> - <slot>TimeEdit1_valueChanged( const QTime & )</slot> - <slot>DateEdit2_valueChanged( const QDate & )</slot> - <slot>TimeEdit2_valueChanged( const QTime & )</slot> - <slot>DateEdit3_valueChanged( const QDate & )</slot> - <slot>TimeEdit3_valueChanged( const QTime & )</slot> - <slot>LineEdit1_textChanged( const QString & )</slot> - <slot>StartBox_activated( const QString & s )</slot> - <slot>MiddleBox_activated( const QString & s )</slot> - <slot>EndBox_activated( const QString & s )</slot> - <slot>DateEdit4_valueChanged( const QDate & )</slot> - <slot>TimeEdit4_valueChanged( const QTime & )</slot> - <slot>DateEdit5_valueChanged( const QDate & )</slot> - <slot>TimeEdit5_valueChanged( const QTime & )</slot> - <slot>itemName_textChanged( const QString & )</slot> + <slot>DateEdit1_valueChanged( const TQDate & )</slot> + <slot>TimeEdit1_valueChanged( const TQTime & )</slot> + <slot>DateEdit2_valueChanged( const TQDate & )</slot> + <slot>TimeEdit2_valueChanged( const TQTime & )</slot> + <slot>DateEdit3_valueChanged( const TQDate & )</slot> + <slot>TimeEdit3_valueChanged( const TQTime & )</slot> + <slot>LineEdit1_textChanged( const TQString & )</slot> + <slot>StartBox_activated( const TQString & s )</slot> + <slot>MiddleBox_activated( const TQString & s )</slot> + <slot>EndBox_activated( const TQString & s )</slot> + <slot>DateEdit4_valueChanged( const TQDate & )</slot> + <slot>TimeEdit4_valueChanged( const TQTime & )</slot> + <slot>DateEdit5_valueChanged( const TQDate & )</slot> + <slot>TimeEdit5_valueChanged( const TQTime & )</slot> + <slot>itemName_textChanged( const TQString & )</slot> <slot>PrioSpinBox_valueChanged( int val )</slot> <slot>CalBox_toggled( bool mode )</slot> <slot>PrioSlider_valueChanged( int val )</slot> <slot returnType="KDGanttViewItem *">getItem()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h index 9ce60bdb..3ab24af8 100644 --- a/kdgantt/itemAttributeDialog.ui.h +++ b/kdgantt/itemAttributeDialog.ui.h @@ -22,8 +22,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. ** **********************************************************************/ @@ -31,12 +31,12 @@ /**************************************************************************** ** ui.h extension file, included from the uic-generated form implementation. ** -** If you wish to add, delete or rename slots use Qt Designer which will +** If you wish to add, delete or rename slots use TQt Designer which will ** update this file, preserving your code. Create an init() slot in place of ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ -#include <qcolordialog.h> +#include <tqcolordialog.h> void itemAttributeDialog::init( ) { @@ -49,12 +49,12 @@ void itemAttributeDialog::init( ) void itemAttributeDialog::ChangeText_clicked() { if ( !myItem) return; - QColor c = QColorDialog::getColor( myItem->textColor(), this ); + TQColor c = TQColorDialog::getColor( myItem->textColor(), this ); if ( c.isValid() ) myItem->setTextColor( c ); - QPixmap * pix = (QPixmap *)ChangeText->pixmap(); + TQPixmap * pix = (TQPixmap *)ChangeText->pixmap(); pix->fill( myItem->textColor() ); - ChangeText->repaint(); + ChangeText->tqrepaint(); } @@ -62,10 +62,10 @@ void itemAttributeDialog::ChangeStart_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); - QColor st, mi, en; + myItem->tqshapes( start, middle, end ); + TQColor st, mi, en; myItem->colors( st, mi, en ); - QColor c = QColorDialog::getColor( st, this ); + TQColor c = TQColorDialog::getColor( st, this ); if ( c.isValid() ) { st = c; ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); @@ -79,10 +79,10 @@ void itemAttributeDialog::ChangeMiddle_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); - QColor st, mi, en; + myItem->tqshapes( start, middle, end ); + TQColor st, mi, en; myItem->colors( st, mi, en ); - QColor c = QColorDialog::getColor( mi, this ); + TQColor c = TQColorDialog::getColor( mi, this ); if ( c.isValid() ) { mi = c; ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) ); @@ -95,10 +95,10 @@ void itemAttributeDialog::ChangeEnd_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); - QColor st, mi, en; + myItem->tqshapes( start, middle, end ); + TQColor st, mi, en; myItem->colors( st, mi, en ); - QColor c = QColorDialog::getColor( en, this ); + TQColor c = TQColorDialog::getColor( en, this ); if ( c.isValid() ) { en = c; ChangeEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) ); @@ -237,15 +237,15 @@ void itemAttributeDialog::reset( KDGanttViewItem * item ) TimeEdit1->setTime( item->startTime().time() ); if ( item->pixmap() != 0 ) setIcon( *(item->pixmap()) ); - setCaption( "Properties of " + ((QListViewItem*)item)->text(0) ); - itemName->setText(((QListViewItem*)item)->text(0) ); + setCaption( "Properties of " + ((TQListViewItem*)item)->text(0) ); + itemName->setText(((TQListViewItem*)item)->text(0) ); // DateEdit1->setRange(item->startTime().date().addYears(-10), item->endTime().date() ); // DateEdit3->setRange(item->startTime().date(), item->endTime().date().addYears(10)); LineEdit1->setText( item->text() ); KDGanttViewItem::Shape start, middle, end; - item->shapes( start, middle, end ); - QColor st, mi, en; + item->tqshapes( start, middle, end ); + TQColor st, mi, en; item->colors( st, mi, en ); ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) ); @@ -254,9 +254,9 @@ void itemAttributeDialog::reset( KDGanttViewItem * item ) HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) ); HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) ); - ChangeText->setPixmap(QPixmap( 16,16 )); - QPixmap * pix; - pix = (QPixmap *)ChangeText->pixmap(); + ChangeText->setPixmap(TQPixmap( 16,16 )); + TQPixmap * pix; + pix = (TQPixmap *)ChangeText->pixmap(); pix->fill( item->textColor() ); StartBox->setCurrentItem((int)start ); MiddleBox->setCurrentItem((int)middle ); @@ -272,10 +272,10 @@ void itemAttributeDialog::HighStart_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); - QColor st, mi, en; + myItem->tqshapes( start, middle, end ); + TQColor st, mi, en; myItem->highlightColors( st, mi, en ); - QColor c = QColorDialog::getColor( st, this ); + TQColor c = TQColorDialog::getColor( st, this ); if ( c.isValid() ) { st = c; HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); @@ -289,10 +289,10 @@ void itemAttributeDialog::HighMiddle_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); - QColor st, mi, en; + myItem->tqshapes( start, middle, end ); + TQColor st, mi, en; myItem->highlightColors( st, mi, en ); - QColor c = QColorDialog::getColor( mi, this ); + TQColor c = TQColorDialog::getColor( mi, this ); if ( c.isValid() ) { mi = c; HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) ); @@ -306,10 +306,10 @@ void itemAttributeDialog::HighEnd_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); - QColor st, mi, en; + myItem->tqshapes( start, middle, end ); + TQColor st, mi, en; myItem->highlightColors( st, mi, en ); - QColor c = QColorDialog::getColor( en, this ); + TQColor c = TQColorDialog::getColor( en, this ); if ( c.isValid() ) { en = c; HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) ); @@ -319,10 +319,10 @@ void itemAttributeDialog::HighEnd_clicked() } -void itemAttributeDialog::DateEdit1_valueChanged( const QDate & ) +void itemAttributeDialog::DateEdit1_valueChanged( const TQDate & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit1->date() ); dt.setTime( TimeEdit1->time() ); if ( dt.isValid() ) @@ -333,10 +333,10 @@ void itemAttributeDialog::DateEdit1_valueChanged( const QDate & ) } -void itemAttributeDialog::TimeEdit1_valueChanged( const QTime & ) +void itemAttributeDialog::TimeEdit1_valueChanged( const TQTime & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit1->date() ); dt.setTime( TimeEdit1->time() ); if ( dt.isValid() ) { @@ -347,10 +347,10 @@ void itemAttributeDialog::TimeEdit1_valueChanged( const QTime & ) } -void itemAttributeDialog::DateEdit2_valueChanged( const QDate & ) +void itemAttributeDialog::DateEdit2_valueChanged( const TQDate & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit2->date() ); dt.setTime( TimeEdit2->time() ); if ( dt.isValid() ) { @@ -360,10 +360,10 @@ void itemAttributeDialog::DateEdit2_valueChanged( const QDate & ) } -void itemAttributeDialog::TimeEdit2_valueChanged( const QTime & ) +void itemAttributeDialog::TimeEdit2_valueChanged( const TQTime & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit2->date() ); dt.setTime( TimeEdit2->time() ); if ( dt.isValid() ) { @@ -373,10 +373,10 @@ void itemAttributeDialog::TimeEdit2_valueChanged( const QTime & ) } -void itemAttributeDialog::DateEdit3_valueChanged( const QDate & ) +void itemAttributeDialog::DateEdit3_valueChanged( const TQDate & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit3->date() ); dt.setTime( TimeEdit3->time() ); if ( dt.isValid() ) { @@ -386,10 +386,10 @@ void itemAttributeDialog::DateEdit3_valueChanged( const QDate & ) } -void itemAttributeDialog::TimeEdit3_valueChanged( const QTime & ) +void itemAttributeDialog::TimeEdit3_valueChanged( const TQTime & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit3->date() ); dt.setTime( TimeEdit3->time() ); if ( dt.isValid() ) { @@ -399,27 +399,27 @@ void itemAttributeDialog::TimeEdit3_valueChanged( const QTime & ) } -void itemAttributeDialog::LineEdit1_textChanged( const QString & ) +void itemAttributeDialog::LineEdit1_textChanged( const TQString & ) { if ( !myItem) return; myItem->setText(LineEdit1->text()); } -void itemAttributeDialog::StartBox_activated( const QString & s ) +void itemAttributeDialog::StartBox_activated( const TQString & s ) { KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); start = KDGanttViewItem::stringToShape( s ); myItem->setShapes( start, middle, end ); reset( myItem ); } -void itemAttributeDialog::MiddleBox_activated( const QString & s ) +void itemAttributeDialog::MiddleBox_activated( const TQString & s ) { KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); middle = KDGanttViewItem::stringToShape( s ); myItem->setShapes( start, middle, end ); reset( myItem ); @@ -427,10 +427,10 @@ void itemAttributeDialog::MiddleBox_activated( const QString & s ) } -void itemAttributeDialog::EndBox_activated( const QString & s ) +void itemAttributeDialog::EndBox_activated( const TQString & s ) { KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); end = KDGanttViewItem::stringToShape( s ); myItem->setShapes( start, middle, end ); reset( myItem ); @@ -438,10 +438,10 @@ void itemAttributeDialog::EndBox_activated( const QString & s ) } -void itemAttributeDialog::DateEdit4_valueChanged( const QDate & ) +void itemAttributeDialog::DateEdit4_valueChanged( const TQDate & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit4->date() ); dt.setTime( TimeEdit4->time() ); if ( dt.isValid() ) { @@ -451,10 +451,10 @@ void itemAttributeDialog::DateEdit4_valueChanged( const QDate & ) } -void itemAttributeDialog::TimeEdit4_valueChanged( const QTime & ) +void itemAttributeDialog::TimeEdit4_valueChanged( const TQTime & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit4->date() ); dt.setTime( TimeEdit4->time() ); if ( dt.isValid() ) { @@ -464,10 +464,10 @@ void itemAttributeDialog::TimeEdit4_valueChanged( const QTime & ) } -void itemAttributeDialog::DateEdit5_valueChanged( const QDate & ) +void itemAttributeDialog::DateEdit5_valueChanged( const TQDate & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit5->date() ); dt.setTime( TimeEdit5->time() ); if ( dt.isValid() ) { @@ -477,10 +477,10 @@ void itemAttributeDialog::DateEdit5_valueChanged( const QDate & ) } -void itemAttributeDialog::TimeEdit5_valueChanged( const QTime & ) +void itemAttributeDialog::TimeEdit5_valueChanged( const TQTime & ) { if ( !myItem) return; - QDateTime dt; + TQDateTime dt; dt.setDate( DateEdit5->date() ); dt.setTime( TimeEdit5->time() ); if ( dt.isValid() ) { @@ -491,10 +491,10 @@ void itemAttributeDialog::TimeEdit5_valueChanged( const QTime & ) -void itemAttributeDialog::itemName_textChanged( const QString & ) +void itemAttributeDialog::itemName_textChanged( const TQString & ) { if ( !myItem) return; - ((QListViewItem*)myItem)->setText( 0, itemName->text() ); + ((TQListViewItem*)myItem)->setText( 0, itemName->text() ); setCaption( "Properties of " + itemName->text() ); } diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h index 3cfe7af3..34248062 100644 --- a/kdgantt/qlayoutengine_p.h +++ b/kdgantt/qlayoutengine_p.h @@ -1,7 +1,7 @@ -// THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter +// THIS IS A COPY OF THE FILE FOUND IN $TQTDIR/src/kernel. Needed to modify qsplitter /**************************************************************************** -** $Id: qlayoutengine_p.h 523435 2006-03-28 08:01:15Z mlaurent $ +** $Id: qtqlayoutengine_p.h 523435 2006-03-28 08:01:15Z mlaurent $ ** ** Internal header file. ** @@ -9,27 +9,27 @@ ** ** Copyright (C) 1998-99 by Trolltech AS. All rights reserved. ** -** This file is part of the kernel module of the Qt GUI Toolkit. +** This file is part of the kernel module of the TQt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. +** LICENSE.TQPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. +** information about TQt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for TQPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are @@ -37,16 +37,16 @@ ** **********************************************************************/ -#ifndef QLAYOUTENGINE_P_H -#define QLAYOUTENGINE_P_H +#ifndef TQLAYOUTENGINE_P_H +#define TQLAYOUTENGINE_P_H // // W A R N I N G // ------------- // -// This file is not part of the Qt API. It exists for the convenience -// of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp. +// This file is not part of the TQt API. It exists for the convenience +// of qtqlayout.cpp, qtqlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp. // This header file may change from version to version without notice, // or even be removed. // @@ -55,22 +55,22 @@ // -#ifndef QT_H -#include "qabstractlayout.h" -#endif // QT_H +#ifndef TQT_H +#include "tqabstracttqlayout.h" +#endif // TQT_H -#ifndef QT_NO_LAYOUT +#ifndef TQT_NO_LAYOUT struct QLayoutStruct { - void initParameters() { minimumSize = sizeHint = 0; - maximumSize = QWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } + void initParameters() { tqminimumSize = tqsizeHint = 0; + tqmaximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } void init() { stretch = 0; initParameters(); } //permanent storage: int stretch; //parameters: - QCOORD sizeHint; - QCOORD maximumSize; - QCOORD minimumSize; + TQCOORD tqsizeHint; + TQCOORD tqmaximumSize; + TQCOORD tqminimumSize; bool expansive; bool empty; //temporary storage: @@ -81,7 +81,7 @@ struct QLayoutStruct }; -void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, +void qGeomCalc( TQMemArray<QLayoutStruct> &chain, int start, int count, int pos, int space, int spacer ); @@ -92,20 +92,20 @@ void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, Expansive boxes win over non-expansive boxes. */ -static inline void qMaxExpCalc( QCOORD & max, bool &exp, - QCOORD boxmax, bool boxexp ) +static inline void qMaxExpCalc( TQCOORD & max, bool &exp, + TQCOORD boxmax, bool boxexp ) { if ( exp ) { if ( boxexp ) - max = QMAX( max, boxmax ); + max = TQMAX( max, boxmax ); } else { if ( boxexp ) max = boxmax; else - max = QMIN( max, boxmax ); + max = TQMIN( max, boxmax ); } exp = exp || boxexp; } -#endif //QT_NO_LAYOUT +#endif //TQT_NO_LAYOUT #endif |