summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetegroup.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/kopetegroup.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/kopetegroup.cpp')
-rw-r--r--kopete/libkopete/kopetegroup.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kopete/libkopete/kopetegroup.cpp b/kopete/libkopete/kopetegroup.cpp
index f50eb08b..6206545a 100644
--- a/kopete/libkopete/kopetegroup.cpp
+++ b/kopete/libkopete/kopetegroup.cpp
@@ -30,7 +30,7 @@ namespace Kopete {
class Group::Private
{
public:
- QString displayName;
+ TQString displayName;
Group::GroupType type;
bool expanded;
uint groupId;
@@ -59,7 +59,7 @@ Group * Group::temporary()
uint Group::Private::uniqueGroupId = 0;
-Group::Group( const QString &_name, GroupType _type )
+Group::Group( const TQString &_name, GroupType _type )
: ContactListElement( ContactList::self() )
{
d = new Private;
@@ -87,9 +87,9 @@ Group::~Group()
delete d;
}
-QPtrList<MetaContact> Group::members() const
+TQPtrList<MetaContact> Group::members() const
{
- QPtrList<MetaContact> members = ContactList::self()->metaContacts();
+ TQPtrList<MetaContact> members = ContactList::self()->metaContacts();
// members is a *copy* of the meta contacts, so using first(), next() and remove() is fine.
for( members.first(); members.current(); )
{
@@ -101,49 +101,49 @@ QPtrList<MetaContact> Group::members() const
return members;
}
-const QDomElement Group::toXML()
+const TQDomElement Group::toXML()
{
- QDomDocument group;
- group.appendChild( group.createElement( QString::fromLatin1( "kopete-group" ) ) );
- group.documentElement().setAttribute( QString::fromLatin1( "groupId" ), QString::number( groupId() ) );
+ TQDomDocument group;
+ group.appendChild( group.createElement( TQString::fromLatin1( "kopete-group" ) ) );
+ group.documentElement().setAttribute( TQString::fromLatin1( "groupId" ), TQString::number( groupId() ) );
- QString type;
+ TQString type;
switch ( d->type )
{
case Temporary:
- type = QString::fromLatin1( "temporary" );
+ type = TQString::fromLatin1( "temporary" );
break;
case TopLevel:
- type = QString::fromLatin1( "top-level" );
+ type = TQString::fromLatin1( "top-level" );
break;
default:
- type = QString::fromLatin1( "standard" ); // == Normal
+ type = TQString::fromLatin1( "standard" ); // == Normal
break;
}
- group.documentElement().setAttribute( QString::fromLatin1( "type" ), type );
- group.documentElement().setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) );
+ group.documentElement().setAttribute( TQString::fromLatin1( "type" ), type );
+ group.documentElement().setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) );
- QDomElement displayName = group.createElement( QString::fromLatin1( "display-name" ) );
+ TQDomElement displayName = group.createElement( TQString::fromLatin1( "display-name" ) );
displayName.appendChild( group.createTextNode( d->displayName ) );
group.documentElement().appendChild( displayName );
// Store other plugin data
- QValueList<QDomElement> pluginData = ContactListElement::toXML();
- for ( QValueList<QDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it )
+ TQValueList<TQDomElement> pluginData = ContactListElement::toXML();
+ for ( TQValueList<TQDomElement>::Iterator it = pluginData.begin(); it != pluginData.end(); ++it )
group.documentElement().appendChild( group.importNode( *it, true ) );
// Store custom notification data
- QDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML();
+ TQDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML();
if ( notifyData.hasChildNodes() )
group.documentElement().appendChild( group.importNode( notifyData, true ) );
return group.documentElement();
}
-bool Group::fromXML( const QDomElement &data )
+bool Group::fromXML( const TQDomElement &data )
{
- QString strGroupId = data.attribute( QString::fromLatin1( "groupId" ) );
+ TQString strGroupId = data.attribute( TQString::fromLatin1( "groupId" ) );
if ( !strGroupId.isEmpty() )
{
d->groupId = strGroupId.toUInt();
@@ -154,8 +154,8 @@ bool Group::fromXML( const QDomElement &data )
// Don't overwrite type for Temporary and TopLevel groups
if ( d->type != Temporary && d->type != TopLevel )
{
- QString type = data.attribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) );
- if ( type == QString::fromLatin1( "temporary" ) )
+ TQString type = data.attribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) );
+ if ( type == TQString::fromLatin1( "temporary" ) )
{
if ( d->type != Temporary )
{
@@ -163,7 +163,7 @@ bool Group::fromXML( const QDomElement &data )
return false;
}
}
- else if ( type == QString::fromLatin1( "top-level" ) )
+ else if ( type == TQString::fromLatin1( "top-level" ) )
{
if ( d->type != TopLevel )
{
@@ -177,20 +177,20 @@ bool Group::fromXML( const QDomElement &data )
}
}
- QString view = data.attribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) );
- d->expanded = ( view != QString::fromLatin1( "collapsed" ) );
+ TQString view = data.attribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) );
+ d->expanded = ( view != TQString::fromLatin1( "collapsed" ) );
- QDomNode groupData = data.firstChild();
+ TQDomNode groupData = data.firstChild();
while ( !groupData.isNull() )
{
- QDomElement groupElement = groupData.toElement();
- if ( groupElement.tagName() == QString::fromLatin1( "display-name" ) )
+ TQDomElement groupElement = groupData.toElement();
+ if ( groupElement.tagName() == TQString::fromLatin1( "display-name" ) )
{
// Don't set display name for temporary or top-level items
if ( d->type == Normal )
d->displayName = groupElement.text();
}
- else if( groupElement.tagName() == QString::fromLatin1( "custom-notifications" ) )
+ else if( groupElement.tagName() == TQString::fromLatin1( "custom-notifications" ) )
{
Kopete::NotifyDataObject::notifyDataFromXML( groupElement );
}
@@ -208,10 +208,10 @@ bool Group::fromXML( const QDomElement &data )
switch ( d->type )
{
case Temporary:
- d->displayName = QString::fromLatin1( "Temporary" );
+ d->displayName = TQString::fromLatin1( "Temporary" );
break;
case TopLevel:
- d->displayName = QString::fromLatin1( "Top-Level" );
+ d->displayName = TQString::fromLatin1( "Top-Level" );
break;
default:
d->displayName = i18n( "(Unnamed Group)" );
@@ -223,17 +223,17 @@ bool Group::fromXML( const QDomElement &data )
return ( d->type == Normal );
}
-void Group::setDisplayName( const QString &s )
+void Group::setDisplayName( const TQString &s )
{
if ( d->displayName != s )
{
- QString oldname = d->displayName;
+ TQString oldname = d->displayName;
d->displayName = s;
emit displayNameChanged( this, oldname );
}
}
-QString Group::displayName() const
+TQString Group::displayName() const
{
return d->displayName;
}
@@ -269,7 +269,7 @@ uint Group::groupId() const
void Group::sendMessage()
{
- QPtrList<Kopete::MetaContact> list = onlineMembers();
+ TQPtrList<Kopete::MetaContact> list = onlineMembers();
Kopete::MetaContact *mc = list.first();
Kopete::Contact *c;
@@ -279,18 +279,18 @@ void Group::sendMessage()
c->sendMessage();
if( c->manager( Contact::CanCreate ) )
{
- connect( c->manager(), SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) ));
+ connect( c->manager(), TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) ));
}
}
void Group::sendMessage( Message& msg )
{
- QPtrList<MetaContact> list = onlineMembers();
+ TQPtrList<MetaContact> list = onlineMembers();
Kopete::MetaContact *mc = list.first();
ChatSession *cs=msg.manager();
if( cs )
{
- disconnect( cs, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) ) );
+ disconnect( cs, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) ) );
}
else
return;
@@ -314,9 +314,9 @@ void Group::sendMessage( Message& msg )
}
}
-QPtrList<MetaContact> Group::onlineMembers() const
+TQPtrList<MetaContact> Group::onlineMembers() const
{
- QPtrList<MetaContact> list = members();
+ TQPtrList<MetaContact> list = members();
for( list.first(); list.current(); )
if( list.current()->isReachable() && list.current()->isOnline() )