From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdgantt/KDGanttViewTaskLinkGroup.cpp | 70 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'kdgantt/KDGanttViewTaskLinkGroup.cpp') diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp index e87bef0b..a7f65aad 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.cpp +++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp @@ -26,8 +26,8 @@ ** licensing are not clear to you. ** ** As a special exception, permission is given to link this program - ** with any edition of Qt, and distribute the resulting executable, - ** without including the source code for Qt in the source distribution. + ** with any edition of TQt, and distribute the resulting executable, + ** without including the source code for TQt in the source distribution. ** **********************************************************************/ @@ -36,7 +36,7 @@ #include "KDGanttXMLTools.h" #include "KDGanttView.h" -QDict KDGanttViewTaskLinkGroup::sGroupDict; +TQDict KDGanttViewTaskLinkGroup::sGroupDict; /*! \class KDGanttViewTaskLinkGroup KDGanttViewTaskLinkGroup.h A group of task links. @@ -50,7 +50,7 @@ QDict KDGanttViewTaskLinkGroup::sGroupDict; */ KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup() { - generateAndInsertName(QString()); + generateAndInsertName(TQString()); } /*! @@ -70,11 +70,11 @@ KDGanttViewTaskLinkGroup::~KDGanttViewTaskLinkGroup() /*! Constructs an empty task link group and records it under the name \a name so that it can later be found again with - KDGanttViewTaskLinkGroup::find(). + KDGanttViewTaskLinkGroup::tqfind(). \param name the search name of this task link group */ -KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const QString& name ) +KDGanttViewTaskLinkGroup::KDGanttViewTaskLinkGroup( const TQString& name ) { generateAndInsertName( name ); } @@ -121,7 +121,7 @@ bool KDGanttViewTaskLinkGroup::remove (KDGanttViewTaskLink* link) void KDGanttViewTaskLinkGroup::setVisible( bool show ) { isvisible = show; - QPtrListIterator it(myTaskLinkList); + TQPtrListIterator it(myTaskLinkList); for ( ; it.current(); ++it ) { it.current()->setVisible(show); } @@ -151,7 +151,7 @@ bool KDGanttViewTaskLinkGroup::visible() const void KDGanttViewTaskLinkGroup::setHighlight( bool highlight ) { ishighlighted= highlight; - QPtrListIterator it(myTaskLinkList); + TQPtrListIterator it(myTaskLinkList); for ( ; it.current(); ++it ) it.current()->setHighlight(highlight ); @@ -179,10 +179,10 @@ bool KDGanttViewTaskLinkGroup::highlight() const \param color the color to draw the task links in this group in \sa color() */ -void KDGanttViewTaskLinkGroup::setColor( const QColor& color ) +void KDGanttViewTaskLinkGroup::setColor( const TQColor& color ) { myColor = color; - QPtrListIterator it(myTaskLinkList); + TQPtrListIterator it(myTaskLinkList); for ( ; it.current(); ++it ) it.current()->setColor(color); } @@ -198,7 +198,7 @@ void KDGanttViewTaskLinkGroup::setColor( const QColor& color ) \return the color in which the task links in this group are drawn \sa setColor() */ -QColor KDGanttViewTaskLinkGroup::color() const +TQColor KDGanttViewTaskLinkGroup::color() const { return myColor; } @@ -210,11 +210,11 @@ QColor KDGanttViewTaskLinkGroup::color() const \param color the highlight color to draw the task links in this group in \sa color() */ -void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color ) +void KDGanttViewTaskLinkGroup::setHighlightColor( const TQColor& color ) { myColorHL = color; - QPtrListIterator it(myTaskLinkList); + TQPtrListIterator it(myTaskLinkList); for ( ; it.current(); ++it ) it.current()->setHighlightColor(color); } @@ -230,7 +230,7 @@ void KDGanttViewTaskLinkGroup::setHighlightColor( const QColor& color ) are drawn \sa setColor() */ -QColor KDGanttViewTaskLinkGroup::highlightColor() const +TQColor KDGanttViewTaskLinkGroup::highlightColor() const { return myColorHL; } @@ -268,11 +268,11 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link) \return the task link group with the specified name; 0 if no group with that name exists */ -KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name ) +KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::tqfind( const TQString& name ) { - if (name.isEmpty()) // avoid error msg from QDict + if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sGroupDict.find( name ); + return sGroupDict.tqfind( name ); } @@ -280,13 +280,13 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const QString& name ) Creates a DOM node that describes this task link group. \param doc the DOM document to which the node belongs - \param parentElement the element into which to insert this node + \param tqparentElement the element into which to insert this node */ -void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc, - QDomElement& parentElement ) +void KDGanttViewTaskLinkGroup::createNode( TQDomDocument& doc, + TQDomElement& tqparentElement ) { - QDomElement taskLinkGroupElement = doc.createElement( "TaskLink" ); - parentElement.appendChild( taskLinkGroupElement ); + TQDomElement taskLinkGroupElement = doc.createElement( "TaskLink" ); + tqparentElement.appendChild( taskLinkGroupElement ); KDGanttXML::createBoolNode( doc, taskLinkGroupElement, "Highlight", highlight() ); @@ -306,16 +306,16 @@ void KDGanttViewTaskLinkGroup::createNode( QDomDocument& doc, \param element the DOM element from which to read the specification \return the newly created task link group */ -KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomElement& element ) +KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( TQDomElement& element ) { - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); bool highlight = false, visible = false; - QColor color, highlightColor; - QString name; + TQColor color, highlightColor; + TQString name; 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 == "Highlight" ) { bool value; if( KDGanttXML::readBoolNode( element, value ) ) @@ -325,15 +325,15 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl 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 == "Name" ) { - QString value; + TQString value; if( KDGanttXML::readStringNode( element, value ) ) name = value; } else { @@ -362,7 +362,7 @@ KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::createFromDomElement( QDomEl Generates a unique name if necessary and inserts it into the group dictionary. */ -void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name ) +void KDGanttViewTaskLinkGroup::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. @@ -370,11 +370,11 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const QString& name ) // We had a name, remove it sGroupDict.remove( _name ); - QString newName; - if ( name.isEmpty() || sGroupDict.find( name ) ) { + TQString newName; + if ( name.isEmpty() || sGroupDict.tqfind( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sGroupDict.find( newName ) ) { + while( sGroupDict.tqfind( newName ) ) { newName += "_0"; } } else { -- cgit v1.2.1