summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttView.cpp')
-rw-r--r--kdgantt/KDGanttView.cpp838
1 files changed, 419 insertions, 419 deletions
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index 0b09ce109..9403c10ff 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -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"
@@ -80,7 +80,7 @@
\param name the internal debugging name
*/
-KDGanttView::KDGanttView( QWidget* parent, const char* name )
+KDGanttView::KDGanttView( TQWidget* parent, const char* name )
: KDGanttMinimizeSplitter( Qt::Vertical, parent, name ),
myCanvasView(0),
myTimeHeaderScroll(0),
@@ -93,41 +93,41 @@ 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, 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, 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;
@@ -157,8 +157,8 @@ KDGanttView::KDGanttView( QWidget* parent, const char* name )
_showHeader = false;
myTextColor = Qt::black;
- myLegendItems = new QPtrList<legendItem>;
- //QObject::connect( this, SIGNAL (itemDoubleClicked( KDGanttViewItem* ) ) , this, SLOT( editItem( KDGanttViewItem* ))) ;
+ 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::currentDateTime () );
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;
@@ -306,7 +306,7 @@ bool KDGanttView::close ( bool alsoDelete )
//qDebug("close ");
if ( closingBlocked )
return false;
- return QWidget::close ( alsoDelete );
+ return TQWidget::close ( alsoDelete );
}
@@ -318,13 +318,13 @@ bool KDGanttView::close ( bool alsoDelete )
height() of TimeHeader + height() of TimeTable + height() of Legend (if shown)
*/
-QSize KDGanttView::sizeHint() const
+TQSize KDGanttView::sizeHint() 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.
*/
@@ -348,7 +348,7 @@ QSize KDGanttView::sizeHint() const
// 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 );
@@ -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 );
@@ -485,7 +485,7 @@ void KDGanttView::slotcontextMenuRequested ( QListViewItem * item, const QPoint
}
-void KDGanttView::emptySpaceDoubleClicked( QMouseEvent * e )
+void KDGanttView::emptySpaceDoubleClicked( TQMouseEvent * e )
{
emit dateTimeDoubleClicked( getDateTimeForCoordX( e->x(), false ) );
}
@@ -494,7 +494,7 @@ void KDGanttView::emptySpaceDoubleClicked( QMouseEvent * e )
/*
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;
@@ -505,8 +505,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 );
@@ -516,8 +516,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 );
@@ -541,7 +541,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
@@ -553,18 +553,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;
}
}
@@ -644,7 +644,7 @@ void KDGanttView::slotHeaderSizeChanged()
DO NOT DELETE THIS POINTER!
\sa setShowLegend(), setLegendIsDockwindow(),legendIsDockwindow()
*/
-QDockWindow* KDGanttView::legendDockwindow() const
+TQDockWindow* KDGanttView::legendDockwindow() const
{
return myLegend->dockwindow();
}
@@ -776,15 +776,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
@@ -803,15 +803,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 );
@@ -828,8 +828,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.
@@ -844,13 +844,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;
@@ -858,17 +858,17 @@ 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();
+ TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString();
int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
p.drawText( 0, 0, date );
@@ -898,7 +898,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.
@@ -911,7 +911,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();
@@ -936,10 +936,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;
@@ -964,7 +964,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 ) {
@@ -1055,7 +1055,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);
@@ -1076,21 +1076,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
@@ -1102,7 +1102,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() ) {
@@ -1206,13 +1206,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();
myTimeHeader->setFont(font);
myLegend->setFont( font );
- QWidget::setFont( font );
+ TQWidget::setFont( font );
setScale(scale());
}
@@ -1322,7 +1322,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 );
@@ -1379,12 +1379,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 );
@@ -1411,7 +1411,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];
@@ -1441,13 +1441,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 );
@@ -1477,8 +1477,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];
@@ -1495,9 +1495,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);
}
@@ -1511,7 +1511,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;
}
@@ -1527,7 +1527,7 @@ QColor KDGanttView::textColor() const
KDGanttView::noInformationBrush()
*/
-void KDGanttView::setNoInformationBrush( const QBrush& brush )
+void KDGanttView::setNoInformationBrush( const TQBrush& brush )
{
myTimeTable->setNoInformationBrush( brush );
}
@@ -1539,7 +1539,7 @@ void KDGanttView::setNoInformationBrush( const QBrush& brush )
\sa KDGanttViewItem::showNoInformation(), KDGanttViewItem::setShowNoInformation(),
setNoInformationBrush()
*/
-QBrush KDGanttView::noInformationBrush() const
+TQBrush KDGanttView::noInformationBrush() const
{
return myTimeTable->noInformationBrush();
}
@@ -1555,7 +1555,7 @@ void KDGanttView::clearLegend( )
myLegend->clearLegend();
myLegendItems->setAutoDelete( true );
delete myLegendItems;
- myLegendItems = new QPtrList<legendItem>;
+ myLegendItems = new TQPtrList<legendItem>;
}
@@ -1568,8 +1568,8 @@ void KDGanttView::clearLegend( )
\sa clearLegend()
*/
void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape,
- const QColor& shapeColor,
- const QString& text )
+ const TQColor& shapeColor,
+ const TQString& text )
{
myLegend->addLegendItem( shape,shapeColor,text );
legendItem* item = new legendItem;
@@ -1587,7 +1587,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);
}
@@ -1599,7 +1599,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();
}
@@ -1612,7 +1612,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);
}
@@ -1625,7 +1625,7 @@ void KDGanttView::setHorizonEnd( const QDateTime& end )
\sa setHorizonEnd()
*/
-QDateTime KDGanttView::horizonEnd() const
+TQDateTime KDGanttView::horizonEnd() const
{
return myTimeHeader->horizonEnd();
}
@@ -1884,8 +1884,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 );
@@ -1896,7 +1896,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
@@ -1918,9 +1918,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 );
@@ -1945,10 +1945,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 );
@@ -1963,8 +1963,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 );
}
@@ -2002,7 +2002,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 ) ;
}
@@ -2016,7 +2016,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 );
}
@@ -2028,7 +2028,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();
}
@@ -2044,7 +2044,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 );
}
@@ -2057,7 +2057,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);
}
@@ -2249,11 +2249,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 );
@@ -2275,7 +2275,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];
@@ -2295,11 +2295,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 );
@@ -2321,7 +2321,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];
@@ -2386,7 +2386,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 );
@@ -2437,7 +2437,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.
@@ -2448,7 +2448,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 );
}
@@ -2463,7 +2463,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 );
}
@@ -2485,7 +2485,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();
@@ -2497,7 +2497,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;
}
@@ -2510,14 +2510,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 ) )
@@ -2551,35 +2551,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" ) {
@@ -2607,7 +2607,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" ) {
@@ -2631,43 +2631,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 {
@@ -2681,8 +2681,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 );
@@ -2701,36 +2701,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" )
@@ -2751,25 +2751,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" )
@@ -2789,25 +2789,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" )
@@ -2831,28 +2831,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 {
@@ -2865,22 +2865,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 {
@@ -2893,22 +2893,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 {
@@ -2928,23 +2928,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);
@@ -2957,28 +2957,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 {
@@ -2992,22 +2992,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 {
@@ -3021,22 +3021,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 {
@@ -3057,23 +3057,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 );
@@ -3086,12 +3086,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 )
@@ -3113,11 +3113,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 {
@@ -3129,11 +3129,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 {
@@ -3144,27 +3144,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 {
@@ -3185,36 +3185,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
@@ -3259,19 +3259,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" );
@@ -3383,9 +3383,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 );
@@ -3395,7 +3395,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 );
@@ -3415,9 +3415,9 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
showTimeTablePopupMenu() );
// the Shapes element
- QDomElement shapesElement = doc.createElement( "Shapes" );
+ TQDomElement shapesElement = doc.createElement( "Shapes" );
docRoot.appendChild( shapesElement );
- QDomElement shapesEventElement = doc.createElement( "Event" );
+ TQDomElement shapesEventElement = doc.createElement( "Event" );
shapesElement.appendChild( shapesEventElement );
KDGanttViewItem::Shape start, middle, end;
if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
@@ -3435,7 +3435,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createStringNode( doc, shapesEventElement, "End",
"Undefined" );
}
- QDomElement shapesTaskElement = doc.createElement( "Task" );
+ TQDomElement shapesTaskElement = doc.createElement( "Task" );
shapesElement.appendChild( shapesTaskElement );
if( shapes( KDGanttViewItem::Task, start, middle, end ) ) {
KDGanttXML::createStringNode( doc, shapesTaskElement, "Start",
@@ -3452,7 +3452,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
KDGanttXML::createStringNode( doc, shapesTaskElement, "End",
"Undefined" );
}
- QDomElement shapesSummaryElement = doc.createElement( "Summary" );
+ TQDomElement shapesSummaryElement = doc.createElement( "Summary" );
shapesElement.appendChild( shapesSummaryElement );
if( shapes( KDGanttViewItem::Event, start, middle, end ) ) {
KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start",
@@ -3471,22 +3471,22 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
}
// 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 );
@@ -3494,7 +3494,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 ) );
@@ -3505,21 +3505,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 );
@@ -3533,13 +3533,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 ) );
@@ -3550,7 +3550,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 ) {
@@ -3559,32 +3559,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,
@@ -3594,14 +3594,14 @@ 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 ) );
@@ -3625,7 +3625,7 @@ QDomDocument KDGanttView::saveXML( bool withPI ) const
-QString KDGanttView::scaleToString( Scale scale )
+TQString KDGanttView::scaleToString( Scale scale )
{
switch( scale ) {
case Minute:
@@ -3645,7 +3645,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;
@@ -3664,7 +3664,7 @@ KDGanttView::Scale KDGanttView::stringToScale( const QString& string )
}
-QString KDGanttView::yearFormatToString( YearFormat format )
+TQString KDGanttView::yearFormatToString( YearFormat format )
{
switch( format ) {
case FourDigit:
@@ -3680,7 +3680,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;
@@ -3695,7 +3695,7 @@ KDGanttView::YearFormat KDGanttView::stringToYearFormat( const QString& string )
}
-QString KDGanttView::hourFormatToString( HourFormat format )
+TQString KDGanttView::hourFormatToString( HourFormat format )
{
switch( format ) {
case Hour_12:
@@ -3709,7 +3709,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;
@@ -3766,24 +3766,24 @@ void KDGanttView::editItem( KDGanttViewItem* item)
\param itemSize the size of the shape
\return the generated shape pixmap
*/
-QPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
- const QColor& shapeColor,
- const QColor& backgroundColor, int itemSize)
+TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape,
+ const TQColor& shapeColor,
+ 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 );
+ TQPainter paint (&p);
+ TQBrush b = TQBrush ( Qt::SolidPattern );
b.setColor( shapeColor );
paint.setBrush( b );
- QPen pen( Qt::black, 1 ) ;
+ TQPen pen( Qt::black, 1 ) ;
paint.setPen( pen );
switch (shape) {
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));
@@ -3792,7 +3792,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);
@@ -3801,7 +3801,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);
@@ -3811,7 +3811,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);
@@ -3877,19 +3877,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 );
@@ -3897,7 +3897,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 )
{
@@ -3906,7 +3906,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
{
@@ -3915,7 +3915,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 )
{
@@ -3935,7 +3935,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) {
@@ -3958,7 +3958,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) ));
}
@@ -3978,13 +3978,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);
@@ -4010,10 +4010,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
@@ -4099,7 +4099,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);
}
@@ -4107,7 +4107,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 ();
}
@@ -4125,9 +4125,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 );
}
@@ -4138,7 +4138,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 );
}
@@ -4150,7 +4150,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 );
@@ -4164,7 +4164,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 );
@@ -4177,7 +4177,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 );
}
@@ -4189,7 +4189,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( );
}
@@ -4201,7 +4201,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( );
}
@@ -4213,7 +4213,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( );
}
@@ -4225,7 +4225,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( );
}
@@ -4235,20 +4235,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 layout 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) );
}
}
@@ -4264,7 +4264,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);
}
@@ -4285,7 +4285,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);
}
@@ -4375,7 +4375,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 )
{
@@ -4391,20 +4391,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
@@ -4439,7 +4439,7 @@ bool KDGanttView::lvDropEvent ( QDropEvent* e,
\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
@@ -4456,7 +4456,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;
// }
@@ -4493,7 +4493,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*/)
{
@@ -4513,7 +4513,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;
// }
@@ -4525,7 +4525,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.
@@ -4535,7 +4535,7 @@ 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
@@ -4561,7 +4561,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 );
@@ -4589,7 +4589,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 );
}
@@ -4604,14 +4604,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 );
@@ -4650,17 +4650,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
@@ -4715,7 +4715,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.
@@ -4728,7 +4728,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.
@@ -4774,7 +4774,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.
@@ -4782,7 +4782,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
@@ -4797,7 +4797,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
@@ -4806,7 +4806,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.
@@ -4821,7 +4821,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