summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetenotifydataobject.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/kopetenotifydataobject.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/kopetenotifydataobject.cpp')
-rw-r--r--kopete/libkopete/kopetenotifydataobject.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kopete/libkopete/kopetenotifydataobject.cpp b/kopete/libkopete/kopetenotifydataobject.cpp
index 9a0de544..7ba7ab80 100644
--- a/kopete/libkopete/kopetenotifydataobject.cpp
+++ b/kopete/libkopete/kopetenotifydataobject.cpp
@@ -15,7 +15,7 @@
*************************************************************************
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include "kopetenotifydataobject.h"
#include "kopetenotifyevent.h"
@@ -23,7 +23,7 @@
class Kopete::NotifyDataObject::Private
{
public:
- QDict<Kopete::NotifyEvent> events;
+ TQDict<Kopete::NotifyEvent> events;
};
Kopete::NotifyDataObject::NotifyDataObject()
@@ -37,40 +37,40 @@ Kopete::NotifyDataObject::~NotifyDataObject()
delete d;
}
-Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const QString &event ) const
+Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const TQString &event ) const
{
Kopete::NotifyEvent *evt = d->events.find( event );
return evt;
}
-void Kopete::NotifyDataObject::setNotifyEvent( const QString& event, Kopete::NotifyEvent *notifyEvent )
+void Kopete::NotifyDataObject::setNotifyEvent( const TQString& event, Kopete::NotifyEvent *notifyEvent )
{
d->events.replace( event, notifyEvent );
}
-bool Kopete::NotifyDataObject::removeNotifyEvent( const QString &event )
+bool Kopete::NotifyDataObject::removeNotifyEvent( const TQString &event )
{
return d->events.remove( event );
}
-QDomElement Kopete::NotifyDataObject::notifyDataToXML()
+TQDomElement Kopete::NotifyDataObject::notifyDataToXML()
{
- QDomDocument notify;
- QDomElement notifications;
+ TQDomDocument notify;
+ TQDomElement notifications;
if ( !d->events.isEmpty() )
{
//<custom-notifications>
- notifications = notify.createElement( QString::fromLatin1( "custom-notifications" ) );
- QDictIterator<Kopete::NotifyEvent> it( d->events );
+ notifications = notify.createElement( TQString::fromLatin1( "custom-notifications" ) );
+ TQDictIterator<Kopete::NotifyEvent> it( d->events );
for ( ; it.current(); ++it )
{
//<event name="..." suppress-common="true|false">
- QDomElement event = notify.createElement( QString::fromLatin1( "event" ) );
- event.setAttribute( QString::fromLatin1( "name" ), it.currentKey() );
- event.setAttribute( QString::fromLatin1( "suppress-common" ), QString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) );
- QValueList<QDomElement> presentations = it.current()->toXML();
+ TQDomElement event = notify.createElement( TQString::fromLatin1( "event" ) );
+ event.setAttribute( TQString::fromLatin1( "name" ), it.currentKey() );
+ event.setAttribute( TQString::fromLatin1( "suppress-common" ), TQString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) );
+ TQValueList<TQDomElement> presentations = it.current()->toXML();
//<sound-notification enabled="true|false" src="..." single-shot="">
- for ( QValueList<QDomElement>::Iterator it = presentations.begin(); it != presentations.end(); ++it )
+ for ( TQValueList<TQDomElement>::Iterator it = presentations.begin(); it != presentations.end(); ++it )
event.appendChild( notify.importNode( *it, true ) );
notifications.appendChild( event );
}
@@ -78,59 +78,59 @@ QDomElement Kopete::NotifyDataObject::notifyDataToXML()
return notifications;
}
-bool Kopete::NotifyDataObject::notifyDataFromXML( const QDomElement& element )
+bool Kopete::NotifyDataObject::notifyDataFromXML( const TQDomElement& element )
{
- if ( element.tagName() == QString::fromLatin1( "custom-notifications" ) )
+ if ( element.tagName() == TQString::fromLatin1( "custom-notifications" ) )
{
- QDomNode field = element.firstChild();
+ TQDomNode field = element.firstChild();
while( !field.isNull() )
{
//read an event
- QDomElement fieldElement = field.toElement();
- if ( fieldElement.tagName() == QString::fromLatin1( "event" ) )
+ TQDomElement fieldElement = field.toElement();
+ if ( fieldElement.tagName() == TQString::fromLatin1( "event" ) )
{
// get its attributes
- QString name = fieldElement.attribute( QString::fromLatin1( "name" ), QString::null );
- QString suppress = fieldElement.attribute( QString::fromLatin1( "suppress-common" ), QString::null );
- Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == QString::fromLatin1( "true" ) );
+ TQString name = fieldElement.attribute( TQString::fromLatin1( "name" ), TQString::null );
+ TQString suppress = fieldElement.attribute( TQString::fromLatin1( "suppress-common" ), TQString::null );
+ Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == TQString::fromLatin1( "true" ) );
// get its children
- QDomNode child = fieldElement.firstChild();
+ TQDomNode child = fieldElement.firstChild();
while( !child.isNull() )
{
- QDomElement childElement = child.toElement();
- if ( childElement.tagName() == QString::fromLatin1( "sound-presentation" ) )
+ TQDomElement childElement = child.toElement();
+ if ( childElement.tagName() == TQString::fromLatin1( "sound-presentation" ) )
{
// kdDebug(14010) << k_funcinfo << "read: sound" << endl;
- QString src = childElement.attribute( QString::fromLatin1( "src" ) );
- QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) );
- QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) );
+ TQString src = childElement.attribute( TQString::fromLatin1( "src" ) );
+ TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) );
+ TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) );
Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Sound, src,
- ( singleShot == QString::fromLatin1( "true" ) ),
- ( enabled == QString::fromLatin1( "true" ) ) );
+ ( singleShot == TQString::fromLatin1( "true" ) ),
+ ( enabled == TQString::fromLatin1( "true" ) ) );
evt->setPresentation( Kopete::EventPresentation::Sound, pres );
// kdDebug(14010) << k_funcinfo << "after sound: " << evt->toString() << endl;
}
- if ( childElement.tagName() == QString::fromLatin1( "message-presentation" ) )
+ if ( childElement.tagName() == TQString::fromLatin1( "message-presentation" ) )
{
// kdDebug(14010) << k_funcinfo << "read: msg" << endl;
- QString src = childElement.attribute( QString::fromLatin1( "src" ) );
- QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) );
- QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) );
+ TQString src = childElement.attribute( TQString::fromLatin1( "src" ) );
+ TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) );
+ TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) );
Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Message, src,
- ( singleShot == QString::fromLatin1( "true" ) ),
- ( enabled == QString::fromLatin1( "true" ) ) );
+ ( singleShot == TQString::fromLatin1( "true" ) ),
+ ( enabled == TQString::fromLatin1( "true" ) ) );
evt->setPresentation( Kopete::EventPresentation::Message, pres );
// kdDebug(14010) << k_funcinfo << "after message: " << evt->toString() << endl;
}
- if ( childElement.tagName() == QString::fromLatin1( "chat-presentation" ) )
+ if ( childElement.tagName() == TQString::fromLatin1( "chat-presentation" ) )
{
// kdDebug(14010) << k_funcinfo << "read: chat" << endl;
- QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) );
- QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) );
- Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, QString::null,
- ( singleShot == QString::fromLatin1( "true" ) ),
- ( enabled == QString::fromLatin1( "true" ) ) );
+ TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) );
+ TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) );
+ Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, TQString::null,
+ ( singleShot == TQString::fromLatin1( "true" ) ),
+ ( enabled == TQString::fromLatin1( "true" ) ) );
evt->setPresentation( Kopete::EventPresentation::Chat, pres );
// kdDebug(14010) << k_funcinfo << "after chat: " << evt->toString() << endl;
}