From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdgantt/KDGanttMinimizeSplitter.cpp | 210 ++++++++++++++++------------------- kdgantt/KDGanttMinimizeSplitter.h | 62 +++++------ kdgantt/KDGanttSemiSizingControl.cpp | 32 +++--- kdgantt/KDGanttSemiSizingControl.h | 15 +-- kdgantt/KDGanttSizingControl.cpp | 10 +- kdgantt/KDGanttSizingControl.h | 9 +- kdgantt/KDGanttView.cpp | 80 ++++++------- kdgantt/KDGanttView.h | 87 ++++++++------- kdgantt/KDGanttViewEventItem.cpp | 16 +-- kdgantt/KDGanttViewEventItem.h | 24 ++-- kdgantt/KDGanttViewItem.cpp | 150 ++++++++++++------------- kdgantt/KDGanttViewItem.h | 36 +++--- kdgantt/KDGanttViewItemDrag.cpp | 4 +- kdgantt/KDGanttViewItemDrag.h | 6 +- kdgantt/KDGanttViewSubwidgets.cpp | 136 +++++++++++------------ kdgantt/KDGanttViewSubwidgets.h | 61 +++++----- kdgantt/KDGanttViewSummaryItem.cpp | 18 +-- kdgantt/KDGanttViewSummaryItem.h | 24 ++-- kdgantt/KDGanttViewTaskItem.cpp | 26 ++--- kdgantt/KDGanttViewTaskItem.h | 24 ++-- kdgantt/KDGanttViewTaskLink.cpp | 24 ++-- kdgantt/KDGanttViewTaskLink.h | 6 +- kdgantt/KDGanttViewTaskLinkGroup.cpp | 22 ++-- kdgantt/KDGanttViewTaskLinkGroup.h | 10 +- kdgantt/KDGanttXMLTools.cpp | 178 ++++++++++++++--------------- kdgantt/KDGanttXMLTools.h | 42 +++---- kdgantt/itemAttributeDialog.ui | 96 ++++++++-------- kdgantt/itemAttributeDialog.ui.h | 20 ++-- kdgantt/qlayoutengine_p.h | 44 ++++---- 29 files changed, 720 insertions(+), 752 deletions(-) (limited to 'kdgantt') diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index 7f2df6e81..da6744c89 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -26,26 +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 "KDGanttMinimizeSplitter.h" -#ifndef QT_NO_SPLITTER +#ifndef TQT_NO_SPLITTER #include "tqpainter.h" #include "tqdrawutil.h" #include "tqbitmap.h" -#if QT_VERSION >= 300 #include "tqptrlist.h" #include "tqmemarray.h" -#else -#include -#include -#define TQPtrList QList -#define TQMemArray QArray -#endif #include "tqlayout.h" #include "tqlayoutengine_p.h" #include "tqobjectlist.h" @@ -53,23 +46,20 @@ #include "tqapplication.h" //sendPostedEvents #include #include -#ifndef KDGANTT_MASTER_CVS -#include "KDGanttMinimizeSplitter.moc" -#endif +#include "KDGanttMinimizeSplitter.moc" #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 ) - : TQWidget( 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 ); } @@ -82,7 +72,7 @@ TQSize KDGanttSplitterHandle::tqsizeHint() const void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) { orient = o; -#ifndef QT_NO_CURSOR +#ifndef TQT_NO_CURSOR if ( o == KDGanttMinimizeSplitter::Horizontal ) setCursor( splitHCursor ); else @@ -100,14 +90,14 @@ void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e ) if ( _activeButton != 0) return; - QCOORD pos = s->pick(tqparentWidget()->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; } @@ -169,7 +159,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e ) } else { if ( !opaque() && e->button() == LeftButton ) { - QCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos())) + TQCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos())) - mouseOffset; s->setRubberband( -1 ); s->moveSplitter( pos, id() ); @@ -292,23 +282,22 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * ) } bitBlt( this, 0, 0, &buffer ); } -#endif -class QSplitterLayoutStruct +class TQSplitterLayoutStruct { public: KDGanttMinimizeSplitter::ResizeMode mode; - QCOORD sizer; + TQCOORD sizer; bool isSplitter; TQWidget *wid; }; -class QSplitterData +class TQSplitterData { public: - QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} + TQSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} - TQPtrList list; + TQPtrList list; bool opaque; bool firstShow; }; @@ -323,34 +312,34 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in \brief The KDGanttMinimizeSplitter class implements a splitter widget with minimize buttons. - This class (and its documentation) is largely a copy of Qt's + 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 Qt Professional License (if you hold + 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 TQListBox, a TQListView and a TQTextEdit side by side: \code - KDGanttMinimizeSplitter *split = new KDGanttMinimizeSplitter( parent ); + 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) + 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. @@ -360,7 +349,7 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in 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(). */ @@ -389,53 +378,45 @@ static TQSize minSizeHint( const TQWidget* w ) /*! - Constructs a horizontal splitter with the \a parent and \a + Constructs a horizontal splitter with the \a tqparent and \a name arguments being passed on to the TQFrame constructor. */ -KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *parent, const char *name ) - :TQFrame(parent,name,WPaintUnclipped) +KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *tqparent, const char *name ) + :TQFrame(tqparent,name,WPaintUnclipped) { -#if QT_VERSION >= 300 orient = Horizontal; init(); -#endif } /*! - Constructs a splitter with orientation \a o with the \a parent + 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, TQWidget *parent, const char *name ) - :TQFrame(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; + data = new TQSplitterData; if ( orient == Horizontal ) tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) ); else tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) ); } -#endif @@ -443,11 +424,10 @@ 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 TQt::Horizontal (the default). */ -void KDGanttMinimizeSplitter::setOrientation( Orientation o ) +void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o ) { -#if QT_VERSION >= 300 if ( orient == o ) return; orient = o; @@ -457,18 +437,16 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o ) else 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. */ @@ -487,12 +465,12 @@ void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * ) needed. (If \a first is TRUE, then recalcId is very probably needed.) */ -QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *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; TQString tmp = "qt_splithandle_"; tmp += w->name(); @@ -506,7 +484,7 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fir else data->list.append( s ); } - s = new QSplitterLayoutStruct; + s = new TQSplitterLayoutStruct; s->mode = Stretch; s->wid = w; if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() ) @@ -537,7 +515,7 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c ) 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; @@ -547,10 +525,10 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c ) recalc( isVisible() ); } else if ( c->type() == TQEvent::ChildRemoved ) { - QSplitterLayoutStruct *p = 0; + 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 ); @@ -621,10 +599,10 @@ bool KDGanttMinimizeSplitter::event( TQEvent *e ) \sa TQStyle::drawPrimitive() */ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p, - QCOORD x, QCOORD y, QCOORD w, QCOORD h ) + TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h ) { style().drawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(), - (orientation() == Qt::Horizontal ? + (orientation() == TQt::Horizontal ? TQStyle::Style_Horizontal : 0)); } @@ -636,7 +614,7 @@ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p, */ 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 ) @@ -661,11 +639,11 @@ int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const \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); + TQSplitterLayoutStruct *s = data->list.at(id); int oldP = orient == Horizontal ? s->wid->x() : s->wid->y(); bool upLeft; if ( TQApplication::reverseLayout() && orient == Horizontal ) { @@ -701,7 +679,7 @@ 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; TQWidget *w = s->wid; @@ -728,12 +706,12 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) int dd, newLeft, nextPos; if( TQApplication::reverseLayout() && orient == Horizontal ) { dd = w->tqgeometry().right() - pos; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); + 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->tqmaximumSize()))); + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos-dd+1; nextPos = newLeft - 1; } @@ -750,7 +728,7 @@ 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; @@ -782,13 +760,13 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) int right, dd,/* newRight,*/ newLeft, nextPos; if ( TQApplication::reverseLayout() && orient == Horizontal ) { dd = pos - left + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos-dd+1; nextPos = newLeft - 1; } else { right = pick( w->tqgeometry().bottomRight() ); dd = right - pos + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); + dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->tqmaximumSize()))); /*newRight = pos+dd-1;*/ newLeft = pos; nextPos = newLeft + dd; @@ -802,7 +780,7 @@ 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); + TQSplitterLayoutStruct *s = data->list.at(id-1); TQWidget* w = s->wid; *min = pick( w->mapToParent( TQPoint(0,0) ) ); @@ -810,7 +788,7 @@ void KDGanttMinimizeSplitter::expandPos( int id, int* min, int* max ) pick( size() ); } else { - QSplitterLayoutStruct *s = data->list.at(id+1); + TQSplitterLayoutStruct *s = data->list.at(id+1); TQWidget* w = s->wid; *max = pick( w->mapToParent( TQPoint( w->width(), w->height() ) ) ) -8; } @@ -834,7 +812,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 ) { @@ -846,7 +824,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) } } 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 ) { @@ -861,14 +839,14 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) if ( orient == Horizontal && TQApplication::reverseLayout() ) { int splitterWidth = style().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 ); } } @@ -884,7 +862,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; } @@ -898,7 +876,7 @@ void KDGanttMinimizeSplitter::doResize() TQMemArray 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].tqsizeHint = a[i].tqminimumSize = 0; @@ -929,7 +907,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 ); } @@ -941,7 +919,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; @@ -951,9 +929,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 @@ -966,7 +944,7 @@ 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 ) { @@ -976,10 +954,10 @@ void KDGanttMinimizeSplitter::recalc( bool update ) TQSize minS = minSize(s->wid); minl += pick( minS ); maxl += pick( s->wid->tqmaximumSize() ); - mint = QMAX( mint, trans( minS )); + mint = TQMAX( mint, trans( minS )); int tm = trans( s->wid->tqmaximumSize() ); if ( tm > 0 ) - maxt = QMIN( maxt, tm ); + maxt = TQMIN( maxt, tm ); } } } @@ -988,11 +966,11 @@ void KDGanttMinimizeSplitter::recalc( bool update ) // 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; @@ -1017,7 +995,7 @@ void KDGanttMinimizeSplitter::recalc( bool update ) 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; @@ -1064,11 +1042,11 @@ 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 @@ -1093,12 +1071,12 @@ 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 ); @@ -1118,7 +1096,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); } @@ -1132,8 +1110,8 @@ TQSize KDGanttMinimizeSplitter::tqsizeHint() const constPolish(); int l = 0; int t = 0; - if ( children() ) { - const TQObjectList * c = children(); + if ( tqchildren() ) { + const TQObjectList * c = tqchildren(); TQObjectListIt it( *c ); TQObject * o; @@ -1144,7 +1122,7 @@ TQSize KDGanttMinimizeSplitter::tqsizeHint() const TQSize s = ((TQWidget*)o)->tqsizeHint(); if ( s.isValid() ) { l += pick( s ); - t = QMAX( t, trans( s ) ); + t = TQMAX( t, trans( s ) ); } } } @@ -1162,8 +1140,8 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const constPolish(); int l = 0; int t = 0; - if ( children() ) { - const TQObjectList * c = children(); + if ( tqchildren() ) { + const TQObjectList * c = tqchildren(); TQObjectListIt it( *c ); TQObject * o; @@ -1174,7 +1152,7 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const TQSize s = minSizeHint((TQWidget*)o); if ( s.isValid() ) { l += pick( s ); - t = QMAX( t, trans( s ) ); + t = TQMAX( t, trans( s ) ); } } } @@ -1189,7 +1167,7 @@ TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() 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() ); @@ -1214,7 +1192,7 @@ void KDGanttMinimizeSplitter::setHidden( TQWidget *w, bool hide ) } else if ( w == w2 ) { w2show = !hide; } else { -#ifdef QT_CHECK_RANGE +#ifdef TQT_CHECK_RANGE qWarning( "KDGanttMinimizeSplitter::setHidden(), unknown widget" ); #endif return; @@ -1237,7 +1215,7 @@ bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const return !w1show; else if ( w == w2 ) return !w2show; -#ifdef QT_CHECK_RANGE +#ifdef TQT_CHECK_RANGE else qWarning( "KDGanttMinimizeSplitter::isHidden(), unknown widget" ); #endif @@ -1274,7 +1252,7 @@ TQValueList KDGanttMinimizeSplitter::sizes() const that->polish(); } TQValueList list; - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( !s->isSplitter ) list.append( s->sizer ); @@ -1292,7 +1270,7 @@ TQValueList KDGanttMinimizeSplitter::sizes() const top to bottom. Extra values in \a list are ignored. - If \a list tqcontains too few values, the result is undefined + If \a list contains too few values, the result is undefined but the program will still be well-behaved. \sa sizes() @@ -1302,7 +1280,7 @@ void KDGanttMinimizeSplitter::setSizes( TQValueList list ) { processChildEvents(); TQValueList::Iterator it = list.begin(); - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s && it != list.end() ) { if ( !s->isSplitter ) { s->sizer = *it; @@ -1332,7 +1310,7 @@ void KDGanttMinimizeSplitter::processChildEvents() void KDGanttMinimizeSplitter::styleChange( TQStyle& old ) { int sw = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this); - QSplitterLayoutStruct *s = data->list.first(); + TQSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->isSplitter ) s->sizer = sw; @@ -1342,8 +1320,6 @@ void KDGanttMinimizeSplitter::styleChange( TQStyle& old ) TQFrame::styleChange( old ); } -#endif - /*! Specifies the direction of the minimize buttons. If the orientation of the splitter is horizontal then with @@ -1408,7 +1384,7 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in } } else if ( space < cHint + spacerCount*spacer ) { // Less space than tqsizeHint, but more than minimum. - // Currently take space equally from each, like in Qt 2.x. + // 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; @@ -1555,7 +1531,7 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in */ /*! - \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 15429e5a9..86b5340d1 100644 --- a/kdgantt/KDGanttMinimizeSplitter.h +++ b/kdgantt/KDGanttMinimizeSplitter.h @@ -26,46 +26,42 @@ ** 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 "tqframe.h" #include "tqvaluelist.h" -#endif // QT_H -#ifndef QT_NO_SPLITTER +class TQSplitterData; +class TQSplitterLayoutStruct; -class QSplitterData; -class QSplitterLayoutStruct; - -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( 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( TQWidget* parent=0, const char* name=0 ); - KDGanttMinimizeSplitter( Orientation, TQWidget* 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( TQWidget *w, ResizeMode ); virtual void setOpaqueResize( bool = TRUE ); bool opaqueResize() const; @@ -89,9 +85,9 @@ protected: int idAfter( TQWidget* ) const; - void moveSplitter( QCOORD pos, int id ); - virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y, - QCOORD w, QCOORD h ); + 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 ); @@ -103,33 +99,32 @@ private: void doResize(); void storeSizes(); void processChildEvents(); - QSplitterLayoutStruct *addWidget( TQWidget*, 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( TQWidget *w, int p, int s, bool isSplitter = FALSE ); - QCOORD pick( const TQPoint &p ) const + TQCOORD pick( const TQPoint &p ) const { return orient == Horizontal ? p.x() : p.y(); } - QCOORD pick( const TQSize &s ) const + TQCOORD pick( const TQSize &s ) const { return orient == Horizontal ? s.width() : s.height(); } - QCOORD trans( const TQPoint &p ) const + TQCOORD trans( const TQPoint &p ) const { return orient == Vertical ? p.x() : p.y(); } - QCOORD trans( const TQSize &s ) const + TQCOORD trans( const TQSize &s ) const { return orient == 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,16 +132,16 @@ 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; } @@ -175,10 +170,7 @@ private: int _activeButton; bool _collapsed; int _origPos; -#endif }; #endif -#endif // QT_NO_SPLITTER - #endif // KDGANTTMINIMIZESPLITTER_H diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp index 47d089506..e6258e907 100644 --- a/kdgantt/KDGanttSemiSizingControl.cpp +++ b/kdgantt/KDGanttSemiSizingControl.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. ** **********************************************************************/ @@ -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( TQWidget* parent, +KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* tqparent, const char* name ) : - KDGanttSizingControl( parent, name ), _orient( Horizontal ), + KDGanttSizingControl( tqparent, name ), _orient( Horizontal ), _arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0) { init(); @@ -78,16 +78,16 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* 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, - TQWidget* 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, - TQWidget* 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(); @@ -290,10 +290,10 @@ void KDGanttSemiSizingControl::setup() //------------------------------ Setup the button at the correct possition if ( _arrowPos == After && _orient == 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 ); } @@ -313,7 +313,7 @@ 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; diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h index 6b43f7c2e..5857786e0 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. ** **********************************************************************/ @@ -42,18 +42,19 @@ 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( TQWidget* parent = 0, const char* name = 0 ); - KDGanttSemiSizingControl( Orientation orientation, TQWidget* 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, TQWidget* parent = 0, + Qt::Orientation orientation, TQWidget* tqparent = 0, const char* name = 0 ); void setMinimizedWidget( TQWidget* widget ); @@ -78,7 +79,7 @@ protected: TQPixmap pixmap( Direction ); private: - Orientation _orient; + Qt::Orientation _orient; ArrowPosition _arrowPos; TQWidget* _minimizedWidget; TQWidget* _maximizedWidget; diff --git a/kdgantt/KDGanttSizingControl.cpp b/kdgantt/KDGanttSizingControl.cpp index a650a6e4a..a51f9f4fe 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( TQWidget* parent, const char* name, WFlags f ) - :TQWidget( 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 de7003999..cbea0c58b 100644 --- a/kdgantt/KDGanttSizingControl.h +++ b/kdgantt/KDGanttSizingControl.h @@ -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. ** **********************************************************************/ @@ -35,15 +35,16 @@ #include -class KDGanttSizingControl : public QWidget +class KDGanttSizingControl : public TQWidget { Q_OBJECT + TQ_OBJECT public: bool isMinimized() const; protected: - KDGanttSizingControl( TQWidget* 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 6e2e4b4b6..f7eeeacd7 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.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. ** **********************************************************************/ @@ -76,12 +76,12 @@ /*! Constructs an empty KDGanttView. - \param parent the widget parent + \param tqparent the widget tqparent \param name the internal debugging name */ -KDGanttView::KDGanttView( TQWidget* parent, const char* name ) - : KDGanttMinimizeSplitter( Qt::Vertical, parent, name ), +KDGanttView::KDGanttView( TQWidget* tqparent, const char* name ) + : KDGanttMinimizeSplitter( TQt::Vertical, tqparent, name ), myCanvasView(0), myTimeHeaderScroll(0), mFixedHorizon( false ) @@ -156,7 +156,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name ) initDefaults(); _showHeader = false; - myTextColor = Qt::black; + myTextColor = TQt::black; myLegendItems = new TQPtrList; //TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ; myItemAttributeDialog = new itemAttributeDialog(); @@ -766,25 +766,25 @@ bool KDGanttView::editable() const /*! - Saves the state of the Gantt view in an IO device in XML format. The saved + Saves the state of the Gantt view in an IO tqdevice in XML format. The saved data can be reloaded with \a loadProject(). - \param device a pointer to the IO device in which to store the Gantt + \param tqdevice a pointer to the IO tqdevice in which to store the Gantt view state. \return true if the data could be written, false if an error occurred \sa loadProject() */ -bool KDGanttView::saveProject( TQIODevice* device ) +bool KDGanttView::saveProject( TQIODevice* tqdevice ) { - Q_ASSERT( device ); + Q_ASSERT( tqdevice ); TQDomDocument doc = saveXML(); - if( device->isOpen() ) - device->close(); - if( device->open( IO_WriteOnly ) ) { - TQTextStream ts( device ); + if( tqdevice->isOpen() ) + tqdevice->close(); + if( tqdevice->open( IO_WriteOnly ) ) { + TQTextStream ts( tqdevice ); ts << doc.toString(); return true; } else @@ -796,30 +796,30 @@ bool KDGanttView::saveProject( TQIODevice* device ) Loads a previously saved state of the Gantt view. All current settings and items are discarded before loading the data. - \param device a pointer to the IO device from which to load the + \param tqdevice a pointer to the IO tqdevice from which to load the Gantt view state. \return true if the file could be read, false if an error occurred \sa saveProject() */ -bool KDGanttView::loadProject( TQIODevice* device ) +bool KDGanttView::loadProject( TQIODevice* tqdevice ) { - Q_ASSERT( device ); + Q_ASSERT( tqdevice ); - if( device->isOpen() ) - device->close(); - if( device->open( IO_ReadOnly ) ) { + if( tqdevice->isOpen() ) + tqdevice->close(); + if( tqdevice->open( IO_ReadOnly ) ) { TQDomDocument doc( "GanttView" ); TQString err; int errline, errcol; - if ( !doc.setContent( device, &err, &errline, &errcol ) ) { + if ( !doc.setContent( tqdevice, &err, &errline, &errcol ) ) { qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline ); qDebug("%s ", err.latin1()); - device->close(); + tqdevice->close(); return false; } - device->close(); + tqdevice->close(); return loadXML( doc ); } else return false; @@ -869,7 +869,7 @@ void KDGanttView::print( TQPrinter* printer , // at the top, we want to print current time/date TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString(); - int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); + int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height(); p.drawText( 0, 0, date ); // compute the scale @@ -2341,12 +2341,12 @@ KDGanttViewItem* KDGanttView::firstChild() const /*! This method turns calendar mode on and off. In calendar mode, only those items can be opened which have subitems which have - subitems. I.e., if an item tqcontains multiple calendars, it can be + subitems. I.e., if an item contains multiple calendars, it can be opened, but not a calendar item itself. If you want to use this 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. @@ -3727,7 +3727,7 @@ void KDGanttView::addTaskLinkGroup(KDGanttViewTaskLinkGroup* group) myTaskLinkGroupList.append(group); return; } - if (myTaskLinkGroupList.find(group) == -1) + if (myTaskLinkGroupList.tqfind(group) == -1) myTaskLinkGroupList.append(group); } @@ -3776,10 +3776,10 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, TQPixmap p = TQPixmap( size+4, size+4 ); p.fill( backgroundColor ); TQPainter paint (&p); - TQBrush b = TQBrush ( Qt::SolidPattern ); + TQBrush b = TQBrush ( TQt::SolidPattern ); b.setColor( tqshapeColor ); paint.setBrush( b ); - TQPen pen( Qt::black, 1 ) ; + TQPen pen( TQt::black, 1 ) ; paint.setPen( pen ); switch (tqshape) { case KDGanttViewItem::TriangleDown:{ @@ -3857,12 +3857,12 @@ 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; + 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 @@ -4357,7 +4357,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 @@ -4433,7 +4433,7 @@ bool KDGanttView::lvDropEvent ( TQDropEvent* 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. @@ -4475,7 +4475,7 @@ void KDGanttView::lvDragEnterEvent ( TQDragEnterEvent * 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. @@ -4542,7 +4542,7 @@ void KDGanttView::lvStartDrag (KDGanttViewItem* item) // 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() ) { @@ -4800,7 +4800,7 @@ bool KDGanttView::isLinkItemsEnabled() const 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 tqcontains the new + in the list view using in-place editing. \a text contains the new text in the list view. */ diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h index 0f135e5a4..781cc7586 100644 --- a/kdgantt/KDGanttView.h +++ b/kdgantt/KDGanttView.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. ** **********************************************************************/ @@ -70,43 +70,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( TQDateTime horizonStart READ horizonStart WRITE setHorizonStart ) - Q_PROPERTY( TQDateTime 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( TQColor 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( TQColor weekendBackgroundColor READ weekendBackgroundColor WRITE setWeekendBackgroundColor ) - Q_PROPERTY( TQColor ganttViewBackgroundColor READ gvBackgroundColor WRITE setGvBackgroundColor ) - Q_PROPERTY( TQColor listViewBackgroundColor READ lvBackgroundColor WRITE setLvBackgroundColor ) - Q_PROPERTY( TQColor timeHeaderBackgroundColor READ timeHeaderBackgroundColor WRITE setTimeHeaderBackgroundColor ) - Q_PROPERTY( TQColor 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( TQBrush 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 ) @@ -118,7 +119,7 @@ public: enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit }; enum RepaintMode { No, Medium, Always }; - KDGanttView( TQWidget* parent = 0, const char* name = 0 ); + KDGanttView( TQWidget* tqparent = 0, const char* name = 0 ); ~KDGanttView(); virtual void show(); @@ -152,7 +153,7 @@ public: void setHorBackgroundLines( int count = 2, TQBrush brush = TQBrush( TQColor ( 200,200,200 ), - Qt::Dense6Pattern )); + TQt::Dense6Pattern )); int horBackgroundLines( TQBrush& brush ); bool saveProject( TQIODevice* ); bool loadProject( TQIODevice* ); @@ -261,7 +262,7 @@ public: Scale mini = KDGanttView::Minute , Scale maxi = KDGanttView::Month); #if 0 - // This API has been tqreplaced with KDIntervalColorRectangle and addIntervalBackgroundColor + // This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor void setIntervalBackgroundColor( const TQDateTime& start, const TQDateTime& end, const TQColor& color, @@ -305,7 +306,7 @@ public: void setShowLegendButton( bool show ); bool showLegendButton() const; - // Pass-through methods from QListView + // 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 ); diff --git a/kdgantt/KDGanttViewEventItem.cpp b/kdgantt/KDGanttViewEventItem.cpp index eadef6a1b..9c385d46b 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. ** **********************************************************************/ @@ -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, +KDGanttViewEventItem::KDGanttViewEventItem( KDGanttViewItem* tqparent, const TQString& lvtext, const TQString& name ) : - KDGanttViewItem( Event, parent, lvtext, name ) + KDGanttViewItem( Event, tqparent, lvtext, name ) { initItem(); @@ -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 TQString& lvtext, const TQString& name ) : - KDGanttViewItem( Event, parent, after, lvtext, name ) + KDGanttViewItem( Event, tqparent, after, lvtext, name ) { initItem(); diff --git a/kdgantt/KDGanttViewEventItem.h b/kdgantt/KDGanttViewEventItem.h index 6697e60c3..033a248df 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,17 +41,17 @@ class KDGanttViewEventItem : public KDGanttViewItem { public: KDGanttViewEventItem( KDGanttView* view, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewEventItem( KDGanttViewItem* parent, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewEventItem( KDGanttViewItem* parent, KDGanttViewItem* after, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQDateTime& leadTimeStart ); diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp index c250d22f6..eff5c26e8 100644 --- a/kdgantt/KDGanttViewItem.cpp +++ b/kdgantt/KDGanttViewItem.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. ** **********************************************************************/ @@ -122,18 +122,18 @@ 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: @@ -147,12 +147,12 @@ \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. */ @@ -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, +KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* tqparentItem, const TQString& lvtext, const TQString& name ) : - TQListViewItem(parentItem,lvtext) + TQListViewItem(tqparentItem,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 TQString& lvtext, const TQString& name ) : - TQListViewItem( parentItem, after, lvtext ) + 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(); @@ -292,10 +292,10 @@ void KDGanttViewItem::generateAndInsertName( const TQString& name ) sItemDict.remove( _name ); TQString newName; - if ( name.isEmpty() || sItemDict.find( name ) ) { + 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 { @@ -325,11 +325,11 @@ TQString KDGanttViewItem::name() const with that name exists */ -KDGanttViewItem* KDGanttViewItem::find( const TQString& 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 ); } @@ -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(); @@ -735,7 +735,7 @@ TQString 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. @@ -916,10 +916,10 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, // items which don't have any tqshapes return; } - item->setBrush(Qt::SolidPattern); + item->setBrush(TQt::SolidPattern); item->setZ(5); itemShape = (KDCanvasPolygonItem*) item; - itemBack->setBrush(Qt::SolidPattern); + itemBack->setBrush(TQt::SolidPattern); itemBack->setZ(3); itemShapeBack = (KDCanvasPolygonItem*) itemBack; @@ -999,7 +999,7 @@ void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) co 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. @@ -1048,7 +1048,7 @@ void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& 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 @@ -1140,7 +1140,7 @@ const TQPixmap* 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. @@ -1187,7 +1187,7 @@ TQColor 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. @@ -1226,7 +1226,7 @@ TQColor 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 { @@ -1248,14 +1248,14 @@ KDGanttViewItem* KDGanttViewItem::nextSibling() const /*! - 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*)TQListViewItem::parent(); + return (KDGanttViewItem*)TQListViewItem::tqparent(); } @@ -1306,11 +1306,11 @@ void KDGanttViewItem::updateCanvasItems() if (blockUpdating) return; TQPen p,pBack; TQBrush b; - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); if ( enabled() ) { textCanvas->setColor(myTextColor); if (isHighlighted) { - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); b.setColor(myStartColorHL); startShape->setBrush(b); b.setColor(myMiddleColorHL); @@ -1323,7 +1323,7 @@ void KDGanttViewItem::updateCanvasItems() p.setColor(myEndColorHL); endLine->setPen(p); } else { - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); b.setColor(myStartColor); // qDebug("update color %s %s", listViewText().latin1(),myStartColor.name().latin1() ); startShape->setBrush(b); @@ -1338,10 +1338,10 @@ void KDGanttViewItem::updateCanvasItems() endLine->setPen(p); } } else { - //TQColor discol = Qt::lightGray; + //TQColor discol = TQt::lightGray; TQColor discol = TQColor(232,232,232); textCanvas->setColor( TQColor(150,150,150) ); - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); b.setColor(discol); startShape->setBrush(b); midShape->setBrush(b); @@ -1458,7 +1458,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( TQPen ( Qt::red, 3 ) ); + actualEnd->setPen( TQPen ( TQt::red, 3 ) ); textCanvas = new KDCanvasText(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); textCanvas->setText(""); @@ -1547,13 +1547,13 @@ KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const TQString& 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( TQDomDocument& doc, - TQDomElement& parentElement ) + TQDomElement& tqparentElement ) { TQDomElement itemElement = doc.createElement( "Item" ); - parentElement.appendChild( itemElement ); + tqparentElement.appendChild( itemElement ); itemElement.setAttribute( "Type", typeToString( type() ) ); KDGanttXML::createDateTimeNode( doc, itemElement, "StartTime", startTime() ); @@ -1674,22 +1674,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, +KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* tqparent, TQDomElement& element ) { 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; @@ -1704,12 +1704,12 @@ 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, TQDomElement& element ) { @@ -1717,11 +1717,11 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent, 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; @@ -1944,9 +1944,9 @@ 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 */ TQDateTime KDGanttViewItem::myChildStartTime() { @@ -1978,9 +1978,9 @@ TQDateTime 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 */ TQDateTime KDGanttViewItem::myChildEndTime() { @@ -2030,7 +2030,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 TQBrush( TQColor ( 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() */ @@ -2044,7 +2044,7 @@ 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 @@ -2228,7 +2228,7 @@ void KDGanttViewItem::paintBranches ( TQPainter* p, const TQColorGroup& cg, 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; @@ -2255,11 +2255,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; } @@ -2524,8 +2524,8 @@ bool KDGanttViewItem::isMyTextCanvas(TQCanvasItem *tc) void KDGanttViewItem::setProgress(int percent) { - myProgress = QMAX(0, percent); - myProgress = QMIN(100, myProgress); + myProgress = TQMAX(0, percent); + myProgress = TQMIN(100, myProgress); } /*! diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h index 80cc258d4..8c29760ae 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. ** **********************************************************************/ @@ -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,18 +63,18 @@ public: protected: KDGanttViewItem( Type type, KDGanttView* view, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewItem( Type type, KDGanttViewItem* parent, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewItem( Type type, KDGanttViewItem* parent, + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); + KDGanttViewItem( Type type, KDGanttViewItem* tqparent, KDGanttViewItem* after, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); + const TQString& lvtext = TQString(), + const TQString& name = TQString() ); //bool _isCalendar; bool isVisibleInGanttView; @@ -166,23 +166,23 @@ public: KDGanttViewItem* firstChild() const; KDGanttViewItem* nextSibling() const; - KDGanttViewItem* parent() const; + KDGanttViewItem* tqparent() const; KDGanttViewItem* itemAbove(); KDGanttViewItem* itemBelow( bool includeDisabled = true ); KDGanttViewItem* getChildByName( const TQString& name ); TQString name() const; - static KDGanttViewItem* find( const TQString& name ); + static KDGanttViewItem* tqfind( const TQString& name ); void createNode( TQDomDocument& doc, - TQDomElement& parentElement ); + TQDomElement& tqparentElement ); static KDGanttViewItem* createFromDomElement( KDGanttView* view, TQDomElement& element ); static KDGanttViewItem* createFromDomElement( KDGanttView* view, KDGanttViewItem* previous, TQDomElement& element ); - static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent, + static KDGanttViewItem* createFromDomElement( KDGanttViewItem* tqparent, TQDomElement& element ); - static KDGanttViewItem* createFromDomElement( KDGanttViewItem* parent, + static KDGanttViewItem* createFromDomElement( KDGanttViewItem* tqparent, KDGanttViewItem* previous, TQDomElement& element ); diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp index 5ced61b38..c73eff67f 100644 --- a/kdgantt/KDGanttViewItemDrag.cpp +++ b/kdgantt/KDGanttViewItemDrag.cpp @@ -24,8 +24,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. ** **********************************************************************/ diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h index d29ec2143..a4d6cb6f0 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. ** **********************************************************************/ @@ -39,7 +39,7 @@ class KDGanttViewItem; -class KDGanttViewItemDrag :public QStoredDrag +class KDGanttViewItemDrag :public TQStoredDrag { public: KDGanttViewItemDrag(KDGanttViewItem* item, TQWidget *source, const char * name ) ; diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp index b6dabe2be..197ba18ba 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. ** **********************************************************************/ @@ -58,19 +58,19 @@ #include #include -KDTimeTableWidget:: KDTimeTableWidget( TQWidget* parent,KDGanttView* myGantt) - : TQCanvas (parent) +KDTimeTableWidget:: KDTimeTableWidget( TQWidget* tqparent,KDGanttView* myGantt) + : TQCanvas (tqparent) { myGanttView = myGantt; taskLinksVisible = true; flag_blockUpdating = false; int_blockUpdating = 0; - gridPen.setStyle(Qt::DotLine); + gridPen.setStyle(TQt::DotLine); gridPen.setColor(TQColor(100,100,100)); maximumComputedGridHeight = 0; denseLineCount = 0; denseLineBrush = TQBrush( TQColor ( 240,240,240 )); - noInfoLineBrush = TQBrush( TQColor ( 100,100,100 ), Qt::FDiagPattern ); + noInfoLineBrush = TQBrush( TQColor ( 100,100,100 ), TQt::FDiagPattern ); pendingHeight = 0; pendingWidth = 0; retune(256); @@ -514,7 +514,7 @@ void KDTimeTableWidget::computeDenseLines() denseLine->setSize( wid, temp->height()); } if (denseLine->brush() != denseLineBrush ) { - denseLine->setPen( TQPen( Qt::NoPen ) ); + denseLine->setPen( TQPen( TQt::NoPen ) ); denseLine->setBrush( denseLineBrush); } if (!denseLine->isVisible() ) @@ -555,7 +555,7 @@ void KDTimeTableWidget::computeShowNoInformation() } noInfoLine->move( 0, temp->itemPos() ); noInfoLine->setSize( wid, temp->height()); - noInfoLine->setPen( TQPen( Qt::NoPen ) ); + noInfoLine->setPen( TQPen( TQt::NoPen ) ); noInfoLine->setBrush( noInfoLineBrush); noInfoLine->show(); } @@ -695,8 +695,8 @@ int KDTimeTableWidget::getCoordX( TQDateTime dt ) { /* *************************************************************** KDTimeHeaderWidget:: KDTimeHeaderWidget ***************************************************************** */ -KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* parent,KDGanttView* gant ) - : TQWidget (parent) +KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* tqparent,KDGanttView* gant ) + : TQWidget (tqparent) { myToolTip = new KDTimeHeaderToolTip(this,this); mySizeHint = 0; @@ -770,7 +770,7 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* 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; @@ -1636,7 +1636,7 @@ bool KDTimeHeaderWidget::getColumnColor(TQColor& 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; } @@ -1915,7 +1915,7 @@ void KDTimeHeaderWidget::tqrepaintMe(int left,int paintwid, TQPainter* 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; } @@ -2135,8 +2135,8 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) qDebug(" RealScale == Auto : This may not be! "); break; } - tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMinor); - tqitemRectMajor = 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 = tqitemRectMinor.height()+tqitemRectMajor.height()+11; @@ -2537,10 +2537,10 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e ) /* *************************************************************** KDLegendWidget:: KDLegendWidget ***************************************************************** */ -KDLegendWidget:: KDLegendWidget( TQWidget* parent, +KDLegendWidget:: KDLegendWidget( TQWidget* tqparent, KDGanttMinimizeSplitter* legendParent ) : KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Vertical, - parent) + tqparent) { myLegendParent = legendParent; dock = 0; @@ -2645,10 +2645,10 @@ void KDLegendWidget::clearLegend ( ) { if ( myLegend ) delete myLegend; if ( dock ) - myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() ); + myLegend = new TQGroupBox( 1, TQt::Horizontal, scroll->viewport() ); else - myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() ); - myLegend->setBackgroundColor( Qt::white ); + myLegend = new TQGroupBox( 1, TQt::Horizontal, i18n( "Legend" ), scroll->viewport() ); + myLegend->setBackgroundColor( TQt::white ); myLegend->setFont( font() ); scroll->addChild( myLegend ); scroll->setResizePolicy( TQScrollView::AutoOneFit ); @@ -2664,16 +2664,16 @@ void KDLegendWidget::clearLegend ( ) void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ) { TQLabel * temp; - TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, Qt::white, 10); + TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, TQt::white, 10); TQWidget *w = new TQWidget( myLegend ); - w->setBackgroundColor( Qt::white ); + w->setBackgroundColor( TQt::white ); TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6); temp = new TQLabel ( w ); - lay->addWidget( temp, 0, Qt:: AlignRight); + lay->addWidget( temp, 0, TQt:: AlignRight); temp->setPixmap(p); temp = new TQLabel ( text, w ); - temp->setBackgroundColor( Qt::white ); - lay->addWidget( temp, 0, Qt:: AlignLeft); + temp->setBackgroundColor( TQt::white ); + lay->addWidget( temp, 0, TQt:: AlignLeft); lay->addStretch(); if ( dock ) scroll->setMaximumHeight( 32000 ); @@ -2688,7 +2688,7 @@ bool KDLegendWidget::isShown ( ) } -KDListView::KDListView(TQWidget* parent, KDGanttView* gantView):TQListView (parent) +KDListView::KDListView(TQWidget* tqparent, KDGanttView* gantView):TQListView (tqparent) { myGanttView = gantView; setAcceptDrops(true); @@ -2781,7 +2781,7 @@ void KDListView::drawToPainter ( TQPainter * p, bool drawHeader ) return; } // Draw headers - TQPen pen = TQPen(Qt::lightGray, 1); + TQPen pen = TQPen(TQt::lightGray, 1); p->save(); TQHeader *h = header(); for (int s = 0; s < h->count(); ++s) { @@ -2790,7 +2790,7 @@ void KDListView::drawToPainter ( TQPainter * p, bool drawHeader ) p->translate(0, -r.height()); } //kdDebug()<label(s)<<" "<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); @@ -2921,7 +2921,7 @@ void KDListView::drawAllContents(TQPainter * 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() && @@ -2936,10 +2936,10 @@ void KDListView::drawAllContents(TQPainter * 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 ); @@ -2991,13 +2991,13 @@ void KDListView::dragMoveEvent ( TQDragMoveEvent * 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 ); @@ -3091,69 +3091,69 @@ void KDListView::startDrag () } KDCanvasText::KDCanvasText( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : TQCanvasText(canvas) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasLine::KDCanvasLine( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : TQCanvasLine(canvas) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasPolygonItem::KDCanvasPolygonItem( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : TQCanvasPolygonalItem( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasPolygon::KDCanvasPolygon( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : TQCanvasPolygon( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasEllipse::KDCanvasEllipse( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : TQCanvasEllipse( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas, - void* parentItem, + void* tqparentItem, int type ) : TQCanvasRectangle( canvas ) { myParentType = type; - myParentItem = parentItem; + myParentItem = tqparentItem; } -KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWidget* parent, const - char* name ) : TQCanvasView ( canvas, parent, name ), +KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWidget* tqparent, const + char* name ) : TQCanvasView ( canvas, tqparent, name ), movingGVItem( 0 ), scrollBarTimer( 0, "scrollBarTimer" ) { @@ -3311,20 +3311,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; } @@ -3332,9 +3332,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(); @@ -3370,8 +3370,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 ); @@ -3418,20 +3418,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; @@ -3935,7 +3935,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); @@ -3984,7 +3984,7 @@ int KDGanttCanvasView::getLinkType(int from, int to) { /*! Represents the background color for a given interval of time (across all tasks). \sa KDGanttView::addIntervalBackgroundColor - \param view parent view + \param view tqparent view */ KDIntervalColorRectangle::KDIntervalColorRectangle( KDGanttView* view ) : KDCanvasRectangle( view->timeTableWidget(), 0, Type_is_KDGanttGridItem ), diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h index de771800e..af893c863 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. ** **********************************************************************/ @@ -73,9 +73,10 @@ class KDToolTip; class KDCanvasRectangle; class KDTimeHeaderToolTip; -class KDTimeHeaderWidget : public QWidget +class KDTimeHeaderWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: typedef KDGanttView::Scale Scale; @@ -98,7 +99,7 @@ public: enum HourFormat { Hour_24, Hour_12 }; */ - KDTimeHeaderWidget (TQWidget* parent,KDGanttView* gant); + KDTimeHeaderWidget (TQWidget* tqparent,KDGanttView* gant); ~KDTimeHeaderWidget(); TQString getToolTipText(TQPoint p); @@ -138,7 +139,7 @@ public: Scale mini = KDGanttView::Minute , Scale maxi = KDGanttView::Month); #if 0 - // This API has been tqreplaced with KDIntervalColorRectangle and addIntervalBackgroundColor + // This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor void setIntervalBackgroundColor( const TQDateTime& start, const TQDateTime& end, const TQColor& color, @@ -250,12 +251,13 @@ private: /* KDTimeTableWidget */ class KDListView ; -class KDTimeTableWidget : public QCanvas +class KDTimeTableWidget : public TQCanvas { Q_OBJECT + TQ_OBJECT public: - KDTimeTableWidget (TQWidget* parent,KDGanttView* my); + KDTimeTableWidget (TQWidget* tqparent,KDGanttView* my); void setBlockUpdating( bool block = true ); bool blockUpdating(); @@ -329,9 +331,10 @@ private: class KDLegendWidget : public KDGanttSemiSizingControl { Q_OBJECT + TQ_OBJECT public: - KDLegendWidget ( TQWidget* parent, KDGanttMinimizeSplitter* legendParent ); + KDLegendWidget ( TQWidget* tqparent, KDGanttMinimizeSplitter* legendParent ); void showMe(bool); bool isShown(); void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ); @@ -352,12 +355,13 @@ public: }; class KDGanttView; -class KDListView : public QListView +class KDListView : public TQListView { Q_OBJECT + TQ_OBJECT public: - KDListView (TQWidget* parent,KDGanttView* gv ); + KDListView (TQWidget* tqparent,KDGanttView* gv ); KDGanttView* myGanttView; void drawToPainter( TQPainter *p, bool drawHeader=false ); void setCalendarMode( bool mode ); @@ -396,56 +400,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; }; @@ -480,12 +484,13 @@ private: class KDCanvasToolTip; -class KDGanttCanvasView : public QCanvasView +class KDGanttCanvasView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = 0, TQWidget* parent = 0, const char* name = 0 ); + KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = 0, TQWidget* tqparent = 0, const char* name = 0 ); ~KDGanttCanvasView(); TQString getToolTipText(TQPoint p); TQString getWhatsThisText(TQPoint p); @@ -559,7 +564,7 @@ private: TQTimer scrollBarTimer; }; -class KDTimeHeaderToolTip :public QToolTip +class KDTimeHeaderToolTip :public TQToolTip { public: @@ -585,7 +590,7 @@ private: KDTimeHeaderWidget * _header; }; -class KDCanvasToolTip :public QToolTip +class KDCanvasToolTip :public TQToolTip { public: @@ -611,7 +616,7 @@ private: KDGanttCanvasView * _canview; }; -class KDCanvasWhatsThis :public QWhatsThis +class KDCanvasWhatsThis :public TQWhatsThis { public: KDCanvasWhatsThis( TQWidget *wid, KDGanttCanvasView* canview ) : TQWhatsThis( wid ), _wid(wid),_canview (canview) { }; @@ -626,7 +631,7 @@ private: KDGanttCanvasView * _canview; }; -class KDListViewWhatsThis :public QWhatsThis +class KDListViewWhatsThis :public TQWhatsThis { public: KDListViewWhatsThis( TQWidget *wid, KDListView* view ) : TQWhatsThis( wid ), _wid(wid),_view (view) { }; diff --git a/kdgantt/KDGanttViewSummaryItem.cpp b/kdgantt/KDGanttViewSummaryItem.cpp index 95ca682d2..7237cf31e 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. ** **********************************************************************/ @@ -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, +KDGanttViewSummaryItem::KDGanttViewSummaryItem( KDGanttViewItem* tqparent, const TQString& lvtext, const TQString& name ) : - KDGanttViewItem( Summary, parent, lvtext, name ) + KDGanttViewItem( Summary, tqparent, 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 TQString& lvtext, const TQString& name ) : - KDGanttViewItem( Summary, parent, after, lvtext, name ) + KDGanttViewItem( Summary, tqparent, after, lvtext, name ) { initItem(); @@ -272,7 +272,7 @@ void KDGanttViewSummaryItem::showItem( bool show, int coordY ) hideMe(); return; } - if ( displaySubitemsAsGroup() && !parent() && !isOpen() ) { + if ( displaySubitemsAsGroup() && !tqparent() && !isOpen() ) { hideMe(); return; } diff --git a/kdgantt/KDGanttViewSummaryItem.h b/kdgantt/KDGanttViewSummaryItem.h index 6102dbff9..3b2bb9c8e 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,17 +41,17 @@ class KDGanttViewSummaryItem : public KDGanttViewItem { public: KDGanttViewSummaryItem( KDGanttView* view, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewSummaryItem( KDGanttViewItem* parent, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewSummaryItem( KDGanttViewItem* parent, KDGanttViewItem* after, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQDateTime& ); diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp index f2ba122c1..b7cc8a9dd 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. ** **********************************************************************/ @@ -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, +KDGanttViewTaskItem::KDGanttViewTaskItem( KDGanttViewItem* tqparent, const TQString& lvtext, const TQString& name ) : - KDGanttViewItem( Task, parent, lvtext, name ) + KDGanttViewItem( Task, tqparent, 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 TQString& lvtext, const TQString& name ) : - KDGanttViewItem( Task, parent, after, lvtext, name ) + KDGanttViewItem( Task, tqparent, after, lvtext, name ) { initItem(); } @@ -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,9 +242,9 @@ 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(); } @@ -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 6cdb92daf..cd77240e4 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. ** **********************************************************************/ @@ -44,17 +44,17 @@ class KDGanttViewTaskItem : public KDGanttViewItem { public: KDGanttViewTaskItem( KDGanttView* view, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewTaskItem( KDGanttViewItem* parent, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQString& lvtext = TQString::null, - const TQString& name = TQString::null ); - KDGanttViewTaskItem( KDGanttViewItem* parent, KDGanttViewItem* after, - const TQString& lvtext = TQString::null, - const TQString& name = TQString::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 TQDateTime& start ); diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp index 2f5ca479f..4d21073e7 100644 --- a/kdgantt/KDGanttViewTaskLink.cpp +++ b/kdgantt/KDGanttViewTaskLink.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. ** **********************************************************************/ @@ -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); } @@ -268,7 +268,7 @@ void KDGanttViewTaskLink::showMe( bool visible ) TQPen p; TQBrush b; p.setWidth(wid); - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); if (ishighlighted) { b.setColor(myColorHL); p.setColor(myColorHL); @@ -333,7 +333,7 @@ void KDGanttViewTaskLink::showMeType( bool visible ) TQPen p; TQBrush b; p.setWidth(wid); - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); if (ishighlighted) { b.setColor(myColorHL); p.setColor(myColorHL); @@ -732,13 +732,13 @@ TQPtrList 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( TQDomDocument& doc, - TQDomElement& parentElement ) + TQDomElement& tqparentElement ) { TQDomElement taskLinkElement = doc.createElement( "TaskLink" ); - parentElement.appendChild( taskLinkElement ); + tqparentElement.appendChild( taskLinkElement ); TQDomElement fromItemsElement = doc.createElement( "FromItems" ); taskLinkElement.appendChild( fromItemsElement ); @@ -870,13 +870,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& el TQPtrList 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( 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( TQDomElement& el tl->setHighlightColor( highlightColor ); tl->setTooltipText( tooltipText ); tl->setWhatsThisText( whatsThisText ); - KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::find( group ); + KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::tqfind( group ); if( gr ) tl->setGroup( gr ); diff --git a/kdgantt/KDGanttViewTaskLink.h b/kdgantt/KDGanttViewTaskLink.h index 40f6660f6..f09e23702 100644 --- a/kdgantt/KDGanttViewTaskLink.h +++ b/kdgantt/KDGanttViewTaskLink.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. ** **********************************************************************/ @@ -89,7 +89,7 @@ public: TQString whatsThisText() const; void createNode( TQDomDocument& doc, - TQDomElement& parentElement ); + TQDomElement& tqparentElement ); static KDGanttViewTaskLink* createFromDomElement( TQDomElement& ); int linkType(); diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp index 5109168d5..5b39f4b49 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. ** **********************************************************************/ @@ -70,7 +70,7 @@ 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 */ @@ -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 TQString& 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 TQString& 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( TQDomDocument& doc, - TQDomElement& parentElement ) + TQDomElement& tqparentElement ) { TQDomElement taskLinkGroupElement = doc.createElement( "TaskLink" ); - parentElement.appendChild( taskLinkGroupElement ); + tqparentElement.appendChild( taskLinkGroupElement ); KDGanttXML::createBoolNode( doc, taskLinkGroupElement, "Highlight", highlight() ); @@ -371,10 +371,10 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const TQString& name ) sGroupDict.remove( _name ); TQString newName; - if ( name.isEmpty() || sGroupDict.find( name ) ) { + 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 b401c590f..56f5d2b9e 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. ** **********************************************************************/ @@ -42,7 +42,7 @@ class KDTimeTableWidget; class KDGanttView; -class KDGanttViewTaskLinkGroup : public QObject +class KDGanttViewTaskLinkGroup : public TQObject { public: KDGanttViewTaskLinkGroup( const TQString& name ); @@ -62,10 +62,10 @@ public: void setHighlightColor( const TQColor& color ); TQColor highlightColor() const; - static KDGanttViewTaskLinkGroup* find( const TQString& name ); + static KDGanttViewTaskLinkGroup* tqfind( const TQString& name ); void createNode( TQDomDocument& doc, - TQDomElement& parentElement ); + TQDomElement& tqparentElement ); static KDGanttViewTaskLinkGroup* createFromDomElement( TQDomElement& ); void generateAndInsertName( const TQString& name ); diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp index f5f97a36a..248829d3e 100644 --- a/kdgantt/KDGanttXMLTools.cpp +++ b/kdgantt/KDGanttXMLTools.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. ** **********************************************************************/ @@ -40,12 +40,12 @@ namespace KDGanttXML { -void createBoolNode( TQDomDocument& doc, TQDomNode& parent, +void createBoolNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, bool value ) { TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); + tqparent.appendChild( newElement ); TQDomText elementContent = doc.createTextNode( value ? "true" : "false" ); newElement.appendChild( elementContent ); @@ -53,59 +53,59 @@ void createBoolNode( TQDomDocument& doc, TQDomNode& parent, -void createSizeNode( TQDomDocument& doc, TQDomNode& parent, +void createSizeNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQSize& value ) { TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); + tqparent.appendChild( newElement ); newElement.setAttribute( "Width", value.width() ); newElement.setAttribute( "Height", value.height() ); } -void createIntNode( TQDomDocument& doc, TQDomNode& parent, +void createIntNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, int value ) { TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); + tqparent.appendChild( newElement ); TQDomText elementContent = doc.createTextNode( TQString::number( value ) ); newElement.appendChild( elementContent ); } -void createDoubleNode( TQDomDocument& doc, TQDomNode& parent, +void createDoubleNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, double value ) { TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); + tqparent.appendChild( newElement ); TQDomText elementContent = doc.createTextNode( TQString::number( value ) ); newElement.appendChild( elementContent ); } -void createStringNode( TQDomDocument& doc, TQDomNode& parent, +void createStringNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQString& text ) { TQDomElement newElement = doc.createElement( elementName ); - parent.appendChild( newElement ); + tqparent.appendChild( newElement ); TQDomText elementContent = doc.createTextNode( text ); newElement.appendChild( elementContent ); } -void createColorNode( TQDomDocument& doc, TQDomNode& parent, +void createColorNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQColor& color ) { TQDomElement colorElement = doc.createElement( elementName ); - parent.appendChild( colorElement ); + tqparent.appendChild( colorElement ); colorElement.setAttribute( "Red", TQString::number( color.red() ) ); colorElement.setAttribute( "Green", @@ -115,29 +115,29 @@ void createColorNode( TQDomDocument& doc, TQDomNode& parent, } -void createBrushNode( TQDomDocument& doc, TQDomNode& parent, +void createBrushNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQBrush& brush ) { TQDomElement brushElement = doc.createElement( elementName ); - parent.appendChild( brushElement ); + 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( TQDomDocument& doc, TQDomNode& parent, +void createPixmapNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQPixmap& pixmap ) { TQDomElement pixmapElement = doc.createElement( elementName ); - parent.appendChild( pixmapElement ); + 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. + // conforms to the file format TQt Designer uses. TQByteArray ba; TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); @@ -163,11 +163,11 @@ void createPixmapNode( TQDomDocument& doc, TQDomNode& parent, } -void createRectNode( TQDomDocument& doc, TQDomNode& parent, +void createRectNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQRect& rect ) { TQDomElement rectElement = doc.createElement( elementName ); - parent.appendChild( rectElement ); + tqparent.appendChild( rectElement ); TQDomElement xElement = doc.createElement( "X" ); rectElement.appendChild( xElement ); TQDomText xContent = doc.createTextNode( TQString::number( rect.x() ) ); @@ -187,7 +187,7 @@ void createRectNode( TQDomDocument& doc, TQDomNode& parent, } -void createStringListNodes( TQDomDocument& doc, TQDomNode& parent, +void createStringListNodes( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQStringList* list ) { @@ -197,68 +197,64 @@ void createStringListNodes( TQDomDocument& doc, TQDomNode& parent, for( TQStringList::ConstIterator it = list->begin(); it != list->end(); ++it ) { TQDomElement element = doc.createElement( elementName ); - parent.appendChild( element ); + tqparent.appendChild( element ); TQDomText elementContent = doc.createTextNode( *it ); element.appendChild( elementContent ); } } -void createFontNode( TQDomDocument& doc, TQDomNode& parent, +void createFontNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQFont& font ) { TQDomElement fontElement = doc.createElement( elementName ); - parent.appendChild( fontElement ); + 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( TQDomDocument& doc, TQDomNode& parent, +void createPenNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQPen& pen ) { TQDomElement penElement = doc.createElement( elementName ); - parent.appendChild( penElement ); + tqparent.appendChild( penElement ); createIntNode( doc, penElement, "Width", pen.width() ); createColorNode( doc, penElement, "Color", pen.color() ); createStringNode( doc, penElement, "Style", penStyleToString( pen.style() ) ); } -void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent, +void createDateTimeNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQDateTime& datetime ) { TQDomElement dateTimeElement = doc.createElement( elementName ); - parent.appendChild( dateTimeElement ); + tqparent.appendChild( dateTimeElement ); createDateNode( doc, dateTimeElement, "Date", datetime.date() ); createTimeNode( doc, dateTimeElement, "Time", datetime.time() ); } -void createDateNode( TQDomDocument& doc, TQDomNode& parent, +void createDateNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQDate& date ) { TQDomElement dateElement = doc.createElement( elementName ); - parent.appendChild( dateElement ); + 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( TQDomDocument& doc, TQDomNode& parent, +void createTimeNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQTime& time ) { TQDomElement timeElement = doc.createElement( elementName ); - parent.appendChild( timeElement ); + tqparent.appendChild( timeElement ); timeElement.setAttribute( "Hour", TQString::number( time.hour() ) ); timeElement.setAttribute( "Minute", @@ -270,20 +266,20 @@ void createTimeNode( TQDomDocument& doc, TQDomNode& parent, } -TQString penStyleToString( Qt::PenStyle style ) +TQString penStyleToString( TQt::PenStyle style ) { switch( style ) { - case Qt::NoPen: + case TQt::NoPen: return "NoPen"; - case Qt::SolidLine: + case TQt::SolidLine: return "SolidLine"; - case Qt::DashLine: + case TQt::DashLine: return "DashLine"; - case Qt::DotLine: + case TQt::DotLine: return "DotLine"; - case Qt::DashDotLine: + case TQt::DashDotLine: return "DashDotLine"; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: return "DashDotDotLine"; default: // should not happen return "SolidLine"; @@ -292,39 +288,39 @@ TQString penStyleToString( Qt::PenStyle style ) -TQString brushStyleToString( Qt::BrushStyle style ) +TQString brushStyleToString( TQt::BrushStyle style ) { // PENDING(kalle) Support custom patterns switch( style ) { - case Qt::NoBrush: + case TQt::NoBrush: return "NoBrush"; - case Qt::SolidPattern: + case TQt::SolidPattern: return "SolidPattern"; - case Qt::Dense1Pattern: + case TQt::Dense1Pattern: return "Dense1Pattern"; - case Qt::Dense2Pattern: + case TQt::Dense2Pattern: return "Dense2Pattern"; - case Qt::Dense3Pattern: + case TQt::Dense3Pattern: return "Dense3Pattern"; - case Qt::Dense4Pattern: + case TQt::Dense4Pattern: return "Dense4Pattern"; - case Qt::Dense5Pattern: + case TQt::Dense5Pattern: return "Dense5Pattern"; - case Qt::Dense6Pattern: + case TQt::Dense6Pattern: return "Dense6Pattern"; - case Qt::Dense7Pattern: + case TQt::Dense7Pattern: return "Dense7Pattern"; - case Qt::HorPattern: + case TQt::HorPattern: return "HorPattern"; - case Qt::VerPattern: + case TQt::VerPattern: return "VerPattern"; - case Qt::CrossPattern: + case TQt::CrossPattern: return "CrossPattern"; - case Qt::BDiagPattern: + case TQt::BDiagPattern: return "BDiagPattern"; - case Qt::FDiagPattern: + case TQt::FDiagPattern: return "FDiagPattern"; - case Qt::DiagCrossPattern: + case TQt::DiagCrossPattern: return "DiagCrossPattern"; default: // should not happen (but can for a custom pattern) return "SolidPattern"; @@ -403,7 +399,7 @@ bool readBrushNode( const TQDomElement& element, TQBrush& brush ) { bool ok = true; TQColor tempColor; - Qt::BrushStyle tempStyle; + TQt::BrushStyle tempStyle; TQPixmap tempPixmap; TQDomNode node = element.firstChild(); while( !node.isNull() ) { @@ -466,7 +462,7 @@ bool readPixmapNode( const TQDomElement& element, TQPixmap& 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(); @@ -510,7 +506,7 @@ bool readPenNode( const TQDomElement& element, TQPen& pen ) bool ok = true; int tempWidth; TQColor tempColor; - Qt::PenStyle tempStyle; + TQt::PenStyle tempStyle; TQDomNode node = element.firstChild(); while( !node.isNull() ) { TQDomElement element = node.toElement(); @@ -577,10 +573,6 @@ bool readFontNode( const TQDomElement& element, TQFont& font ) if ( pixelSize > 0 ) font.setPixelSize( pixelSize ); font.setWeight( weight ); font.setItalic( italic ); -#if QT_VERSION < 300 - // Qt 3 handles charsets internally. - font.setCharSet( (TQFont::CharSet)charSet ); -#endif } return ok; @@ -713,60 +705,60 @@ bool readTimeNode( const TQDomElement& element, TQTime& value ) -Qt::PenStyle stringToPenStyle( const TQString& style ) +TQt::PenStyle stringToPenStyle( const TQString& style ) { if( style == "NoPen" ) - return Qt::NoPen; + return TQt::NoPen; else if( style == "SolidLine" ) - return Qt::SolidLine; + return TQt::SolidLine; else if( style == "DashLine" ) - return Qt::DashLine; + return TQt::DashLine; else if( style == "DotLine" ) - return Qt::DotLine; + return TQt::DotLine; else if( style == "DashDotLine" ) - return Qt::DashDotLine; + return TQt::DashDotLine; else if( style == "DashDotDotLine" ) - return Qt::DashDotDotLine; + return TQt::DashDotDotLine; else // should not happen - return Qt::SolidLine; + return TQt::SolidLine; } -Qt::BrushStyle stringToBrushStyle( const TQString& style ) +TQt::BrushStyle stringToBrushStyle( const TQString& style ) { // PENDING(kalle) Support custom patterns if( style == "NoBrush" ) - return Qt::NoBrush; + return TQt::NoBrush; else if( style == "SolidPattern" ) - return Qt::SolidPattern; + return TQt::SolidPattern; else if( style == "Dense1Pattern" ) - return Qt::Dense1Pattern; + return TQt::Dense1Pattern; else if( style == "Dense2Pattern" ) - return Qt::Dense2Pattern; + return TQt::Dense2Pattern; else if( style == "Dense3Pattern" ) - return Qt::Dense3Pattern; + return TQt::Dense3Pattern; else if( style == "Dense4Pattern" ) - return Qt::Dense4Pattern; + return TQt::Dense4Pattern; else if( style == "Dense5Pattern" ) - return Qt::Dense5Pattern; + return TQt::Dense5Pattern; else if( style == "Dense6Pattern" ) - return Qt::Dense6Pattern; + return TQt::Dense6Pattern; else if( style == "Dense7Pattern" ) - return Qt::Dense7Pattern; + return TQt::Dense7Pattern; else if( style == "HorPattern" ) - return Qt::HorPattern; + return TQt::HorPattern; else if( style == "VerPattern" ) - return Qt::VerPattern; + return TQt::VerPattern; else if( style == "CrossPattern" ) - return Qt::CrossPattern; + return TQt::CrossPattern; else if( style == "BDiagPattern" ) - return Qt::BDiagPattern; + return TQt::BDiagPattern; else if( style == "FDiagPattern" ) - return Qt::FDiagPattern; + return TQt::FDiagPattern; else if( style == "DiagCrossPattern" ) - return Qt::DiagCrossPattern; + return TQt::DiagCrossPattern; else // should not happen (but can with custom patterns) - return Qt::SolidPattern; + return TQt::SolidPattern; } } diff --git a/kdgantt/KDGanttXMLTools.h b/kdgantt/KDGanttXMLTools.h index 784bc2e10..4d316f8b4 100644 --- a/kdgantt/KDGanttXMLTools.h +++ b/kdgantt/KDGanttXMLTools.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. ** **********************************************************************/ @@ -45,44 +45,44 @@ #include namespace KDGanttXML { - TQString penStyleToString( Qt::PenStyle style ); - Qt::PenStyle stringToPenStyle( const TQString& style ); - TQString brushStyleToString( Qt::BrushStyle style ); - Qt::BrushStyle stringToBrushStyle( const TQString& style ); + TQString penStyleToString( TQt::PenStyle style ); + TQt::PenStyle stringToPenStyle( const TQString& style ); + TQString brushStyleToString( TQt::BrushStyle style ); + TQt::BrushStyle stringToBrushStyle( const TQString& style ); - void createBoolNode( TQDomDocument& doc, TQDomNode& parent, + void createBoolNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, bool value ); - void createSizeNode( TQDomDocument& doc, TQDomNode& parent, + void createSizeNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQSize& value ); - void createIntNode( TQDomDocument& doc, TQDomNode& parent, + void createIntNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, int value ); - void createDoubleNode( TQDomDocument& doc, TQDomNode& parent, + void createDoubleNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, double value ); - void createStringNode( TQDomDocument& doc, TQDomNode& parent, + void createStringNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQString& text ); - void createColorNode( TQDomDocument& doc, TQDomNode& parent, + void createColorNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQColor& color ); - void createBrushNode( TQDomDocument& doc, TQDomNode& parent, + void createBrushNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQBrush& brush ); - void createPixmapNode( TQDomDocument& doc, TQDomNode& parent, + void createPixmapNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQPixmap& pixmap ); - void createRectNode( TQDomDocument& doc, TQDomNode& parent, + void createRectNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQRect& rect ); - void createStringListNodes( TQDomDocument& doc, TQDomNode& parent, + void createStringListNodes( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQStringList* list ); - void createFontNode( TQDomDocument& doc, TQDomNode& parent, + void createFontNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQFont& font ); - void createPenNode( TQDomDocument& doc, TQDomNode& parent, + void createPenNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQPen& pen ); - void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent, + void createDateTimeNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQDateTime& datetime ); - void createDateNode( TQDomDocument& doc, TQDomNode& parent, + void createDateNode( TQDomDocument& doc, TQDomNode& tqparent, const TQString& elementName, const TQDate& date ); - void createTimeNode( TQDomDocument& doc, TQDomNode& parent, + 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 ); diff --git a/kdgantt/itemAttributeDialog.ui b/kdgantt/itemAttributeDialog.ui index 10fac5d62..c214971ae 100644 --- a/kdgantt/itemAttributeDialog.ui +++ b/kdgantt/itemAttributeDialog.ui @@ -1,6 +1,6 @@ itemAttributeDialog - + itemAttributeDialog @@ -25,7 +25,7 @@ 6 - + Layout4 @@ -39,7 +39,7 @@ 6 - + TextLabel1_2 @@ -47,7 +47,7 @@ Item name: - + itemName @@ -71,7 +71,7 @@ - + Layout5 @@ -85,7 +85,7 @@ 6 - + TextLabel4 @@ -93,7 +93,7 @@ ShapeType: - + TextLabel8 @@ -101,12 +101,12 @@ Highlight color: - + TimeEdit5 - + TextLabel1 @@ -114,7 +114,7 @@ Lead - + TextLabel5 @@ -122,7 +122,7 @@ ShapeColor: - + DateEdit1 @@ -130,7 +130,7 @@ true - + TriangleDown @@ -160,7 +160,7 @@ MiddleBox - + DateEdit2 @@ -168,7 +168,7 @@ true - + StartShape @@ -176,7 +176,7 @@ Start - + ChangeStart @@ -184,7 +184,7 @@ Change - + TextLabel2 @@ -192,7 +192,7 @@ Middle - + TriangleDown @@ -222,7 +222,7 @@ StartBox - + TextLabel3 @@ -230,12 +230,12 @@ End - + DateEdit4 - + DateEdit3 @@ -243,7 +243,7 @@ true - + TextLabel2_2 @@ -251,7 +251,7 @@ Actual End - + HighMiddle @@ -259,7 +259,7 @@ Change - + HighStart @@ -267,7 +267,7 @@ Change - + ChangeMiddle @@ -275,7 +275,7 @@ Change - + TimeEdit3 @@ -283,7 +283,7 @@ true - + ChangeEnd @@ -291,7 +291,7 @@ Change - + TextLabel6 @@ -299,7 +299,7 @@ Date: - + HighEnd @@ -307,7 +307,7 @@ Change - + TriangleDown @@ -337,17 +337,17 @@ EndBox - + TimeEdit4 - + DateEdit5 - + TimeEdit1 @@ -355,7 +355,7 @@ true - + TimeEdit2 @@ -363,7 +363,7 @@ true - + TextLabel10 @@ -390,7 +390,7 @@ - + Layout3 @@ -404,7 +404,7 @@ 6 - + Layout1 @@ -418,7 +418,7 @@ 6 - + TextLabel7 @@ -426,7 +426,7 @@ Displayed text: - + LineEdit1 @@ -441,7 +441,7 @@ - + Layout2 @@ -455,7 +455,7 @@ 6 - + TextLabel9 @@ -466,7 +466,7 @@ AlignVCenter|AlignRight - + ChangeText @@ -478,7 +478,7 @@ - + Layout8 @@ -492,7 +492,7 @@ 6 - + PrioLabel @@ -500,7 +500,7 @@ Priority: - + PrioSpinBox @@ -511,7 +511,7 @@ 1 - + PrioSlider @@ -525,7 +525,7 @@ Horizontal - + CalBox @@ -702,7 +702,7 @@ KDGanttViewItem * myItem - + init() ChangeText_clicked() ChangeStart_clicked() @@ -732,6 +732,6 @@ CalBox_toggled( bool mode ) PrioSlider_valueChanged( int val ) getItem() - + diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h index 348b3e972..3ab24af83 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,7 +31,7 @@ /**************************************************************************** ** 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. *****************************************************************************/ @@ -49,7 +49,7 @@ void itemAttributeDialog::init( ) void itemAttributeDialog::ChangeText_clicked() { if ( !myItem) return; - TQColor c = QColorDialog::getColor( myItem->textColor(), this ); + TQColor c = TQColorDialog::getColor( myItem->textColor(), this ); if ( c.isValid() ) myItem->setTextColor( c ); TQPixmap * pix = (TQPixmap *)ChangeText->pixmap(); @@ -65,7 +65,7 @@ void itemAttributeDialog::ChangeStart_clicked() myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->colors( st, mi, en ); - TQColor c = QColorDialog::getColor( st, this ); + TQColor c = TQColorDialog::getColor( st, this ); if ( c.isValid() ) { st = c; ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); @@ -82,7 +82,7 @@ void itemAttributeDialog::ChangeMiddle_clicked() myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->colors( st, mi, en ); - TQColor c = QColorDialog::getColor( mi, this ); + TQColor c = TQColorDialog::getColor( mi, this ); if ( c.isValid() ) { mi = c; ChangeMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) ); @@ -98,7 +98,7 @@ void itemAttributeDialog::ChangeEnd_clicked() myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->colors( st, mi, en ); - TQColor c = QColorDialog::getColor( en, this ); + TQColor c = TQColorDialog::getColor( en, this ); if ( c.isValid() ) { en = c; ChangeEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) ); @@ -275,7 +275,7 @@ void itemAttributeDialog::HighStart_clicked() myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->highlightColors( st, mi, en ); - TQColor c = QColorDialog::getColor( st, this ); + TQColor c = TQColorDialog::getColor( st, this ); if ( c.isValid() ) { st = c; HighStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); @@ -292,7 +292,7 @@ void itemAttributeDialog::HighMiddle_clicked() myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->highlightColors( st, mi, en ); - TQColor c = QColorDialog::getColor( mi, this ); + TQColor c = TQColorDialog::getColor( mi, this ); if ( c.isValid() ) { mi = c; HighMiddle->setPixmap( KDGanttView::getPixmap( middle, mi, backgroundColor(), 10 ) ); @@ -309,7 +309,7 @@ void itemAttributeDialog::HighEnd_clicked() myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->highlightColors( st, mi, en ); - TQColor c = QColorDialog::getColor( en, this ); + TQColor c = TQColorDialog::getColor( en, this ); if ( c.isValid() ) { en = c; HighEnd->setPixmap( KDGanttView::getPixmap( end, en, backgroundColor(), 10 ) ); diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h index 2681ff733..a071dae3e 100644 --- a/kdgantt/qlayoutengine_p.h +++ b/kdgantt/qlayoutengine_p.h @@ -1,4 +1,4 @@ -// 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$ @@ -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,15 +37,15 @@ ** **********************************************************************/ -#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 +// 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 +#ifndef TQT_H #include "tqabstractqlayout.h" -#endif // QT_H +#endif // TQT_H -#ifndef QT_NO_LAYOUT +#ifndef TQT_NO_LAYOUT struct QLayoutStruct { void initParameters() { tqminimumSize = tqsizeHint = 0; - tqmaximumSize = QWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } + tqmaximumSize = TQWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } void init() { stretch = 0; initParameters(); } //permanent storage: int stretch; //parameters: - QCOORD tqsizeHint; - QCOORD tqmaximumSize; - QCOORD tqminimumSize; + TQCOORD tqsizeHint; + TQCOORD tqmaximumSize; + TQCOORD tqminimumSize; bool expansive; bool empty; //temporary storage: @@ -92,20 +92,20 @@ void qGeomCalc( TQMemArray &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 -- cgit v1.2.1