diff options
Diffstat (limited to 'kdgantt/KDGanttView.cpp')
-rw-r--r-- | kdgantt/KDGanttView.cpp | 1050 |
1 files changed, 525 insertions, 525 deletions
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 62f8dc9b1..98bd0782a 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -4,7 +4,7 @@ */ /**************************************************************************** - ** Copyright (C) 2002-2004 Klarälvdalens Datakonsult AB. All rights reserved. + ** Copyright (C) 2002-2004 Klar�lvdalens Datakonsult AB. All rights reserved. ** ** This file is part of the KDGantt library. ** @@ -27,8 +27,8 @@ ** licensing are not clear to you. ** ** As a special exception, permission is given to link this program - ** with any edition of Qt, and distribute the resulting executable, - ** without including the source code for Qt in the source distribution. + ** with any edition of TQt, and distribute the resulting executable, + ** without including the source code for TQt in the source distribution. ** **********************************************************************/ @@ -39,19 +39,19 @@ #include "KDGanttViewItem.h" #include "KDGanttXMLTools.h" #include "itemAttributeDialog.h" -#include <qprinter.h> -#include <qpainter.h> -#include <qlayout.h> -#include <qpaintdevicemetrics.h> -#include <qfile.h> -#include <qheader.h> -#include <qscrollview.h> -#include <qapplication.h> -#include <qevent.h> -#include <qiconview.h> - -#include <qmessagebox.h> -#include <qfileinfo.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqpaintdevicemetrics.h> +#include <tqfile.h> +#include <tqheader.h> +#include <tqscrollview.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqiconview.h> + +#include <tqmessagebox.h> +#include <tqfileinfo.h> #ifndef KDGANTT_MASTER_CVS #include "KDGanttView.moc" @@ -69,19 +69,19 @@ In order to set up a Gantt view, create an object of this class, and populate it with a number of \a KDGanttViewItem objects. - If you experience problems with the repainting of the content of the + If you experience problems with the tqrepainting of the content of the Gantt View after scrolling, call \a setRepaintMode(). */ /*! Constructs an empty KDGanttView. - \param parent the widget parent + \param tqparent the widget tqparent \param name the internal debugging name */ -KDGanttView::KDGanttView( QWidget* parent, const char* name ) - : KDGanttMinimizeSplitter( Qt::Vertical, parent, name ), +KDGanttView::KDGanttView( TQWidget* tqparent, const char* name ) + : KDGanttMinimizeSplitter( Qt::Vertical, tqparent, name ), myCanvasView(0), myTimeHeaderScroll(0) { @@ -92,42 +92,42 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); mySplitter = new KDGanttMinimizeSplitter( this ); mySplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left ); - leftWidget = new QVBox( mySplitter ); - rightWidget = new QVBox( mySplitter ); + leftWidget = new TQVBox( mySplitter ); + rightWidget = new TQVBox( mySplitter ); myLegend = new KDLegendWidget( leftWidget, this ); - spacerLeft = new QHBox( leftWidget ); + spacerLeft = new TQHBox( leftWidget ); myListView = new KDListView(leftWidget, this); - myListView->setVScrollBarMode (QScrollView::AlwaysOff ); - connect( myListView, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( slotSelectionChanged( QListViewItem* ) ) ); + myListView->setVScrollBarMode (TQScrollView::AlwaysOff ); + connect( myListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) ); - connect( myListView, SIGNAL( mouseButtonClicked ( int, QListViewItem * , const QPoint &, int ) ), this, SLOT( slotmouseButtonClicked ( int , QListViewItem * , const QPoint &, int ) ) ); - connect( myListView, SIGNAL( contextMenuRequested ( QListViewItem * , const QPoint &, int ) ), this, SLOT( slotcontextMenuRequested ( QListViewItem * , const QPoint & , int ) ) ); - connect( myListView, SIGNAL(doubleClicked ( QListViewItem * ) ), this, SLOT(slotdoubleClicked ( QListViewItem * ) ) ); + connect( myListView, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotmouseButtonClicked ( int , TQListViewItem * , const TQPoint &, int ) ) ); + connect( myListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT( slotcontextMenuRequested ( TQListViewItem * , const TQPoint & , int ) ) ); + connect( myListView, TQT_SIGNAL(doubleClicked ( TQListViewItem * ) ), this, TQT_SLOT(slotdoubleClicked ( TQListViewItem * ) ) ); - connect( myListView, SIGNAL(currentChanged( QListViewItem * ) ), this, SLOT(slotCurrentChanged ( QListViewItem * ) ) ); - connect( myListView, SIGNAL(itemRenamed ( QListViewItem * , int , const QString & ) ), this, SLOT(slotItemRenamed ( QListViewItem *, int , const QString & ) ) ); - connect( myListView, SIGNAL(mouseButtonPressed( int, QListViewItem * , const QPoint &, int ) ), this, SLOT(slotMouseButtonPressed ( int , QListViewItem * , const QPoint & , int ) ) ); + connect( myListView, TQT_SIGNAL(currentChanged( TQListViewItem * ) ), this, TQT_SLOT(slotCurrentChanged ( TQListViewItem * ) ) ); + connect( myListView, TQT_SIGNAL(itemRenamed ( TQListViewItem * , int , const TQString & ) ), this, TQT_SLOT(slotItemRenamed ( TQListViewItem *, int , const TQString & ) ) ); + connect( myListView, TQT_SIGNAL(mouseButtonPressed( int, TQListViewItem * , const TQPoint &, int ) ), this, TQT_SLOT(slotMouseButtonPressed ( int , TQListViewItem * , const TQPoint & , int ) ) ); - //connect( myListView, SIGNAL( ), this, SLOT( ) ); + //connect( myListView, TQT_SIGNAL( ), this, TQT_SLOT( ) ); myTimeTable = new KDTimeTableWidget (rightWidget,this); - spacerRight = new QWidget( rightWidget ); + spacerRight = new TQWidget( rightWidget ); - myTimeHeaderContainer = new QHBox( rightWidget ); - myTimeHeaderContainer->setFrameStyle( QFrame::NoFrame ); + myTimeHeaderContainer = new TQHBox( rightWidget ); + myTimeHeaderContainer->setFrameStyle( TQFrame::NoFrame ); myTimeHeaderContainer->setMargin( 0 ); - myTimeHeaderScroll = new QScrollView ( myTimeHeaderContainer ); - myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff ); - myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOff ); - timeHeaderSpacerWidget = new QWidget( myTimeHeaderContainer ); + myTimeHeaderScroll = new TQScrollView ( myTimeHeaderContainer ); + myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff ); + myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOff ); + timeHeaderSpacerWidget = new TQWidget( myTimeHeaderContainer ); /* - myTimeHeaderScroll = new QScrollView ( rightWidget ); - myTimeHeaderScroll->setHScrollBarMode( QScrollView::AlwaysOff ); - myTimeHeaderScroll->setVScrollBarMode( QScrollView::AlwaysOn ); + myTimeHeaderScroll = new TQScrollView ( rightWidget ); + myTimeHeaderScroll->setHScrollBarMode( TQScrollView::AlwaysOff ); + myTimeHeaderScroll->setVScrollBarMode( TQScrollView::AlwaysOn ); */ //myTimeHeader = new KDTimeHeaderWidget (rightWidget,this); myTimeHeader = new KDTimeHeaderWidget (myTimeHeaderScroll->viewport(),this); @@ -135,18 +135,18 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) myTimeHeaderScroll->viewport()->setBackgroundColor( myTimeHeader->backgroundColor() ); timeHeaderSpacerWidget->setBackgroundColor( myTimeHeader->backgroundColor() ); myCanvasView = new KDGanttCanvasView (this,myTimeTable,rightWidget); - myTimeHeaderScroll->setFrameStyle( QFrame::NoFrame ); + myTimeHeaderScroll->setFrameStyle( TQFrame::NoFrame ); // - myCanvasView->setFrameStyle( QFrame::NoFrame ); + myCanvasView->setFrameStyle( TQFrame::NoFrame ); myCanvasView->setMargin( 0 ); // myTimeHeaderScroll->setMargin( 0 );//myCanvasView->frameWidth() ); setFrameStyle(myListView->frameStyle()); setLineWidth( 2 ); - myListView->setFrameStyle( QFrame::NoFrame ); + myListView->setFrameStyle( TQFrame::NoFrame ); myListView->setMargin( 0 ); - QObject::connect(myListView, SIGNAL ( expanded ( QListViewItem * ) ) , myTimeTable , SLOT( expandItem(QListViewItem * ))) ; - QObject::connect(myListView, SIGNAL (collapsed ( QListViewItem * ) ) , myTimeTable , SLOT(collapseItem(QListViewItem * ))) ; + TQObject::connect(myListView, TQT_SIGNAL ( expanded ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT( expandItem(TQListViewItem * ))) ; + TQObject::connect(myListView, TQT_SIGNAL (collapsed ( TQListViewItem * ) ) , myTimeTable , TQT_SLOT(collapseItem(TQListViewItem * ))) ; timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() ); listViewIsVisible = true; @@ -156,9 +156,9 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) initDefaults(); _showHeader = false; - myTextColor = Qt::black; - myLegendItems = new QPtrList<legendItem>; - //QObject::connect( this, SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, SLOT( editItem( KDGanttViewItem* ))) ; + myTextColor = TQt::black; + myLegendItems = new TQPtrList<legendItem>; + //TQObject::connect( this, TQT_SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, TQT_SLOT( editItem( KDGanttViewItem* ))) ; myItemAttributeDialog = new itemAttributeDialog(); setRepaintMode( KDGanttView::Medium ); //setRepaintMode( KDGanttView::Always ); @@ -166,19 +166,19 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) setHeaderVisible( false ); // now connecting the widgets - connect(myCanvasView->horizontalScrollBar(), SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), SLOT( setValue ( int))) ; - connect(myCanvasView, SIGNAL ( heightResized( int )) ,myTimeTable, SLOT( checkHeight ( int))) ; - connect(myCanvasView, SIGNAL ( widthResized( int )) ,myTimeHeader, SLOT( checkWidth ( int))) ; - - QObject::connect(myCanvasView->verticalScrollBar(), SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), SLOT( setValue ( int ))) ; - connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,this, SLOT(slotHeaderSizeChanged() )) ; - connect(myTimeHeader, SIGNAL ( sizeChanged( int ) ) ,myTimeTable, SLOT(resetWidth( int ) )) ; - connect(myListView, SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, SLOT( moveMyContent( int, int ))) ; - connect(myTimeTable, SIGNAL ( heightComputed ( int ) ) ,myCanvasView, SLOT( setMyContentsHeight( int ))) ; + connect(myCanvasView->horizontalScrollBar(), TQT_SIGNAL ( valueChanged ( int )) ,myTimeHeaderScroll->horizontalScrollBar(), TQT_SLOT( setValue ( int))) ; + connect(myCanvasView, TQT_SIGNAL ( heightResized( int )) ,myTimeTable, TQT_SLOT( checkHeight ( int))) ; + connect(myCanvasView, TQT_SIGNAL ( widthResized( int )) ,myTimeHeader, TQT_SLOT( checkWidth ( int))) ; + + TQObject::connect(myCanvasView->verticalScrollBar(), TQT_SIGNAL ( valueChanged ( int ) ) ,myListView->verticalScrollBar(), TQT_SLOT( setValue ( int ))) ; + connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,this, TQT_SLOT(slotHeaderSizeChanged() )) ; + connect(myTimeHeader, TQT_SIGNAL ( sizeChanged( int ) ) ,myTimeTable, TQT_SLOT(resetWidth( int ) )) ; + connect(myListView, TQT_SIGNAL ( contentsMoving ( int, int ) ) ,myCanvasView, TQT_SLOT( moveMyContent( int, int ))) ; + connect(myTimeTable, TQT_SIGNAL ( heightComputed ( int ) ) ,myCanvasView, TQT_SLOT( setMyContentsHeight( int ))) ; // the next three are for adding new ticks at left/right - connect( myCanvasView->horizontalScrollBar(), SIGNAL (prevLine () ) ,this, SLOT(addTickLeft())); - connect( myCanvasView->horizontalScrollBar(), SIGNAL (nextLine () ) ,this, SLOT(addTickRight())); - connect( myCanvasView->horizontalScrollBar(), SIGNAL (valueChanged ( int ) ) ,this, SLOT( enableAdding( int ))); + connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(addTickLeft())); + connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(addTickRight())); + connect( myCanvasView->horizontalScrollBar(), TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT( enableAdding( int ))); // now initing fCenterTimeLineAfterShow = false; @@ -186,9 +186,9 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name ) fDropEnabled = false; closingBlocked = false; myTimeHeader->computeTicks(); - centerTimelineAfterShow( QDateTime::currentDateTime () ); + centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () ); setDisplayEmptyTasksAsLine( false ); - QValueList<int> list; + TQValueList<int> list; list.append(240); list.append(530); mySplitter->setSizes( list ); @@ -287,7 +287,7 @@ void KDGanttView::show() else myCanvasView->horizontalScrollBar()->setValue(1 ); myTimeTable->updateMyContent(); - QWidget::show(); + TQWidget::show(); myCanvasView->setMyContentsHeight( 0 ); if ( fCenterTimeLineAfterShow ) { fCenterTimeLineAfterShow = false; @@ -296,7 +296,7 @@ void KDGanttView::show() } /*! Closes the widget. - The closing is rejected, if a repainting is currently being done. + The closing is rejected, if a tqrepainting is currently being done. \param alsoDelete if true, the widget is deleted \return true, if the widget was closed */ @@ -306,29 +306,29 @@ bool KDGanttView::close ( bool alsoDelete ) //qDebug("close "); if ( closingBlocked ) return false; - return QWidget::close ( alsoDelete ); + return TQWidget::close ( alsoDelete ); } /*! Returns a useful size for the view. Returned width: - sizeHint().width() of the list view + width of TimeTable + tqsizeHint().width() of the list view + width of TimeTable Returned height: height() of TimeHeader + height() of TimeTable + height() of Legend (if shown) */ -QSize KDGanttView::sizeHint() const +TQSize KDGanttView::tqsizeHint() const { bool block = myTimeTable->blockUpdating(); myTimeTable->setBlockUpdating( false ); myTimeTable->updateMyContent(); /* The below causes recursive calls to various size updating methods, which - * cause QCanvas to hide and show items like mad, which is very slow. If + * cause TQCanvas to hide and show items like mad, which is very slow. If * there is a legitimate gui updating issue here somewhere, it will need * to be solved differently. */ - //qApp->processEvents(); + //tqApp->processEvents(); int hintHeight = myTimeHeader->height(); int legendHeight = 0; if ( showLegendButton() ) @@ -342,13 +342,13 @@ QSize KDGanttView::sizeHint() const if ( myLegend->isShown() ) hintHeight += myLegend->legendSizeHint().height() +10; hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2; - int hintWid = myListView->sizeHint().width(); + int hintWid = myListView->tqsizeHint().width(); //hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width(); - hintWid += myCanvasView->sizeHint().width(); + hintWid += myCanvasView->tqsizeHint().width(); // add 10 for the splitter-bars // qDebug("sizehint %d %d ",hintWid+10, hintHeight ); myTimeTable->setBlockUpdating( block ); - return QSize( hintWid+10, hintHeight ); + return TQSize( hintWid+10, hintHeight ); } @@ -418,7 +418,7 @@ bool KDGanttView::headerVisible() const \param global true if coordX is a global position, false otherwise \return the date and time at coordinate X in the Gantt view. */ -QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const +TQDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const { // default for myTimeHeader->getDateTimeForIndex() is local return myTimeHeader->getDateTimeForIndex(coordX, !global ); @@ -428,7 +428,7 @@ QDateTime KDGanttView::getDateTimeForCoordX(int coordX, bool global ) const /*! Implements a casted pass-through of the selectionChanged() signal. */ -void KDGanttView::slotSelectionChanged( QListViewItem* item ) +void KDGanttView::slotSelectionChanged( TQListViewItem* item ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); Q_ASSERT( gItem ); @@ -440,8 +440,8 @@ void KDGanttView::slotSelectionChanged( QListViewItem* item ) Implements a casted pass-through of the mouseButtonClicked() signal. Signals itemLeftClicked() , itemMidClicked() are emitted as well. */ -void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item, - const QPoint & pos, int c ) +void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item, + const TQPoint & pos, int c ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvMouseButtonClicked ( button , gItem, pos, c ); @@ -458,11 +458,11 @@ void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item, //emit mouseButtonClicked ( button , gItem, pos, c ); { switch ( button ) { - case LeftButton: + case Qt::LeftButton: emit lvItemLeftClicked( gItem ); emit itemLeftClicked( gItem ); break; - case MidButton: + case Qt::MidButton: emit lvItemMidClicked( gItem ); emit itemMidClicked( gItem ); break; @@ -476,7 +476,7 @@ void KDGanttView::slotmouseButtonClicked ( int button, QListViewItem * item, The signal itemRightClicked() is emitted as well; the position is the global position. */ -void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint & pos, int col ) +void KDGanttView::slotcontextMenuRequested ( TQListViewItem * item, const TQPoint & pos, int col ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvContextMenuRequested ( gItem, pos, col ); @@ -488,7 +488,7 @@ void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint /* Implements a casted pass-through of the doubleClicked() signal. */ -void KDGanttView::slotdoubleClicked ( QListViewItem * item ) +void KDGanttView::slotdoubleClicked ( TQListViewItem * item ) { { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); @@ -501,7 +501,7 @@ void KDGanttView::slotdoubleClicked ( QListViewItem * item ) /* Implements a casted pass-through of the currentChanged() signal. */ -void KDGanttView::slotCurrentChanged ( QListViewItem * item ) +void KDGanttView::slotCurrentChanged ( TQListViewItem * item ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); myCurrentItem = gItem; @@ -512,8 +512,8 @@ void KDGanttView::slotCurrentChanged ( QListViewItem * item ) /* Implements a casted pass-through of the itemRenamed() signal. */ -void KDGanttView::slotItemRenamed ( QListViewItem * item , int col, - const QString & text ) +void KDGanttView::slotItemRenamed ( TQListViewItem * item , int col, + const TQString & text ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvItemRenamed( gItem, col, text ); @@ -523,8 +523,8 @@ void KDGanttView::slotItemRenamed ( QListViewItem * item , int col, /* Implements a casted pass-through of the mouseButtonPressed() signal. */ -void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item, - const QPoint & pos, int c ) +void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item, + const TQPoint & pos, int c ) { KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item ); emit lvMouseButtonPressed( button, gItem, pos, c ); @@ -532,14 +532,14 @@ void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item, /*! - Specifies whether the content should be repainted after scrolling or + Specifies whether the content should be tqrepainted after scrolling or not. - \param mode If No, there is no repainting after scrolling. This is + \param mode If No, there is no tqrepainting after scrolling. This is the fastest mode. - If Medium, there is extra repainting after releasing the + If Medium, there is extra tqrepainting after releasing the scrollbar. This provides fast scrolling with updated content - after scrolling. Recommended, when repaint problems occur. + after scrolling. Recommended, when tqrepaint problems occur. This is the default value after startup. If Always, there is an extra update after every move of the scrollbar. This entails slow scrolling with updated @@ -548,7 +548,7 @@ void KDGanttView::slotMouseButtonPressed ( int button, QListViewItem * item, void KDGanttView::setRepaintMode( RepaintMode mode ) { - QScrollBar *cvh, *cvv; + TQScrollBar *cvh, *cvv; cvh = myCanvasView->horizontalScrollBar(); cvv = myCanvasView->verticalScrollBar(); // first disconnect @@ -560,18 +560,18 @@ void KDGanttView::setRepaintMode( RepaintMode mode ) break; case Medium: - connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); - connect( cvv, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (nextLine () ) ,this, SLOT(forceRepaint())); - connect( cvv, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (prevLine () ) ,this, SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (nextLine () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (prevLine () ) ,this, TQT_SLOT(forceRepaint())); break; case Always: - connect( cvv, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int ))); - connect( cvh, SIGNAL (valueChanged ( int ) ) ,this, SLOT(forceRepaint( int ))); - connect( cvv, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); - connect( cvh, SIGNAL (sliderReleased () ) ,this, SLOT(forceRepaint())); + connect( cvv, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int ))); + connect( cvh, TQT_SIGNAL (valueChanged ( int ) ) ,this, TQT_SLOT(forceRepaint( int ))); + connect( cvv, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); + connect( cvh, TQT_SIGNAL (sliderReleased () ) ,this, TQT_SLOT(forceRepaint())); break; } } @@ -622,7 +622,7 @@ void KDGanttView::slotHeaderSizeChanged() // legend is cleared - reinit legend with list legendItem* li; for ( li = myLegendItems->first(); li; li = myLegendItems->next() ) { - myLegend->addLegendItem(li->shape, li->color, li->text ); + myLegend->addLegendItem(li->tqshape, li->color, li->text ); } } } @@ -651,7 +651,7 @@ void KDGanttView::slotHeaderSizeChanged() DO NOT DELETE THIS POINTER! \sa setShowLegend(), setLegendIsDockwindow(),legendIsDockwindow() */ -QDockWindow* KDGanttView::legendDockwindow() const +TQDockWindow* KDGanttView::legendDockwindow() const { return myLegend->dockwindow(); } @@ -698,9 +698,9 @@ void KDGanttView::setShowListView( bool show ) if(listViewIsVisible == show) return; listViewIsVisible = show; if (listViewIsVisible) - myListView->parentWidget()->show(); + myListView->tqparentWidget()->show(); else - myListView->parentWidget()->hide(); + myListView->tqparentWidget()->hide(); } @@ -783,15 +783,15 @@ bool KDGanttView::editable() const \sa loadProject() */ -bool KDGanttView::saveProject( QIODevice* device ) +bool KDGanttView::saveProject( TQIODevice* device ) { Q_ASSERT( device ); - QDomDocument doc = saveXML(); + TQDomDocument doc = saveXML(); if( device->isOpen() ) device->close(); if( device->open( IO_WriteOnly ) ) { - QTextStream ts( device ); + TQTextStream ts( device ); ts << doc.toString(); return true; } else @@ -810,15 +810,15 @@ bool KDGanttView::saveProject( QIODevice* device ) \sa saveProject() */ -bool KDGanttView::loadProject( QIODevice* device ) +bool KDGanttView::loadProject( TQIODevice* device ) { Q_ASSERT( device ); if( device->isOpen() ) device->close(); if( device->open( IO_ReadOnly ) ) { - QDomDocument doc( "GanttView" ); - QString err; + TQDomDocument doc( "GanttView" ); + TQString err; int errline, errcol; if ( !doc.setContent( device, &err, &errline, &errcol ) ) { qDebug("KDGantt::Error parsing XML data at line %d. Message is:", errline ); @@ -835,8 +835,8 @@ bool KDGanttView::loadProject( QIODevice* device ) /*! Sends a Gantt view to a printer. The printer should already be set - up for printing (by calling QPrinter::setup()). - If the printer is not set up, QPrinter::setup() is called before printing + up for printing (by calling TQPrinter::setup()). + If the printer is not set up, TQPrinter::setup() is called before printing You can specify, whether the ListView, TimeLine, or Legend will be printed. All combinations of these three widgets are allowed. @@ -851,13 +851,13 @@ bool KDGanttView::loadProject( QIODevice* device ) \sa drawContents() */ -void KDGanttView::print( QPrinter* printer , +void KDGanttView::print( TQPrinter* printer , bool printListView, bool printTimeLine, bool printLegend ) { bool deletePrinter = false; if (! printer ) { - printer = new QPrinter(); + printer = new TQPrinter(); deletePrinter = true; if ( !printer->setup()) { delete printer; @@ -865,18 +865,18 @@ void KDGanttView::print( QPrinter* printer , } } // now we have a printer to print on - QPainter p( printer ); + TQPainter p( printer ); // get the paper metrics - QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); + TQPaintDeviceMetrics m = TQPaintDeviceMetrics ( printer ); float dx, dy; // get the size of the desired output for scaling. // here we want to print all: ListView, TimeLine, and Legend // for this purpose, we call drawContents() with a 0 pointer as painter - QSize size = drawContents( 0, printListView, printTimeLine, printLegend ); + TQSize size = drawContents( 0, printListView, printTimeLine, printLegend ); // at the top, we want to print current time/date - QString date = "Printing Time: " + QDateTime::currentDateTime().toString(); - int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); + TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString(); + int hei = p.boundingRect(0,0, 5, 5, TQt::AlignLeft, date ).height(); p.drawText( 0, 0, date ); // compute the scale @@ -905,7 +905,7 @@ void KDGanttView::print( QPrinter* printer , /*! - Paints a Gantt view on a QPainter. + Paints a Gantt view on a TQPainter. You can specify, whether the list view, the time line, or the legend is painted. All combinations of these three widgets are allowed. @@ -918,7 +918,7 @@ void KDGanttView::print( QPrinter* printer , the scale of the painter, before calling this method with a painter. In order to get the output fitted to your paper and your printer, call first - QSize size = drawContents( 0, printListView, printTimeLine, printLegend ); + TQSize size = drawContents( 0, printListView, printTimeLine, printLegend ); //then compute the scale dx = paper.width() / size.width(); dy = paper.height() / size.height(); @@ -943,10 +943,10 @@ void KDGanttView::print( QPrinter* printer , \return the size of the painted area \sa print() */ -QSize KDGanttView::drawContents( QPainter* p, +TQSize KDGanttView::drawContents( TQPainter* p, bool drawListView , bool drawTimeLine, bool drawLegend ) { - QSize size; + TQSize size; int lvX, lvY, thX, thY, tlX, tlY, lwX, lwY, allX, allY; lvX = myListView->contentsWidth(); lvY = myCanvasView->canvas()->height() + 20; @@ -971,7 +971,7 @@ QSize KDGanttView::drawContents( QPainter* p, if ( allX < lwX ) allX = lwX ; } - size = QSize( allX, allY ); + size = TQSize( allX, allY ); int temp = 0; if ( p ) { if ( drawListView ) { @@ -986,7 +986,7 @@ QSize KDGanttView::drawContents( QPainter* p, } if ( drawTimeLine ) { p->translate( myCanvasView->frameWidth(), 0); - myTimeHeader->repaintMe( 0, myTimeHeader->width(), p ); + myTimeHeader->tqrepaintMe( 0, myTimeHeader->width(), p ); p->translate( -myCanvasView->frameWidth(), thY); myCanvasView->drawToPainter( p ); if ( drawListView ) @@ -1062,7 +1062,7 @@ void KDGanttView::zoomToFit() \sa zoomToFit() */ -void KDGanttView::zoomToSelection( const QDateTime& start, const QDateTime& end ) +void KDGanttView::zoomToSelection( const TQDateTime& start, const TQDateTime& end ) { myTimeHeader->zoomToSelection( start, end); @@ -1083,21 +1083,21 @@ void KDGanttView::ensureVisible( KDGanttViewItem* item ) /*! - Makes sure that the specified QDateTime is in the center of the + Makes sure that the specified TQDateTime is in the center of the visible Gantt chart (if possible). If you want to center the timeline when the KDGanttView is hidden, calling centerTimelineAfterShow() is the better alternative. \sa center(), centerTimelineAfterShow() */ -void KDGanttView::centerTimeline( const QDateTime& center ) +void KDGanttView::centerTimeline( const TQDateTime& center ) { myTimeHeader->centerDateTime( center ); } /*! - Makes sure that the specified QDateTime is in the center of the + Makes sure that the specified TQDateTime is in the center of the visible Gantt chart (if possible). If the KDGanttView is currently hidden, this method resets the center once again after the next show() call. Use this method if you want to center the timeline when @@ -1109,7 +1109,7 @@ void KDGanttView::centerTimeline( const QDateTime& center ) \sa center(), centerTimeline() */ -void KDGanttView::centerTimelineAfterShow( const QDateTime& center ) +void KDGanttView::centerTimelineAfterShow( const TQDateTime& center ) { myTimeHeader->centerDateTime( center ); if ( ! isVisible() ) { @@ -1213,13 +1213,13 @@ bool KDGanttView::showTaskLinks() const \param font the new font of the widget */ -void KDGanttView::setFont(const QFont& font) +void KDGanttView::setFont(const TQFont& font) { myListView->setFont(font); - myListView->repaint(); + myListView->tqrepaint(); myTimeHeader->setFont(font); myLegend->setFont( font ); - QWidget::setFont( font ); + TQWidget::setFont( font ); setScale(scale()); } @@ -1306,21 +1306,21 @@ bool KDGanttView::showTimeTablePopupMenu() const /*! - Sets the shapes for a certain type of Gantt item. Not all items use - all three shapes (e.g., only summary items use the middle shape). + Sets the tqshapes for a certain type of Gantt item. Not all items use + all three tqshapes (e.g., only summary items use the middle tqshape). - This setting overrides any shape settings made on individual items. + This setting overrides any tqshape settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the documentation of the KDGanttViewItem class. - \param type the type of Gantt items for which to set the shapes - \param start the shape to use for the beginning of the item - \param middle the shape to use for the middle of the item - \param end the shape to use for the end of the item - \param overwriteExisting if true, overwrites existing shape settings + \param type the type of Gantt items for which to set the tqshapes + \param start the tqshape to use for the beginning of the item + \param middle the tqshape to use for the middle of the item + \param end the tqshape to use for the end of the item + \param overwriteExisting if true, overwrites existing tqshape settings in the individual items - \sa shapes() + \sa tqshapes() */ void KDGanttView::setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, @@ -1329,7 +1329,7 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setShapes(start,middle, end ); @@ -1344,18 +1344,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, /*! - Queries the shapes for a particular type of Gantt item. + Queries the tqshapes for a particular type of Gantt item. - \param type the type of Gantt items for which to query the shapes - \param start the start shape is returned in this parameter - \param middle the middle shape is returned in this parameter - \param end the end shape is returned in this parameter - \return true if there was a general shape set for the specified - type. If the return value is false, the values of the three shape + \param type the type of Gantt items for which to query the tqshapes + \param start the start tqshape is returned in this parameter + \param middle the middle tqshape is returned in this parameter + \param end the end tqshape is returned in this parameter + \return true if there was a general tqshape set for the specified + type. If the return value is false, the values of the three tqshape parameters are undefined. \sa setShapes() */ -bool KDGanttView::shapes( KDGanttViewItem::Type type, +bool KDGanttView::tqshapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape& start, KDGanttViewItem::Shape& middle, KDGanttViewItem::Shape& end ) const @@ -1386,12 +1386,12 @@ bool KDGanttView::shapes( KDGanttViewItem::Type type, \sa colors(), setDefaultColors(), defaultColors() */ void KDGanttView::setColors( KDGanttViewItem::Type type, - const QColor& start, const QColor& middle, - const QColor& end, + const TQColor& start, const TQColor& middle, + const TQColor& end, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setColors(start,middle, end ); @@ -1418,7 +1418,7 @@ void KDGanttView::setColors( KDGanttViewItem::Type type, \sa setColors(), setDefaultColor(), defaultColor() */ bool KDGanttView::colors( KDGanttViewItem::Type type, - QColor& start, QColor& middle, QColor& end ) const + TQColor& start, TQColor& middle, TQColor& end ) const { int index = getIndex( type ); start = myColor [index*3]; @@ -1448,13 +1448,13 @@ bool KDGanttView::colors( KDGanttViewItem::Type type, \sa highlightColors(), setDefaultHighlightColor(), defaultHighlightColor() */ void KDGanttView::setHighlightColors( KDGanttViewItem::Type type, - const QColor& start, - const QColor& middle, - const QColor& end, + const TQColor& start, + const TQColor& middle, + const TQColor& end, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setHighlightColors(start,middle, end ); @@ -1484,8 +1484,8 @@ void KDGanttView::setHighlightColors( KDGanttViewItem::Type type, defaultHighlightColor() */ bool KDGanttView::highlightColors( KDGanttViewItem::Type type, - QColor& start, QColor& middle, - QColor& end ) const + TQColor& start, TQColor& middle, + TQColor& end ) const { int index = getIndex( type ); start = myColorHL [index*3]; @@ -1502,9 +1502,9 @@ bool KDGanttView::highlightColors( KDGanttViewItem::Type type, \param color the text color to use \sa textColor() */ -void KDGanttView::setTextColor( const QColor& color ) +void KDGanttView::setTextColor( const TQColor& color ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { ((KDGanttViewItem*)it.current())->setTextColor(color); } @@ -1518,7 +1518,7 @@ void KDGanttView::setTextColor( const QColor& color ) \return the color used for texts in the Gantt chart. \sa setTextColor() */ -QColor KDGanttView::textColor() const +TQColor KDGanttView::textColor() const { return myTextColor; } @@ -1534,7 +1534,7 @@ QColor KDGanttView::textColor() const KDGanttView::noInformationBrush() */ -void KDGanttView::setNoInformationBrush( const QBrush& brush ) +void KDGanttView::setNoInformationBrush( const TQBrush& brush ) { myTimeTable->setNoInformationBrush( brush ); } @@ -1546,7 +1546,7 @@ void KDGanttView::setNoInformationBrush( const QBrush& brush ) \sa KDGanttViewItem::showNoInformation(), KDGanttViewItem::setShowNoInformation(), setNoInformationBrush() */ -QBrush KDGanttView::noInformationBrush() const +TQBrush KDGanttView::noInformationBrush() const { return myTimeTable->noInformationBrush(); } @@ -1562,26 +1562,26 @@ void KDGanttView::clearLegend( ) myLegend->clearLegend(); myLegendItems->setAutoDelete( true ); delete myLegendItems; - myLegendItems = new QPtrList<legendItem>; + myLegendItems = new TQPtrList<legendItem>; } /*! Adds an item to the legend. - \param shape the shape to display - \param shapeColor the color in which to display the shape + \param tqshape the tqshape to display + \param tqshapeColor the color in which to display the tqshape \param text the text to display \sa clearLegend() */ -void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, - const QColor& shapeColor, - const QString& text ) +void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, + const TQString& text ) { - myLegend->addLegendItem( shape,shapeColor,text ); + myLegend->addLegendItem( tqshape,tqshapeColor,text ); legendItem* item = new legendItem; - item->shape = shape; - item->color = shapeColor; + item->tqshape = tqshape; + item->color = tqshapeColor; item->text = text; myLegendItems->append( item ); } @@ -1594,7 +1594,7 @@ void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, \param start the start of the horizon \sa horizonStart() */ -void KDGanttView::setHorizonStart( const QDateTime& start ) +void KDGanttView::setHorizonStart( const TQDateTime& start ) { myTimeHeader->setHorizonStart(start); } @@ -1606,7 +1606,7 @@ void KDGanttView::setHorizonStart( const QDateTime& start ) \return the start of the horizon of the Gantt chart \sa setHorizonStart() */ -QDateTime KDGanttView::horizonStart() const +TQDateTime KDGanttView::horizonStart() const { return myTimeHeader->horizonStart(); } @@ -1619,7 +1619,7 @@ QDateTime KDGanttView::horizonStart() const \param end the end of the horizon \sa setHorizonEnd() */ -void KDGanttView::setHorizonEnd( const QDateTime& end ) +void KDGanttView::setHorizonEnd( const TQDateTime& end ) { myTimeHeader->setHorizonEnd(end); } @@ -1632,7 +1632,7 @@ void KDGanttView::setHorizonEnd( const QDateTime& end ) \sa setHorizonEnd() */ -QDateTime KDGanttView::horizonEnd() const +TQDateTime KDGanttView::horizonEnd() const { return myTimeHeader->horizonEnd(); } @@ -1891,8 +1891,8 @@ bool KDGanttView::showMinorTicks() const \sa columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -void KDGanttView::setColumnBackgroundColor( const QDateTime& column, - const QColor& color , +void KDGanttView::setColumnBackgroundColor( const TQDateTime& column, + const TQColor& color , Scale mini, Scale maxi ) { myTimeHeader->setColumnBackgroundColor( column, color,mini,maxi ); @@ -1903,7 +1903,7 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column, Sets the background color for a time interval given by \a start and \a end. \a start may be later than \a end. If there is already a background interval with the same \a start and \a end values - defined, the values (i.e. const QColor& color , Scale mini, Scale + defined, the values (i.e. const TQColor& color , Scale mini, Scale maxi) of this background interval are changed. Change the times of an already defined interval with \a changeBackgroundInterval(). Delete an already defined interval with \a @@ -1925,9 +1925,9 @@ void KDGanttView::setColumnBackgroundColor( const QDateTime& column, columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -void KDGanttView::setIntervalBackgroundColor( const QDateTime& start, - const QDateTime& end, - const QColor& color , +void KDGanttView::setIntervalBackgroundColor( const TQDateTime& start, + const TQDateTime& end, + const TQColor& color , Scale mini, Scale maxi ) { myTimeHeader->setIntervalBackgroundColor( start, end, color,mini,maxi ); @@ -1952,10 +1952,10 @@ void KDGanttView::setIntervalBackgroundColor( const QDateTime& start, columnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart, - const QDateTime& oldend, - const QDateTime& newstart, - const QDateTime& newend ) +bool KDGanttView::changeBackgroundInterval( const TQDateTime& oldstart, + const TQDateTime& oldend, + const TQDateTime& newstart, + const TQDateTime& newend ) { return myTimeHeader->changeBackgroundInterval( oldstart, oldend, newstart, newend ); @@ -1970,8 +1970,8 @@ bool KDGanttView::changeBackgroundInterval( const QDateTime& oldstart, \a start and \a end found (and hence deleted). \sa changeBackgroundInterval(), columnBackgroundColor() */ -bool KDGanttView::deleteBackgroundInterval( const QDateTime& start, - const QDateTime& end) +bool KDGanttView::deleteBackgroundInterval( const TQDateTime& start, + const TQDateTime& end) { return myTimeHeader->deleteBackgroundInterval( start, end ); } @@ -1999,7 +1999,7 @@ void KDGanttView::clearBackgroundColor() \sa setColumnBackgroundColor(), setWeekendBackgroundColor(), weekendBackgroundColor() */ -QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const +TQColor KDGanttView::columnBackgroundColor( const TQDateTime& column ) const { return myTimeHeader->columnBackgroundColor( column ) ; } @@ -2013,7 +2013,7 @@ QColor KDGanttView::columnBackgroundColor( const QDateTime& column ) const \param color the background color to use for weekend days. \sa weekendBackgroundColor(), setWeekendDays(), weekendDays() */ -void KDGanttView::setWeekendBackgroundColor( const QColor& color ) +void KDGanttView::setWeekendBackgroundColor( const TQColor& color ) { myTimeHeader->setWeekendBackgroundColor( color ); } @@ -2025,7 +2025,7 @@ void KDGanttView::setWeekendBackgroundColor( const QColor& color ) \return the background color for weekend days \sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays() */ -QColor KDGanttView::weekendBackgroundColor() const +TQColor KDGanttView::weekendBackgroundColor() const { return myTimeHeader->weekendBackgroundColor(); } @@ -2041,7 +2041,7 @@ QColor KDGanttView::weekendBackgroundColor() const \param weekday the day of the week (Monday = 1, Sunday = 7) \sa weekendBackgroundColor(), setWeekendDays(), weekendDays() */ -void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday ) +void KDGanttView::setWeekdayBackgroundColor( const TQColor& color, int weekday ) { myTimeHeader->setWeekdayBackgroundColor( color, weekday ); } @@ -2054,7 +2054,7 @@ void KDGanttView::setWeekdayBackgroundColor( const QColor& color, int weekday ) \return the background color for weekend days \sa setWeekendBackgroundColor(), setWeekendDays(), weekendDays() */ -QColor KDGanttView::weekdayBackgroundColor(int weekday) const +TQColor KDGanttView::weekdayBackgroundColor(int weekday) const { return myTimeHeader->weekdayBackgroundColor( weekday); } @@ -2246,11 +2246,11 @@ int KDGanttView::minorScaleCount() const \sa defaultColor(), setColors(), colors() */ void KDGanttView::setDefaultColor( KDGanttViewItem::Type type, - const QColor& color, + const TQColor& color, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setDefaultColor(color ); @@ -2272,7 +2272,7 @@ void KDGanttView::setDefaultColor( KDGanttViewItem::Type type, \return color the default color used \sa setDefaultColor(), setColors(), colors() */ -QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const +TQColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const { int index = getIndex( type ); return myDefaultColor [index]; @@ -2292,11 +2292,11 @@ QColor KDGanttView::defaultColor( KDGanttViewItem::Type type ) const \sa defaultHighlightColor(), setHighlightColors(), highlightColors() */ void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type, - const QColor& color, + const TQColor& color, bool overwriteExisting ) { if ( overwriteExisting ) { - QListViewItemIterator it(myListView); + TQListViewItemIterator it(myListView); for ( ; it.current(); ++it ) { if ( ((KDGanttViewItem*)it.current())->type() == type) ((KDGanttViewItem*)it.current())->setDefaultHighlightColor(color ); @@ -2318,7 +2318,7 @@ void KDGanttView::setDefaultHighlightColor( KDGanttViewItem::Type type, \return color the default highlighting color used \sa setDefaultHighlightColor(), setHighlightColors(), highlightColors() */ -QColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const +TQColor KDGanttView::defaultHighlightColor( KDGanttViewItem::Type type ) const { int index = getIndex( type ); return myDefaultColorHL [index]; @@ -2343,7 +2343,7 @@ KDGanttViewItem* KDGanttView::firstChild() const GanttView as a calendar view, you have to call setDisplaySubitemsAsGroup( true ); to use the root items as calendar items. To create new calendar entries for these root items, create - a new KDGanttViewTaskItem with this root item as a parent. If you + a new KDGanttViewTaskItem with this root item as a tqparent. If you want an item with subitems to behave like a calendar (which is possibly empty at startup), please call setIsCalendar( true ); for this item. @@ -2383,7 +2383,7 @@ bool KDGanttView::calendarMode() const */ void KDGanttView::setDisplaySubitemsAsGroup( bool show ) { - QListViewItemIterator it( myListView ); + TQListViewItemIterator it( myListView ); for ( ; it.current(); ++it ) { KDGanttViewItem* currentItem = ( KDGanttViewItem* )it.current(); currentItem->setDisplaySubitemsAsGroup( show ); @@ -2434,7 +2434,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const /*! Defines the horizontal background lines of the Gantt chart. Call setHorBackgroundLines() - (equivalent to setHorBackgroundLines( 2, QBrush( QColor ( 240,240,240 )) ) ) + (equivalent to setHorBackgroundLines( 2, TQBrush( TQColor ( 240,240,240 )) ) ) to draw a light grey horizontal background line for every second Gantt item. Call setHorBackgroundLines(0) in order to not show horizontal background lines. @@ -2445,7 +2445,7 @@ bool KDGanttView::displayEmptyTasksAsLine() const for count < 2, no background lines are drawn \param brush the brush of the lines */ -void KDGanttView::setHorBackgroundLines( int count, QBrush brush ) +void KDGanttView::setHorBackgroundLines( int count, TQBrush brush ) { myTimeTable->setHorBackgroundLines( count, brush ); } @@ -2460,7 +2460,7 @@ void KDGanttView::setHorBackgroundLines( int count, QBrush brush ) if 0 is returned, no backgroud lines are drawn */ -int KDGanttView::horBackgroundLines( QBrush& brush ) +int KDGanttView::horBackgroundLines( TQBrush& brush ) { return myTimeTable->horBackgroundLines( brush ); } @@ -2482,7 +2482,7 @@ KDGanttViewItem* KDGanttView::lastItem() const \return the list of task links in the Gantt view */ -QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const +TQPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const { return myTimeTable->taskLinks(); @@ -2494,7 +2494,7 @@ QPtrList<KDGanttViewTaskLink> KDGanttView::taskLinks() const \return the list of task link groups in the Gantt view */ -QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const +TQPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const { return myTaskLinkGroupList; } @@ -2507,14 +2507,14 @@ QPtrList<KDGanttViewTaskLinkGroup> KDGanttView::taskLinkGroups() const format error occurred \sa saveXML */ -bool KDGanttView::loadXML( const QDomDocument& doc ) +bool KDGanttView::loadXML( const TQDomDocument& doc ) { - QDomElement docRoot = doc.documentElement(); // ChartParams element - QDomNode node = docRoot.firstChild(); + TQDomElement docRoot = doc.documentElement(); // ChartParams element + TQDomNode node = docRoot.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "ShowLegend" ) { bool value; if( KDGanttXML::readBoolNode( element, value ) ) @@ -2548,35 +2548,35 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readBoolNode( element, value ) ) setDisplayEmptyTasksAsLine( value ); } else if( tagName == "GlobalFont" ) { - QFont font; + TQFont font; if( KDGanttXML::readFontNode( element, font ) ) setFont( font ); } else if( tagName == "HorizonStart" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) setHorizonStart( value ); } else if( tagName == "HorizonEnd" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) setHorizonEnd( value ); } else if( tagName == "Scale" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setScale( stringToScale( value ) ); } else if( tagName == "MinimumScale" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setMinimumScale( stringToScale( value ) ); } else if( tagName == "MaximumScale" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setMaximumScale( stringToScale( value ) ); } else if( tagName == "YearFormat" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setYearFormat( stringToYearFormat( value ) ); } else if( tagName == "HourFormat" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) setHourFormat( stringToHourFormat( value ) ); } else if( tagName == "ShowMinorTicks" ) { @@ -2604,7 +2604,7 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readBoolNode( element, value ) ) setEditable( value ); } else if( tagName == "TextColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setTextColor( value ); } else if( tagName == "MajorScaleCount" ) { @@ -2628,43 +2628,43 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readIntNode( element, value ) ) setGanttMaximumWidth( value ); } else if( tagName == "NoInformationBrush" ) { - QBrush value; + TQBrush value; if( KDGanttXML::readBrushNode( element, value ) ) setNoInformationBrush( value ); } else if( tagName == "GanttViewBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setGvBackgroundColor( value ); } else if( tagName == "ListViewBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setLvBackgroundColor( value ); } else if( tagName == "TimeHeaderBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setTimeHeaderBackgroundColor( value ); } else if( tagName == "LegendHeaderBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setLegendHeaderBackgroundColor( value ); } else if( tagName == "WeekendBackgroundColor" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setWeekendBackgroundColor( value ); } else if( tagName == "WeekdayBackgroundColor" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); int day = 0; - QColor color; + TQColor color; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Day" ) { int value; if( KDGanttXML::readIntNode( element, value ) ) day = value; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) color = value; } else { @@ -2678,8 +2678,8 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( day && color.isValid() ) setWeekdayBackgroundColor( color, day ); } else if( tagName == "WeekendDays" ) { - QString startString = element.attribute( "Start" ); - QString endString = element.attribute( "End" ); + TQString startString = element.attribute( "Start" ); + TQString endString = element.attribute( "End" ); bool startOk = false, endOk = false; int start = startString.toInt( &startOk ); int end = startString.toInt( &endOk ); @@ -2698,36 +2698,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) if( KDGanttXML::readBoolNode( element, value ) ) setShowTimeTablePopupMenu( value ); } else if( tagName == "Shapes" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); bool undefinedShape = false; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { KDGanttViewItem::Shape startShape, middleShape, endShape; startShape = KDGanttViewItem::TriangleDown; middleShape = KDGanttViewItem::TriangleDown; endShape = KDGanttViewItem::TriangleDown; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "Middle" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "End" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) @@ -2748,25 +2748,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startShape = KDGanttViewItem::TriangleDown; middleShape = KDGanttViewItem::TriangleDown; endShape = KDGanttViewItem::TriangleDown; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull()) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "Middle" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "End" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) @@ -2786,25 +2786,25 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startShape = KDGanttViewItem::TriangleDown; middleShape = KDGanttViewItem::TriangleDown; endShape = KDGanttViewItem::TriangleDown; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) startShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "Middle" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) middleShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) undefinedShape = true; } else if( tagName == "End" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) endShape = KDGanttViewItem::stringToShape( value ); if ( value == "Undefined" ) @@ -2828,28 +2828,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "Colors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull()) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2862,22 +2862,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) setColors( KDGanttViewItem::Event, startColor, middleColor, endColor, false ); } else if( tagName == "Task" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2890,22 +2890,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) setColors( KDGanttViewItem::Task, startColor, middleColor, endColor, false ); } else if( tagName == "Summary" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2925,23 +2925,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "DefaultColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( KDGanttViewItem::Event, value, false ); } else if( tagName == "Task" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( KDGanttViewItem::Task, value, false ); } else if( tagName == "Summary" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultColor( KDGanttViewItem::Summary, value , false); @@ -2954,28 +2954,28 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "HighlightColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -2989,22 +2989,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startColor, middleColor, endColor, false ); } else if( tagName == "Task" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -3018,22 +3018,22 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) startColor, middleColor, endColor , false); } else if( tagName == "Summary" ) { - QColor startColor, middleColor, endColor; - QDomNode node = element.firstChild(); + TQColor startColor, middleColor, endColor; + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an elemente - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Start" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) startColor = value; } else if( tagName == "Middle" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) middleColor = value; } else if( tagName == "End" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) endColor = value; } else { @@ -3054,23 +3054,23 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "DefaultHighlightColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Event" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( KDGanttViewItem::Event, value , false); } else if( tagName == "Task" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( KDGanttViewItem::Task, value, false ); } else if( tagName == "Summary" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) setDefaultHighlightColor( KDGanttViewItem::Summary, value, false ); @@ -3083,12 +3083,12 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "Items" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); KDGanttViewItem* previous = 0; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Item" ) { KDGanttViewItem* newItem; if( previous ) @@ -3110,11 +3110,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "TaskLinks" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "TaskLink" ) KDGanttViewTaskLink::createFromDomElement( element ); else { @@ -3126,11 +3126,11 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "TaskLinkGroups" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "TaskLink" ) KDGanttViewTaskLinkGroup::createFromDomElement( element ); } else { @@ -3141,27 +3141,27 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) node = node.nextSibling(); } } else if( tagName == "ColumnBackgroundColors" ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "ColumnBackgroundColor" ) { - QDomNode node = element.firstChild(); - QDateTime dateTime; - QColor color; + TQDomNode node = element.firstChild(); + TQDateTime dateTime; + TQColor color; while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was // really an // element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "DateTime" ) { - QDateTime value; + TQDateTime value; if( KDGanttXML::readDateTimeNode( element, value ) ) dateTime = value; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) color = value; } else { @@ -3182,36 +3182,36 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) } } else if( tagName == "LegendItems" ) { clearLegend(); - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "LegendItem" ) { KDGanttViewItem::Shape tempLegendShape; tempLegendShape = KDGanttViewItem::TriangleDown; - QColor tempLegendColor; - QString tempLegendString; + TQColor tempLegendColor; + TQString tempLegendString; bool ok = true; - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { // was really an element - QString tagName = element.tagName(); + TQString tagName = element.tagName(); if( tagName == "Shape" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) tempLegendShape = KDGanttViewItem::stringToShape( value ); else ok = false; } else if( tagName == "Color" ) { - QColor value; + TQColor value; if( KDGanttXML::readColorNode( element, value ) ) tempLegendColor = value; else ok = false; } else if( tagName == "Text" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) tempLegendString = value; else @@ -3256,19 +3256,19 @@ bool KDGanttView::loadXML( const QDomDocument& doc ) \return the XML document that represents the parameters \sa loadXML */ -QDomDocument KDGanttView::saveXML( bool withPI ) const +TQDomDocument KDGanttView::saveXML( bool withPI ) const { // Create an inital DOM document - QString docstart = "<GanttView/>"; + TQString docstart = "<GanttView/>"; - QDomDocument doc( "GanttView" ); + TQDomDocument doc( "GanttView" ); doc.setContent( docstart ); if( withPI ) { - QDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ; + TQDomProcessingInstruction pin = doc.createProcessingInstruction( "kdgantt", "version=\"1.0\" encoding=\"UTF-8\"" ) ; doc.appendChild ( pin ); } - QDomElement docRoot = doc.documentElement(); + TQDomElement docRoot = doc.documentElement(); docRoot.setAttribute( "xmlns", "http://www.klaralvdalens-datakonsult.se/kdgantt" ); docRoot.setAttribute( "xmlns:xsi", "http://www.w3.org/2000/10/XMLSchema-instance" ); docRoot.setAttribute( "xsi:schemaLocation", "http://www.klaralvdalens-datakonsult.se/kdgantt" ); @@ -3380,9 +3380,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const // the WeekdayBackgroundColor elements for( int weekday = 1; weekday <= 7; weekday++ ) { - QColor color = weekdayBackgroundColor( weekday ); + TQColor color = weekdayBackgroundColor( weekday ); if( color.isValid() ) { - QDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" ); + TQDomElement weekendBackgroundColorElement = doc.createElement( "WeekdayBackgroundColor" ); docRoot.appendChild( weekendBackgroundColorElement ); KDGanttXML::createIntNode( doc, weekendBackgroundColorElement, "Day", weekday ); @@ -3392,7 +3392,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const } // the WeekendDays element - QDomElement weekendDaysElement = doc.createElement( "WeekendDays" ); + TQDomElement weekendDaysElement = doc.createElement( "WeekendDays" ); docRoot.appendChild( weekendDaysElement ); int weekendStart, weekendEnd; weekendDays( weekendStart, weekendEnd ); @@ -3412,78 +3412,78 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const showTimeTablePopupMenu() ); // the Shapes element - QDomElement shapesElement = doc.createElement( "Shapes" ); - docRoot.appendChild( shapesElement ); - QDomElement shapesEventElement = doc.createElement( "Event" ); - shapesElement.appendChild( shapesEventElement ); + TQDomElement tqshapesElement = doc.createElement( "Shapes" ); + docRoot.appendChild( tqshapesElement ); + TQDomElement tqshapesEventElement = doc.createElement( "Event" ); + tqshapesElement.appendChild( tqshapesEventElement ); KDGanttViewItem::Shape start, middle, end; - if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", - KDGanttViewItem::shapeToString( end ) ); + if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", "Undefined" ); } - QDomElement shapesTaskElement = doc.createElement( "Task" ); - shapesElement.appendChild( shapesTaskElement ); - if( shapes( KDGanttViewItem::Task, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", - KDGanttViewItem::shapeToString( end ) ); + TQDomElement tqshapesTaskElement = doc.createElement( "Task" ); + tqshapesElement.appendChild( tqshapesTaskElement ); + if( tqshapes( KDGanttViewItem::Task, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", "Undefined" ); } - QDomElement shapesSummaryElement = doc.createElement( "Summary" ); - shapesElement.appendChild( shapesSummaryElement ); - if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", - KDGanttViewItem::shapeToString( end ) ); + TQDomElement tqshapesSummaryElement = doc.createElement( "Summary" ); + tqshapesElement.appendChild( tqshapesSummaryElement ); + if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", "Undefined" ); } // the Colors element - QDomElement colorsElement = doc.createElement( "Colors" ); + TQDomElement colorsElement = doc.createElement( "Colors" ); docRoot.appendChild( colorsElement ); - QDomElement colorsEventElement = doc.createElement( "Event" ); + TQDomElement colorsEventElement = doc.createElement( "Event" ); colorsElement.appendChild( colorsEventElement ); - QColor startColor, middleColor, endColor; + TQColor startColor, middleColor, endColor; colors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, colorsEventElement, "Start", startColor ); KDGanttXML::createColorNode( doc, colorsEventElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, colorsEventElement, "End", endColor ); - QDomElement colorsTaskElement = doc.createElement( "Task" ); + TQDomElement colorsTaskElement = doc.createElement( "Task" ); colorsElement.appendChild( colorsTaskElement ); colors( KDGanttViewItem::Task, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, colorsTaskElement, "Start", startColor ); KDGanttXML::createColorNode( doc, colorsTaskElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, colorsTaskElement, "End", endColor ); - QDomElement colorsSummaryElement = doc.createElement( "Summary" ); + TQDomElement colorsSummaryElement = doc.createElement( "Summary" ); colorsElement.appendChild( colorsSummaryElement ); colors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, colorsSummaryElement, "Start", startColor ); @@ -3491,7 +3491,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const KDGanttXML::createColorNode( doc, colorsSummaryElement, "End", endColor ); // the DefaultColor element - QDomElement defaultColorsElement = doc.createElement( "DefaultColors" ); + TQDomElement defaultColorsElement = doc.createElement( "DefaultColors" ); docRoot.appendChild( defaultColorsElement ); KDGanttXML::createColorNode( doc, defaultColorsElement, "Event", defaultColor( KDGanttViewItem::Event ) ); @@ -3502,21 +3502,21 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const // the HighlightColors element - QDomElement highlightColorsElement = doc.createElement( "HighlightColors" ); + TQDomElement highlightColorsElement = doc.createElement( "HighlightColors" ); docRoot.appendChild( highlightColorsElement ); - QDomElement highlightColorsEventElement = doc.createElement( "Event" ); + TQDomElement highlightColorsEventElement = doc.createElement( "Event" ); highlightColorsElement.appendChild( highlightColorsEventElement ); highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Start", startColor ); KDGanttXML::createColorNode( doc, highlightColorsEventElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, highlightColorsEventElement, "End", endColor ); - QDomElement highlightColorsTaskElement = doc.createElement( "Task" ); + TQDomElement highlightColorsTaskElement = doc.createElement( "Task" ); highlightColorsElement.appendChild( highlightColorsTaskElement ); highlightColors( KDGanttViewItem::Task, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Start", startColor ); KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, highlightColorsTaskElement, "End", endColor ); - QDomElement highlightColorsSummaryElement = doc.createElement( "Summary" ); + TQDomElement highlightColorsSummaryElement = doc.createElement( "Summary" ); highlightColorsElement.appendChild( highlightColorsSummaryElement ); highlightColors( KDGanttViewItem::Event, startColor, middleColor, endColor ); KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", startColor ); @@ -3530,13 +3530,13 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", middleColor ); KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", endColor ); } else { - KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", QColor() ); - KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", QColor() ); - KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", QColor() ); + KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Start", TQColor() ); + KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "Middle", TQColor() ); + KDGanttXML::createColorNode( doc, highlightColorsSummaryElement, "End", TQColor() ); } */ // the DefaultHighlightColor element - QDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" ); + TQDomElement defaultHighlightColorsElement = doc.createElement( "DefaultHighlightColors" ); docRoot.appendChild( defaultHighlightColorsElement ); KDGanttXML::createColorNode( doc, defaultHighlightColorsElement, "Event", defaultHighlightColor( KDGanttViewItem::Event ) ); @@ -3547,7 +3547,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const // the Items element - QDomElement itemsElement = doc.createElement( "Items" ); + TQDomElement itemsElement = doc.createElement( "Items" ); docRoot.appendChild( itemsElement ); KDGanttViewItem* currentItem = firstChild(); while( currentItem ) { @@ -3556,32 +3556,32 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const } // the TaskLinks element - QDomElement taskLinksElement = doc.createElement( "TaskLinks" ); + TQDomElement taskLinksElement = doc.createElement( "TaskLinks" ); docRoot.appendChild( taskLinksElement ); - QPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks(); + TQPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks(); KDGanttViewTaskLink* currentTL = 0; for( currentTL = taskLinkList.first(); currentTL; currentTL = taskLinkList.next() ) currentTL->createNode( doc, taskLinksElement ); // the TaskLinkGroups element - QDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" ); + TQDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" ); docRoot.appendChild( taskLinkGroupsElement ); - QPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups(); + TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups(); KDGanttViewTaskLinkGroup* currentTLG = 0; for( currentTLG = taskLinkGroupList.first(); currentTLG; currentTLG = taskLinkGroupList.next() ) currentTLG->createNode( doc, taskLinkGroupsElement ); // the ColumnBackgroundColors element - QDomElement columnBackgroundColorsElement = + TQDomElement columnBackgroundColorsElement = doc.createElement( "ColumnBackgroundColors" ); docRoot.appendChild( columnBackgroundColorsElement ); KDTimeHeaderWidget::ColumnColorList ccList = myTimeHeader->columnBackgroundColorList(); for( KDTimeHeaderWidget::ColumnColorList::iterator it = ccList.begin(); it != ccList.end(); ++it ) { - QDomElement columnBackgroundColorElement = + TQDomElement columnBackgroundColorElement = doc.createElement( "ColumnBackgroundColor" ); columnBackgroundColorsElement.appendChild( columnBackgroundColorElement ); KDGanttXML::createDateTimeNode( doc, columnBackgroundColorElement, @@ -3591,17 +3591,17 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const } // the LegendItems element - QDomElement legendItemsElement = + TQDomElement legendItemsElement = doc.createElement( "LegendItems" ); docRoot.appendChild( legendItemsElement ); legendItem* current; - QPtrListIterator<legendItem> lit( *myLegendItems ); + TQPtrListIterator<legendItem> lit( *myLegendItems ); while( ( current = lit.current() ) ) { ++lit; - QDomElement legendItemElement = doc.createElement( "LegendItem" ); + TQDomElement legendItemElement = doc.createElement( "LegendItem" ); legendItemsElement.appendChild( legendItemElement ); KDGanttXML::createStringNode( doc, legendItemElement, "Shape", - KDGanttViewItem::shapeToString( current->shape ) ); + KDGanttViewItem::tqshapeToString( current->tqshape ) ); KDGanttXML::createColorNode( doc, legendItemElement, "Color", current->color ); KDGanttXML::createStringNode( doc, legendItemElement, "Text", @@ -3622,7 +3622,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const -QString KDGanttView::scaleToString( Scale scale ) +TQString KDGanttView::scaleToString( Scale scale ) { switch( scale ) { case Minute: @@ -3642,7 +3642,7 @@ QString KDGanttView::scaleToString( Scale scale ) } -KDGanttView::Scale KDGanttView::stringToScale( const QString& string ) +KDGanttView::Scale KDGanttView::stringToScale( const TQString& string ) { if( string == "Minute" ) return Minute; @@ -3661,7 +3661,7 @@ KDGanttView::Scale KDGanttView::stringToScale( const QString& string ) } -QString KDGanttView::yearFormatToString( YearFormat format ) +TQString KDGanttView::yearFormatToString( YearFormat format ) { switch( format ) { case FourDigit: @@ -3677,7 +3677,7 @@ QString KDGanttView::yearFormatToString( YearFormat format ) } -KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string ) +KDGanttView::YearFormat KDGanttView::stringToYearFormat( const TQString& string ) { if( string == "FourDigit" ) return FourDigit; @@ -3692,7 +3692,7 @@ KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string ) } -QString KDGanttView::hourFormatToString( HourFormat format ) +TQString KDGanttView::hourFormatToString( HourFormat format ) { switch( format ) { case Hour_12: @@ -3706,7 +3706,7 @@ QString KDGanttView::hourFormatToString( HourFormat format ) } -KDGanttView::HourFormat KDGanttView::stringToHourFormat( const QString& string ) +KDGanttView::HourFormat KDGanttView::stringToHourFormat( const TQString& string ) { if( string == "Hour_12" ) return Hour_12; @@ -3724,7 +3724,7 @@ void KDGanttView::addTaskLinkGroup(KDGanttViewTaskLinkGroup* group) myTaskLinkGroupList.append(group); return; } - if (myTaskLinkGroupList.find(group) == -1) + if (myTaskLinkGroupList.tqfind(group) == -1) myTaskLinkGroupList.append(group); } @@ -3754,33 +3754,33 @@ void KDGanttView::editItem( KDGanttViewItem* item) /*! - This method returns the pixmap used for a certain shape, in the + This method returns the pixmap used for a certain tqshape, in the selected color and size. - \param shape the shape to generate - \param shapeColor the foreground color of the shape - \param backgroundColor the background color of the shape - \param itemSize the size of the shape - \return the generated shape pixmap + \param tqshape the tqshape to generate + \param tqshapeColor the foreground color of the tqshape + \param backgroundColor the background color of the tqshape + \param itemSize the size of the tqshape + \return the generated tqshape pixmap */ -QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, - const QColor& shapeColor, - const QColor& backgroundColor, int itemSize) +TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, + const TQColor& backgroundColor, int itemSize) { // 10 is a good value as size int size = itemSize+2; int hei = ( itemSize/3 ) / 2; - QPixmap p = QPixmap( size+4, size+4 ); + TQPixmap p = TQPixmap( size+4, size+4 ); p.fill( backgroundColor ); - QPainter paint (&p); - QBrush b = QBrush ( Qt::SolidPattern ); - b.setColor( shapeColor ); + TQPainter paint (&p); + TQBrush b = TQBrush ( TQt::SolidPattern ); + b.setColor( tqshapeColor ); paint.setBrush( b ); - QPen pen( Qt::black, 1 ) ; + TQPen pen( TQt::black, 1 ) ; paint.setPen( pen ); - switch (shape) { + switch (tqshape) { case KDGanttViewItem::TriangleDown:{ - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,-hei); arr.setPoint(1,size/2,-hei); arr.setPoint(2,0,((size/2)-hei)); @@ -3789,7 +3789,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, break; } case KDGanttViewItem::TriangleUp :{ - QPointArray arr = QPointArray(3); + TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,hei); arr.setPoint(1,size/2,hei); arr.setPoint(2,0,(-size/2)+hei); @@ -3798,7 +3798,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, break; } case KDGanttViewItem::Diamond :{ - QPointArray arr = QPointArray(4); + TQPointArray arr = TQPointArray(4); arr.setPoint(0,0,-size/2); arr.setPoint(1,size/2,0); arr.setPoint(2,0,size/2); @@ -3808,7 +3808,7 @@ QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, break; } case KDGanttViewItem::Square :{ - QPointArray arr = QPointArray(4); + TQPointArray arr = TQPointArray(4); arr.setPoint(0,-size/2,-size/2); arr.setPoint(1,size/2,-size/2); arr.setPoint(2,size/2,size/2); @@ -3854,15 +3854,15 @@ void KDGanttView::initDefaults() undefinedColorHL[i] = true; } // setting the default colors - myDefaultColor [ getIndex( KDGanttViewItem::Event ) ] = Qt::blue; //event - myDefaultColorHL [ getIndex( KDGanttViewItem::Event ) ] = Qt::red; - myDefaultColor [ getIndex( KDGanttViewItem::Task ) ] = Qt::green;//task - myDefaultColorHL [ getIndex( KDGanttViewItem::Task ) ] = Qt::red; - myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = Qt::cyan;//summary - myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = Qt::red; - - // setting the default shape types - // currently, we take for each item for all three shapes (start, middle, end) the same default shape + myDefaultColor [ getIndex( KDGanttViewItem::Event ) ] = TQt::blue; //event + myDefaultColorHL [ getIndex( KDGanttViewItem::Event ) ] = TQt::red; + myDefaultColor [ getIndex( KDGanttViewItem::Task ) ] = TQt::green;//task + myDefaultColorHL [ getIndex( KDGanttViewItem::Task ) ] = TQt::red; + myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = TQt::cyan;//summary + myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = TQt::red; + + // setting the default tqshape types + // currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape for (i = 0;i<3;++i) { myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task @@ -3874,19 +3874,19 @@ void KDGanttView::initDefaults() /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ -int KDGanttView::addColumn( const QString& label, int width ) +int KDGanttView::addColumn( const TQString& label, int width ) { return myListView->addColumn( label, width ); } /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ -int KDGanttView::addColumn( const QIconSet& iconset, const QString& label, +int KDGanttView::addColumn( const TQIconSet& iconset, const TQString& label, int width ) { return myListView->addColumn( iconset, label, width ); @@ -3894,7 +3894,7 @@ int KDGanttView::addColumn( const QIconSet& iconset, const QString& label, /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ void KDGanttView::removeColumn( int index ) { @@ -3903,7 +3903,7 @@ void KDGanttView::removeColumn( int index ) /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ KDGanttViewItem* KDGanttView::selectedItem() const { @@ -3912,7 +3912,7 @@ KDGanttViewItem* KDGanttView::selectedItem() const /*! - Calls to this method are passed through to the underlying \a QListView. + Calls to this method are passed through to the underlying \a TQListView. */ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected ) { @@ -3932,7 +3932,7 @@ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected ) in the Gantt view with this name. */ -KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const +KDGanttViewItem* KDGanttView::getItemByName( const TQString& name ) const { KDGanttViewItem* temp = firstChild(),* ret; while (temp != 0) { @@ -3955,7 +3955,7 @@ KDGanttViewItem* KDGanttView::getItemByName( const QString& name ) const no item in the list view at this position. */ -KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const +KDGanttViewItem* KDGanttView::getItemByListViewPos( const TQPoint& pos ) const { return static_cast<KDGanttViewItem*>( myListView->itemAt(myListView->mapFromGlobal(pos) )); } @@ -3975,13 +3975,13 @@ KDGanttViewItem* KDGanttView::getItemByListViewPos( const QPoint& pos ) const in the Gantt view at this position. */ -KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const +KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const TQPoint& pos ) const { KDGanttViewItem* item; - QPoint local = myCanvasView->mapFromGlobal(pos); + TQPoint local = myCanvasView->mapFromGlobal(pos); - QCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local )); - QCanvasItemList::Iterator it; + TQCanvasItemList il = myTimeTable->collisions( myCanvasView->viewportToContents( local )); + TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { if ( myCanvasView->getType(*it) == Type_is_KDGanttViewItem) { item = myCanvasView->getItem(*it); @@ -4007,10 +4007,10 @@ KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const QPoint& pos ) const in the Gantt view at this position. */ -KDGanttViewItem* KDGanttView::getItemAt( const QPoint& pos, bool global ) const +KDGanttViewItem* KDGanttView::getItemAt( const TQPoint& pos, bool global ) const { /* buggy code - commented out - QPoint myPos; + TQPoint myPos; if ( global ) myPos = myListView->contentsToViewport( myListView->mapFromGlobal(pos) ); else @@ -4096,7 +4096,7 @@ void KDGanttView::clear() /*! Passes on the signal from the list view. */ -void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ) +void KDGanttView::slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ) { emit dropped( e, droppedItem, itemBelowMouse); } @@ -4104,7 +4104,7 @@ void KDGanttView::slot_lvDropped(QDropEvent* e, KDGanttViewItem* droppedItem, KD /*! Implements a pass-through to the list view. */ -QDragObject * KDGanttView::dragObject () +TQDragObject * KDGanttView::dragObject () { return myListView->dragObject (); } @@ -4122,9 +4122,9 @@ void KDGanttView::startDrag () /*! This method is overridden for internal purposes. */ -void KDGanttView::setPaletteBackgroundColor( const QColor& col) +void KDGanttView::setPaletteBackgroundColor( const TQColor& col) { - QWidget::setPaletteBackgroundColor( col ); + TQWidget::setPaletteBackgroundColor( col ); timeHeaderSpacerWidget->setPaletteBackgroundColor( col ); } @@ -4135,7 +4135,7 @@ void KDGanttView::setPaletteBackgroundColor( const QColor& col) \param c the background color of the Gantt view. \sa gvBackgroundColor() */ -void KDGanttView::setGvBackgroundColor ( const QColor & c ) +void KDGanttView::setGvBackgroundColor ( const TQColor & c ) { myTimeTable->setBackgroundColor( c ); } @@ -4147,7 +4147,7 @@ void KDGanttView::setGvBackgroundColor ( const QColor & c ) \param c the background color of the time header. \sa timeHeaderBackgroundColor() */ -void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c ) +void KDGanttView::setTimeHeaderBackgroundColor ( const TQColor & c ) { myTimeHeader->setPaletteBackgroundColor( c ); //rightWidget->setPaletteBackgroundColor( c ); @@ -4161,7 +4161,7 @@ void KDGanttView::setTimeHeaderBackgroundColor ( const QColor & c ) \param c the background color of the legend header \sa legendHeaderBackgroundColor() */ -void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c ) +void KDGanttView::setLegendHeaderBackgroundColor ( const TQColor & c ) { myLegend->setPaletteBackgroundColor( c ); leftWidget->setPaletteBackgroundColor( c ); @@ -4174,7 +4174,7 @@ void KDGanttView::setLegendHeaderBackgroundColor ( const QColor & c ) \param c the background color of the list view \sa lvBackgroundColor() */ -void KDGanttView::setLvBackgroundColor ( const QColor & c ) +void KDGanttView::setLvBackgroundColor ( const TQColor & c ) { myListView->viewport()->setPaletteBackgroundColor( c ); } @@ -4186,7 +4186,7 @@ void KDGanttView::setLvBackgroundColor ( const QColor & c ) \return the background color of the list view \sa setLvBackgroundColor() */ -QColor KDGanttView::lvBackgroundColor ( )const +TQColor KDGanttView::lvBackgroundColor ( )const { return myListView->viewport()->paletteBackgroundColor( ); } @@ -4198,7 +4198,7 @@ QColor KDGanttView::lvBackgroundColor ( )const \return the background color of the Gantt view \sa setGvBackgroundColor() */ -QColor KDGanttView::gvBackgroundColor () const +TQColor KDGanttView::gvBackgroundColor () const { return myTimeTable->backgroundColor( ); } @@ -4210,7 +4210,7 @@ QColor KDGanttView::gvBackgroundColor () const \return the background color of the time header \sa setTimeHeaderBackgroundColor() */ -QColor KDGanttView::timeHeaderBackgroundColor () const +TQColor KDGanttView::timeHeaderBackgroundColor () const { return myTimeHeader->paletteBackgroundColor( ); } @@ -4222,7 +4222,7 @@ QColor KDGanttView::timeHeaderBackgroundColor () const \return the background color of the legend header \sa setLegendHeaderBackgroundColor() */ -QColor KDGanttView::legendHeaderBackgroundColor () const +TQColor KDGanttView::legendHeaderBackgroundColor () const { return myLegend->paletteBackgroundColor( ); } @@ -4232,20 +4232,20 @@ QColor KDGanttView::legendHeaderBackgroundColor () const Adds a widget to the spacer widget above the list view part and below the ShowLegendButton. To assign all the space above the Listview to the spacer widget, hide the ShowLegendButton by calling - setShowLegendButton( false ). The spacer widget is a QHBox. You + setShowLegendButton( false ). The spacer widget is a TQHBox. You may add as many widgets as you want. They are ordered horizontally from left to right. To remove a widget from the spacer widget, call widget->reparent(newParent,...) or delete the widget. Since the spacer - is a QHBox, the layout of the added widgets is managed by this - QHBox. + is a TQHBox, the tqlayout of the added widgets is managed by this + TQHBox. \param w A pointer to the widget to be added. \sa setShowLegendButton( ) */ -void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w ) +void KDGanttView::addUserdefinedLegendHeaderWidget( TQWidget * w ) { if ( w ) { - w->reparent ( spacerLeft, 0, QPoint(0,0) ); + w->reparent ( spacerLeft, 0, TQPoint(0,0) ); } } @@ -4261,7 +4261,7 @@ void KDGanttView::addUserdefinedLegendHeaderWidget( QWidget * w ) void KDGanttView::setDragEnabled( bool b ) { fDragEnabled = b; - QListViewItemIterator it( myListView ); + TQListViewItemIterator it( myListView ); for ( ; it.current(); ++it ) { (( KDGanttViewItem* )it.current())->setDragEnabled(b); } @@ -4282,7 +4282,7 @@ void KDGanttView::setDropEnabled( bool b ) fDropEnabled = b; //myListView->setAcceptDrops( b ); - QListViewItemIterator it( myListView ); + TQListViewItemIterator it( myListView ); for ( ; it.current(); ++it ) { (( KDGanttViewItem* )it.current())->setDropEnabled(b); } @@ -4354,7 +4354,7 @@ bool KDGanttView::dropEnabled() const order to specify user-defined drop handling, subclass KDGanttView and reimplement this method. - \param e The QDropEvent + \param e The TQDropEvent Note: e->source() is a pointer to the KDGanttView from which the drag started. I.e., if e->source() == this, this drag is an internal drag. \param droppedItem 0, if this is a drag operation from another @@ -4372,7 +4372,7 @@ bool KDGanttView::dropEnabled() const true, when the internal drop handling should not be executed \sa lvDropEvent(), lvStartDrag() */ -bool KDGanttView::lvDropEvent ( QDropEvent* e, +bool KDGanttView::lvDropEvent ( TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ) { @@ -4388,20 +4388,20 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e, // ************** begin example ************ /* - if ( QUriDrag::canDecode( e ) ) { - QStrList lst; - QUriDrag::decode( e, lst ); + if ( TQUriDrag::canDecode( e ) ) { + TQStrList lst; + TQUriDrag::decode( e, lst ); // we try the first file of icon-url-list - QString str = lst.at ( 0 ); + TQString str = lst.at ( 0 ); // remove file: at beginning of string str = str.right( str.length() - 5 ); - QFileInfo info; + TQFileInfo info; info.setFile( str ) ; if ( info.isFile() ) { - if (!QMessageBox::information( this, "KDGantt Drag&Drop test", + if (!TQMessageBox::information( this, "KDGantt Drag&Drop test", "Try to insert file: "+ str + " ?", "&Okay", "&Cancel",0,1 ) ) { - QFile file( str ); + TQFile file( str ); // store current updating status bool uen = myTimeTable->blockUpdating(); // block updating while insertion of items @@ -4430,13 +4430,13 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e, In order to define accepting drops for particular items yourself, subclass KDGanttView and reimplement this method. - \param e The QDragMoveEvent + \param e The TQDragMoveEvent Note: e->source() is a pointer to the KDGanttView, the drag started from. I.e., if e->source() == this, this drag is an internal drag. \sa lvDropEvent(), lvStartDrag(), lvDragMoveEvent() */ -void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) +void KDGanttView::lvDragEnterEvent ( TQDragEnterEvent * e) { // the standard behaviour: // accept drag enter events, if KDGanttViewItemDrag can decode the event @@ -4453,7 +4453,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) // Please uncomment the following lines for this behaviour // You have to uncomment lines in lvDragMoveEvent() and lvDropEvent () as well - // if ( QUriDrag::canDecode( e ) ) { + // if ( TQUriDrag::canDecode( e ) ) { // e->accept(true); // return; // } @@ -4472,7 +4472,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) In order to specify user-defined drop acceptance for particular items, subclass KDGanttView and reimplement this method. - \param e The QDragMoveEvent + \param e The TQDragMoveEvent Note: e->source() is a pointer to the KDGanttView, the drag started from. I.e. if e->source() == this, this drag is an internal drag. draggedItem 0, if this is a drag operation from another KDGanttView instance. @@ -4490,7 +4490,7 @@ void KDGanttView::lvDragEnterEvent ( QDragEnterEvent * e) if you have called e->accept( true ) before. \sa lvDropEvent(), lvStartDrag() */ -bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, +bool KDGanttView::lvDragMoveEvent ( TQDragMoveEvent* /*e*/, KDGanttViewItem* /* draggedItem*/, KDGanttViewItem* /*itemBelowMouse*/) { @@ -4510,7 +4510,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, // a saved Gantt file, subclass KDGanttView // and reimplement this method with to following code uncommented: - // if ( QUriDrag::canDecode( e ) ) { + // if ( TQUriDrag::canDecode( e ) ) { // e->accept(true); // return true; // } @@ -4522,7 +4522,7 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, /*! - This virtual method creates a QDragObject and starts a drag for a + This virtual method creates a TQDragObject and starts a drag for a KDGanttViewItem. In order to prevent drags of particular items, subclass from KDGanttView and reimplement this method. @@ -4532,14 +4532,14 @@ bool KDGanttView::lvDragMoveEvent ( QDragMoveEvent* /*e*/, */ void KDGanttView::lvStartDrag (KDGanttViewItem* item) { - QDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" ); + TQDragObject* d = new KDGanttViewItemDrag(item, this, "itemdrag" ); // call d->drag() to start the dragging // d->drag() returns true, if a move was requested as a drag // if a copy (by pressing the <Ctrl>-key) was performed, d->drag() returns false // In order to avoid starting drags for particular items, subclass KDGanttView // an reimplement this method. // insert here some code like - // if ( item->parent() ) + // if ( item->tqparent() ) // return; // This particular code will make it impossible to drag other items but root items. if ( d->drag() ) { @@ -4558,7 +4558,7 @@ void KDGanttView::lvStartDrag (KDGanttViewItem* item) void KDGanttView::setListViewWidth( int w ) { int sw = mySplitter->width(); - QValueList<int> list; + TQValueList<int> list; list.append(w); list.append(sw-w); mySplitter->setSizes( list ); @@ -4586,7 +4586,7 @@ int KDGanttView::listViewWidth( ) \param m the scrollbar mode. \sa setGvVScrollBarMode( ) */ -void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m ) +void KDGanttView::setLvVScrollBarMode( TQScrollView::ScrollBarMode m ) { myListView->setVScrollBarMode ( m ); } @@ -4601,14 +4601,14 @@ void KDGanttView::setLvVScrollBarMode( QScrollView::ScrollBarMode m ) \param m The scrollbar mode. \sa setLvVScrollBarMode( ) */ -void KDGanttView::setGvVScrollBarMode( QScrollView::ScrollBarMode m ) +void KDGanttView::setGvVScrollBarMode( TQScrollView::ScrollBarMode m ) { - if ( m == QScrollView::Auto ) - qDebug("KDGanttView::setListViewVScrollBarMode: QScrollView::Auto not supported. Nothing changed. "); + if ( m == TQScrollView::Auto ) + qDebug("KDGanttView::setListViewVScrollBarMode: TQScrollView::Auto not supported. Nothing changed. "); else { myCanvasView->setVScrollBarMode ( m ); - if ( m == QScrollView::AlwaysOn ) + if ( m == TQScrollView::AlwaysOn ) timeHeaderSpacerWidget->setFixedWidth(myCanvasView->verticalScrollBar()->width() ); else timeHeaderSpacerWidget->setFixedWidth( 0 ); @@ -4647,17 +4647,17 @@ bool KDGanttView::isLinkItemsEnabled() const } /*! - \fn void KDGanttView::timeIntervalSelected( const QDateTime& start, const QDateTime& end); + \fn void KDGanttView::timeIntervalSelected( const TQDateTime& start, const TQDateTime& end); This signal is emitted when the user selects a time interval with the mouse on the time header connect this signal to - the slot void zoomToSelection( const QDateTime& start, const - QDateTime& end) to obtain automatic zooming. + the slot void zoomToSelection( const TQDateTime& start, const + TQDateTime& end) to obtain automatic zooming. */ /*! - \fn void KDGanttView::timeIntervallSelected( const QDateTime& start, const QDateTime& end); + \fn void KDGanttView::timeIntervallSelected( const TQDateTime& start, const TQDateTime& end); \deprecated This signal is deprecated, do not use it in new code; use timeIntervalSelected() instead. timeIntervallSelected() will be @@ -4712,7 +4712,7 @@ bool KDGanttView::isLinkItemsEnabled() const */ /*! - \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const QPoint & pos) + \fn void KDGanttView::gvMouseButtonClicked ( int button, KDGanttViewItem* item, const TQPoint & pos) This signal is emitted when the user clicks into the Gantt view with any mouse button. Notice that \a pos is the absolute mouse position. @@ -4725,7 +4725,7 @@ bool KDGanttView::isLinkItemsEnabled() const */ /*! - \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const QPoint & pos ) + \fn void KDGanttView::gvContextMenuRequested ( KDGanttViewItem * item, const TQPoint & pos ) This signal is emitted when the user requests a context menu in the Gantt view. Notice that \a pos is the absolute mouse position. @@ -4771,7 +4771,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvMouseButtonPressed ( int button, - KDGanttViewItem* item, const QPoint & pos, int col) + KDGanttViewItem* item, const TQPoint & pos, int col) This signal is emitted when the user presses any mouse button in the list view. Notice that \a pos is the absolute mouse position. @@ -4779,7 +4779,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvMouseButtonClicked ( int button, - KDGanttViewItem* item, const QPoint & pos, int col) + KDGanttViewItem* item, const TQPoint & pos, int col) This signal is emitted when the user clicks into the list view with any mouse button . Notice that \a pos is the absolute @@ -4794,7 +4794,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvItemRenamed( KDGanttViewItem*, int col, - const QString& text ) + const TQString& text ) This signal is emitted whenever the user changes the name of an item in the list view using in-place editing. \a text contains the new @@ -4803,7 +4803,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! \fn void KDGanttView::lvContextMenuRequested( KDGanttViewItem * - item, const QPoint & pos, int col ) + item, const TQPoint & pos, int col ) This signal is emitted when the user requests a context menu in the list view. Notice that \a pos is the absolute mouse position. @@ -4818,7 +4818,7 @@ bool KDGanttView::isLinkItemsEnabled() const /*! - \fn void KDGanttView::dropped ( QDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse) + \fn void KDGanttView::dropped ( TQDropEvent * e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse) This signal is emitted whenever a Gantt item is dropped onto the Gantt view. \a droppedItem is 0, if this is a drag operation from |