summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/private
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/private
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/private')
-rw-r--r--kopete/libkopete/private/kopetecommand.cpp34
-rw-r--r--kopete/libkopete/private/kopetecommand.h30
-rw-r--r--kopete/libkopete/private/kopeteemoticons.cpp170
-rw-r--r--kopete/libkopete/private/kopeteemoticons.h36
-rw-r--r--kopete/libkopete/private/kopeteutils_private.cpp6
-rw-r--r--kopete/libkopete/private/kopeteutils_private.h14
-rw-r--r--kopete/libkopete/private/kopeteviewmanager.cpp62
-rw-r--r--kopete/libkopete/private/kopeteviewmanager.h2
8 files changed, 177 insertions, 177 deletions
diff --git a/kopete/libkopete/private/kopetecommand.cpp b/kopete/libkopete/private/kopetecommand.cpp
index 52588f2e..1f8969f6 100644
--- a/kopete/libkopete/private/kopetecommand.cpp
+++ b/kopete/libkopete/private/kopetecommand.cpp
@@ -13,7 +13,7 @@
*************************************************************************
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -25,17 +25,17 @@
#include "kopetecommand.h"
#include "kopeteuiglobal.h"
-Kopete::Command::Command( QObject *parent, const QString &command, const char* handlerSlot,
- const QString &help, Kopete::CommandHandler::CommandType type, const QString &formatString,
- uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix )
+Kopete::Command::Command( TQObject *parent, const TQString &command, const char* handlerSlot,
+ const TQString &help, Kopete::CommandHandler::CommandType type, const TQString &formatString,
+ uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix )
: KAction( command[0].upper() + command.right( command.length() - 1).lower(), pix, cut, parent,
- ( command.lower() + QString::fromLatin1("_command") ).latin1() )
+ ( command.lower() + TQString::fromLatin1("_command") ).latin1() )
{
init( command, handlerSlot, help, type, formatString, minArgs, maxArgs );
}
-void Kopete::Command::init( const QString &command, const char* slot, const QString &help,
- Kopete::CommandHandler::CommandType type, const QString &formatString, uint minArgs, int maxArgs )
+void Kopete::Command::init( const TQString &command, const char* slot, const TQString &help,
+ Kopete::CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs )
{
m_command = command;
m_help = help;
@@ -47,18 +47,18 @@ void Kopete::Command::init( const QString &command, const char* slot, const QStr
if( m_type == Kopete::CommandHandler::Normal )
{
- QObject::connect( this, SIGNAL( handleCommand( const QString &, Kopete::ChatSession *) ),
+ TQObject::connect( this, TQT_SIGNAL( handleCommand( const TQString &, Kopete::ChatSession *) ),
parent(), slot );
}
- QObject::connect( this, SIGNAL( activated() ), this, SLOT( slotAction() ) );
+ TQObject::connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotAction() ) );
}
void Kopete::Command::slotAction()
{
Kopete::ChatSession *manager = Kopete::ChatSessionManager::self()->activeView()->msgManager();
- QString args;
+ TQString args;
if( m_minArgs > 0 )
{
args = KInputDialog::getText( i18n("Enter Arguments"), i18n("Enter the arguments to %1:").arg(m_command) );
@@ -69,9 +69,9 @@ void Kopete::Command::slotAction()
processCommand( args, manager, true );
}
-void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *manager, bool gui )
+void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession *manager, bool gui )
{
- QStringList mArgs = Kopete::CommandHandler::parseArguments( args );
+ TQStringList mArgs = Kopete::CommandHandler::parseArguments( args );
if( m_processing )
{
printError( i18n("Alias \"%1\" expands to itself.").arg( text() ), manager, gui );
@@ -98,12 +98,12 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *
if( m_type == Kopete::CommandHandler::UserAlias ||
m_type == Kopete::CommandHandler::SystemAlias )
{
- QString formatString = m_formatString;
+ TQString formatString = m_formatString;
// Translate %s to the whole string and %n to current nickname
- formatString.replace( QString::fromLatin1("%n"), manager->myself()->nickName() );
- formatString.replace( QString::fromLatin1("%s"), args );
+ formatString.replace( TQString::fromLatin1("%n"), manager->myself()->nickName() );
+ formatString.replace( TQString::fromLatin1("%s"), args );
// Translate %1..%N to word1..wordN
@@ -115,7 +115,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *
kdDebug(14010) << "New Command after processing alias: " << formatString << endl;
- Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/") + formatString, manager );
+ Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/") + formatString, manager );
}
else
{
@@ -125,7 +125,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *
}
}
-void Kopete::Command::printError( const QString &error, Kopete::ChatSession *manager, bool gui ) const
+void Kopete::Command::printError( const TQString &error, Kopete::ChatSession *manager, bool gui ) const
{
if( gui )
{
diff --git a/kopete/libkopete/private/kopetecommand.h b/kopete/libkopete/private/kopetecommand.h
index 298872db..6a686f1e 100644
--- a/kopete/libkopete/private/kopetecommand.h
+++ b/kopete/libkopete/private/kopetecommand.h
@@ -18,7 +18,7 @@
#ifndef __KOPETECOMMAND_H__
#define __KOPETECOMMAND_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#include "kopetecommandhandler.h"
@@ -38,7 +38,7 @@ class Command : public KAction
* @param parent The plugin who owns this command
* @param command The command we want to handle, not including the '/'
* @param handlerSlot The slot used to handle the command. This slot must
- * accept two parameters, a QString of arguments, and a Kopete::ChatSession
+ * accept two parameters, a TQString of arguments, and a Kopete::ChatSession
* pointer to the Manager under which the command was sent.
* @param help An optional help string to be shown when the user uses
* /help <i>command</i>
@@ -49,25 +49,25 @@ class Command : public KAction
* @param cut The shortcut for the command
* @param pix The icon to use for the command
*/
- Command( QObject *parent, const QString &command, const char* handlerSlot,
- const QString &help = QString::null, CommandHandler::CommandType type = CommandHandler::Normal, const QString &formatString = QString::null,
+ Command( TQObject *parent, const TQString &command, const char* handlerSlot,
+ const TQString &help = TQString::null, CommandHandler::CommandType type = CommandHandler::Normal, const TQString &formatString = TQString::null,
uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0,
- const QString &pix = QString::null );
+ const TQString &pix = TQString::null );
/**
* Process this command
*/
- void processCommand( const QString &args, ChatSession *manager, bool gui = false );
+ void processCommand( const TQString &args, ChatSession *manager, bool gui = false );
/**
* Returns the command this object handles
*/
- const QString &command() const { return m_command; };
+ const TQString &command() const { return m_command; };
/**
* Returns the help string for this command
*/
- const QString &help() const { return m_help; };
+ const TQString &help() const { return m_help; };
/**
* Returns the type of the command
@@ -80,7 +80,7 @@ class Command : public KAction
* has been handled, all processing on it stops by the command handler
* (a command cannot be handled twice)
*/
- void handleCommand( const QString &args, Kopete::ChatSession *manager );
+ void handleCommand( const TQString &args, Kopete::ChatSession *manager );
private slots:
/**
@@ -89,15 +89,15 @@ class Command : public KAction
void slotAction();
private:
- void init( const QString &command, const char* slot, const QString &help,
- CommandHandler::CommandType type, const QString &formatString,
+ void init( const TQString &command, const char* slot, const TQString &help,
+ CommandHandler::CommandType type, const TQString &formatString,
uint minArgs, int maxArgs );
- void printError( const QString &error, ChatSession *manager, bool gui = false ) const;
+ void printError( const TQString &error, ChatSession *manager, bool gui = false ) const;
- QString m_command;
- QString m_help;
- QString m_formatString;
+ TQString m_command;
+ TQString m_help;
+ TQString m_formatString;
uint m_minArgs;
int m_maxArgs;
bool m_processing;
diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp
index 0b234deb..a2d33341 100644
--- a/kopete/libkopete/private/kopeteemoticons.cpp
+++ b/kopete/libkopete/private/kopeteemoticons.cpp
@@ -21,11 +21,11 @@
#include "kopeteprefs.h"
-#include <qdom.h>
-#include <qfile.h>
-#include <qstylesheet.h>
-#include <qimage.h>
-#include <qdatetime.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqstylesheet.h>
+#include <tqimage.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -50,10 +50,10 @@ struct Emoticons::Emoticon
Emoticon(){}
/* sort by longest to shortest matchText */
bool operator< (const Emoticon &e){ return matchText.length() > e.matchText.length(); }
- QString matchText;
- QString matchTextEscaped;
+ TQString matchText;
+ TQString matchTextEscaped;
QString picPath;
- QString picHTMLCode;
+ TQString picHTMLCode;
};
/* This is the object we will store each emoticon match in */
@@ -67,13 +67,13 @@ struct Emoticons::EmoticonNode {
class Emoticons::Private
{
public:
- QMap<QChar, QValueList<Emoticon> > emoticonMap;
- QMap<QString, QStringList> emoticonAndPicList;
+ TQMap<TQChar, TQValueList<Emoticon> > emoticonMap;
+ TQMap<TQString, TQStringList> emoticonAndPicList;
/**
* The current icon theme from KopetePrefs
*/
- QString theme;
+ TQString theme;
};
@@ -89,19 +89,19 @@ Emoticons *Emoticons::self()
}
-QString Emoticons::parseEmoticons(const QString& message, ParseMode mode ) //static
+TQString Emoticons::parseEmoticons(const TQString& message, ParseMode mode ) //static
{
return self()->parse( message, mode );
}
-QValueList<Emoticons::Token> Emoticons::tokenizeEmoticons( const QString& message, ParseMode mode ) // static
+TQValueList<Emoticons::Token> Emoticons::tokenizeEmoticons( const TQString& message, ParseMode mode ) // static
{
return self()->tokenize( message, mode );
}
-QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint mode )
+TQValueList<Emoticons::Token> Emoticons::tokenize( const TQString& message, uint mode )
{
- QValueList<Token> result;
+ TQValueList<Token> result;
if ( !KopetePrefs::prefs()->useEmoticons() )
{
result.append( Token( Text, message ) );
@@ -115,23 +115,23 @@ QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint m
}
/* previous char, in the firs iteration assume that it is space since we want
- * to let emoticons at the beginning, the very first previous QChar must be a space. */
- QChar p = ' ';
- QChar c; /* current char */
- QChar n; /* next character after a match candidate, if strict this should be QChar::null or space */
+ * to let emoticons at the beginning, the very first previous TQChar must be a space. */
+ TQChar p = ' ';
+ TQChar c; /* current char */
+ TQChar n; /* next character after a match candidate, if strict this should be TQChar::null or space */
/* This is the EmoticonNode container, it will represent each matched emoticon */
- QValueList<EmoticonNode> foundEmoticons;
- QValueList<EmoticonNode>::const_iterator found;
+ TQValueList<EmoticonNode> foundEmoticons;
+ TQValueList<EmoticonNode>::const_iterator found;
/* First-pass, store the matched emoticon locations in foundEmoticons */
- QValueList<Emoticon> emoticonList;
- QValueList<Emoticon>::const_iterator it;
+ TQValueList<Emoticon> emoticonList;
+ TQValueList<Emoticon>::const_iterator it;
size_t pos;
bool inHTMLTag = false;
bool inHTMLLink = false;
bool inHTMLEntity = false;
- QString needle; // search for this
+ TQString needle; // search for this
for ( pos = 0; pos < message.length(); pos++ )
{
c = message[ pos ];
@@ -271,14 +271,14 @@ QValueList<Emoticons::Token> Emoticons::tokenize( const QString& message, uint m
return result;
}
-Emoticons::Emoticons( const QString &theme ) : QObject( kapp, "KopeteEmoticons" )
+Emoticons::Emoticons( const TQString &theme ) : TQObject( kapp, "KopeteEmoticons" )
{
// kdDebug(14010) << "KopeteEmoticons::KopeteEmoticons" << endl;
d=new Private;
if(theme.isNull())
{
initEmoticons();
- connect( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(initEmoticons()) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(initEmoticons()) );
}
else
{
@@ -294,32 +294,32 @@ Emoticons::~Emoticons( )
-void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList &emoticons )
+void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons )
{
KStandardDirs *dir = KGlobal::dirs();
- QString pic;
+ TQString pic;
//maybe an extension was given, so try to find the exact file
- pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt );
+ pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt );
if( pic.isNull() )
- pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".mng" ) );
+ pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) );
if ( pic.isNull() )
- pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".png" ) );
+ pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) );
if ( pic.isNull() )
- pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".gif" ) );
+ pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".gif" ) );
if( !pic.isNull() ) // only add if we found one file
{
- QPixmap p;
- QString result;
+ TQPixmap p;
+ TQString result;
d->emoticonAndPicList.insert( pic, emoticons );
- for ( QStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd();
+ for ( TQStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd();
it != end; ++it )
{
- QString matchEscaped=QStyleSheet::escape(*it);
+ TQString matchEscaped=TQStyleSheet::escape(*it);
Emoticon e;
e.picPath = pic;
@@ -328,15 +328,15 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList &
// Unless we do so, ChatMessagePart::slotScrollView does not work properly and causing
// HTMLPart not to be scrolled to the very last message.
p.load( e.picPath );
- result = QString::fromLatin1( "<img align=\"center\" src=\"" ) +
+ result = TQString::fromLatin1( "<img align=\"center\" src=\"" ) +
e.picPath +
- QString::fromLatin1( "\" title=\"" ) +
+ TQString::fromLatin1( "\" title=\"" ) +
matchEscaped +
- QString::fromLatin1( "\" width=\"" ) +
- QString::number( p.width() ) +
- QString::fromLatin1( "\" height=\"" ) +
- QString::number( p.height() ) +
- QString::fromLatin1( "\" />" );
+ TQString::fromLatin1( "\" width=\"" ) +
+ TQString::number( p.width() ) +
+ TQString::fromLatin1( "\" height=\"" ) +
+ TQString::number( p.height() ) +
+ TQString::fromLatin1( "\" />" );
e.picHTMLCode = result;
e.matchTextEscaped = matchEscaped;
@@ -347,7 +347,7 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList &
}
}
-void Emoticons::initEmoticons( const QString &theme )
+void Emoticons::initEmoticons( const TQString &theme )
{
if(theme.isNull())
{
@@ -365,43 +365,43 @@ void Emoticons::initEmoticons( const QString &theme )
d->emoticonAndPicList.clear();
d->emoticonMap.clear();
- QString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/emoticons.xml" ) );
+ TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) );
if(!filename.isEmpty())
return initEmoticon_emoticonsxml( filename );
- filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/icondef.xml" ) );
+ filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) );
if(!filename.isEmpty())
return initEmoticon_JEP0038( filename );
kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" <<endl;
}
-void Emoticons::initEmoticon_emoticonsxml( const QString & filename)
+void Emoticons::initEmoticon_emoticonsxml( const TQString & filename)
{
- QDomDocument emoticonMap( QString::fromLatin1( "messaging-emoticon-map" ) );
+ TQDomDocument emoticonMap( TQString::fromLatin1( "messaging-emoticon-map" ) );
- QFile mapFile( filename );
+ TQFile mapFile( filename );
mapFile.open( IO_ReadOnly );
emoticonMap.setContent( &mapFile );
- QDomElement list = emoticonMap.documentElement();
- QDomNode node = list.firstChild();
+ TQDomElement list = emoticonMap.documentElement();
+ TQDomNode node = list.firstChild();
while( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() )
{
- if( element.tagName() == QString::fromLatin1( "emoticon" ) )
+ if( element.tagName() == TQString::fromLatin1( "emoticon" ) )
{
- QString emoticon_file = element.attribute(
- QString::fromLatin1( "file" ), QString::null );
- QStringList items;
+ TQString emoticon_file = element.attribute(
+ TQString::fromLatin1( "file" ), TQString::null );
+ TQStringList items;
- QDomNode emoticonNode = node.firstChild();
+ TQDomNode emoticonNode = node.firstChild();
while( !emoticonNode.isNull() )
{
- QDomElement emoticonElement = emoticonNode.toElement();
+ TQDomElement emoticonElement = emoticonNode.toElement();
if( !emoticonElement.isNull() )
{
- if( emoticonElement.tagName() == QString::fromLatin1( "string" ) )
+ if( emoticonElement.tagName() == TQString::fromLatin1( "string" ) )
{
items << emoticonElement.text();
}
@@ -430,42 +430,42 @@ void Emoticons::initEmoticon_emoticonsxml( const QString & filename)
}
-void Emoticons::initEmoticon_JEP0038( const QString & filename)
+void Emoticons::initEmoticon_JEP0038( const TQString & filename)
{
- QDomDocument emoticonMap( QString::fromLatin1( "icondef" ) );
+ TQDomDocument emoticonMap( TQString::fromLatin1( "icondef" ) );
- QFile mapFile( filename );
+ TQFile mapFile( filename );
mapFile.open( IO_ReadOnly );
emoticonMap.setContent( &mapFile );
- QDomElement list = emoticonMap.documentElement();
- QDomNode node = list.firstChild();
+ TQDomElement list = emoticonMap.documentElement();
+ TQDomNode node = list.firstChild();
while( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() )
{
- if( element.tagName() == QString::fromLatin1( "icon" ) )
+ if( element.tagName() == TQString::fromLatin1( "icon" ) )
{
- QStringList items;
- QString emoticon_file;
+ TQStringList items;
+ TQString emoticon_file;
- QDomNode emoticonNode = node.firstChild();
+ TQDomNode emoticonNode = node.firstChild();
while( !emoticonNode.isNull() )
{
- QDomElement emoticonElement = emoticonNode.toElement();
+ TQDomElement emoticonElement = emoticonNode.toElement();
if( !emoticonElement.isNull() )
{
- if( emoticonElement.tagName() == QString::fromLatin1( "text" ) )
+ if( emoticonElement.tagName() == TQString::fromLatin1( "text" ) )
{
//TODO xml:lang
items << emoticonElement.text();
}
- else if( emoticonElement.tagName() == QString::fromLatin1( "object" ) && emoticon_file.isEmpty() )
+ else if( emoticonElement.tagName() == TQString::fromLatin1( "object" ) && emoticon_file.isEmpty() )
{
- QString mime= emoticonElement.attribute(
- QString::fromLatin1( "mime" ), QString::fromLatin1("image/*") );
- if(mime.startsWith(QString::fromLatin1("image/")) && !mime.endsWith(QString::fromLatin1("/svg+xml")))
+ TQString mime= emoticonElement.attribute(
+ TQString::fromLatin1( "mime" ), TQString::fromLatin1("image/*") );
+ if(mime.startsWith(TQString::fromLatin1("image/")) && !mime.endsWith(TQString::fromLatin1("/svg+xml")))
{
emoticon_file = emoticonElement.text();
}
@@ -503,11 +503,11 @@ void Emoticons::sortEmoticons()
{
/* sort strings in order of longest to shortest to provide convenient input for
greedy matching in the tokenizer */
- QValueList<QChar> keys = d->emoticonMap.keys();
- for ( QValueList<QChar>::const_iterator it = keys.begin(); it != keys.end(); ++it )
+ TQValueList<TQChar> keys = d->emoticonMap.keys();
+ for ( TQValueList<TQChar>::const_iterator it = keys.begin(); it != keys.end(); ++it )
{
- QChar key = (*it);
- QValueList<Emoticon> keyValues = d->emoticonMap[key];
+ TQChar key = (*it);
+ TQValueList<Emoticon> keyValues = d->emoticonMap[key];
qHeapSort(keyValues.begin(), keyValues.end());
d->emoticonMap[key] = keyValues;
}
@@ -516,21 +516,21 @@ void Emoticons::sortEmoticons()
-QMap<QString, QStringList> Emoticons::emoticonAndPicList()
+TQMap<TQString, TQStringList> Emoticons::emoticonAndPicList()
{
return d->emoticonAndPicList;
}
-QString Emoticons::parse( const QString &message, ParseMode mode )
+TQString Emoticons::parse( const TQString &message, ParseMode mode )
{
if ( !KopetePrefs::prefs()->useEmoticons() )
return message;
- QValueList<Token> tokens = tokenize( message, mode );
- QValueList<Token>::const_iterator token;
- QString result;
- QPixmap p;
+ TQValueList<Token> tokens = tokenize( message, mode );
+ TQValueList<Token>::const_iterator token;
+ TQString result;
+ TQPixmap p;
for ( token = tokens.begin(); token != tokens.end(); ++token )
{
switch ( (*token).type )
diff --git a/kopete/libkopete/private/kopeteemoticons.h b/kopete/libkopete/private/kopeteemoticons.h
index 84fd305a..762a02a0 100644
--- a/kopete/libkopete/private/kopeteemoticons.h
+++ b/kopete/libkopete/private/kopeteemoticons.h
@@ -18,9 +18,9 @@
#ifndef kopeteemoticons_h__
#define kopeteemoticons_h__
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include "kopete_export.h"
@@ -35,7 +35,7 @@ public:
* chosen by the user.
* Instead, use @ref Kopete::Emoticons::self()
**/
- Emoticons( const QString &theme = QString::null );
+ Emoticons( const TQString &theme = TQString::null );
~Emoticons( );
@@ -63,10 +63,10 @@ public:
* If nicks is provided, they will not be parsed if they
* exist in message.
*/
- static QString parseEmoticons( const QString &message, ParseMode = SkipHTML ) ;
+ static TQString parseEmoticons( const TQString &message, ParseMode = SkipHTML ) ;
- QString parse( const QString &message, ParseMode = SkipHTML );
+ TQString parse( const TQString &message, ParseMode = SkipHTML );
/**
* TokenType, a token might be an image ( emoticon ) or text.
@@ -77,15 +77,15 @@ public:
};
/**
- * A token consists of a QString text which is either a regular text
+ * A token consists of a TQString text which is either a regular text
* or a path to image depending on the type.
* If type is Image the text refers to an image path.
* If type is Text the text refers to a regular text.
*/
struct Token {
Token() : type( Undefined ) {}
- Token( TokenType t, const QString &m ) : type( t ), text(m) {}
- Token( TokenType t, const QString &m, const QString &p, const QString &html )
+ Token( TokenType t, const TQString &m ) : type( t ), text(m) {}
+ Token( TokenType t, const TQString &m, const TQString &p, const TQString &html )
: type( t ), text( m ), picPath( p ), picHTMLCode( html ) {}
TokenType type;
QString text;
@@ -96,9 +96,9 @@ public:
/**
* Static function which will call tokenize
- * @see tokenize( const QString& )
+ * @see tokenize( const TQString& )
*/
- static QValueList<Token> tokenizeEmoticons( const QString &message, ParseMode mode = DefaultParseMode );
+ static TQValueList<Token> tokenizeEmoticons( const TQString &message, ParseMode mode = DefaultParseMode );
/**
* Tokenizes an message.
@@ -120,17 +120,17 @@ public:
* Note: quotation marks are used to emphasize white spaces.
* @param message is the message to tokenize
* @param mode is a bitmask of ParseMode enum
- * @return a QValueList which consiste of ordered tokens of the text.
+ * @return a TQValueList which consiste of ordered tokens of the text.
* @author Engin AYDOGAN < engin@bzzzt.biz >
* @since 23-03-05
*/
- QValueList<Token> tokenize( const QString &message, uint mode = DefaultParseMode );
+ TQValueList<Token> tokenize( const TQString &message, uint mode = DefaultParseMode );
/**
* Return all emoticons and the corresponding icon.
* (only one emoticon per image)
*/
- QMap<QString, QStringList> emoticonAndPicList();
+ TQMap<TQString, TQStringList> emoticonAndPicList();
public slots:
/**
@@ -149,19 +149,19 @@ private:
* add an emoticon to our mapping if
* an animation/pixmap has been found for it
**/
- void addIfPossible( const QString& filenameNoExt, const QStringList &emoticons );
+ void addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons );
/**
* uses the kopete's emoticons.xml for the theme
* @see initEmoticons
*/
- void initEmoticon_emoticonsxml( const QString & filename);
+ void initEmoticon_emoticonsxml( const TQString & filename);
/**
* uses the JEP-0038 xml description for the theme
* @see initEmoticons
*/
- void initEmoticon_JEP0038( const QString & filename);
+ void initEmoticon_JEP0038( const TQString & filename);
/**
* sorts emoticons for convenient parsing, which yields greedy matching on
@@ -180,7 +180,7 @@ private slots:
* Fills the map with paths and emoticons
* This needs to be done on every emoticon-theme change
**/
- void initEmoticons ( const QString &theme = QString::null );
+ void initEmoticons ( const TQString &theme = TQString::null );
};
diff --git a/kopete/libkopete/private/kopeteutils_private.cpp b/kopete/libkopete/private/kopeteutils_private.cpp
index 3746bcd3..933a5b11 100644
--- a/kopete/libkopete/private/kopeteutils_private.cpp
+++ b/kopete/libkopete/private/kopeteutils_private.cpp
@@ -14,7 +14,7 @@
*************************************************************************
*/
-#include <qmap.h>
+#include <tqmap.h>
#include <kmessagebox.h>
@@ -49,7 +49,7 @@ NotifyHelper* NotifyHelper::self()
void NotifyHelper::slotEventActivated(unsigned int action)
{
- const KNotification *n = dynamic_cast<const KNotification *>(QObject::sender());
+ const KNotification *n = dynamic_cast<const KNotification *>(TQObject::sender());
if (n)
{
ErrorNotificationInfo info = m_events[n];
@@ -64,7 +64,7 @@ void NotifyHelper::slotEventActivated(unsigned int action)
void NotifyHelper::slotEventClosed()
{
- const KNotification *n = dynamic_cast<const KNotification *>(QObject::sender());
+ const KNotification *n = dynamic_cast<const KNotification *>(TQObject::sender());
if (n)
unregisterNotification(n);
}
diff --git a/kopete/libkopete/private/kopeteutils_private.h b/kopete/libkopete/private/kopeteutils_private.h
index a684c965..8c780c2f 100644
--- a/kopete/libkopete/private/kopeteutils_private.h
+++ b/kopete/libkopete/private/kopeteutils_private.h
@@ -18,9 +18,9 @@
#ifndef KOPETE_UTILS_PRIVATE_H
#define KOPETE_UTILS_PRIVATE_H
-#include "qobject.h"
-#include "qstring.h"
-#include "qpixmap.h"
+#include "tqobject.h"
+#include "tqstring.h"
+#include "tqpixmap.h"
class KNotification;
@@ -32,9 +32,9 @@ namespace Utils
typedef struct
{
- QString caption;
- QString explanation;
- QString debugInfo;
+ TQString caption;
+ TQString explanation;
+ TQString debugInfo;
} ErrorNotificationInfo;
class NotifyHelper : public QObject
@@ -50,7 +50,7 @@ public slots:
private:
NotifyHelper();
~NotifyHelper();
- QMap<const KNotification*, ErrorNotificationInfo> m_events;
+ TQMap<const KNotification*, ErrorNotificationInfo> m_events;
static NotifyHelper *s_self;
};
diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp
index c6d295fd..2a6ccb84 100644
--- a/kopete/libkopete/private/kopeteviewmanager.cpp
+++ b/kopete/libkopete/private/kopeteviewmanager.cpp
@@ -19,8 +19,8 @@
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qptrlist.h>
-#include <qstylesheet.h>
+#include <tqptrlist.h>
+#include <tqstylesheet.h>
#include <kplugininfo.h>
#include <knotification.h>
#include <kglobal.h>
@@ -39,8 +39,8 @@
#include "kopeteviewmanager.h"
-typedef QMap<Kopete::ChatSession*,KopeteView*> ManagerMap;
-typedef QPtrList<Kopete::MessageEvent> EventList;
+typedef TQMap<Kopete::ChatSession*,KopeteView*> ManagerMap;
+typedef TQPtrList<Kopete::MessageEvent> EventList;
struct KopeteViewManagerPrivate
{
@@ -73,13 +73,13 @@ KopeteViewManager::KopeteViewManager()
d->activeView = 0L;
d->foreignMessage=false;
- connect( KopetePrefs::prefs(), SIGNAL( saved() ), this, SLOT( slotPrefsChanged() ) );
+ connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), this, TQT_SLOT( slotPrefsChanged() ) );
- connect( Kopete::ChatSessionManager::self() , SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ),
- this, SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) );
+ connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ),
+ this, TQT_SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) );
- connect( Kopete::ChatSessionManager::self() , SIGNAL( readMessage() ),
- this, SLOT ( nextEvent() ) );
+ connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( readMessage() ),
+ this, TQT_SLOT ( nextEvent() ) );
slotPrefsChanged();
}
@@ -106,7 +106,7 @@ void KopeteViewManager::slotPrefsChanged()
d->balloonNotifyIgnoreClosesChatView = KopetePrefs::prefs()->balloonNotifyIgnoreClosesChatView();
}
-KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString &requestedPlugin )
+KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQString &requestedPlugin )
{
// kdDebug(14000) << k_funcinfo << endl;
@@ -119,7 +119,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString
Kopete::PluginManager *pluginManager = Kopete::PluginManager::self();
Kopete::ViewPlugin *viewPlugin = 0L;
- QString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin;
+ TQString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin;
if( !pluginName.isEmpty() )
{
viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( pluginName );
@@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString
}
if( !viewPlugin )
- viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( QString::fromLatin1("kopete_chatwindow") );
+ viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") );
if( viewPlugin )
{
@@ -141,8 +141,8 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString
d->foreignMessage = false;
d->managerMap.insert( session, newView );
- connect( session, SIGNAL( closing(Kopete::ChatSession *) ),
- this, SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) );
+ connect( session, TQT_SIGNAL( closing(Kopete::ChatSession *) ),
+ this, TQT_SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) );
return newView;
}
@@ -169,8 +169,8 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi
bool appendMessageEvent = d->useQueueOrStack;
- QWidget *w;
- if( d->queueUnreadMessages && ( w = dynamic_cast<QWidget*>(view( manager )) ) )
+ TQWidget *w;
+ if( d->queueUnreadMessages && ( w = dynamic_cast<TQWidget*>(view( manager )) ) )
{
// append msg event to queue if chat window is active but not the chat view in it...
appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView);
@@ -192,7 +192,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi
{
Kopete::MessageEvent *event=new Kopete::MessageEvent(msg,manager);
d->eventList.append( event );
- connect(event, SIGNAL(done(Kopete::MessageEvent *)), this, SLOT(slotEventDeleted(Kopete::MessageEvent *)));
+ connect(event, TQT_SIGNAL(done(Kopete::MessageEvent *)), this, TQT_SLOT(slotEventDeleted(Kopete::MessageEvent *)));
Kopete::ChatSessionManager::self()->postNewEvent(event);
}
}
@@ -204,42 +204,42 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi
if ( !outgoingMessage && ( !manager->account()->isAway() || KopetePrefs::prefs()->soundIfAway() )
&& msg.direction() != Kopete::Message::Internal )
{
- QWidget *w=dynamic_cast<QWidget*>(manager->view(false));
+ TQWidget *w=dynamic_cast<TQWidget*>(manager->view(false));
KConfig *config = KGlobal::config();
config->setGroup("General");
if( (!manager->view(false) || !w || manager->view() != d->activeView ||
config->readBoolEntry("EventIfActive", true) || !w->isActiveWindow())
&& msg.from())
{
- QString msgFrom = QString::null;
+ TQString msgFrom = TQString::null;
if( msg.from()->metaContact() )
msgFrom = msg.from()->metaContact()->displayName();
else
msgFrom = msg.from()->contactId();
- QString msgText = msg.plainBody();
+ TQString msgText = msg.plainBody();
if( msgText.length() > 90 )
- msgText = msgText.left(88) + QString::fromLatin1("...");
+ msgText = msgText.left(88) + TQString::fromLatin1("...");
- QString event;
- QString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" );
+ TQString event;
+ TQString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" );
switch( msg.importance() )
{
case Kopete::Message::Low:
- event = QString::fromLatin1( "kopete_contact_lowpriority" );
+ event = TQString::fromLatin1( "kopete_contact_lowpriority" );
break;
case Kopete::Message::Highlight:
- event = QString::fromLatin1( "kopete_contact_highlight" );
+ event = TQString::fromLatin1( "kopete_contact_highlight" );
body = i18n( "<qt>A highlighted message arrived from %1<br>\"%2\"</qt>" );
break;
default:
- event = QString::fromLatin1( "kopete_contact_incoming" );
+ event = TQString::fromLatin1( "kopete_contact_incoming" );
}
- KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( QStyleSheet::escape(msgFrom), QStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/
+ KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/
w , i18n("View") );
- connect(notify,SIGNAL(activated(unsigned int )), manager , SLOT(raiseView()) );
+ connect(notify,TQT_SIGNAL(activated(unsigned int )), manager , TQT_SLOT(raiseView()) );
}
}
}
@@ -256,7 +256,7 @@ void KopeteViewManager::readMessages( Kopete::ChatSession *manager, bool outgoin
else if( !thisView->isVisible() )
thisView->makeVisible();
- QPtrListIterator<Kopete::MessageEvent> it( d->eventList );
+ TQPtrListIterator<Kopete::MessageEvent> it( d->eventList );
Kopete::MessageEvent* event;
while ( ( event = it.current() ) != 0 )
{
@@ -285,7 +285,7 @@ void KopeteViewManager::slotEventDeleted( Kopete::MessageEvent *event )
else if ( event->state() == Kopete::MessageEvent::Ignored && d->balloonNotifyIgnoreClosesChatView )
{
bool bAnotherWithThisManager = false;
- for( QPtrListIterator<Kopete::MessageEvent> it( d->eventList ); it; ++it )
+ for( TQPtrListIterator<Kopete::MessageEvent> it( d->eventList ); it; ++it )
{
Kopete::MessageEvent *event = it.current();
if ( event->message().manager() == kmm )
@@ -314,7 +314,7 @@ void KopeteViewManager::slotViewActivated( KopeteView *view )
// kdDebug( 14000 ) << k_funcinfo << endl;
d->activeView = view;
- QPtrListIterator<Kopete::MessageEvent> it ( d->eventList );
+ TQPtrListIterator<Kopete::MessageEvent> it ( d->eventList );
Kopete::MessageEvent* event;
while ( ( event = it.current() ) != 0 )
{
diff --git a/kopete/libkopete/private/kopeteviewmanager.h b/kopete/libkopete/private/kopeteviewmanager.h
index b1706906..f6b29e98 100644
--- a/kopete/libkopete/private/kopeteviewmanager.h
+++ b/kopete/libkopete/private/kopeteviewmanager.h
@@ -54,7 +54,7 @@ class KOPETE_EXPORT KopeteViewManager : public QObject
* @param session The Kopete::ChatSession we are viewing.
* @param requestedPlugin Specifies the view plugin to use.
*/
- KopeteView *view( Kopete::ChatSession *session, const QString &requestedPlugin = QString::null );
+ KopeteView *view( Kopete::ChatSession *session, const TQString &requestedPlugin = TQString::null );
/**
* Provide access to the list of KopeteChatWindow the class maintains.