summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewItem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttViewItem.cpp')
-rw-r--r--kdgantt/KDGanttViewItem.cpp342
1 files changed, 171 insertions, 171 deletions
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index 16665e5a2..3d36683b2 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -39,7 +39,7 @@
#include "KDGanttViewEventItem.h"
#include "itemAttributeDialog.h"
-#include "qpainter.h"
+#include "tqpainter.h"
#include "KDGanttXMLTools.h"
@@ -71,13 +71,13 @@
When a new item is created, the colors are set to the default values
for items of the type of this item, defined in the KDGanttView class with
void setColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
the colors of the shapes are set to the default color for items of this type,
defined in the KDGanttView class with:
- void setDefaultColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultColor( KDGanttViewItem::Type type, const TQColor& );
The initial default color in the KDGanttView class is set to
blue for KDGanttViewItem::Event,
green for KDGanttViewItem::Task,
@@ -88,13 +88,13 @@
values for items of the type of this item,
defined in the KDGanttView class with:
void setHighlightColors( KDGanttViewItem::Type type,
- const QColor& start,
- const QColor& middle,
- const QColor& end );
+ const TQColor& start,
+ const TQColor& middle,
+ const TQColor& end );
If there is no default value defined for this type,
the highlight colors of the shapes are set to the default color for
items of this type, defined in the KDGanttView class with:
- void setDefaultHighlightColor( KDGanttViewItem::Type type, const QColor& );
+ void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& );
The initial default highlight color in the KDGanttView class is set to red
for all types.
@@ -157,7 +157,7 @@
*/
-QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
+TQDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
/*!
Constructs an empty Gantt item.
@@ -169,9 +169,9 @@ QDict<KDGanttViewItem> KDGanttViewItem::sItemDict;
is specified, a unique name will be generated
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -189,9 +189,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
*/
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(parentItem,lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(parentItem,lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -211,9 +211,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem(view->myListView,after, lvtext)
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem(view->myListView,after, lvtext)
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -233,9 +233,9 @@ KDGanttViewItem::KDGanttViewItem( Type type, KDGanttView* view,
KDGanttViewItem::KDGanttViewItem( Type type, KDGanttViewItem* parentItem,
KDGanttViewItem* after,
- const QString& lvtext,
- const QString& name ) :
- QListViewItem( parentItem, after, lvtext )
+ const TQString& lvtext,
+ const TQString& name ) :
+ TQListViewItem( parentItem, after, lvtext )
{
initColorAndShapes(type);
generateAndInsertName( name );
@@ -283,7 +283,7 @@ KDGanttViewItem::~KDGanttViewItem()
Generates a unique name if necessary and inserts it into the item
dictionary.
*/
-void KDGanttViewItem::generateAndInsertName( const QString& name )
+void KDGanttViewItem::generateAndInsertName( const TQString& name )
{
// First check if we already had a name. This can be the case if
// the item was reconstructed from an XML file.
@@ -291,7 +291,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
// We had a name, remove it
sItemDict.remove( _name );
- QString newName;
+ TQString newName;
if ( name.isEmpty() || sItemDict.find( name ) ) {
// create unique name
newName.sprintf( "%p", (void* )this );
@@ -311,7 +311,7 @@ void KDGanttViewItem::generateAndInsertName( const QString& name )
\return the unique item name
*/
-QString KDGanttViewItem::name() const
+TQString KDGanttViewItem::name() const
{
return _name;
}
@@ -325,7 +325,7 @@ QString KDGanttViewItem::name() const
with that name exists
*/
-KDGanttViewItem* KDGanttViewItem::find( const QString& name )
+KDGanttViewItem* KDGanttViewItem::find( const TQString& name )
{
if (name.isEmpty()) // avoid error msg from QDict
return 0;
@@ -369,7 +369,7 @@ void KDGanttViewItem::setEnabled( bool on )
temp->setEnabled( on );
temp = temp->nextSibling();
}
- QListViewItem::setEnabled( on );
+ TQListViewItem::setEnabled( on );
myGanttView->myTimeTable->dec_blockUpdating();
}
updateCanvasItems();
@@ -414,7 +414,7 @@ void KDGanttViewItem::setItemVisible( bool on )
*/
bool KDGanttViewItem::itemVisible () const
{
- return QListViewItem::isVisible();
+ return TQListViewItem::isVisible();
}
@@ -534,7 +534,7 @@ int KDGanttViewItem::priority()
\param start the start time
\sa startTime(), setEndTime(), endTime()
*/
-void KDGanttViewItem::setStartTime( const QDateTime& )
+void KDGanttViewItem::setStartTime( const TQDateTime& )
{
}
@@ -545,7 +545,7 @@ void KDGanttViewItem::setStartTime( const QDateTime& )
\return the start time of this item
\sa setStartTime(), setEndTime(), endTime()
*/
-QDateTime KDGanttViewItem::startTime() const
+TQDateTime KDGanttViewItem::startTime() const
{
return myStartTime;
}
@@ -559,7 +559,7 @@ QDateTime KDGanttViewItem::startTime() const
\param end the end time
\sa endTime(), setStartTime(), startTime()
*/
-void KDGanttViewItem::setEndTime( const QDateTime& end )
+void KDGanttViewItem::setEndTime( const TQDateTime& end )
{
switch( type() ) {
case Event:
@@ -583,7 +583,7 @@ void KDGanttViewItem::setEndTime( const QDateTime& end )
\return the end time of this item
\sa setEndTime(), setStartTime(), startTime()
*/
-QDateTime KDGanttViewItem::endTime() const
+TQDateTime KDGanttViewItem::endTime() const
{
return myEndTime;
}
@@ -600,7 +600,7 @@ QDateTime KDGanttViewItem::endTime() const
\sa text(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-void KDGanttViewItem::setText( const QString& text )
+void KDGanttViewItem::setText( const TQString& text )
{
textCanvas->setText(text);
textCanvasText = text;
@@ -615,18 +615,18 @@ void KDGanttViewItem::setText( const QString& text )
\sa setText(), setTextColor(), textColor(), setListViewText(),
listViewText()
*/
-QString KDGanttViewItem::text() const
+TQString KDGanttViewItem::text() const
{
return textCanvasText;
}
/*!
- \deprecated Use setListViewTest( int, const QString& ) instead
+ \deprecated Use setListViewTest( int, const TQString& ) instead
*/
-void KDGanttViewItem::setListViewText( const QString& text, int column )
+void KDGanttViewItem::setListViewText( const TQString& text, int column )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -637,9 +637,9 @@ void KDGanttViewItem::setListViewText( const QString& text, int column )
\param text the text to be shown
\sa text(), setTextColor(), textColor(), setText(), listViewText()
*/
-void KDGanttViewItem::setListViewText( int column, const QString& text )
+void KDGanttViewItem::setListViewText( int column, const TQString& text )
{
- QListViewItem::setText( column, text );
+ TQListViewItem::setText( column, text );
}
@@ -651,9 +651,9 @@ void KDGanttViewItem::setListViewText( int column, const QString& text )
\sa setText(), setTextColor(), textColor(), text(),
setListViewText()
*/
-QString KDGanttViewItem::listViewText( int column ) const
+TQString KDGanttViewItem::listViewText( int column ) const
{
- return QListViewItem::text( column );
+ return TQListViewItem::text( column );
}
@@ -663,7 +663,7 @@ QString KDGanttViewItem::listViewText( int column ) const
\param font the font to be shown
\sa font()
*/
-void KDGanttViewItem::setFont( const QFont& font )
+void KDGanttViewItem::setFont( const TQFont& font )
{
textCanvas->setFont(font);
updateCanvasItems();
@@ -676,7 +676,7 @@ void KDGanttViewItem::setFont( const QFont& font )
\return the font used for the text in this item
\sa setFont()
*/
-QFont KDGanttViewItem::font() const
+TQFont KDGanttViewItem::font() const
{
return textCanvas->font();
}
@@ -688,7 +688,7 @@ QFont KDGanttViewItem::font() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewItem::setTooltipText( const QString& text )
+void KDGanttViewItem::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -700,7 +700,7 @@ void KDGanttViewItem::setTooltipText( const QString& text )
\return the tooltip text
\sa setTooltipText()
*/
-QString KDGanttViewItem::tooltipText() const
+TQString KDGanttViewItem::tooltipText() const
{
return myToolTipText;
@@ -713,7 +713,7 @@ QString KDGanttViewItem::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewItem::setWhatsThisText( const QString& text )
+void KDGanttViewItem::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
}
@@ -726,7 +726,7 @@ void KDGanttViewItem::setWhatsThisText( const QString& text )
\sa setWhatsThisText()
*/
-QString KDGanttViewItem::whatsThisText() const
+TQString KDGanttViewItem::whatsThisText() const
{
return myWhatsThisText;
}
@@ -819,25 +819,25 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
if (itemShape) delete itemShape;
if (itemShapeBack) delete itemShapeBack;
- QCanvasPolygonalItem * item;
- QCanvasPolygonalItem * itemBack;
+ TQCanvasPolygonalItem * item;
+ TQCanvasPolygonalItem * itemBack;
int size = myItemSize+2;
int hei = (myItemSize/3)/2;
switch (shape) {
case TriangleDown:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-hei);
arr.setPoint(1,size/2,-hei);
arr.setPoint(2,0,((size/2)-hei));
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -847,17 +847,17 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
// of the same size as a TriangleDown-icon, if we increment the size by 2
size+=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 4;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,hei);
arr.setPoint(1,size/2,hei);
arr.setPoint(2,0,(-size/2)+hei);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -865,19 +865,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
case Diamond:
{
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,0,-size/2);
arr.setPoint(1,size/2,0);
arr.setPoint(2,0,size/2);
arr.setPoint(3,-size/2,0);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -885,19 +885,19 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape,
{
size -=2;
item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
- QPointArray arr = QPointArray(4);
+ TQPointArray arr = TQPointArray(4);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)item)->setPoints(arr);
+ ((TQCanvasPolygon*)item)->setPoints(arr);
size += 2;hei +=1;
itemBack = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem);
arr.setPoint(0,-size/2,-size/2);
arr.setPoint(1,size/2,-size/2);
arr.setPoint(2,size/2,size/2);
arr.setPoint(3,-size/2,size/2);
- ((QCanvasPolygon*)itemBack)->setPoints(arr);
+ ((TQCanvasPolygon*)itemBack)->setPoints(arr);
break;
}
@@ -954,8 +954,8 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const
\param end the color for the end shape
\sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
- const QColor& end )
+void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
+ const TQColor& end )
{
myStartColor=start ;
@@ -982,7 +982,7 @@ void KDGanttViewItem::setColors( const QColor& start, const QColor& middle,
\param end returns the end color
\sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor()
*/
-void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColor ;
middle = myMiddleColor;
@@ -1008,7 +1008,7 @@ void KDGanttViewItem::colors( QColor& start, QColor& middle, QColor& end ) const
\param end the highlight color for the end shape
\sa highlightColors(), setShapes(), shapes()
*/
-void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& middle, const QColor& end )
+void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end )
{
myStartColorHL=start ;
myMiddleColorHL= middle;
@@ -1034,7 +1034,7 @@ void KDGanttViewItem::setHighlightColors( const QColor& start, const QColor& mid
\param end returns the end highlight color
\sa setHighlightColors(), setShapes(), shapes()
*/
-void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& end ) const
+void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const
{
start = myStartColorHL ;
middle = myMiddleColorHL;
@@ -1054,7 +1054,7 @@ void KDGanttViewItem::highlightColors( QColor& start, QColor& middle, QColor& en
\param color the text color
\sa textColor(), setText(), text()
*/
-void KDGanttViewItem::setTextColor( const QColor& color )
+void KDGanttViewItem::setTextColor( const TQColor& color )
{
myTextColor = color;
@@ -1077,7 +1077,7 @@ void KDGanttViewItem::setTextColor( const QColor& color )
\return the text color
\sa setTextColor(), setText(), text()
*/
-QColor KDGanttViewItem::textColor() const
+TQColor KDGanttViewItem::textColor() const
{
return myTextColor;
}
@@ -1105,17 +1105,17 @@ QColor KDGanttViewItem::textColor() const
\param pixmap the pixmap to show
\sa pixmap()
*/
-void KDGanttViewItem::setPixmap( int column, const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( int column, const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( column, pixmap );
+ TQListViewItem::setPixmap( column, pixmap );
}
/*!
- \deprecated use setPixmap( int, const QPixmap& ) instead
+ \deprecated use setPixmap( int, const TQPixmap& ) instead
*/
-void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
+void KDGanttViewItem::setPixmap( const TQPixmap& pixmap )
{
- QListViewItem::setPixmap( 0, pixmap );
+ TQListViewItem::setPixmap( 0, pixmap );
}
@@ -1126,9 +1126,9 @@ void KDGanttViewItem::setPixmap( const QPixmap& pixmap )
\return a pointer to the pixmap shown
\sa setPixmap()
*/
-const QPixmap* KDGanttViewItem::pixmap( int column ) const
+const TQPixmap* KDGanttViewItem::pixmap( int column ) const
{
- return QListViewItem::pixmap( column );
+ return TQListViewItem::pixmap( column );
}
@@ -1147,7 +1147,7 @@ const QPixmap* KDGanttViewItem::pixmap( int column ) const
\param color the default color to use
\sa defaultColor(), setColors(), colors()
*/
-void KDGanttViewItem::setDefaultColor( const QColor& color )
+void KDGanttViewItem::setDefaultColor( const TQColor& color )
{
myDefaultColor = color;
@@ -1173,7 +1173,7 @@ void KDGanttViewItem::setDefaultColor( const QColor& color )
\return color the default color used
\sa setDefaultColor(), setColors(), colors()
*/
-QColor KDGanttViewItem::defaultColor() const
+TQColor KDGanttViewItem::defaultColor() const
{
return myDefaultColor;
}
@@ -1194,7 +1194,7 @@ QColor KDGanttViewItem::defaultColor() const
\param color the default highlighting color to use
\sa defaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
+void KDGanttViewItem::setDefaultHighlightColor( const TQColor& color )
{
myDefaultColorHL = color;
if ( displaySubitemsAsGroup() ) {
@@ -1217,7 +1217,7 @@ void KDGanttViewItem::setDefaultHighlightColor( const QColor& color )
\return color the default highlighting color used
\sa setDefaultHighlightColor(), setHighlightColors(), highlightColors()
*/
-QColor KDGanttViewItem::defaultHighlightColor() const
+TQColor KDGanttViewItem::defaultHighlightColor() const
{
return myDefaultColorHL;
}
@@ -1231,7 +1231,7 @@ QColor KDGanttViewItem::defaultHighlightColor() const
KDGanttViewItem* KDGanttViewItem::firstChild() const
{
- return (KDGanttViewItem* )QListViewItem::firstChild();
+ return (KDGanttViewItem* )TQListViewItem::firstChild();
}
@@ -1243,7 +1243,7 @@ KDGanttViewItem* KDGanttViewItem::firstChild() const
*/
KDGanttViewItem* KDGanttViewItem::nextSibling() const
{
- return (KDGanttViewItem* )QListViewItem::nextSibling();
+ return (KDGanttViewItem* )TQListViewItem::nextSibling();
}
@@ -1255,7 +1255,7 @@ KDGanttViewItem* KDGanttViewItem::nextSibling() const
*/
KDGanttViewItem* KDGanttViewItem::parent() const
{
- return (KDGanttViewItem*)QListViewItem::parent();
+ return (KDGanttViewItem*)TQListViewItem::parent();
}
@@ -1266,7 +1266,7 @@ KDGanttViewItem* KDGanttViewItem::parent() const
*/
KDGanttViewItem* KDGanttViewItem::itemAbove()
{
- return (KDGanttViewItem* )QListViewItem::itemAbove();
+ return (KDGanttViewItem* )TQListViewItem::itemAbove();
}
@@ -1281,7 +1281,7 @@ KDGanttViewItem* KDGanttViewItem::itemAbove()
KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
{
- KDGanttViewItem* retItem = (KDGanttViewItem* )QListViewItem::itemBelow();
+ KDGanttViewItem* retItem = (KDGanttViewItem* )TQListViewItem::itemBelow();
if ( !includeDisabled ) {
return retItem;
}
@@ -1290,7 +1290,7 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
return retItem;
}
}
- KDGanttViewItem* Item2 = (KDGanttViewItem* )QListViewItem::listView()->itemAt(QPoint (2, QListViewItem::itemPos() + QListViewItem::height() +2) );
+ KDGanttViewItem* Item2 = (KDGanttViewItem* )TQListViewItem::listView()->itemAt(TQPoint (2, TQListViewItem::itemPos() + TQListViewItem::height() +2) );
if ( Item2 != 0 )
if (!Item2->enabled() )
return Item2;
@@ -1304,8 +1304,8 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
void KDGanttViewItem::updateCanvasItems()
{
if (blockUpdating) return;
- QPen p,pBack;
- QBrush b;
+ TQPen p,pBack;
+ TQBrush b;
b.setStyle(Qt::SolidPattern);
if ( enabled() ) {
textCanvas->setColor(myTextColor);
@@ -1338,9 +1338,9 @@ void KDGanttViewItem::updateCanvasItems()
endLine->setPen(p);
}
} else {
- //QColor discol = Qt::lightGray;
- QColor discol = QColor(232,232,232);
- textCanvas->setColor( QColor(150,150,150) );
+ //TQColor discol = Qt::lightGray;
+ TQColor discol = TQColor(232,232,232);
+ textCanvas->setColor( TQColor(150,150,150) );
b.setStyle(Qt::SolidPattern);
b.setColor(discol);
startShape->setBrush(b);
@@ -1354,7 +1354,7 @@ void KDGanttViewItem::updateCanvasItems()
pBack.setWidth((myItemSize/3-1)+2);
startLineBack->setPen(pBack);
endLineBack->setPen(pBack);
- QFont f = textCanvas->font();
+ TQFont f = textCanvas->font();
f.setPixelSize(myItemSize);
textCanvas->setFont(f);
//if (isvisible) {
@@ -1380,7 +1380,7 @@ void KDGanttViewItem::setOpen( bool open )
} else {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
}
@@ -1390,16 +1390,16 @@ void KDGanttViewItem::showItem( bool, int )
}
-QPoint KDGanttViewItem::getTaskLinkStartCoord(QPoint p)
+TQPoint KDGanttViewItem::getTaskLinkStartCoord(TQPoint p)
{
textCanvas->move(p.x()+myItemSize, itemPos() + height()/2-myItemSize/2);
- return QPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myEndTime) +myItemSize/2,itemPos()+height()/2);
}
-QPoint KDGanttViewItem::getTaskLinkEndCoord()
+TQPoint KDGanttViewItem::getTaskLinkEndCoord()
{
- return QPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
+ return TQPoint (myGanttView->myTimeHeader->getCoordX(myStartTime)-myItemSize/2 ,itemPos()-myItemSize/2+height()/2-2);
}
@@ -1423,7 +1423,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
{
_isMoveable = false;
_isResizeable = false;
- setTextOffset(QPoint(0,0));
+ setTextOffset(TQPoint(0,0));
//_isCalendar = false;
_callListViewOnSetOpen = true;
myType = t;
@@ -1445,8 +1445,8 @@ void KDGanttViewItem::initColorAndShapes(Type t)
myGanttView->myTimeHeader->saveCenterDateTime();
myStartTime = myGanttView->myTimeHeader->myCenterDateTime;
myEndTime = myStartTime;
- myToolTipText =QListViewItem::text(0);
- myWhatsThisText = QListViewItem::text(0);
+ myToolTipText =TQListViewItem::text(0);
+ myWhatsThisText = TQListViewItem::text(0);
isHighlighted = false;
isEditable = true;
_displaySubitemsAsGroup = myGanttView->displaySubitemsAsGroup();
@@ -1458,7 +1458,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
startLineBack->setZ(1);endLineBack->setZ(1);
actualEnd = new KDCanvasLine(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
actualEnd->setZ(5);
- actualEnd->setPen( QPen ( Qt::red, 3 ) );
+ actualEnd->setPen( TQPen ( Qt::red, 3 ) );
textCanvas = new KDCanvasText(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem);
textCanvas->setText("");
@@ -1498,7 +1498,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
setHighlightColors(defaultHighlightColor(),defaultHighlightColor(), defaultHighlightColor());
setFont(myGanttView->font());
// if (type() == Task)
- //setText(QListViewItem::text(0)); // testing only
+ //setText(TQListViewItem::text(0)); // testing only
//isvisible = true;
_priority = 150;
_showNoInformation = false;
@@ -1508,7 +1508,7 @@ void KDGanttViewItem::initColorAndShapes(Type t)
}
-QString KDGanttViewItem::shapeToString( Shape shape )
+TQString KDGanttViewItem::shapeToString( Shape shape )
{
switch( shape ) {
case TriangleDown:
@@ -1526,7 +1526,7 @@ QString KDGanttViewItem::shapeToString( Shape shape )
}
-KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
+KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const TQString& string )
{
if( string == "TriangleDown" )
return TriangleDown;
@@ -1549,10 +1549,10 @@ KDGanttViewItem::Shape KDGanttViewItem::stringToShape( const QString& string )
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewItem::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewItem::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement itemElement = doc.createElement( "Item" );
+ TQDomElement itemElement = doc.createElement( "Item" );
parentElement.appendChild( itemElement );
itemElement.setAttribute( "Type", typeToString( type() ) );
@@ -1579,7 +1579,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createStringNode( doc, itemElement, "EndShape",
shapeToString( endShape ) );
KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() );
- QColor startColor, middleColor, endColor;
+ TQColor startColor, middleColor, endColor;
colors( startColor, middleColor, endColor );
KDGanttXML::createColorNode( doc, itemElement, "StartColor", startColor );
KDGanttXML::createColorNode( doc, itemElement, "MiddleColor", middleColor );
@@ -1594,7 +1594,7 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
KDGanttXML::createColorNode( doc, itemElement, "EndHighlightColor", endColor );
KDGanttXML::createColorNode( doc, itemElement, "TextColor", textColor() );
KDGanttXML::createStringNode( doc, itemElement, "Name", name() );
- QDomElement itemsElement = doc.createElement( "Items" );
+ TQDomElement itemsElement = doc.createElement( "Items" );
itemElement.appendChild( itemsElement );
KDGanttViewItem* currentItem = firstChild();
while( currentItem ) {
@@ -1615,9 +1615,9 @@ void KDGanttViewItem::createNode( QDomDocument& doc,
\return the newly created item
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1647,9 +1647,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1679,9 +1679,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
\return the newly created element
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1711,9 +1711,9 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
*/
KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
KDGanttViewItem* previous,
- QDomElement& element )
+ TQDomElement& element )
{
- QString typeString = element.attribute( "Type" );
+ TQString typeString = element.attribute( "Type" );
Q_ASSERT( !typeString.isEmpty() );
KDGanttViewItem* item;
if( typeString == "Task" )
@@ -1735,48 +1735,48 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
/*
Fills in the values in the item by reading the DOM element.
*/
-void KDGanttViewItem::loadFromDomElement( QDomElement& element )
+void KDGanttViewItem::loadFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
Shape startShape = TriangleDown, middleShape = TriangleDown,
endShape = TriangleDown;
- QColor startColor, middleColor, endColor;
- QColor startHighlightColor, middleHighlightColor, endHighlightColor;
- QString tempName;
+ TQColor startColor, middleColor, endColor;
+ TQColor startHighlightColor, middleHighlightColor, endHighlightColor;
+ TQString tempName;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "StartTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setStartTime( value );
} else if( tagName == "EndTime" ) {
- QDateTime value;
+ TQDateTime value;
if( KDGanttXML::readDateTimeNode( element, value ) )
setEndTime( value );
} else if( tagName == "Text" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setText( value );
} else if( tagName == "Font" ) {
- QFont value;
+ TQFont value;
if( KDGanttXML::readFontNode( element, value ) )
setFont( value );
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setTooltipText( value );
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setWhatsThisText( value );
} else if( tagName == "Pixmap" ) {
- QPixmap value;
+ TQPixmap value;
if( KDGanttXML::readPixmapNode( element, value ) )
setPixmap( value );
} else if( tagName == "ListViewText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
setListViewText( value );
} else if( tagName == "Open" ) {
@@ -1788,64 +1788,64 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
if( KDGanttXML::readBoolNode( element, value ) )
setHighlight( value );
} else if( tagName == "StartShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
startShape = stringToShape( value );
} else if( tagName == "MiddleShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
middleShape = stringToShape( value );
} else if( tagName == "EndShape" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
endShape = stringToShape( value );
} else if( tagName == "DefaultColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultColor( value );
} else if( tagName == "StartColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startColor = value;
} else if( tagName == "MiddleColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleColor = value;
} else if( tagName == "EndColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endColor = value;
} else if( tagName == "DefaultHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setDefaultHighlightColor( value );
} else if( tagName == "StartHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
startHighlightColor = value;
} else if( tagName == "MiddleHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
middleHighlightColor = value;
} else if( tagName == "EndHighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
endHighlightColor = value;
} else if( tagName == "TextColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
setTextColor( value );
} else if( tagName == "Name" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tempName = value;
} else if( tagName == "Items" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDGanttViewItem* previous = 0;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
KDGanttViewItem* newItem;
if( previous )
@@ -1883,7 +1883,7 @@ void KDGanttViewItem::loadFromDomElement( QDomElement& element )
}
-QString KDGanttViewItem::typeToString( Type type )
+TQString KDGanttViewItem::typeToString( Type type )
{
switch( type ) {
case Event:
@@ -1948,9 +1948,9 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
\return the start time of the children of this item
*/
-QDateTime KDGanttViewItem::myChildStartTime()
+TQDateTime KDGanttViewItem::myChildStartTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -1982,9 +1982,9 @@ QDateTime KDGanttViewItem::myChildStartTime()
\return the end time of the children of this item
*/
-QDateTime KDGanttViewItem::myChildEndTime()
+TQDateTime KDGanttViewItem::myChildEndTime()
{
- QDateTime ret, tempTime;
+ TQDateTime ret, tempTime;
bool set = true;
KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
if (temp) {
@@ -2030,7 +2030,7 @@ bool KDGanttViewItem::showNoInformation()
The height of the line is the height of the item.
The brush of the line is specified by KDGanttView::setNoInformationBrush().
(i.e. the same brush for all items of the Gantt view).
- The default brush is QBrush( QColor ( 100,100,100 ), Qt::FDiagPattern );
+ The default brush is TQBrush( TQColor ( 100,100,100 ), Qt::FDiagPattern );
\param show if true, the 'showNoInformation' line is shown for this item
\sa showNoInformation(), KDGanttView::setNoInformationBrush(), KDGanttView::noInformationBrush()
*/
@@ -2049,7 +2049,7 @@ void KDGanttViewItem::setShowNoInformation( bool show )
\param name the name of the item
\return the pointer to the item with name \a name
*/
-KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
+KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name )
{
if ( listViewText() == name )
return this;
@@ -2064,7 +2064,7 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const QString& name )
/*
-void KDGanttViewItem::printinfo( QString s )
+void KDGanttViewItem::printinfo( TQString s )
{
KDGanttViewItem* temp = firstChild();
while (temp != 0) {
@@ -2105,7 +2105,7 @@ int KDGanttViewItem::computeHeight()
showItem( false );
if ( firstChild() )
firstChild()->hideSubtree();
- // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", QListViewItem::text(0).latin1());
+ // qDebug("KDGanttViewItem::computeHeight() %s returns 0 ", TQListViewItem::text(0).latin1());
return 0;
}
@@ -2146,7 +2146,7 @@ int KDGanttViewItem::computeHeight()
// display closed item as usual
//
if ( isOpen() ) {
- //qDebug("KDGanttViewItem::computeHeight() %s is open ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is open ", TQListViewItem::text(0).latin1());
temp = firstChild();
// if item opened, iterate over all subitems
int tempHeight;
@@ -2169,7 +2169,7 @@ int KDGanttViewItem::computeHeight()
temp = temp->nextSibling();
}
} else { // closed!
- //qDebug("KDGanttViewItem::computeHeight() %s is closed ", QListViewItem::text(0).latin1());
+ //qDebug("KDGanttViewItem::computeHeight() %s is closed ", TQListViewItem::text(0).latin1());
if ( !displaySubitemsAsGroup() ) {
if ( firstChild() ) {
@@ -2187,7 +2187,7 @@ int KDGanttViewItem::computeHeight()
showItem( true );
hei += height();
- //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", QListViewItem::text(0).latin1(), hei);
+ //qDebug("KDGanttViewItem::computeHeight() %s returns: %d ", TQListViewItem::text(0).latin1(), hei);
return hei;
}
@@ -2209,10 +2209,10 @@ bool KDGanttViewItem::showNoCross()
}
-void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
+void KDGanttViewItem::paintBranches ( TQPainter* p, const TQColorGroup& cg,
int w, int y, int h )
{
- QListViewItem::paintBranches ( p, cg, w, y, h);
+ TQListViewItem::paintBranches ( p, cg, w, y, h);
if ( !myGanttView->calendarMode() )
return;
else {
@@ -2224,7 +2224,7 @@ void KDGanttViewItem::paintBranches ( QPainter* p, const QColorGroup& cg,
int hei = temp->height();
//qDebug(" y %d w %d h %d ", y,w,h);
//qDebug("yc %d hei %d",y_coord,hei );
- myGanttView->myListView->paintemptyarea( p, QRect( 0,y+y_coord,w,hei));
+ myGanttView->myListView->paintemptyarea( p, TQRect( 0,y+y_coord,w,hei));
int x_c = w/2;
int y_c = y+y_coord+ temp->height ()/2;
int y_ce ;
@@ -2465,16 +2465,16 @@ bool KDGanttViewItem::isCalendar( ) const
/*!
Returns the coordinate of this items middle left point
*/
-QPoint KDGanttViewItem::middleLeft()
+TQPoint KDGanttViewItem::middleLeft()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myStartTime), itemPos()+height()/2);
}
/*!
Returns the coordinate of this items middle right point
*/
-QPoint KDGanttViewItem::middleRight()
+TQPoint KDGanttViewItem::middleRight()
{
- return QPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
+ return TQPoint(myGanttView->myTimeHeader->getCoordX(myEndTime), itemPos()+height()/2);
}
/*!
Moves this items text.
@@ -2496,21 +2496,21 @@ void KDGanttViewItem::moveTextCanvas(int x, int y)
*/
void KDGanttViewItem::moveTextCanvas()
{
- QPoint m = myTextOffset+middleRight();
+ TQPoint m = myTextOffset+middleRight();
textCanvas->move(m.x(), m.y()-myItemSize/2);
}
/*!
Sets with how much the item text is offset.
*/
-void KDGanttViewItem::setTextOffset(QPoint p)
+void KDGanttViewItem::setTextOffset(TQPoint p)
{
//qDebug("%s: setTextOffset() offset: %d,%d",listViewText(0).latin1(),p.x(),p.y());
myTextOffset.setX(p.x());
myTextOffset.setY(p.y());
}
-bool KDGanttViewItem::isMyTextCanvas(QCanvasItem *tc)
+bool KDGanttViewItem::isMyTextCanvas(TQCanvasItem *tc)
{
return tc == textCanvas;
}
@@ -2534,7 +2534,7 @@ void KDGanttViewItem::setProgress(int percent)
\param start the float start time
*/
-void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
+void KDGanttViewItem::setFloatStartTime(const TQDateTime &start)
{
myFloatStartTime = start;
}
@@ -2545,7 +2545,7 @@ void KDGanttViewItem::setFloatStartTime(const QDateTime &start)
\param end the float end time
*/
-void KDGanttViewItem::setFloatEndTime(const QDateTime &end)
+void KDGanttViewItem::setFloatEndTime(const TQDateTime &end)
{
myFloatEndTime = end;
}