summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewTaskLink.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttViewTaskLink.cpp')
-rw-r--r--kdgantt/KDGanttViewTaskLink.cpp192
1 files changed, 96 insertions, 96 deletions
diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp
index 22a50b8ab..2f5ca479f 100644
--- a/kdgantt/KDGanttViewTaskLink.cpp
+++ b/kdgantt/KDGanttViewTaskLink.cpp
@@ -62,8 +62,8 @@
\param to the target items
\param type the link type for the connection
*/
-KDGanttViewTaskLink::KDGanttViewTaskLink( QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+KDGanttViewTaskLink::KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type )
{
fromList= from;
@@ -109,8 +109,8 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewItem* from,
*/
KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
- QPtrList<KDGanttViewItem> from,
- QPtrList<KDGanttViewItem> to,
+ TQPtrList<KDGanttViewItem> from,
+ TQPtrList<KDGanttViewItem> to,
LinkType type )
{
fromList = from;
@@ -166,14 +166,14 @@ KDGanttViewTaskLink::~KDGanttViewTaskLink( )
void KDGanttViewTaskLink::initTaskLink()
{
- horLineList = new QPtrList<KDCanvasLine>;
- verLineList = new QPtrList<KDCanvasLine>;
- horLineList2 = new QPtrList<KDCanvasLine>;
- verLineList2 = new QPtrList<KDCanvasLine>;
- horLineList3 = new QPtrList<KDCanvasLine>;
- topList = new QPtrList<KDCanvasPolygon>;
- topLeftList = new QPtrList<KDCanvasPolygon>;
- topRightList = new QPtrList<KDCanvasPolygon>;
+ horLineList = new TQPtrList<KDCanvasLine>;
+ verLineList = new TQPtrList<KDCanvasLine>;
+ horLineList2 = new TQPtrList<KDCanvasLine>;
+ verLineList2 = new TQPtrList<KDCanvasLine>;
+ horLineList3 = new TQPtrList<KDCanvasLine>;
+ topList = new TQPtrList<KDCanvasPolygon>;
+ topLeftList = new TQPtrList<KDCanvasPolygon>;
+ topRightList = new TQPtrList<KDCanvasPolygon>;
horLineList->setAutoDelete( true );
verLineList->setAutoDelete( true );
horLineList2->setAutoDelete( true );
@@ -200,7 +200,7 @@ void KDGanttViewTaskLink::initTaskLink()
top = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
topLeft = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
topRight = new KDCanvasPolygon(myTimeTable,this,Type_is_KDGanttTaskLink);
- QPointArray arr = QPointArray(3);
+ TQPointArray arr = TQPointArray(3);
arr.setPoint(0,-4,-5);
arr.setPoint(1,4,-5);
arr.setPoint(2,0,0);
@@ -265,8 +265,8 @@ void KDGanttViewTaskLink::showMe( bool visible )
isvisible = visible;
int wid = 1;
- QPen p;
- QBrush b;
+ TQPen p;
+ TQBrush b;
p.setWidth(wid);
b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
@@ -277,17 +277,17 @@ void KDGanttViewTaskLink::showMe( bool visible )
b.setColor(myColor);
p.setColor(myColor);
}
- QPoint start, end;
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPoint start, end;
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
- (*fromIt)->setTextOffset(QPoint(0,0));
+ (*fromIt)->setTextOffset(TQPoint(0,0));
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
- (*toIt)->setTextOffset(QPoint(0,0));
+ (*toIt)->setTextOffset(TQPoint(0,0));
if (!isvisible || ! (*fromIt)->isVisibleInGanttView || !(*toIt)->isVisibleInGanttView || !myTimeTable->taskLinksVisible) {
(*horIt)->hide();
(*verIt)->hide();
@@ -330,8 +330,8 @@ void KDGanttViewTaskLink::showMeType( bool visible )
hide();
isvisible = visible;
int wid = 1;
- QPen p;
- QBrush b;
+ TQPen p;
+ TQBrush b;
p.setWidth(wid);
b.setStyle(Qt::SolidPattern);
if (ishighlighted) {
@@ -342,19 +342,19 @@ void KDGanttViewTaskLink::showMeType( bool visible )
b.setColor(myColor);
p.setColor(myColor);
}
- QPoint start, end;
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
- QPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
- QPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
- QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPoint start, end;
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
+ TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
+ TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
+ TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
- (*fromIt)->setTextOffset(QPoint(30,0));
+ (*fromIt)->setTextOffset(TQPoint(30,0));
(*fromIt)->moveTextCanvas();
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
@@ -368,12 +368,12 @@ void KDGanttViewTaskLink::showMeType( bool visible )
(*topIt)->setBrush(b);
(*topLeftIt)->setBrush(b);
(*topRightIt)->setBrush(b);
- (*toIt)->setTextOffset(QPoint(30,0));
+ (*toIt)->setTextOffset(TQPoint(30,0));
(*toIt)->moveTextCanvas();
switch (linkType()) {
case StartStart: {
start = (*fromIt)->middleLeft();
- end = (*toIt)->middleLeft()-QPoint(12,0);
+ end = (*toIt)->middleLeft()-TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()-xOffset(*fromIt),start.y(),
start.x()-10, start.y());
@@ -401,7 +401,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case FinishFinish: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleRight()+QPoint(12,0);
+ end = (*toIt)->middleRight()+TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10, start.y());
@@ -429,7 +429,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case FinishStart: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleLeft() - QPoint(12,0);
+ end = (*toIt)->middleLeft() - TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10,start.y());
@@ -459,7 +459,7 @@ void KDGanttViewTaskLink::showMeType( bool visible )
}
case StartFinish: {
start = (*fromIt)->middleRight();
- end = (*toIt)->middleRight()+QPoint(12,0);
+ end = (*toIt)->middleRight()+TQPoint(12,0);
bool down = start.y() < end.y();
(*horIt)->setPoints(start.x()+xOffset(*fromIt),start.y(),
start.x()+10, start.y());
@@ -589,7 +589,7 @@ bool KDGanttViewTaskLink::highlight() const
\param color the color to draw this task link in
\sa color()
*/
-void KDGanttViewTaskLink::setColor( const QColor& color )
+void KDGanttViewTaskLink::setColor( const TQColor& color )
{
myColor = color;
//if ( isvisible) setVisible(true );
@@ -603,7 +603,7 @@ void KDGanttViewTaskLink::setColor( const QColor& color )
\return the color in which this task link is drawn
\sa setColor()
*/
-QColor KDGanttViewTaskLink::color() const
+TQColor KDGanttViewTaskLink::color() const
{
return myColor;
}
@@ -615,7 +615,7 @@ QColor KDGanttViewTaskLink::color() const
\param color the highlight color to draw this task link in
\sa highlightColor()
*/
-void KDGanttViewTaskLink::setHighlightColor( const QColor& color )
+void KDGanttViewTaskLink::setHighlightColor( const TQColor& color )
{
myColorHL = color;
//if ( isvisible) setVisible(true );
@@ -629,7 +629,7 @@ void KDGanttViewTaskLink::setHighlightColor( const QColor& color )
\return the highlight color in which this task link is drawn
\sa setHighlightColor()
*/
-QColor KDGanttViewTaskLink::highlightColor() const
+TQColor KDGanttViewTaskLink::highlightColor() const
{
return myColorHL;
}
@@ -641,7 +641,7 @@ QColor KDGanttViewTaskLink::highlightColor() const
\param text the tooltip text
\sa tooltipText()
*/
-void KDGanttViewTaskLink::setTooltipText( const QString& text )
+void KDGanttViewTaskLink::setTooltipText( const TQString& text )
{
myToolTipText = text;
}
@@ -653,7 +653,7 @@ void KDGanttViewTaskLink::setTooltipText( const QString& text )
\return the tooltip text of this task link
\sa setTooltipText()
*/
-QString KDGanttViewTaskLink::tooltipText() const
+TQString KDGanttViewTaskLink::tooltipText() const
{
return myToolTipText;
}
@@ -665,7 +665,7 @@ QString KDGanttViewTaskLink::tooltipText() const
\param text the what's this text
\sa whatsThisText()
*/
-void KDGanttViewTaskLink::setWhatsThisText( const QString& text )
+void KDGanttViewTaskLink::setWhatsThisText( const TQString& text )
{
myWhatsThisText = text;
@@ -678,7 +678,7 @@ void KDGanttViewTaskLink::setWhatsThisText( const QString& text )
\return the what's this text of this task link
\sa setWhatsThisText()
*/
-QString KDGanttViewTaskLink::whatsThisText() const
+TQString KDGanttViewTaskLink::whatsThisText() const
{
return myWhatsThisText;
}
@@ -690,7 +690,7 @@ QString KDGanttViewTaskLink::whatsThisText() const
\return the ist of source item of this task link
\sa to()
*/
-QPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const
+TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::from() const
{
return fromList;
}
@@ -722,7 +722,7 @@ void KDGanttViewTaskLink::removeItemFromList( KDGanttViewItem* item )
\return the list of target item of this task link
\sa from()
*/
-QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
+TQPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
{
return toList;
}
@@ -734,23 +734,23 @@ QPtrList<KDGanttViewItem> KDGanttViewTaskLink::to() const
\param doc the DOM document to which the node belongs
\param parentElement the element into which to insert this node
*/
-void KDGanttViewTaskLink::createNode( QDomDocument& doc,
- QDomElement& parentElement )
+void KDGanttViewTaskLink::createNode( TQDomDocument& doc,
+ TQDomElement& parentElement )
{
- QDomElement taskLinkElement = doc.createElement( "TaskLink" );
+ TQDomElement taskLinkElement = doc.createElement( "TaskLink" );
parentElement.appendChild( taskLinkElement );
- QDomElement fromItemsElement = doc.createElement( "FromItems" );
+ TQDomElement fromItemsElement = doc.createElement( "FromItems" );
taskLinkElement.appendChild( fromItemsElement );
- QPtrList<KDGanttViewItem> fromList = from();
+ TQPtrList<KDGanttViewItem> fromList = from();
KDGanttViewItem* item;
for( item = fromList.first(); item;
item = fromList.next() )
KDGanttXML::createStringNode( doc, fromItemsElement, "Item", item->name() );
- QDomElement toItemsElement = doc.createElement( "ToItems" );
+ TQDomElement toItemsElement = doc.createElement( "ToItems" );
taskLinkElement.appendChild( toItemsElement );
- QPtrList<KDGanttViewItem> toList = to();
+ TQPtrList<KDGanttViewItem> toList = to();
for( item = toList.first(); item;
item = toList.next() )
KDGanttXML::createStringNode( doc, toItemsElement, "Item", item->name() );
@@ -780,26 +780,26 @@ void KDGanttViewTaskLink::createNode( QDomDocument& doc,
\param element the DOM element from which to read the specification
\return the newly created task link
*/
-KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& element )
+KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& element )
{
- QDomNode node = element.firstChild();
- QStringList fromList, toList;
+ TQDomNode node = element.firstChild();
+ TQStringList fromList, toList;
bool highlight = false, visible = false;
- QColor color, highlightColor;
- QString tooltipText, whatsThisText, group;
+ TQColor color, highlightColor;
+ TQString tooltipText, whatsThisText, group;
LinkType linktype=None;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "FromItems" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
fromList << value;
} else {
@@ -810,13 +810,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
node = node.nextSibling();
}
} else if( tagName == "ToItems" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Item" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
toList << value;
} else {
@@ -835,27 +835,27 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
if( KDGanttXML::readBoolNode( element, value ) )
visible = value;
} else if( tagName == "Color" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
color = value;
} else if( tagName == "HighlightColor" ) {
- QColor value;
+ TQColor value;
if( KDGanttXML::readColorNode( element, value ) )
highlightColor = value;
} else if( tagName == "TooltipText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
tooltipText = value;
} else if( tagName == "WhatsThisText" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
whatsThisText = value;
} else if( tagName == "Group" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
group = value;
} else if( tagName == "Linktype" ) {
- QString value;
+ TQString value;
if( KDGanttXML::readStringNode( element, value ) )
linktype = stringToLinkType( value );
} else {
@@ -866,15 +866,15 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( QDomElement& ele
node = node.nextSibling();
}
- QPtrList<KDGanttViewItem> fromItemList;
- QPtrList<KDGanttViewItem> toItemList;
- for( QStringList::const_iterator fromIt = fromList.begin();
+ TQPtrList<KDGanttViewItem> fromItemList;
+ TQPtrList<KDGanttViewItem> toItemList;
+ for( TQStringList::const_iterator fromIt = fromList.begin();
fromIt != fromList.end(); ++fromIt ) {
KDGanttViewItem* item = KDGanttViewItem::find( *fromIt );
if( item )
fromItemList.append( item );
}
- for( QStringList::const_iterator toIt = toList.begin();
+ for( TQStringList::const_iterator toIt = toList.begin();
toIt != toList.end(); ++toIt ) {
KDGanttViewItem* item = KDGanttViewItem::find( *toIt );
if( item )
@@ -935,16 +935,16 @@ int KDGanttViewTaskLink::xOffset(KDGanttViewItem *item)
void KDGanttViewTaskLink::hide()
{
- QPtrListIterator<KDCanvasLine> horIt(*horLineList);
- QPtrListIterator<KDCanvasLine> verIt(*verLineList);
- QPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
- QPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
- QPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
- QPtrListIterator<KDCanvasPolygon> topIt(*topList);
- QPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
- QPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
- QPtrListIterator<KDGanttViewItem> fromIt(fromList);
- QPtrListIterator<KDGanttViewItem> toIt(toList);
+ TQPtrListIterator<KDCanvasLine> horIt(*horLineList);
+ TQPtrListIterator<KDCanvasLine> verIt(*verLineList);
+ TQPtrListIterator<KDCanvasLine> horIt2(*horLineList2);
+ TQPtrListIterator<KDCanvasLine> verIt2(*verLineList2);
+ TQPtrListIterator<KDCanvasLine> horIt3(*horLineList3);
+ TQPtrListIterator<KDCanvasPolygon> topIt(*topList);
+ TQPtrListIterator<KDCanvasPolygon> topLeftIt(*topLeftList);
+ TQPtrListIterator<KDCanvasPolygon> topRightIt(*topRightList);
+ TQPtrListIterator<KDGanttViewItem> fromIt(fromList);
+ TQPtrListIterator<KDGanttViewItem> toIt(toList);
for ( ; fromIt.current(); ++fromIt ) {
toIt.toFirst();
for ( ; toIt.current(); ++toIt ) {
@@ -968,7 +968,7 @@ void KDGanttViewTaskLink::hide()
}
}
-QString KDGanttViewTaskLink::linkTypeToString( LinkType type )
+TQString KDGanttViewTaskLink::linkTypeToString( LinkType type )
{
switch( type ) {
case None:
@@ -992,7 +992,7 @@ QString KDGanttViewTaskLink::linkTypeToString( LinkType type )
return "";
}
-KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const QString type )
+KDGanttViewTaskLink::LinkType KDGanttViewTaskLink::stringToLinkType( const TQString type )
{
if (type == "FinishStart")
return FinishStart;