summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewTaskLinkGroup.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kdgantt/KDGanttViewTaskLinkGroup.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
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
Diffstat (limited to 'kdgantt/KDGanttViewTaskLinkGroup.cpp')
-rw-r--r--kdgantt/KDGanttViewTaskLinkGroup.cpp70
1 files changed, 35 insertions, 35 deletions
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> KDGanttViewTaskLinkGroup::sGroupDict;
+TQDict<KDGanttViewTaskLinkGroup> KDGanttViewTaskLinkGroup::sGroupDict;
/*! \class KDGanttViewTaskLinkGroup KDGanttViewTaskLinkGroup.h
A group of task links.
@@ -50,7 +50,7 @@ QDict<KDGanttViewTaskLinkGroup> 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<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> 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<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> 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<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> 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<KDGanttViewTaskLink> it(myTaskLinkList);
+ TQPtrListIterator<KDGanttViewTaskLink> 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 {