summaryrefslogtreecommitdiffstats
path: root/kopete/plugins
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/plugins
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/plugins')
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.cpp48
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksplugin.h20
-rw-r--r--kopete/plugins/addbookmarks/addbookmarkspreferences.cpp42
-rw-r--r--kopete/plugins/addbookmarks/addbookmarkspreferences.h2
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp6
-rw-r--r--kopete/plugins/addbookmarks/addbookmarksprefssettings.h14
-rw-r--r--kopete/plugins/alias/aliasplugin.cpp2
-rw-r--r--kopete/plugins/alias/aliasplugin.h2
-rw-r--r--kopete/plugins/alias/aliaspreferences.cpp142
-rw-r--r--kopete/plugins/alias/aliaspreferences.h14
-rw-r--r--kopete/plugins/alias/editaliasdialog.cpp14
-rw-r--r--kopete/plugins/alias/editaliasdialog.h2
-rw-r--r--kopete/plugins/autoreplace/autoreplaceconfig.cpp18
-rw-r--r--kopete/plugins/autoreplace/autoreplaceconfig.h10
-rw-r--r--kopete/plugins/autoreplace/autoreplaceplugin.cpp28
-rw-r--r--kopete/plugins/autoreplace/autoreplaceplugin.h10
-rw-r--r--kopete/plugins/autoreplace/autoreplacepreferences.cpp62
-rw-r--r--kopete/plugins/autoreplace/autoreplacepreferences.h6
-rw-r--r--kopete/plugins/connectionstatus/connectionstatusplugin.cpp18
-rw-r--r--kopete/plugins/connectionstatus/connectionstatusplugin.h6
-rw-r--r--kopete/plugins/contactnotes/contactnotesedit.cpp12
-rw-r--r--kopete/plugins/contactnotes/contactnotesedit.h10
-rw-r--r--kopete/plugins/contactnotes/contactnotesplugin.cpp14
-rw-r--r--kopete/plugins/contactnotes/contactnotesplugin.h12
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.cpp10
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.h4
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp88
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.h16
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.cpp8
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.h2
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.cpp16
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.h6
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp48
-rw-r--r--kopete/plugins/cryptography/kgpginterface.h24
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.cpp58
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.h32
-rw-r--r--kopete/plugins/cryptography/popuppublic.cpp170
-rw-r--r--kopete/plugins/cryptography/popuppublic.h18
-rw-r--r--kopete/plugins/highlight/filter.h14
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp104
-rw-r--r--kopete/plugins/highlight/highlightconfig.h8
-rw-r--r--kopete/plugins/highlight/highlightplugin.cpp16
-rw-r--r--kopete/plugins/highlight/highlightplugin.h8
-rw-r--r--kopete/plugins/highlight/highlightpreferences.cpp64
-rw-r--r--kopete/plugins/highlight/highlightpreferences.h6
-rw-r--r--kopete/plugins/history/converter.cpp140
-rw-r--r--kopete/plugins/history/historydialog.cpp208
-rw-r--r--kopete/plugins/history/historydialog.h30
-rw-r--r--kopete/plugins/history/historyguiclient.cpp22
-rw-r--r--kopete/plugins/history/historyguiclient.h4
-rw-r--r--kopete/plugins/history/historylogger.cpp276
-rw-r--r--kopete/plugins/history/historylogger.h42
-rw-r--r--kopete/plugins/history/historyplugin.cpp38
-rw-r--r--kopete/plugins/history/historyplugin.h10
-rw-r--r--kopete/plugins/history/historypreferences.cpp24
-rw-r--r--kopete/plugins/history/historypreferences.h6
-rw-r--r--kopete/plugins/latex/latexguiclient.cpp18
-rw-r--r--kopete/plugins/latex/latexguiclient.h4
-rw-r--r--kopete/plugins/latex/latexplugin.cpp88
-rw-r--r--kopete/plugins/latex/latexplugin.h14
-rw-r--r--kopete/plugins/latex/latexpreferences.cpp10
-rw-r--r--kopete/plugins/latex/latexpreferences.h4
-rw-r--r--kopete/plugins/motionautoaway/motionawayplugin.cpp16
-rw-r--r--kopete/plugins/motionautoaway/motionawayplugin.h18
-rw-r--r--kopete/plugins/motionautoaway/motionawaypreferences.cpp16
-rw-r--r--kopete/plugins/motionautoaway/motionawaypreferences.h2
-rw-r--r--kopete/plugins/netmeeting/netmeetingguiclient.cpp8
-rw-r--r--kopete/plugins/netmeeting/netmeetingguiclient.h4
-rw-r--r--kopete/plugins/netmeeting/netmeetinginvitation.cpp44
-rw-r--r--kopete/plugins/netmeeting/netmeetinginvitation.h16
-rw-r--r--kopete/plugins/netmeeting/netmeetingplugin.cpp20
-rw-r--r--kopete/plugins/netmeeting/netmeetingplugin.h4
-rw-r--r--kopete/plugins/netmeeting/netmeetingpreferences.cpp10
-rw-r--r--kopete/plugins/netmeeting/netmeetingpreferences.h4
-rw-r--r--kopete/plugins/nowlistening/nlamarok.cpp26
-rw-r--r--kopete/plugins/nowlistening/nljuk.cpp42
-rw-r--r--kopete/plugins/nowlistening/nlkaffeine.cpp18
-rw-r--r--kopete/plugins/nowlistening/nlkscd.cpp22
-rw-r--r--kopete/plugins/nowlistening/nlmediaplayer.h16
-rw-r--r--kopete/plugins/nowlistening/nlnoatun.cpp36
-rw-r--r--kopete/plugins/nowlistening/nlnoatun.h4
-rw-r--r--kopete/plugins/nowlistening/nlxmms.cpp2
-rw-r--r--kopete/plugins/nowlistening/nowlisteningguiclient.cpp10
-rw-r--r--kopete/plugins/nowlistening/nowlisteningguiclient.h4
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.cpp102
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.h16
-rw-r--r--kopete/plugins/nowlistening/nowlisteningpreferences.cpp24
-rw-r--r--kopete/plugins/nowlistening/nowlisteningpreferences.h2
-rw-r--r--kopete/plugins/smpppdcs/detectordcop.cpp4
-rw-r--r--kopete/plugins/smpppdcs/detectordcop.h4
-rw-r--r--kopete/plugins/smpppdcs/detectornetstat.cpp12
-rw-r--r--kopete/plugins/smpppdcs/detectornetstat.h6
-rw-r--r--kopete/plugins/smpppdcs/detectornetworkstatus.cpp6
-rw-r--r--kopete/plugins/smpppdcs/detectornetworkstatus.h6
-rw-r--r--kopete/plugins/smpppdcs/detectorsmpppd.cpp2
-rw-r--r--kopete/plugins/smpppdcs/detectorsmpppd.h2
-rw-r--r--kopete/plugins/smpppdcs/kinternetiface.h2
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp22
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h24
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp24
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h4
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp18
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h18
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp36
-rw-r--r--kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h4
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsiface.h2
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.cpp30
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsplugin.h8
-rw-r--r--kopete/plugins/smpppdcs/smpppdcspreferences.cpp58
-rw-r--r--kopete/plugins/smpppdcs/smpppdcspreferences.h10
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp32
-rw-r--r--kopete/plugins/smpppdcs/smpppdcsprefsimpl.h6
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationwidget.cpp4
-rw-r--r--kopete/plugins/smpppdcs/smpppdlocationwidget.h4
-rw-r--r--kopete/plugins/smpppdcs/smpppdsearcher.cpp30
-rw-r--r--kopete/plugins/smpppdcs/smpppdsearcher.h6
-rw-r--r--kopete/plugins/smpppdcs/unittest/clienttest.cpp10
-rw-r--r--kopete/plugins/statistics/statisticscontact.cpp128
-rw-r--r--kopete/plugins/statistics/statisticscontact.h40
-rw-r--r--kopete/plugins/statistics/statisticsdb.cpp36
-rw-r--r--kopete/plugins/statistics/statisticsdb.h4
-rw-r--r--kopete/plugins/statistics/statisticsdcopiface.h20
-rw-r--r--kopete/plugins/statistics/statisticsdialog.cpp164
-rw-r--r--kopete/plugins/statistics/statisticsdialog.h12
-rw-r--r--kopete/plugins/statistics/statisticsplugin.cpp98
-rw-r--r--kopete/plugins/statistics/statisticsplugin.h36
-rw-r--r--kopete/plugins/texteffect/texteffectconfig.cpp10
-rw-r--r--kopete/plugins/texteffect/texteffectconfig.h8
-rw-r--r--kopete/plugins/texteffect/texteffectplugin.cpp18
-rw-r--r--kopete/plugins/texteffect/texteffectplugin.h8
-rw-r--r--kopete/plugins/texteffect/texteffectpreferences.cpp66
-rw-r--r--kopete/plugins/texteffect/texteffectpreferences.h4
-rw-r--r--kopete/plugins/translator/translatordialog.cpp4
-rw-r--r--kopete/plugins/translator/translatordialog.h6
-rw-r--r--kopete/plugins/translator/translatorguiclient.cpp22
-rw-r--r--kopete/plugins/translator/translatorguiclient.h6
-rw-r--r--kopete/plugins/translator/translatorlanguages.cpp6
-rw-r--r--kopete/plugins/translator/translatorlanguages.h34
-rw-r--r--kopete/plugins/translator/translatorplugin.cpp108
-rw-r--r--kopete/plugins/translator/translatorplugin.h30
-rw-r--r--kopete/plugins/translator/translatorprefs.cpp8
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.cpp98
-rw-r--r--kopete/plugins/webpresence/webpresenceplugin.h16
-rw-r--r--kopete/plugins/webpresence/webpresencepreferences.cpp10
-rw-r--r--kopete/plugins/webpresence/webpresencepreferences.h2
145 files changed, 2027 insertions, 2027 deletions
diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
index fae164f1..113ec95e 100644
--- a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
+++ b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp
@@ -12,9 +12,9 @@
#include <kdebug.h>
#include <kbookmark.h>
-#include <qvariant.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqvariant.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include "addbookmarksplugin.moc"
#include "addbookmarksplugin.h"
@@ -39,11 +39,11 @@ static bool isURLInGroup(const KURL& url, const KBookmarkGroup& group)
return false;
}
-BookmarksPlugin::BookmarksPlugin(QObject *parent, const char *name, const QStringList &/*args*/)
+BookmarksPlugin::BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &/*args*/)
: Kopete::Plugin(BookmarksPluginFactory::instance(), parent, name)
{
//kdDebug(14501) << "plugin loading" << endl;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, TQT_SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) );
}
/*!
@@ -75,16 +75,16 @@ void BookmarksPlugin::slotBookmarkURLsInMessage(Kopete::Message & msg)
delete URLsList;
}
-void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data )
+void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data )
{
- QTextCodec *codec = getPageEncoding( data );
- QString htmlpage = codec->toUnicode( data );
- QRegExp rx("<title>([^<]*){1,96}</title>");
+ TQTextCodec *codec = getPageEncoding( data );
+ TQString htmlpage = codec->toUnicode( data );
+ TQRegExp rx("<title>([^<]*){1,96}</title>");
rx.setCaseSensitive(false);
int pos = rx.search( htmlpage );
KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager();
KBookmarkGroup group = getKopeteFolder();
- QString sender = m_map[(KIO::TransferJob*)transfer].sender;
+ TQString sender = m_map[(KIO::TransferJob*)transfer].sender;
if ( m_settings.useSubfolderForContact( sender ) )
group = getFolder( group, sender );
@@ -102,10 +102,10 @@ void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArra
transfer->kill();
}
-KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text )
+KURL::List* BookmarksPlugin::extractURLsFromString( const TQString& text )
{
KURL::List *list = new KURL::List;
- QRegExp rx("<a href=\"[^\\s\"]+\"");
+ TQRegExp rx("<a href=\"[^\\s\"]+\"");
int pos=0;
KURL url;
@@ -119,7 +119,7 @@ KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text )
return list;
}
-void BookmarksPlugin::addKopeteBookmark( const KURL& url, const QString& sender )
+void BookmarksPlugin::addKopeteBookmark( const KURL& url, const TQString& sender )
{
KBookmarkGroup group = getKopeteFolder();
@@ -133,8 +133,8 @@ void BookmarksPlugin::addKopeteBookmark( const KURL& url, const QString& sender
// make asynchronous transfer to avoid GUI freezing due to overloaded web servers
transfer = KIO::get(url, false, false);
transfer->setInteractive(false);
- connect ( transfer, SIGNAL ( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT ( slotAddKopeteBookmark( KIO::Job *, const QByteArray & ) ) );
+ connect ( transfer, TQT_SIGNAL ( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT ( slotAddKopeteBookmark( KIO::Job *, const TQByteArray & ) ) );
m_map[transfer].url = url;
m_map[transfer].sender = sender;
}
@@ -144,10 +144,10 @@ KBookmarkGroup BookmarksPlugin::getKopeteFolder()
{
KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager();
- return getFolder( mgr->root(), QString::fromLatin1("kopete") );
+ return getFolder( mgr->root(), TQString::fromLatin1("kopete") );
}
-KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString& folder )
+KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const TQString& folder )
{
KBookmark bookmark;
@@ -163,16 +163,16 @@ KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString&
return group;
}
-QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data )
+TQTextCodec* BookmarksPlugin::getPageEncoding( const TQByteArray& data )
{
- QString temp = QString::fromLatin1(data);
- QRegExp rx("<meta[^>]*(charset|CHARSET)\\s*=\\s*[^>]*>");
+ TQString temp = TQString::fromLatin1(data);
+ TQRegExp rx("<meta[^>]*(charset|CHARSET)\\s*=\\s*[^>]*>");
int pos = rx.search( temp );
- QTextCodec *codec;
+ TQTextCodec *codec;
if( pos == -1 ){
kdDebug( 14501 ) << "charset not found in first data chunk" << endl;
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
//kdDebug(14501) << temp.mid(pos, rx.matchedLength()) << endl;
temp = temp.mid(pos, rx.matchedLength()-1);
@@ -181,9 +181,9 @@ QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data )
for( pos = 0 ; temp[pos].isLetterOrNumber() || temp[pos] == '-' ; pos++ );
temp = temp.left( pos );
//kdDebug(14501) << "encoding: " << temp << endl;
- codec = QTextCodec::codecForName( temp.latin1() );
+ codec = TQTextCodec::codecForName( temp.latin1() );
if( !codec ){
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
return codec;
}
diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.h b/kopete/plugins/addbookmarks/addbookmarksplugin.h
index 4c425b9f..459c1b8b 100644
--- a/kopete/plugins/addbookmarks/addbookmarksplugin.h
+++ b/kopete/plugins/addbookmarks/addbookmarksplugin.h
@@ -17,8 +17,8 @@
#include <kopeteplugin.h>
#include <kbookmarkmanager.h>
#include <kio/job.h>
-#include <qcstring.h>
-#include <qmap.h>
+#include <tqcstring.h>
+#include <tqmap.h>
/**
@author Roie Kerstein <sf_kersteinroie@bezeqint.net>
@@ -28,27 +28,27 @@ class BookmarksPlugin : public Kopete::Plugin
{
Q_OBJECT
public:
- BookmarksPlugin(QObject *parent, const char *name, const QStringList &args);
+ BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &args);
private:
typedef struct S_URLANDNAME{
KURL url;
- QString sender;
+ TQString sender;
} URLandName;
- typedef QMap<KIO::TransferJob*,URLandName> JobsToURLsMap;
+ typedef TQMap<KIO::TransferJob*,URLandName> JobsToURLsMap;
JobsToURLsMap m_map;
BookmarksPrefsSettings m_settings;
- void addKopeteBookmark( const KURL& url, const QString& sender );
- KURL::List* extractURLsFromString( const QString& text );
+ void addKopeteBookmark( const KURL& url, const TQString& sender );
+ KURL::List* extractURLsFromString( const TQString& text );
KBookmarkGroup getKopeteFolder();
- KBookmarkGroup getFolder( KBookmarkGroup group, const QString& folder );
- QTextCodec* getPageEncoding( const QByteArray& data );
+ KBookmarkGroup getFolder( KBookmarkGroup group, const TQString& folder );
+ TQTextCodec* getPageEncoding( const TQByteArray& data );
public slots:
void slotBookmarkURLsInMessage(Kopete::Message & msg);
void slotReloadSettings();
private slots:
- void slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data );
+ void slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data );
};
typedef KGenericFactory<BookmarksPlugin> BookmarksPluginFactory;
diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp
index 12ebd877..69b7fc1b 100644
--- a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp
+++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp
@@ -15,32 +15,32 @@
#include <kgenericfactory.h>
#include <kopetepluginmanager.h>
#include <kopetecontactlist.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qlistbox.h>
-#include <qnamespace.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqlistbox.h>
+#include <tqnamespace.h>
+#include <tqradiobutton.h>
typedef KGenericFactory<BookmarksPreferences> BookmarksPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_addbookmarks, BookmarksPreferencesFactory("kcm_kopete_addbookmarks") )
-BookmarksPreferences::BookmarksPreferences(QWidget *parent, const char *name, const QStringList &args)
+BookmarksPreferences::BookmarksPreferences(TQWidget *parent, const char *name, const TQStringList &args)
: KCModule(BookmarksPreferencesFactory::instance(), parent, args)
{
Q_UNUSED( name );
- ( new QVBoxLayout (this) )->setAutoAdd( true );
+ ( new TQVBoxLayout (this) )->setAutoAdd( true );
p_dialog = new BookmarksPrefsUI( this );
load();
- connect( p_dialog->yesButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->noButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->onlySelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->onlyNotSelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() ));
- connect( p_dialog->contactList, SIGNAL( selectionChanged() ), this, SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->yesButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->noButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->onlySelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->onlyNotSelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() ));
+ connect( p_dialog->contactList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSetStatusChanged() ));
if(Kopete::PluginManager::self()->plugin("kopete_addbookmarks") )
- connect( this, SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , SLOT(slotReloadSettings()));
- connect( p_dialog->m_addUntrusted, SIGNAL( toggled(bool) ), this, SLOT( slotAddUntrustedChanged() ) );
+ connect( this, TQT_SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , TQT_SLOT(slotReloadSettings()));
+ connect( p_dialog->m_addUntrusted, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotAddUntrustedChanged() ) );
}
@@ -50,8 +50,8 @@ BookmarksPreferences::~BookmarksPreferences()
void BookmarksPreferences::save()
{
- QStringList list;
- QStringList::iterator it;
+ TQStringList list;
+ TQStringList::iterator it;
m_settings.setFolderForEachContact( (BookmarksPrefsSettings::UseSubfolders)p_dialog->buttonGroup1->selectedId() );
@@ -87,15 +87,15 @@ void BookmarksPreferences::slotAddUntrustedChanged()
void BookmarksPreferences::load()
{
- QStringList list;
- QStringList::iterator it;
- QListBoxItem* item;
+ TQStringList list;
+ TQStringList::iterator it;
+ TQListBoxItem* item;
m_settings.load();
p_dialog->buttonGroup1->setButton(m_settings.isFolderForEachContact());
p_dialog->m_addUntrusted->setChecked( m_settings.addBookmarksFromUnknownContacts() );
if( p_dialog->contactList->count() == 0 ){
- QStringList contacts = Kopete::ContactList::self()->contacts();
+ TQStringList contacts = Kopete::ContactList::self()->contacts();
contacts.sort();
p_dialog->contactList->insertStringList( contacts );
}
diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.h b/kopete/plugins/addbookmarks/addbookmarkspreferences.h
index 7a9d5bff..30c94b70 100644
--- a/kopete/plugins/addbookmarks/addbookmarkspreferences.h
+++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.h
@@ -23,7 +23,7 @@ class BookmarksPreferences : public KCModule
{
Q_OBJECT
public:
- BookmarksPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ BookmarksPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
~BookmarksPreferences();
diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp
index 045ce801..34d921c3 100644
--- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp
+++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp
@@ -15,8 +15,8 @@
#include "addbookmarksprefssettings.h"
-BookmarksPrefsSettings::BookmarksPrefsSettings(QObject *parent, const char *name)
- : QObject(parent, name)
+BookmarksPrefsSettings::BookmarksPrefsSettings(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
load();
}
@@ -61,7 +61,7 @@ void BookmarksPrefsSettings::save()
configfile->sync();
}
-bool BookmarksPrefsSettings::useSubfolderForContact( QString nickname )
+bool BookmarksPrefsSettings::useSubfolderForContact( TQString nickname )
{
if ( !nickname.isEmpty() )
{
diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h
index 2d82e7c4..659f3c69 100644
--- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h
+++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h
@@ -12,8 +12,8 @@
#ifndef ADDBOOKMARKSPREFSSETTINGS_H
#define ADDBOOKMARKSPREFSSETTINGS_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
/**
@author Roie Kerstein <sf_kersteinroie@bezeqint.net>
@@ -24,7 +24,7 @@ Q_OBJECT
public:
enum UseSubfolders { Always=0, Never=1, SelectedContacts=2, UnselectedContacts=3 };
- BookmarksPrefsSettings(QObject *parent = 0, const char *name = 0);
+ BookmarksPrefsSettings(TQObject *parent = 0, const char *name = 0);
~BookmarksPrefsSettings();
@@ -32,9 +32,9 @@ public:
void save();
UseSubfolders isFolderForEachContact() {return m_isfolderforeachcontact;}
void setFolderForEachContact(UseSubfolders val) {m_isfolderforeachcontact = val;}
- bool useSubfolderForContact( QString nickname );
- QStringList getContactsList() {return m_contactslist;}
- void setContactsList(QStringList list) {m_contactslist = list;}
+ bool useSubfolderForContact( TQString nickname );
+ TQStringList getContactsList() {return m_contactslist;}
+ void setContactsList(TQStringList list) {m_contactslist = list;}
bool addBookmarksFromUnknownContacts() { return m_addbookmarksfromunknowns; };
void setAddBookmarksFromUnknownContacts( bool );
@@ -42,7 +42,7 @@ private:
bool m_folderPerContact;
bool m_addbookmarksfromunknowns;
UseSubfolders m_isfolderforeachcontact;
- QStringList m_contactslist;
+ TQStringList m_contactslist;
};
diff --git a/kopete/plugins/alias/aliasplugin.cpp b/kopete/plugins/alias/aliasplugin.cpp
index 1594a836..52a8511b 100644
--- a/kopete/plugins/alias/aliasplugin.cpp
+++ b/kopete/plugins/alias/aliasplugin.cpp
@@ -17,7 +17,7 @@ typedef KGenericFactory<AliasPlugin> AliasPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_alias, AliasPluginFactory( "kopete_alias" ) )
AliasPlugin * AliasPlugin::pluginStatic_ = 0L;
-AliasPlugin::AliasPlugin( QObject *parent, const char * name, const QStringList & )
+AliasPlugin::AliasPlugin( TQObject *parent, const char * name, const TQStringList & )
: Kopete::Plugin( AliasPluginFactory::instance(), parent, name )
{
if( !pluginStatic_ )
diff --git a/kopete/plugins/alias/aliasplugin.h b/kopete/plugins/alias/aliasplugin.h
index 8e55dc20..cf53c791 100644
--- a/kopete/plugins/alias/aliasplugin.h
+++ b/kopete/plugins/alias/aliasplugin.h
@@ -19,7 +19,7 @@ class AliasPlugin : public Kopete::Plugin
public:
static AliasPlugin *plugin();
- AliasPlugin( QObject *parent, const char *name, const QStringList &args );
+ AliasPlugin( TQObject *parent, const char *name, const TQStringList &args );
~AliasPlugin();
private:
diff --git a/kopete/plugins/alias/aliaspreferences.cpp b/kopete/plugins/alias/aliaspreferences.cpp
index 65342ddf..a331a592 100644
--- a/kopete/plugins/alias/aliaspreferences.cpp
+++ b/kopete/plugins/alias/aliaspreferences.cpp
@@ -15,11 +15,11 @@
#include <kgenericfactory.h>
#include <kmessagebox.h>
#include <kconfig.h>
-#include <qregexp.h>
-#include <qlayout.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
#include <kplugininfo.h>
#include <kiconloader.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kopetecommandhandler.h"
#include "kopetepluginmanager.h"
@@ -35,11 +35,11 @@ typedef KGenericFactory<AliasPreferences> AliasPreferencesFactory;
class AliasItem : public QListViewItem
{
public:
- AliasItem( QListView *parent,
+ AliasItem( TQListView *parent,
uint number,
- const QString &alias,
- const QString &command, const ProtocolList &p ) :
- QListViewItem( parent, alias, command )
+ const TQString &alias,
+ const TQString &command, const ProtocolList &p ) :
+ TQListViewItem( parent, alias, command )
{
protocolList = p;
id = number;
@@ -49,7 +49,7 @@ class AliasItem : public QListViewItem
uint id;
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align )
{
if ( column == 2 )
@@ -58,18 +58,18 @@ class AliasItem : public QListViewItem
if ( cellWidth < 0 )
cellWidth = 0;
- QListViewItem::paintCell( p, cg, column, cellWidth, align );
+ TQListViewItem::paintCell( p, cg, column, cellWidth, align );
// Draw the rest of the background
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
int marg = lv->itemMargin();
int r = marg;
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole =
- QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole =
+ TQPalette::backgroundRoleFromMode( bgmode );
p->fillRect( cellWidth, 0, width - cellWidth, height(),
cg.brush( crole ) );
@@ -77,7 +77,7 @@ class AliasItem : public QListViewItem
{
p->fillRect( QMAX( cellWidth, r - marg ), 0,
width - cellWidth - r + marg, height(),
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
if ( isEnabled() || !lv )
p->setPen( cg.highlightedText() );
else if ( !isEnabled() && lv )
@@ -90,7 +90,7 @@ class AliasItem : public QListViewItem
for ( ProtocolList::Iterator it = protocolList.begin();
it != protocolList.end(); ++it )
{
- QPixmap icon = SmallIcon( (*it)->pluginIcon() );
+ TQPixmap icon = SmallIcon( (*it)->pluginIcon() );
p->drawPixmap( mc_x + 4, height() - 16,
icon );
mc_x += 16;
@@ -99,7 +99,7 @@ class AliasItem : public QListViewItem
else
{
// Use Qt's own drawing
- QListViewItem::paintCell( p, cg, column, width, align );
+ TQListViewItem::paintCell( p, cg, column, width, align );
}
}
};
@@ -107,39 +107,39 @@ class AliasItem : public QListViewItem
class ProtocolItem : public QListViewItem
{
public:
- ProtocolItem( QListView *parent, KPluginInfo *p ) :
- QListViewItem( parent, p->name() )
+ ProtocolItem( TQListView *parent, KPluginInfo *p ) :
+ TQListViewItem( parent, p->name() )
{
this->setPixmap( 0, SmallIcon( p->icon() ) );
id = p->pluginName();
}
- QString id;
+ TQString id;
};
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_alias, AliasPreferencesFactory( "kcm_kopete_alias" ) )
-AliasPreferences::AliasPreferences( QWidget *parent, const char *, const QStringList &args )
+AliasPreferences::AliasPreferences( TQWidget *parent, const char *, const TQStringList &args )
: KCModule( AliasPreferencesFactory::instance(), parent, args )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new AliasDialogBase( this );
- connect( preferencesDialog->addButton, SIGNAL(clicked()), this, SLOT( slotAddAlias() ) );
- connect( preferencesDialog->editButton, SIGNAL(clicked()), this, SLOT( slotEditAlias() ) );
- connect( preferencesDialog->deleteButton, SIGNAL(clicked()), this, SLOT( slotDeleteAliases() ) );
- connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ),
- this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) );
+ connect( preferencesDialog->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddAlias() ) );
+ connect( preferencesDialog->editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotEditAlias() ) );
+ connect( preferencesDialog->deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotDeleteAliases() ) );
+ connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ),
+ this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) );
- connect( preferencesDialog->aliasList, SIGNAL(selectionChanged()),
- this, SLOT( slotCheckAliasSelected() ) );
+ connect( preferencesDialog->aliasList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT( slotCheckAliasSelected() ) );
load();
}
AliasPreferences::~AliasPreferences()
{
- QListViewItem *myChild = preferencesDialog->aliasList->firstChild();
+ TQListViewItem *myChild = preferencesDialog->aliasList->firstChild();
while( myChild )
{
ProtocolList protocols = static_cast<AliasItem*>( myChild )->protocolList;
@@ -162,15 +162,15 @@ void AliasPreferences::load()
if( config->hasGroup( "AliasPlugin" ) )
{
config->setGroup("AliasPlugin");
- QStringList aliases = config->readListEntry("AliasNames");
- for( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it )
+ TQStringList aliases = config->readListEntry("AliasNames");
+ for( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it )
{
uint aliasNumber = config->readUnsignedNumEntry( (*it) + "_id" );
- QString aliasCommand = config->readEntry( (*it) + "_command" );
- QStringList protocols = config->readListEntry( (*it) + "_protocols" );
+ TQString aliasCommand = config->readEntry( (*it) + "_command" );
+ TQStringList protocols = config->readListEntry( (*it) + "_protocols" );
ProtocolList protocolList;
- for( QStringList::Iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 )
+ for( TQStringList::Iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 )
{
Kopete::Plugin *p = Kopete::PluginManager::self()->plugin( *it2 );
protocolList.append( (Kopete::Protocol*)p );
@@ -193,25 +193,25 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin )
if( config->hasGroup( "AliasPlugin" ) )
{
config->setGroup("AliasPlugin");
- QStringList aliases = config->readListEntry("AliasNames");
- for( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it )
+ TQStringList aliases = config->readListEntry("AliasNames");
+ for( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it )
{
uint aliasNumber = config->readUnsignedNumEntry( (*it) + "_id" );
- QString aliasCommand = config->readEntry( (*it) + "_command" );
- QStringList protocols = config->readListEntry( (*it) + "_protocols" );
+ TQString aliasCommand = config->readEntry( (*it) + "_command" );
+ TQStringList protocols = config->readListEntry( (*it) + "_protocols" );
- for( QStringList::iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 )
+ for( TQStringList::iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 )
{
if( *it2 == protocol->pluginId() )
{
- QPair<Kopete::Protocol*, QString> pr( protocol, *it );
+ QPair<Kopete::Protocol*, TQString> pr( protocol, *it );
if( protocolMap.find( pr ) == protocolMap.end() )
{
Kopete::CommandHandler::commandHandler()->registerAlias(
protocol,
*it,
aliasCommand,
- QString::fromLatin1("Custom alias for %1").arg(aliasCommand),
+ TQString::fromLatin1("Custom alias for %1").arg(aliasCommand),
Kopete::CommandHandler::UserAlias
);
@@ -241,14 +241,14 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin )
void AliasPreferences::save()
{
KConfig *config = KGlobal::config();
- config->deleteGroup( QString::fromLatin1("AliasPlugin") );
- config->setGroup( QString::fromLatin1("AliasPlugin") );
+ config->deleteGroup( TQString::fromLatin1("AliasPlugin") );
+ config->setGroup( TQString::fromLatin1("AliasPlugin") );
- QStringList aliases;
+ TQStringList aliases;
AliasItem *item = (AliasItem*)preferencesDialog->aliasList->firstChild();
while( item )
{
- QStringList protocols;
+ TQStringList protocols;
for( ProtocolList::Iterator it = item->protocolList.begin();
it != item->protocolList.end(); ++it )
{
@@ -269,13 +269,13 @@ void AliasPreferences::save()
emit KCModule::changed(false);
}
-void AliasPreferences::addAlias( QString &alias, QString &command, const ProtocolList &p, uint id )
+void AliasPreferences::addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id )
{
- QRegExp spaces( QString::fromLatin1("\\s+") );
+ TQRegExp spaces( TQString::fromLatin1("\\s+") );
- if( alias.startsWith( QString::fromLatin1("/") ) )
+ if( alias.startsWith( TQString::fromLatin1("/") ) )
alias = alias.section( '/', 1 );
- if( command.startsWith( QString::fromLatin1("/") ) )
+ if( command.startsWith( TQString::fromLatin1("/") ) )
command = command.section( '/', 1 );
if( id == 0 )
@@ -286,13 +286,13 @@ void AliasPreferences::addAlias( QString &alias, QString &command, const Protoco
id = 1;
}
- QString newAlias = command.section( spaces, 0, 0 );
+ TQString newAlias = command.section( spaces, 0, 0 );
aliasMap.insert( alias, new AliasItem( preferencesDialog->aliasList, id, alias, command, p ) );
// count the number of arguments present in 'command'
- QRegExp rx( "(%\\d+)" );
- QStringList list;
+ TQRegExp rx( "(%\\d+)" );
+ TQStringList list;
int pos = 0;
while ( pos >= 0 ) {
pos = rx.search( command, pos );
@@ -309,13 +309,13 @@ void AliasPreferences::addAlias( QString &alias, QString &command, const Protoco
*it,
alias,
command,
- QString::fromLatin1("Custom alias for %1").arg(command),
+ TQString::fromLatin1("Custom alias for %1").arg(command),
Kopete::CommandHandler::UserAlias,
0,
argc
);
- protocolMap.insert( QPair<Kopete::Protocol*,QString>( *it, alias ), true );
+ protocolMap.insert( QPair<Kopete::Protocol*,TQString>( *it, alias ), true );
}
}
@@ -325,13 +325,13 @@ void AliasPreferences::slotAddAlias()
loadProtocols( &addDialog );
addDialog.addButton->setText( i18n("&Add") );
- if( addDialog.exec() == QDialog::Accepted )
+ if( addDialog.exec() == TQDialog::Accepted )
{
- QString alias = addDialog.alias->text();
- if( alias.startsWith( QString::fromLatin1("/") ) )
+ TQString alias = addDialog.alias->text();
+ if( alias.startsWith( TQString::fromLatin1("/") ) )
alias = alias.section( '/', 1 );
- if( alias.contains( QRegExp("[_=]") ) )
+ if( alias.contains( TQRegExp("[_=]") ) )
{
KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. An"
" alias name cannot contain the characters \"_\" or \"=\"."
@@ -339,7 +339,7 @@ void AliasPreferences::slotAddAlias()
}
else
{
- QString command = addDialog.command->text();
+ TQString command = addDialog.command->text();
ProtocolList protocols = selectedProtocols( &addDialog );
// Loop through selected protocols
@@ -367,7 +367,7 @@ void AliasPreferences::slotAddAlias()
const ProtocolList AliasPreferences::selectedProtocols( EditAliasDialog *dialog )
{
ProtocolList protocolList;
- QListViewItem *item = dialog->protocolList->firstChild();
+ TQListViewItem *item = dialog->protocolList->firstChild();
while( item )
{
@@ -390,8 +390,8 @@ const ProtocolList AliasPreferences::selectedProtocols( EditAliasDialog *dialog
void AliasPreferences::loadProtocols( EditAliasDialog *dialog )
{
- QValueList<KPluginInfo*> plugins = Kopete::PluginManager::self()->availablePlugins("Protocols");
- for( QValueList<KPluginInfo*>::Iterator it = plugins.begin(); it != plugins.end(); ++it )
+ TQValueList<KPluginInfo*> plugins = Kopete::PluginManager::self()->availablePlugins("Protocols");
+ for( TQValueList<KPluginInfo*>::Iterator it = plugins.begin(); it != plugins.end(); ++it )
{
ProtocolItem *item = new ProtocolItem( dialog->protocolList, *it );
itemMap[ (Kopete::Protocol*)Kopete::PluginManager::self()->plugin( (*it)->pluginName() ) ] = item;
@@ -403,10 +403,10 @@ void AliasPreferences::slotEditAlias()
EditAliasDialog editDialog;
loadProtocols( &editDialog );
- QListViewItem *item = preferencesDialog->aliasList->selectedItems().first();
+ TQListViewItem *item = preferencesDialog->aliasList->selectedItems().first();
if( item )
{
- QString oldAlias = item->text(0);
+ TQString oldAlias = item->text(0);
editDialog.alias->setText( oldAlias );
editDialog.command->setText( item->text(1) );
ProtocolList protocols = static_cast<AliasItem*>( item )->protocolList;
@@ -415,12 +415,12 @@ void AliasPreferences::slotEditAlias()
itemMap[ *it ]->setSelected( true );
}
- if( editDialog.exec() == QDialog::Accepted )
+ if( editDialog.exec() == TQDialog::Accepted )
{
- QString alias = editDialog.alias->text();
- if( alias.startsWith( QString::fromLatin1("/") ) )
+ TQString alias = editDialog.alias->text();
+ if( alias.startsWith( TQString::fromLatin1("/") ) )
alias = alias.section( '/', 1 );
- if( alias.contains( QRegExp("[_=]") ) )
+ if( alias.contains( TQRegExp("[_=]") ) )
{
KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. An"
" alias name cannot contain the characters \"_\" or \"=\"."
@@ -428,7 +428,7 @@ void AliasPreferences::slotEditAlias()
}
else
{
- QString command = editDialog.command->text();
+ TQString command = editDialog.command->text();
if( alias == oldAlias )
{
@@ -468,8 +468,8 @@ void AliasPreferences::slotDeleteAliases()
{
if( KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete the selected aliases?"), i18n("Delete Aliases"), KGuiItem(i18n("Delete"), "editdelete") ) == KMessageBox::Continue )
{
- QPtrList< QListViewItem > items = preferencesDialog->aliasList->selectedItems();
- for( QListViewItem *i = items.first(); i; i = items.next() )
+ TQPtrList< TQListViewItem > items = preferencesDialog->aliasList->selectedItems();
+ for( TQListViewItem *i = items.first(); i; i = items.next() )
{
ProtocolList protocols = static_cast<AliasItem*>( i )->protocolList;
for( ProtocolList::Iterator it = protocols.begin(); it != protocols.end(); ++it )
@@ -479,7 +479,7 @@ void AliasPreferences::slotDeleteAliases()
i->text(0)
);
- protocolMap.erase( QPair<Kopete::Protocol*,QString>( *it, i->text(0) ) );
+ protocolMap.erase( QPair<Kopete::Protocol*,TQString>( *it, i->text(0) ) );
}
aliasMap.erase( i->text(0) );
diff --git a/kopete/plugins/alias/aliaspreferences.h b/kopete/plugins/alias/aliaspreferences.h
index 330553a3..9ad25f38 100644
--- a/kopete/plugins/alias/aliaspreferences.h
+++ b/kopete/plugins/alias/aliaspreferences.h
@@ -12,7 +12,7 @@
#include "kcmodule.h"
-typedef QValueList<Kopete::Protocol*> ProtocolList;
+typedef TQValueList<Kopete::Protocol*> ProtocolList;
class AliasDialogBase;
namespace Kopete { class Protocol; }
@@ -26,8 +26,8 @@ class AliasPreferences : public KCModule
Q_OBJECT
public:
- AliasPreferences( QWidget *parent = 0, const char *name = 0,
- const QStringList &args = QStringList() );
+ AliasPreferences( TQWidget *parent = 0, const char *name = 0,
+ const TQStringList &args = TQStringList() );
~AliasPreferences();
virtual void save();
@@ -42,12 +42,12 @@ class AliasPreferences : public KCModule
private:
AliasDialogBase * preferencesDialog;
- void addAlias( QString &alias, QString &command, const ProtocolList &p, uint id = 0 );
+ void addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id = 0 );
void loadProtocols( EditAliasDialog *dialog );
const ProtocolList selectedProtocols( EditAliasDialog *dialog );
- QMap<Kopete::Protocol*,ProtocolItem*> itemMap;
- QMap<QPair<Kopete::Protocol*,QString>, bool> protocolMap;
- QMap<QString,AliasItem*> aliasMap;
+ TQMap<Kopete::Protocol*,ProtocolItem*> itemMap;
+ TQMap<QPair<Kopete::Protocol*,TQString>, bool> protocolMap;
+ TQMap<TQString,AliasItem*> aliasMap;
};
#endif
diff --git a/kopete/plugins/alias/editaliasdialog.cpp b/kopete/plugins/alias/editaliasdialog.cpp
index 42eb2f4b..6acdf153 100644
--- a/kopete/plugins/alias/editaliasdialog.cpp
+++ b/kopete/plugins/alias/editaliasdialog.cpp
@@ -16,20 +16,20 @@
*/
#include "editaliasdialog.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kpushbutton.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <klineedit.h>
#include <klistview.h>
-EditAliasDialog::EditAliasDialog( QWidget* parent, const char* name )
+EditAliasDialog::EditAliasDialog( TQWidget* parent, const char* name )
: AliasDialog( parent, name )
{
- QObject::connect( alias, SIGNAL( textChanged( const QString& ) ), this, SLOT( checkButtonsEnabled() ) );
- QObject::connect( command, SIGNAL( textChanged( const QString& ) ), this, SLOT( checkButtonsEnabled() ) );
- QObject::connect( protocolList, SIGNAL( selectionChanged() ), this, SLOT( checkButtonsEnabled() ) );
+ TQObject::connect( alias, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) );
+ TQObject::connect( command, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) );
+ TQObject::connect( protocolList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( checkButtonsEnabled() ) );
checkButtonsEnabled();
}
diff --git a/kopete/plugins/alias/editaliasdialog.h b/kopete/plugins/alias/editaliasdialog.h
index 869e8903..da3caf4b 100644
--- a/kopete/plugins/alias/editaliasdialog.h
+++ b/kopete/plugins/alias/editaliasdialog.h
@@ -26,7 +26,7 @@ class EditAliasDialog : public AliasDialog
{
Q_OBJECT
public:
- EditAliasDialog( QWidget* parent = 0, const char* name = 0 );
+ EditAliasDialog( TQWidget* parent = 0, const char* name = 0 );
virtual ~EditAliasDialog();
public slots:
diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.cpp b/kopete/plugins/autoreplace/autoreplaceconfig.cpp
index 0407990a..2537f44a 100644
--- a/kopete/plugins/autoreplace/autoreplaceconfig.cpp
+++ b/kopete/plugins/autoreplace/autoreplaceconfig.cpp
@@ -33,7 +33,7 @@ void AutoReplaceConfig::load()
KConfig *config = KGlobal::config();
config->setGroup( "AutoReplace Plugin" );
- QStringList wordsList = config->readListEntry( "WordsToReplace" );
+ TQStringList wordsList = config->readListEntry( "WordsToReplace" );
if( wordsList.isEmpty() )
{
// basic list, key/value
@@ -44,8 +44,8 @@ void AutoReplaceConfig::load()
// we may be reloading after removing an entry from the list
m_map.clear();
- QString k, v;
- for ( QStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it )
+ TQString k, v;
+ for ( TQStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it )
{
k = *it;
++it;
@@ -61,18 +61,18 @@ void AutoReplaceConfig::load()
m_upper = config->readBoolEntry( "CapitalizeBeginningSentence" , false );
}
-QStringList AutoReplaceConfig::defaultAutoReplaceList()
+TQStringList AutoReplaceConfig::defaultAutoReplaceList()
{
- return QStringList::split( ",", i18n( "list_of_words_to_replace",
+ return TQStringList::split( ",", i18n( "list_of_words_to_replace",
"ur,your,r,are,u,you,theres,there is,arent,are not,dont,do not" ) );
}
void AutoReplaceConfig::loadDefaultAutoReplaceList()
{
- QStringList wordsList = defaultAutoReplaceList();
+ TQStringList wordsList = defaultAutoReplaceList();
m_map.clear();
- QString k, v;
- for ( QStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it )
+ TQString k, v;
+ for ( TQStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it )
{
k = *it;
v = *( ++it );
@@ -116,7 +116,7 @@ void AutoReplaceConfig::save()
KConfig * config = KGlobal::config();
config->setGroup( "AutoReplace Plugin" );
- QStringList newWords;
+ TQStringList newWords;
WordsToReplace::Iterator it;
for ( it = m_map.begin(); it != m_map.end(); ++it )
{
diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.h b/kopete/plugins/autoreplace/autoreplaceconfig.h
index 62b11fbf..b819098e 100644
--- a/kopete/plugins/autoreplace/autoreplaceconfig.h
+++ b/kopete/plugins/autoreplace/autoreplaceconfig.h
@@ -16,9 +16,9 @@
*************************************************************************
*/
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#ifndef AutoReplaceConfig_H
#define AutoReplaceConfig_H
@@ -31,7 +31,7 @@ public:
void save();
void load();
- typedef QMap<QString, QString> WordsToReplace;
+ typedef TQMap<TQString, TQString> WordsToReplace;
WordsToReplace map() const;
bool autoReplaceIncoming() const;
@@ -40,7 +40,7 @@ public:
bool capitalizeBeginningSentence() const;
void setMap( const WordsToReplace &w );
- QStringList defaultAutoReplaceList();
+ TQStringList defaultAutoReplaceList();
void loadDefaultAutoReplaceList();
private:
diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.cpp b/kopete/plugins/autoreplace/autoreplaceplugin.cpp
index c06bc0bd..f3610a7f 100644
--- a/kopete/plugins/autoreplace/autoreplaceplugin.cpp
+++ b/kopete/plugins/autoreplace/autoreplaceplugin.cpp
@@ -29,7 +29,7 @@ typedef KGenericFactory<AutoReplacePlugin> AutoReplacePluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_autoreplace, AutoReplacePluginFactory( "kopete_autoreplace" ) )
AutoReplacePlugin * AutoReplacePlugin::pluginStatic_ = 0L;
-AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const QStringList & )
+AutoReplacePlugin::AutoReplacePlugin( TQObject *parent, const char * name, const TQStringList & )
: Kopete::Plugin( AutoReplacePluginFactory::instance(), parent, name )
{
if( !pluginStatic_ )
@@ -37,16 +37,16 @@ AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const
m_prefs = new AutoReplaceConfig;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ),
- this, SLOT( slotAboutToSend( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ this, TQT_SLOT( slotAboutToSend( Kopete::Message & ) ) );
// nb this connection causes the slot to be called on in- and outbound
// messages which suggests something is broken in the message handler
// system!
m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound,
- Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotAboutToSend( Kopete::Message& ) ) );
+ Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotAboutToSend( Kopete::Message& ) ) );
- connect( this, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) );
+ connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotSettingsChanged() ) );
}
AutoReplacePlugin::~AutoReplacePlugin()
@@ -71,21 +71,21 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg )
if ( ( msg.direction() == Kopete::Message::Outbound && m_prefs->autoReplaceOutgoing() ) ||
( msg.direction() == Kopete::Message::Inbound && m_prefs->autoReplaceIncoming() ) )
{
- QString replaced_message = msg.plainBody();
+ TQString replaced_message = msg.plainBody();
AutoReplaceConfig::WordsToReplace map = m_prefs->map();
// replaces all matched words --> try to find a more 'economic' way
// "\\b(%1)\\b" doesn't work when substituting /me.
- QString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)";
+ TQString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)";
AutoReplaceConfig::WordsToReplace::Iterator it;
bool isReplaced=false;
for ( it = map.begin(); it != map.end(); ++it )
{
- QRegExp re( match.arg( QRegExp::escape( it.key() ) ) );
+ TQRegExp re( match.arg( TQRegExp::escape( it.key() ) ) );
if( re.search( replaced_message ) != -1 )
{
- QString before = re.cap(1);
- QString after = re.cap(3);
+ TQString before = re.cap(1);
+ TQString after = re.cap(3);
replaced_message.replace( re, before + map.find( it.key() ).data() + after );
isReplaced=true;
}
@@ -99,10 +99,10 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg )
{
if ( m_prefs->dotEndSentence() )
{
- QString replaced_message = msg.plainBody();
+ TQString replaced_message = msg.plainBody();
// eventually add . at the end of the lines, sent lines only
- replaced_message.replace( QRegExp( "([a-z])$" ), "\\1." );
- // replaced_message.replace(QRegExp( "([\\w])$" ), "\\1." );
+ replaced_message.replace( TQRegExp( "([a-z])$" ), "\\1." );
+ // replaced_message.replace(TQRegExp( "([\\w])$" ), "\\1." );
// the message is now the one with replaced words
msg.setBody( replaced_message, Kopete::Message::PlainText );
@@ -110,7 +110,7 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg )
if( m_prefs->capitalizeBeginningSentence() )
{
- QString replaced_message = msg.plainBody();
+ TQString replaced_message = msg.plainBody();
// eventually start each sent line with capital letter
// TODO ". " "? " "! "
replaced_message[ 0 ] = replaced_message.at( 0 ).upper();
diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.h b/kopete/plugins/autoreplace/autoreplaceplugin.h
index 750f0614..7d9bcedf 100644
--- a/kopete/plugins/autoreplace/autoreplaceplugin.h
+++ b/kopete/plugins/autoreplace/autoreplaceplugin.h
@@ -18,10 +18,10 @@
#ifndef AutoReplacePLUGIN_H
#define AutoReplacePLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include "kopetemessage.h"
#include "kopeteplugin.h"
@@ -42,7 +42,7 @@ class AutoReplacePlugin : public Kopete::Plugin
public:
static AutoReplacePlugin *plugin();
- AutoReplacePlugin( QObject *parent, const char *name, const QStringList &args );
+ AutoReplacePlugin( TQObject *parent, const char *name, const TQStringList &args );
~AutoReplacePlugin();
private slots:
diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.cpp b/kopete/plugins/autoreplace/autoreplacepreferences.cpp
index 0a2a6b0f..4f852610 100644
--- a/kopete/plugins/autoreplace/autoreplacepreferences.cpp
+++ b/kopete/plugins/autoreplace/autoreplacepreferences.cpp
@@ -15,12 +15,12 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlistview.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlistview.h>
#include <klocale.h>
#include <klineedit.h>
@@ -36,10 +36,10 @@ typedef KGenericFactory<AutoReplacePreferences> AutoReplacePreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_autoreplace, AutoReplacePreferencesFactory( "kcm_kopete_autoreplace" ) )
-AutoReplacePreferences::AutoReplacePreferences( QWidget *parent, const char * /* name */, const QStringList &args )
+AutoReplacePreferences::AutoReplacePreferences( TQWidget *parent, const char * /* name */, const TQStringList &args )
: KCAutoConfigModule( AutoReplacePreferencesFactory::instance(), parent, args )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new AutoReplacePrefsUI( this );
// creates table columns (avoids new columns every time)
@@ -48,16 +48,16 @@ AutoReplacePreferences::AutoReplacePreferences( QWidget *parent, const char * /*
preferencesDialog->m_list->header()->setStretchEnabled( true , 1 );
// connect SIGNALS/SLOTS
- connect( preferencesDialog->m_add, SIGNAL(pressed()),
- SLOT( slotAddCouple()) );
- connect( preferencesDialog->m_edit, SIGNAL(pressed()),
- SLOT( slotEditCouple()) );
- connect( preferencesDialog->m_remove, SIGNAL(pressed()),
- SLOT(slotRemoveCouple()) );
- connect( preferencesDialog->m_list, SIGNAL(selectionChanged()),
- SLOT(slotSelectionChanged()) );
- connect( preferencesDialog->m_key, SIGNAL(textChanged ( const QString & )),
- SLOT( slotEnableAddEdit( const QString & )) );
+ connect( preferencesDialog->m_add, TQT_SIGNAL(pressed()),
+ TQT_SLOT( slotAddCouple()) );
+ connect( preferencesDialog->m_edit, TQT_SIGNAL(pressed()),
+ TQT_SLOT( slotEditCouple()) );
+ connect( preferencesDialog->m_remove, TQT_SIGNAL(pressed()),
+ TQT_SLOT(slotRemoveCouple()) );
+ connect( preferencesDialog->m_list, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotSelectionChanged()) );
+ connect( preferencesDialog->m_key, TQT_SIGNAL(textChanged ( const TQString & )),
+ TQT_SLOT( slotEnableAddEdit( const TQString & )) );
m_wordListChanged = false;
@@ -90,7 +90,7 @@ void AutoReplacePreferences::load()
for ( it = map.begin(); it != map.end(); ++it )
{
// notice: insertItem is called automatically by the constructor
- new QListViewItem( preferencesDialog->m_list, it.key(), it.data() );
+ new TQListViewItem( preferencesDialog->m_list, it.key(), it.data() );
}
m_wordListChanged = false;
@@ -102,7 +102,7 @@ void AutoReplacePreferences::save()
{
// make a list reading all values from gui
AutoReplaceConfig::WordsToReplace newWords;
- for ( QListViewItem * i = preferencesDialog->m_list->firstChild(); i != 0; i = i->nextSibling() )
+ for ( TQListViewItem * i = preferencesDialog->m_list->firstChild(); i != 0; i = i->nextSibling() )
newWords[ i->text( 0 ) ] = i->text( 1 );
// save the words list
@@ -116,16 +116,16 @@ void AutoReplacePreferences::save()
// read m_key m_value, create a QListViewItem
void AutoReplacePreferences::slotAddCouple()
{
- QString k = preferencesDialog->m_key->text();
- QString v = preferencesDialog->m_value->text();
+ TQString k = preferencesDialog->m_key->text();
+ TQString v = preferencesDialog->m_value->text();
if ( !k.isEmpty() && !k.isNull() && !v.isEmpty() && !v.isNull() )
{
- QListViewItem * lvi;
- QListViewItem * oldLvi = 0;
+ TQListViewItem * lvi;
+ TQListViewItem * oldLvi = 0;
// see if we are replacing an existing entry
if ( ( oldLvi = preferencesDialog->m_list->findItem( k, 0 ) ) )
delete oldLvi;
- lvi = new QListViewItem( preferencesDialog->m_list, k, v );
+ lvi = new TQListViewItem( preferencesDialog->m_list, k, v );
// Triggers a size, geometry and content update
// during the next iteration of the event loop
preferencesDialog->m_list->triggerUpdate();
@@ -140,9 +140,9 @@ void AutoReplacePreferences::slotAddCouple()
// edit the selected item
void AutoReplacePreferences::slotEditCouple()
{
- QString k = preferencesDialog->m_key->text();
- QString v = preferencesDialog->m_value->text();
- QListViewItem * lvi;
+ TQString k = preferencesDialog->m_key->text();
+ TQString v = preferencesDialog->m_value->text();
+ TQListViewItem * lvi;
if ( ( lvi = preferencesDialog->m_list->selectedItem() ) && !k.isEmpty() && !k.isNull() && !v.isEmpty() && !v.isNull() )
{
lvi->setText( 0, k );
@@ -163,7 +163,7 @@ void AutoReplacePreferences::slotRemoveCouple()
slotWidgetModified();
}
-void AutoReplacePreferences::slotEnableAddEdit( const QString & keyText )
+void AutoReplacePreferences::slotEnableAddEdit( const TQString & keyText )
{
preferencesDialog->m_add->setEnabled( !keyText.isEmpty() );
preferencesDialog->m_edit->setEnabled( !keyText.isEmpty() && preferencesDialog->m_list->selectedItem() );
@@ -171,7 +171,7 @@ void AutoReplacePreferences::slotEnableAddEdit( const QString & keyText )
void AutoReplacePreferences::slotSelectionChanged()
{
- QListViewItem *selection = 0;
+ TQListViewItem *selection = 0;
if ( ( selection = preferencesDialog->m_list->selectedItem() ) )
{
// enable the remove button
@@ -203,7 +203,7 @@ void AutoReplacePreferences::defaults()
for ( it = map.begin(); it != map.end(); ++it )
{
// notice: insertItem is called automatically by the constructor
- new QListViewItem( preferencesDialog->m_list, it.key(), it.data() );
+ new TQListViewItem( preferencesDialog->m_list, it.key(), it.data() );
}
m_wordListChanged = true;
slotWidgetModified();
diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.h b/kopete/plugins/autoreplace/autoreplacepreferences.h
index a08b2ba2..00638bfa 100644
--- a/kopete/plugins/autoreplace/autoreplacepreferences.h
+++ b/kopete/plugins/autoreplace/autoreplacepreferences.h
@@ -25,7 +25,7 @@ class AutoReplaceConfig;
// TODO
// add button enabled only when k and v are present
- // remove button enabled only when a QListViewItem is selected
+ // remove button enabled only when a TQListViewItem is selected
// signal/slot when map changes (needed?)
// capital letter not just at the beginning but always after ". ", "! "...
@@ -34,7 +34,7 @@ class AutoReplacePreferences : public KCAutoConfigModule
Q_OBJECT
public:
- AutoReplacePreferences( QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList() );
+ AutoReplacePreferences( TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList() );
~AutoReplacePreferences();
virtual void save();
@@ -46,7 +46,7 @@ private slots:
void slotAddCouple();
void slotEditCouple();
void slotRemoveCouple();
- void slotEnableAddEdit( const QString & );
+ void slotEnableAddEdit( const TQString & );
void slotSelectionChanged();
protected slots:
diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp
index 8840c893..33f4e3dd 100644
--- a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp
+++ b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp
@@ -17,7 +17,7 @@
#include "connectionstatusplugin.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -28,15 +28,15 @@
typedef KGenericFactory<ConnectionStatusPlugin> ConnectionStatusPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_connectionstatus, ConnectionStatusPluginFactory( "kopete_connectionstatus" ) )
-ConnectionStatusPlugin::ConnectionStatusPlugin( QObject *parent, const char *name, const QStringList& /* args */ )
+ConnectionStatusPlugin::ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList& /* args */ )
: Kopete::Plugin( ConnectionStatusPluginFactory::instance(), parent, name )
{
kdDebug( 14301 ) << k_funcinfo << endl;
m_process = 0L;
- m_timer = new QTimer();
- connect( m_timer, SIGNAL( timeout() ), this, SLOT( slotCheckStatus() ) );
+ m_timer = new TQTimer();
+ connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotCheckStatus() ) );
m_timer->start( 60000 );
m_pluginConnected = false;
@@ -61,7 +61,7 @@ void ConnectionStatusPlugin::slotCheckStatus()
return;
}
- m_buffer = QString::null;
+ m_buffer = TQString::null;
// Use KProcess to run netstat -rn. We'll then parse the output of
// netstat -rn in slotProcessStdout() to see if it mentions the
@@ -69,8 +69,8 @@ void ConnectionStatusPlugin::slotCheckStatus()
m_process = new KProcess;
*m_process << "netstat" << "-r";
- connect( m_process, SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, SLOT( slotProcessStdout( KProcess *, char *, int ) ) );
- connect( m_process, SIGNAL( processExited( KProcess * ) ), this, SLOT( slotProcessExited( KProcess * ) ) );
+ connect( m_process, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, TQT_SLOT( slotProcessStdout( KProcess *, char *, int ) ) );
+ connect( m_process, TQT_SIGNAL( processExited( KProcess * ) ), this, TQT_SLOT( slotProcessExited( KProcess * ) ) );
if ( !m_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) )
{
@@ -88,7 +88,7 @@ void ConnectionStatusPlugin::slotProcessExited( KProcess *process )
if ( process == m_process )
{
setConnectedStatus( m_buffer.contains( "default" ) );
- m_buffer = QString::null;
+ m_buffer = TQString::null;
delete m_process;
m_process = 0L;
}
@@ -98,7 +98,7 @@ void ConnectionStatusPlugin::slotProcessStdout( KProcess *, char *buffer, int bu
{
// Look for a default gateway
//kdDebug( 14301 ) << k_funcinfo << endl;
- m_buffer += QString::fromLatin1( buffer, buflen );
+ m_buffer += TQString::fromLatin1( buffer, buflen );
//kdDebug( 14301 ) << qsBuffer << endl;
}
diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.h b/kopete/plugins/connectionstatus/connectionstatusplugin.h
index 5f0a53bf..726176cb 100644
--- a/kopete/plugins/connectionstatus/connectionstatusplugin.h
+++ b/kopete/plugins/connectionstatus/connectionstatusplugin.h
@@ -31,7 +31,7 @@ class ConnectionStatusPlugin : public Kopete::Plugin
Q_OBJECT
public:
- ConnectionStatusPlugin( QObject *parent, const char *name, const QStringList &args );
+ ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList &args );
~ConnectionStatusPlugin();
private slots:
@@ -48,8 +48,8 @@ private:
bool m_pluginConnected;
KProcess *m_process;
- QTimer *m_timer;
- QString m_buffer;
+ TQTimer *m_timer;
+ TQString m_buffer;
};
#endif
diff --git a/kopete/plugins/contactnotes/contactnotesedit.cpp b/kopete/plugins/contactnotes/contactnotesedit.cpp
index f7333c7b..782476b9 100644
--- a/kopete/plugins/contactnotes/contactnotesedit.cpp
+++ b/kopete/plugins/contactnotes/contactnotesedit.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqvbox.h>
#include <klocale.h>
@@ -31,10 +31,10 @@ ContactNotesEdit::ContactNotesEdit(Kopete::MetaContact *m,ContactNotesPlugin *p,
m_plugin=p;
m_metaContact=m;
- QVBox *w=new QVBox(this);
+ TQVBox *w=new TQVBox(this);
w->setSpacing(KDialog::spacingHint());
- m_label = new QLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label");
- m_linesEdit= new QTextEdit ( w , "m_linesEdit");
+ m_label = new TQLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label");
+ m_linesEdit= new TQTextEdit ( w , "m_linesEdit");
m_linesEdit->setText(p->notes(m));
diff --git a/kopete/plugins/contactnotes/contactnotesedit.h b/kopete/plugins/contactnotes/contactnotesedit.h
index 20fe7d10..6af9178d 100644
--- a/kopete/plugins/contactnotes/contactnotesedit.h
+++ b/kopete/plugins/contactnotes/contactnotesedit.h
@@ -18,8 +18,8 @@
#ifndef CONTACTNOTESEDIT_H
#define CONTACTNOTESEDIT_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kdialogbase.h>
class QLabel;
@@ -41,13 +41,13 @@ private:
ContactNotesPlugin *m_plugin;
Kopete::MetaContact *m_metaContact;
- QLabel *m_label;
- QTextEdit *m_linesEdit;
+ TQLabel *m_label;
+ TQTextEdit *m_linesEdit;
protected slots: // Protected slots
virtual void slotOk();
signals: // Signals
- void notesChanged(const QString, Kopete::MetaContact*);
+ void notesChanged(const TQString, Kopete::MetaContact*);
};
#endif
diff --git a/kopete/plugins/contactnotes/contactnotesplugin.cpp b/kopete/plugins/contactnotes/contactnotesplugin.cpp
index 5982200f..ce67e663 100644
--- a/kopete/plugins/contactnotes/contactnotesplugin.cpp
+++ b/kopete/plugins/contactnotes/contactnotesplugin.cpp
@@ -29,7 +29,7 @@
typedef KGenericFactory<ContactNotesPlugin> ContactNotesPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_contactnotes, ContactNotesPluginFactory( "kopete_contactnotes" ) )
-ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+ContactNotesPlugin::ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( ContactNotesPluginFactory::instance(), parent, name )
{
if ( pluginStatic_ )
@@ -37,8 +37,8 @@ ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const char *name, const
else
pluginStatic_ = this;
- KAction *m_actionEdit=new KAction( i18n("&Notes"), "identity", 0, this, SLOT (slotEditInfo()), actionCollection() , "editContactNotes");
- connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , m_actionEdit , SLOT(setEnabled(bool)));
+ KAction *m_actionEdit=new KAction( i18n("&Notes"), "identity", 0, this, TQT_SLOT (slotEditInfo()), actionCollection() , "editContactNotes");
+ connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , m_actionEdit , TQT_SLOT(setEnabled(bool)));
m_actionEdit->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 );
setXMLFile("contactnotesui.rc");
@@ -63,18 +63,18 @@ void ContactNotesPlugin::slotEditInfo()
if(!m)
return;
ContactNotesEdit *e=new ContactNotesEdit(m,this);
- connect( e, SIGNAL( notesChanged( const QString, Kopete::MetaContact*) ),this,
- SLOT( setNotes( const QString, Kopete::MetaContact * ) ) );
+ connect( e, TQT_SIGNAL( notesChanged( const TQString, Kopete::MetaContact*) ),this,
+ TQT_SLOT( setNotes( const TQString, Kopete::MetaContact * ) ) );
e->show();
}
-QString ContactNotesPlugin::notes(Kopete::MetaContact *m)
+TQString ContactNotesPlugin::notes(Kopete::MetaContact *m)
{
return m->pluginData( this, "notes" );
}
-void ContactNotesPlugin::setNotes( const QString n, Kopete::MetaContact *m )
+void ContactNotesPlugin::setNotes( const TQString n, Kopete::MetaContact *m )
{
m->setPluginData( this, "notes", n );
}
diff --git a/kopete/plugins/contactnotes/contactnotesplugin.h b/kopete/plugins/contactnotes/contactnotesplugin.h
index c4fb8224..f526070d 100644
--- a/kopete/plugins/contactnotes/contactnotesplugin.h
+++ b/kopete/plugins/contactnotes/contactnotesplugin.h
@@ -18,9 +18,9 @@
#ifndef BABELFISHPLUGIN_H
#define BABELFISHPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "kopeteplugin.h"
@@ -44,14 +44,14 @@ class ContactNotesPlugin : public Kopete::Plugin
public:
static ContactNotesPlugin *plugin();
- ContactNotesPlugin( QObject *parent, const char *name, const QStringList &args );
+ ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList &args );
~ContactNotesPlugin();
- QString notes(Kopete::MetaContact *m);
+ TQString notes(Kopete::MetaContact *m);
public slots:
- void setNotes(const QString n, Kopete::MetaContact *m);
+ void setNotes(const TQString n, Kopete::MetaContact *m);
private:
static ContactNotesPlugin* pluginStatic_;
diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp
index 0c53eee0..898e7f1a 100644
--- a/kopete/plugins/cryptography/cryptographyguiclient.cpp
+++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp
@@ -28,7 +28,7 @@
class CryptographyPlugin;
CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
- : QObject(parent) , KXMLGUIClient(parent)
+ : TQObject(parent) , KXMLGUIClient(parent)
{
if(!parent || parent->members().isEmpty())
{
@@ -36,7 +36,7 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
return;
}
- QPtrList<Kopete::Contact> mb=parent->members();
+ TQPtrList<Kopete::Contact> mb=parent->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
@@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
setInstance( KGenericFactory<CryptographyPlugin>::instance() );
- m_action=new KToggleAction( i18n("Encrypt Messages" ), QString::fromLatin1( "encrypted" ), 0, this, SLOT(slotToggled()), actionCollection() , "cryptographyToggle" );
- m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != QString::fromLatin1("off") ) ;
+ m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::fromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" );
+ m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::fromLatin1("off") ) ;
setXMLFile("cryptographychatui.rc");
}
@@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient()
void CryptographyGUIClient::slotToggled()
{
- QPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members();
+ TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h
index 5a1aee2c..7f3d8c4f 100644
--- a/kopete/plugins/cryptography/cryptographyguiclient.h
+++ b/kopete/plugins/cryptography/cryptographyguiclient.h
@@ -15,7 +15,7 @@
#ifndef CRYPTOGUICLIENT_H
#define CRYPTOGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -24,7 +24,7 @@ class KToggleAction;
/**
*@author Olivier Goffart
*/
-class CryptographyGUIClient : public QObject, public KXMLGUIClient
+class CryptographyGUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
public:
diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp
index 701ad8bd..4e2e9686 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.cpp
+++ b/kopete/plugins/cryptography/cryptographyplugin.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kaction.h>
@@ -45,13 +45,13 @@
//In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did.
//We limit the html to some basis tag to limit security problem (bad links)
// - Olivier
-const QRegExp CryptographyPlugin::isHTML( QString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
+const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
typedef KGenericFactory<CryptographyPlugin> CryptographyPluginFactory;
static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) )
-CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ),
m_cachedPass()
{
@@ -59,27 +59,27 @@ CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const
pluginStatic_=this;
m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound,
- Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotIncomingMessage( Kopete::Message& ) ) );
+ Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotIncomingMessage( Kopete::Message& ) ) );
connect( Kopete::ChatSessionManager::self(),
- SIGNAL( aboutToSend( Kopete::Message & ) ),
- SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+ TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
- m_cachedPass_timer = new QTimer(this, "m_cachedPass_timer" );
- QObject::connect(m_cachedPass_timer, SIGNAL(timeout()), this, SLOT(slotForgetCachedPass() ));
+ m_cachedPass_timer = new TQTimer(this, "m_cachedPass_timer" );
+ TQObject::connect(m_cachedPass_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForgetCachedPass() ));
- KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey");
- connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , action , SLOT(setEnabled(bool)));
+ KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, TQT_SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey");
+ connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , action , TQT_SLOT(setEnabled(bool)));
action->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 );
setXMLFile("cryptographyui.rc");
loadSettings();
- connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
//Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
{
slotNewKMM(*it);
}
@@ -117,12 +117,12 @@ CryptographyPlugin* CryptographyPlugin::plugin()
CryptographyPlugin* CryptographyPlugin::pluginStatic_ = 0L;
-QCString CryptographyPlugin::cachedPass()
+TQCString CryptographyPlugin::cachedPass()
{
return pluginStatic_->m_cachedPass;
}
-void CryptographyPlugin::setCachedPass(const QCString& p)
+void CryptographyPlugin::setCachedPass(const TQCString& p)
{
if(pluginStatic_->mCacheMode==Never)
return;
@@ -144,7 +144,7 @@ bool CryptographyPlugin::passphraseHandling()
m_actionCollection = new KActionCollection(this);
KAction *actionTranslate = new KAction( i18n ("Translate"), 0,
- this, SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" );
+ this, TQT_SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" );
m_actionCollection->insert( actionTranslate );
m_currentChatSession=KMM;
@@ -153,14 +153,14 @@ bool CryptographyPlugin::passphraseHandling()
void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
{
- QString body = msg.plainBody();
- if( !body.startsWith( QString::fromLatin1("-----BEGIN PGP MESSAGE----") )
- || !body.contains( QString::fromLatin1("-----END PGP MESSAGE----") ) )
+ TQString body = msg.plainBody();
+ if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") )
+ || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) )
return;
if( msg.direction() != Kopete::Message::Inbound )
{
- QString plainBody;
+ TQString plainBody;
if ( m_cachedMessages.contains( body ) )
{
plainBody = m_cachedMessages[ body ];
@@ -176,19 +176,19 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
//Check if this is a RTF message before escaping it
if( !isHTML.exactMatch( plainBody ) )
{
- plainBody = QStyleSheet::escape( plainBody );
+ plainBody = TQStyleSheet::escape( plainBody );
//this is the same algoritm as in Kopete::Message::escapedBody();
- plainBody.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "<br/>" ) )
- .replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
- .replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "&nbsp; " ) );
+ plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br/>" ) )
+ .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
+ .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "&nbsp; " ) );
}
- msg.setBody( QString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Outgoing Encrypted Message: ")
- + QString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ plainBody
- + QString::fromLatin1(" </td></tr></table>")
+ + TQString::fromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
body = Kopete::Message::escape( body );
}
- msg.setBody( QString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Incoming Encrypted Message: ")
- + QString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ body
- + QString::fromLatin1(" </td></tr></table>")
+ + TQString::fromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -230,11 +230,11 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(msg.direction() != Kopete::Message::Outbound)
return;
- QStringList keys;
- QPtrList<Kopete::Contact> contactlist = msg.to();
+ TQStringList keys;
+ TQPtrList<Kopete::Contact> contactlist = msg.to();
for( Kopete::Contact *c = contactlist.first(); c; c = contactlist.next() )
{
- QString tmpKey;
+ TQString tmpKey;
if( c->metaContact() )
{
if(c->metaContact()->pluginData( this, "encrypt_messages" ) == "off" )
@@ -251,7 +251,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(mAlsoMyKey) //encrypt also with the self key
keys.append( mPrivateKeyID );
- QString key = keys.join( " " );
+ TQString key = keys.join( " " );
if(key.isEmpty())
{
@@ -259,12 +259,12 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
return;
}
- QString original=msg.plainBody();
+ TQString original=msg.plainBody();
/* Code From KGPG */
////////////////// encode from editor
- QString encryptOptions="";
+ TQString encryptOptions="";
//if (utrust==true)
encryptOptions+=" --always-trust ";
@@ -279,7 +279,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
// if (selec==NULL) {KMessageBox::sorry(Kopete::UI::Global::mainWidget(),i18n("You have not chosen an encryption key..."));return;}
- QString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions);
+ TQString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions);
if (!resultat.isEmpty())
{
msg.setBody(resultat,Kopete::Message::PlainText);
@@ -295,7 +295,7 @@ void CryptographyPlugin::slotSelectContactKey()
Kopete::MetaContact *m=Kopete::ContactList::self()->selectedMetaContacts().first();
if(!m)
return;
- QString key = m->pluginData( this, "gpgKey" );
+ TQString key = m->pluginData( this, "gpgKey" );
CryptographySelectUserKey *opts = new CryptographySelectUserKey( key, m );
opts->exec();
if( opts->result() )
@@ -308,14 +308,14 @@ void CryptographyPlugin::slotSelectContactKey()
void CryptographyPlugin::slotForgetCachedPass()
{
- m_cachedPass=QCString();
+ m_cachedPass=TQCString();
m_cachedPass_timer->stop();
}
void CryptographyPlugin::slotNewKMM(Kopete::ChatSession *KMM)
{
- connect(this , SIGNAL( destroyed(QObject*)) ,
- new CryptographyGUIClient(KMM) , SLOT(deleteLater()));
+ connect(this , TQT_SIGNAL( destroyed(TQObject*)) ,
+ new CryptographyGUIClient(KMM) , TQT_SLOT(deleteLater()));
}
diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h
index 506617cc..f34bd175 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.h
+++ b/kopete/plugins/cryptography/cryptographyplugin.h
@@ -50,12 +50,12 @@ public:
};
static CryptographyPlugin *plugin();
- static QCString cachedPass();
- static void setCachedPass(const QCString &pass);
+ static TQCString cachedPass();
+ static void setCachedPass(const TQCString &pass);
static bool passphraseHandling();
- static const QRegExp isHTML;
+ static const TQRegExp isHTML;
- CryptographyPlugin( QObject *parent, const char *name, const QStringList &args );
+ CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args );
~CryptographyPlugin();
public slots:
@@ -74,14 +74,14 @@ private slots:
private:
static CryptographyPlugin* pluginStatic_;
Kopete::SimpleMessageHandlerFactory *m_inboundHandler;
- QCString m_cachedPass;
- QTimer *m_cachedPass_timer;
+ TQCString m_cachedPass;
+ TQTimer *m_cachedPass_timer;
//cache messages for showing
- QMap<QString, QString> m_cachedMessages;
+ TQMap<TQString, TQString> m_cachedMessages;
//Settings
- QString mPrivateKeyID;
+ TQString mPrivateKeyID;
int mCacheMode;
unsigned int mCacheTime;
bool mAlsoMyKey;
diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp
index 1039aac8..8e1b96ee 100644
--- a/kopete/plugins/cryptography/cryptographypreferences.cpp
+++ b/kopete/plugins/cryptography/cryptographypreferences.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kgenericfactory.h>
@@ -27,12 +27,12 @@
typedef KGenericFactory<CryptographyPreferences> CryptographyPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography"))
-CryptographyPreferences::CryptographyPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args)
{
// Add actuall widget generated from ui file.
preferencesDialog = new CryptographyPrefsUI(this);
- connect (preferencesDialog->m_selectOwnKey , SIGNAL(pressed()) , this , SLOT(slotSelectPressed()));
+ connect (preferencesDialog->m_selectOwnKey , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotSelectPressed()));
setMainWidget( preferencesDialog ,"Cryptography Plugin");
}
@@ -40,7 +40,7 @@ void CryptographyPreferences::slotSelectPressed()
{
KgpgSelKey opts(this,0,false);
opts.exec();
- if (opts.result()==QDialog::Accepted)
+ if (opts.result()==TQDialog::Accepted)
preferencesDialog->PGP_private_key->setText(opts.getkeyID());
}
diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h
index 057eacf1..6053e96b 100644
--- a/kopete/plugins/cryptography/cryptographypreferences.h
+++ b/kopete/plugins/cryptography/cryptographypreferences.h
@@ -30,7 +30,7 @@ class KAutoConfig;
class CryptographyPreferences : public KCAutoConfigModule {
Q_OBJECT
public:
- CryptographyPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
private:
CryptographyPrefsUI *preferencesDialog;
private slots: // Public slots
diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
index 4f1cc35e..ae92647b 100644
--- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
+++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
@@ -17,8 +17,8 @@
#include <klocale.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include "cryptographyuserkey_ui.h"
#include "kopetemetacontact.h"
@@ -26,14 +26,14 @@
#include "cryptographyselectuserkey.h"
-CryptographySelectUserKey::CryptographySelectUserKey(const QString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok )
+CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok )
{
m_metaContact=mc;
view = new CryptographyUserKey_ui(this,"CryptographyUserKey_ui");
setMainWidget(view);
- connect (view->m_selectKey , SIGNAL(clicked()) , this , SLOT(slotSelectPressed()));
- connect (view->m_removeButton , SIGNAL(clicked()) , this , SLOT(slotRemovePressed()));
+ connect (view->m_selectKey , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotSelectPressed()));
+ connect (view->m_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotRemovePressed()));
view->m_titleLabel->setText(i18n("Select public key for %1").arg(mc->displayName()));
view->m_editKey->setText(key);
@@ -45,12 +45,12 @@ CryptographySelectUserKey::~CryptographySelectUserKey()
void CryptographySelectUserKey::slotSelectPressed()
{
popupPublic *dialog=new popupPublic(this, "public_keys", 0,false);
- connect(dialog,SIGNAL(selectedKey(QString &,QString,bool,bool)),this,SLOT(keySelected(QString &)));
+ connect(dialog,TQT_SIGNAL(selectedKey(TQString &,TQString,bool,bool)),this,TQT_SLOT(keySelected(TQString &)));
dialog->show();
}
-void CryptographySelectUserKey::keySelected(QString &key)
+void CryptographySelectUserKey::keySelected(TQString &key)
{
view->m_editKey->setText(key);
}
@@ -60,7 +60,7 @@ void CryptographySelectUserKey::slotRemovePressed()
view->m_editKey->setText("");
}
-QString CryptographySelectUserKey::publicKey() const
+TQString CryptographySelectUserKey::publicKey() const
{
return view->m_editKey->text();
}
diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h
index 1a8828cf..7ca5ec8e 100644
--- a/kopete/plugins/cryptography/cryptographyselectuserkey.h
+++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h
@@ -30,14 +30,14 @@ class CryptographyUserKey_ui;
class CryptographySelectUserKey : public KDialogBase {
Q_OBJECT
public:
- CryptographySelectUserKey(const QString &key, Kopete::MetaContact *mc);
+ CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc);
~CryptographySelectUserKey();
- QString publicKey() const;
+ TQString publicKey() const;
private slots:
- void keySelected(QString &);
+ void keySelected(TQString &);
void slotSelectPressed();
/** No descriptions */
void slotRemovePressed();
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index 51b35a63..e41e246d 100644
--- a/kopete/plugins/cryptography/kgpginterface.cpp
+++ b/kopete/plugins/cryptography/kgpginterface.cpp
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocio.h>
@@ -40,10 +40,10 @@ KgpgInterface::KgpgInterface()
KgpgInterface::~KgpgInterface()
{}
-QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Options)
+TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString Options)
{
FILE *fp;
- QString dests,encResult;
+ TQString dests,encResult;
char buffer[200];
userIDs=userIDs.stripWhiteSpace();
@@ -59,7 +59,7 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt
}
dests+=" --recipient "+userIDs;
- QCString gpgcmd = "echo -n ";
+ TQCString gpgcmd = "echo -n ";
gpgcmd += KShellProcess::quote( text ).utf8();
gpgcmd += " | gpg --no-secmem-warning --no-tty ";
gpgcmd += Options.local8Bit();
@@ -75,17 +75,17 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt
if( !encResult.isEmpty() )
return encResult;
else
- return QString::null;
+ return TQString::null;
}
-QString KgpgInterface::KgpgDecryptText(QString text,QString userID)
+TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
FILE *fp,*pass;
- QString encResult;
+ TQString encResult;
char buffer[200];
int counter=0,ppass[2];
- QCString password = CryptographyPlugin::cachedPass();
+ TQCString password = CryptographyPlugin::cachedPass();
bool passphraseHandling=CryptographyPlugin::passphraseHandling();
while ((counter<3) && (encResult.isEmpty()))
@@ -94,16 +94,16 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID)
if(passphraseHandling && password.isNull())
{
/// pipe for passphrase
- //userID=QString::fromUtf8(userID);
+ //userID=TQString::fromUtf8(userID);
userID.replace('<',"&lt;");
- QString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
+ TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
if (counter>1)
- passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(QString::number(4-counter)));
+ passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(TQString::number(4-counter)));
/// pipe for passphrase
int code=KPasswordDialog::getPassword(password,passdlg);
- if (code!=QDialog::Accepted)
- return QString::null;
+ if (code!=TQDialog::Accepted)
+ return TQString::null;
CryptographyPlugin::setCachedPass(password);
}
@@ -116,29 +116,29 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID)
fclose(pass);
}
- QCString gpgcmd="echo ";
+ TQCString gpgcmd="echo ";
gpgcmd += KShellProcess::quote(text).utf8();
gpgcmd += " | gpg --no-secmem-warning --no-tty ";
if(passphraseHandling)
- gpgcmd += "--passphrase-fd " + QString::number(ppass[0]).local8Bit();
+ gpgcmd += "--passphrase-fd " + TQString::number(ppass[0]).local8Bit();
gpgcmd += " -d ";
////////// encode with untrusted keys or armor if checked by user
fp = popen(gpgcmd, "r");
while ( fgets( buffer, sizeof(buffer), fp))
- encResult += QString::fromUtf8(buffer);
+ encResult += TQString::fromUtf8(buffer);
pclose(fp);
- password = QCString();
+ password = TQCString();
}
if( !encResult.isEmpty() )
return encResult;
else
- return QString::null;
+ return TQString::null;
}
-QString KgpgInterface::checkForUtf8(QString txt)
+TQString KgpgInterface::checkForUtf8(TQString txt)
{
// code borrowed from gpa
@@ -147,7 +147,7 @@ QString KgpgInterface::checkForUtf8(QString txt)
/* Make sure the encoding is UTF-8.
* Test structure suggested by Werner Koch */
if (txt.isEmpty())
- return QString::null;
+ return TQString::null;
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
@@ -157,17 +157,17 @@ QString KgpgInterface::checkForUtf8(QString txt)
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
if (txt.find("\\x")==-1)
- return QString::fromUtf8(txt.ascii());
+ return TQString::fromUtf8(txt.ascii());
// if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
- str[0] = (char) QString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
+ str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
txt.replace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
- return QString::fromUtf8(txt.ascii());
+ return TQString::fromUtf8(txt.ascii());
else
- return QString::fromUtf8(QString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly
+ return TQString::fromUtf8(TQString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly
}
diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h
index b70bc68a..f324359e 100644
--- a/kopete/plugins/cryptography/kgpginterface.h
+++ b/kopete/plugins/cryptography/kgpginterface.h
@@ -26,8 +26,8 @@
/**
* Encrypt a file using gpg.
*/
-//class KgpgEncryptFile : public QObject {
-class KgpgInterface : public QObject {
+//class KgpgEncryptFile : public TQObject {
+class KgpgInterface : public TQObject {
Q_OBJECT
@@ -39,26 +39,26 @@ class KgpgInterface : public QObject {
/**Encrypt text function
- * @param text QString text to be encrypted.
+ * @param text TQString text to be encrypted.
* @param userIDs the recipients key id's.
* @param Options String with the wanted gpg options. ex: "--armor"
* returns the encrypted text or empty string if encyption failed
*/
- static QString KgpgEncryptText(QString text,QString userIDs, QString Options="");
+ static TQString KgpgEncryptText(TQString text,TQString userIDs, TQString Options="");
/**Decrypt text function
- * @param text QString text to be decrypted.
- * @param userID QString the name of the decryption key (only used to prompt user for passphrase)
+ * @param text TQString text to be decrypted.
+ * @param userID TQString the name of the decryption key (only used to prompt user for passphrase)
*/
- static QString KgpgDecryptText(QString text,QString userID);
-// static QString KgpgDecryptFileToText(KURL srcUrl,QString userID);
+ static TQString KgpgDecryptText(TQString text,TQString userID);
+// static TQString KgpgDecryptFileToText(KURL srcUrl,TQString userID);
/*
* Destructor for the class.
*/
~KgpgInterface();
- static QString checkForUtf8(QString txt);
+ static TQString checkForUtf8(TQString txt);
private slots:
@@ -69,12 +69,12 @@ signals:
/**
* @internal structure for communication
*/
- QString message,tempKeyFile,userIDs,txtprocess,output;
- QCString passphrase;
+ TQString message,tempKeyFile,userIDs,txtprocess,output;
+ TQCString passphrase;
bool deleteSuccess,konsLocal,anonymous,txtsent,decfinished,decok,badmdc;
int signSuccess;
int step,signb,sigsearch;
- QString konsSignKey, konsKeyID;
+ TQString konsSignKey, konsKeyID;
/**
diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp
index 70f76598..88078ece 100644
--- a/kopete/plugins/cryptography/kgpgselkey.cpp
+++ b/kopete/plugins/cryptography/kgpgselkey.cpp
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <sys/wait.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kprocess.h>
#include <kiconloader.h>
@@ -38,11 +38,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////// Secret key selection dialog, used when user wants to sign a key
-KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
+KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
{
- QString keyname;
- QWidget *page = new QWidget(this);
- QLabel *labeltxt;
+ TQString keyname;
+ TQWidget *page = new TQWidget(this);
+ TQLabel *labeltxt;
KIconLoader *loader = KGlobal::iconLoader();
keyPair=loader->loadIcon("kgpg_key2",KIcon::Small,20);
@@ -54,22 +54,22 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
keysListpr->setShowSortIndicator(true);
keysListpr->setFullWidth(true);
- labeltxt=new QLabel(i18n("Choose secret key:"),page);
- QVBoxLayout *vbox=new QVBoxLayout(page,3);
+ labeltxt=new TQLabel(i18n("Choose secret key:"),page);
+ TQVBoxLayout *vbox=new TQVBoxLayout(page,3);
vbox->addWidget(labeltxt);
vbox->addWidget(keysListpr);
if (showlocal==true)
{
- local = new QCheckBox(i18n("Local signature (cannot be exported)"),page);
+ local = new TQCheckBox(i18n("Local signature (cannot be exported)"),page);
vbox->addWidget(local);
}
FILE *fp,*fp2;
- QString tst,tst2;
+ TQString tst,tst2;
char line[130];
- // FIXME: Why use popen instead of KProcess, QProcess or KProcIO?!?
+ // FIXME: Why use popen instead of KProcess, TQProcess or KProcIO?!?
// Are we interested in having buffer overflows now? - Martijn
fp = popen( "gpg --no-tty --with-colon --list-secret-keys", "r" );
while ( fgets( line, sizeof(line), fp))
@@ -77,12 +77,12 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
tst=line;
if (tst.startsWith("sec"))
{
- const QString trust=tst.section(':',1,1);
- QString val=tst.section(':',6,6);
- QString id=QString("0x"+tst.section(':',4,4).right(8));
+ const TQString trust=tst.section(':',1,1);
+ TQString val=tst.section(':',6,6);
+ TQString id=TQString("0x"+tst.section(':',4,4).right(8));
if (val.isEmpty())
val=i18n("Unlimited");
- QString tr;
+ TQString tr;
switch( trust[0] )
{
case 'o':
@@ -122,14 +122,14 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
tst=tst.section(":",9,9);
// FIXME: Same here: don't use popen! - Martijn
- fp2 = popen( QString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" );
+ fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" );
bool dead=true;
while ( fgets( line, sizeof(line), fp2))
{
tst2=line;
if (tst2.startsWith("pub"))
{
- const QString trust2=tst2.section(':',1,1);
+ const TQString trust2=tst2.section(':',1,1);
switch( trust2[0] )
{
case 'f':
@@ -156,8 +156,8 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
pclose(fp);
- QObject::connect(keysListpr,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotpreOk()));
- QObject::connect(keysListpr,SIGNAL(clicked(QListViewItem *)),this,SLOT(slotSelect(QListViewItem *)));
+ TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotpreOk()));
+ TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(slotSelect(TQListViewItem *)));
keysListpr->setSelected(keysListpr->firstChild(),true);
@@ -167,17 +167,17 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
setMainWidget(page);
}
-QString KgpgSelKey::extractKeyName(QString fullName)
+TQString KgpgSelKey::extractKeyName(TQString fullName)
{
- QString kMail;
+ TQString kMail;
if (fullName.find("<")!=-1)
{
kMail=fullName.section('<',-1,-1);
kMail.truncate(kMail.length()-1);
}
- QString kName=fullName.section('<',0,0);
+ TQString kName=fullName.section('<',0,0);
if (kName.find("(")!=-1) kName=kName.section('(',0,0);
- return QString(kMail+" ("+kName+")").stripWhiteSpace();
+ return TQString(kMail+" ("+kName+")").stripWhiteSpace();
}
void KgpgSelKey::slotpreOk()
@@ -196,7 +196,7 @@ void KgpgSelKey::slotOk()
accept();
}
-void KgpgSelKey::slotSelect(QListViewItem *item)
+void KgpgSelKey::slotSelect(TQListViewItem *item)
{
if (item==NULL) return;
if (item->depth()!=0)
@@ -207,9 +207,9 @@ void KgpgSelKey::slotSelect(QListViewItem *item)
}
-QString KgpgSelKey::getkeyID()
+TQString KgpgSelKey::getkeyID()
{
- QString userid;
+ TQString userid;
///// emit selected key
if (keysListpr->currentItem()==NULL) return("");
else
@@ -222,9 +222,9 @@ QString KgpgSelKey::getkeyID()
}
}
-QString KgpgSelKey::getkeyMail()
+TQString KgpgSelKey::getkeyMail()
{
- QString username;
+ TQString username;
///// emit selected key
if (keysListpr->currentItem()==NULL) return("");
else
diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h
index 11bcc498..f511f999 100644
--- a/kopete/plugins/cryptography/kgpgselkey.h
+++ b/kopete/plugins/cryptography/kgpgselkey.h
@@ -27,15 +27,15 @@ class KListView;
class QCheckBox;
typedef struct gpgKey{
- QString gpgkeymail;
- QString gpgkeyname;
- QString gpgkeyid;
- QString gpgkeytrust;
- QString gpgkeyvalidity;
- QString gpgkeysize;
- QString gpgkeycreation;
- QString gpgkeyexpiration;
- QString gpgkeyalgo;
+ TQString gpgkeymail;
+ TQString gpgkeyname;
+ TQString gpgkeyid;
+ TQString gpgkeytrust;
+ TQString gpgkeyvalidity;
+ TQString gpgkeysize;
+ TQString gpgkeycreation;
+ TQString gpgkeyexpiration;
+ TQString gpgkeyalgo;
};
class KgpgSelKey : public KDialogBase
@@ -43,19 +43,19 @@ class KgpgSelKey : public KDialogBase
Q_OBJECT
public:
- KgpgSelKey( QWidget *parent = 0, const char *name = 0,bool showlocal=true);
+ KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true);
KListView *keysListpr;
-QPixmap keyPair;
-QCheckBox *local;
+TQPixmap keyPair;
+TQCheckBox *local;
private slots:
void slotOk();
void slotpreOk();
-void slotSelect(QListViewItem *item);
-QString extractKeyName(QString fullName);
+void slotSelect(TQListViewItem *item);
+TQString extractKeyName(TQString fullName);
public:
- QString getkeyID();
- QString getkeyMail();
+ TQString getkeyID();
+ TQString getkeyMail();
bool getlocal();
};
diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp
index 36008bcf..9c1561f1 100644
--- a/kopete/plugins/cryptography/popuppublic.cpp
+++ b/kopete/plugins/cryptography/popuppublic.cpp
@@ -18,18 +18,18 @@
***************************************************************************/
//////////////////////////////////////////////////////// code for choosing a public key from a list for encryption
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qptrlist.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqptrlist.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <kdeversion.h>
#include <klistview.h>
@@ -57,13 +57,13 @@
class UpdateViewItem2 : public KListViewItem
{
public:
- UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault);
- virtual void paintCell(QPainter *p, const QColorGroup &cg,int col, int width, int align);
- virtual QString key(int c,bool ) const;
+ UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align);
+ virtual TQString key(int c,bool ) const;
bool def;
};
-UpdateViewItem2::UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault)
+UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault)
: KListViewItem(parent)
{
def=isDefault;
@@ -73,28 +73,28 @@ def=isDefault;
}
-void UpdateViewItem2::paintCell(QPainter *p, const QColorGroup &cg,int column, int width, int alignment)
+void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
{
if ((def) && (column<2)) {
- QFont font(p->font());
+ TQFont font(p->font());
font.setBold(true);
p->setFont(font);
}
KListViewItem::paintCell(p, cg, column, width, alignment);
}
-QString UpdateViewItem2 :: key(int c,bool ) const
+TQString UpdateViewItem2 :: key(int c,bool ) const
{
return text(c).lower();
}
/////////////// main view
-popupPublic::popupPublic(QWidget *parent, const char *name,QString sfile,bool filemode,KShortcut goDefaultKey):
+popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey):
KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true)
{
- QWidget *page = plainPage();
- QVBoxLayout *vbox=new QVBoxLayout(page,0,spacingHint());
+ TQWidget *page = plainPage();
+ TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint());
vbox->setAutoAdd(true);
setButtonText(KDialogBase::Details,i18n("Options"));
@@ -111,17 +111,17 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile));
fmode=filemode;
- QHButtonGroup *hBar=new QHButtonGroup(page);
- //hBar->setFrameStyle(QFrame::NoFrame);
+ TQHButtonGroup *hBar=new TQHButtonGroup(page);
+ //hBar->setFrameStyle(TQFrame::NoFrame);
hBar->setMargin(0);
- QToolButton *clearSearch = new QToolButton(hBar);
+ TQToolButton *clearSearch = new TQToolButton(hBar);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left"
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left"
: "locationbar_erase"));
- (void) new QLabel(i18n("Search: "),hBar);
+ (void) new TQLabel(i18n("Search: "),hBar);
KListViewSearchLine* listViewSearch = new KListViewSearchLine(hBar);
- connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
keysList = new KListView( page );
keysList->addColumn(i18n("Name"));
@@ -136,54 +136,54 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
keysList->setFullWidth(true);
keysList->setAllColumnsShowFocus(true);
keysList->setSelectionModeExt(KListView::Extended);
- keysList->setColumnWidthMode(0,QListView::Manual);
- keysList->setColumnWidthMode(1,QListView::Manual);
+ keysList->setColumnWidthMode(0,TQListView::Manual);
+ keysList->setColumnWidthMode(1,TQListView::Manual);
keysList->setColumnWidth(0,210);
keysList->setColumnWidth(1,210);
- boutonboxoptions=new QButtonGroup(5,Qt::Vertical ,page,0);
+ boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0);
KActionCollection *actcol=new KActionCollection(this);
- (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
+ (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
- CBarmor=new QCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
- CBuntrusted=new QCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions);
- CBhideid=new QCheckBox(i18n("Hide user id"),boutonboxoptions);
+ CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
+ CBuntrusted=new TQCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions);
+ CBhideid=new TQCheckBox(i18n("Hide user id"),boutonboxoptions);
setDetailsWidget(boutonboxoptions);
- QWhatsThis::add
+ TQWhatsThis::add
(keysList,i18n("<b>Public keys list</b>: select the key that will be used for encryption."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBarmor,i18n("<b>ASCII encryption</b>: makes it possible to open the encrypted file/message in a text editor"));
- QWhatsThis::add
+ TQWhatsThis::add
(CBhideid,i18n("<b>Hide user ID</b>: Do not put the keyid into encrypted packets. This option hides the receiver "
"of the message and is a countermeasure against traffic analysis. It may slow down the decryption process because "
"all available secret keys are tried."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBuntrusted,i18n("<b>Allow encryption with untrusted keys</b>: when you import a public key, it is usually "
"marked as untrusted and you cannot use it unless you sign it in order to make it 'trusted'. Checking this "
"box enables you to use any key, even if it has not be signed."));
if (filemode) {
- QWidget *parentBox=new QWidget(boutonboxoptions);
- QHBoxLayout *shredBox=new QHBoxLayout(parentBox,0);
- //shredBox->setFrameStyle(QFrame::NoFrame);
+ TQWidget *parentBox=new TQWidget(boutonboxoptions);
+ TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0);
+ //shredBox->setFrameStyle(TQFrame::NoFrame);
//shredBox->setMargin(0);
- CBshred=new QCheckBox(i18n("Shred source file"),parentBox);
- QWhatsThis::add
+ CBshred=new TQCheckBox(i18n("Shred source file"),parentBox);
+ TQWhatsThis::add
(CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible"));
- QString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
+ TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox );
shredBox->addWidget(CBshred);
shredBox->addWidget(warn);
}
- CBsymmetric=new QCheckBox(i18n("Symmetrical encryption"),boutonboxoptions);
- QWhatsThis::add
+ CBsymmetric=new TQCheckBox(i18n("Symmetrical encryption"),boutonboxoptions);
+ TQWhatsThis::add
(CBsymmetric,i18n("<b>Symmetrical encryption</b>: encryption does not use keys. You just need to give a password "
"to encrypt/decrypt the file"));
- QObject::connect(CBsymmetric,SIGNAL(toggled(bool)),this,SLOT(isSymetric(bool)));
+ TQObject::connect(CBsymmetric,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(isSymetric(bool)));
//BEGIN modified for Kopete
@@ -206,27 +206,27 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
//END modified for Kopete
/*if (KGpgSettings::allowCustomEncryptionOptions()) {
- QHButtonGroup *bGroup = new QHButtonGroup(page);
- //bGroup->setFrameStyle(QFrame::NoFrame);
- (void) new QLabel(i18n("Custom option:"),bGroup);
+ TQHButtonGroup *bGroup = new TQHButtonGroup(page);
+ //bGroup->setFrameStyle(TQFrame::NoFrame);
+ (void) new TQLabel(i18n("Custom option:"),bGroup);
KLineEdit *optiontxt=new KLineEdit(bGroup);
optiontxt->setText(customOptions);
- QWhatsThis::add
+ TQWhatsThis::add
(optiontxt,i18n("<b>Custom option</b>: for experienced users only, allows you to enter a gpg command line option, like: '--armor'"));
- QObject::connect(optiontxt,SIGNAL(textChanged ( const QString & )),this,SLOT(customOpts(const QString & )));
+ TQObject::connect(optiontxt,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(customOpts(const TQString & )));
}*/
- QObject::connect(keysList,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotOk()));
-// QObject::connect(this,SIGNAL(okClicked()),this,SLOT(crypte()));
- QObject::connect(CBuntrusted,SIGNAL(toggled(bool)),this,SLOT(refresh(bool)));
+ TQObject::connect(keysList,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotOk()));
+// TQObject::connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(crypte()));
+ TQObject::connect(CBuntrusted,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(refresh(bool)));
char line[200]="\0";
FILE *fp2;
- seclist=QString::null;
+ seclist=TQString::null;
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r");
while ( fgets( line, sizeof(line), fp2))
{
- QString readLine=line;
+ TQString readLine=line;
if (readLine.startsWith("sec")) seclist+=", 0x"+readLine.section(":",4,4).right(8);
}
pclose(fp2);
@@ -251,7 +251,7 @@ accept();
void popupPublic::enable()
{
- QListViewItem *current = keysList->firstChild();
+ TQListViewItem *current = keysList->firstChild();
if (current==NULL)
return;
current->setVisible(true);
@@ -265,7 +265,7 @@ void popupPublic::enable()
void popupPublic::sort()
{
bool reselect=false;
- QListViewItem *current = keysList->firstChild();
+ TQListViewItem *current = keysList->firstChild();
if (current==NULL)
return;
@@ -289,7 +289,7 @@ void popupPublic::sort()
}
if (reselect) {
- QListViewItem *firstvisible;
+ TQListViewItem *firstvisible;
firstvisible=keysList->firstChild();
while (firstvisible->isVisible()!=true) {
firstvisible=firstvisible->nextSibling();
@@ -310,14 +310,14 @@ void popupPublic::isSymetric(bool state)
}
-void popupPublic::customOpts(const QString &str)
+void popupPublic::customOpts(const TQString &str)
{
customOptions=str;
}
void popupPublic::slotGotoDefaultKey()
{
- /*QListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
+ /*TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
keysList->clearSelection();
keysList->setCurrentItem(myDefaulKey);
keysList->setSelected(myDefaulKey,true);
@@ -335,14 +335,14 @@ void popupPublic::refresh(bool state)
void popupPublic::refreshkeys()
{
keysList->clear();
- /*QStringList groups= QStringList::split(",", KGpgSettings::groups());
+ /*TQStringList groups= TQStringList::split(",", KGpgSettings::groups());
if (!groups.isEmpty())
{
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
{
- if (!QString(*it).isEmpty())
+ if (!TQString(*it).isEmpty())
{
- UpdateViewItem2 *item=new UpdateViewItem2(keysList,QString(*it),QString::null,QString::null,false);
+ UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false);
item->setPixmap(0,keyGroup);
}
}
@@ -350,14 +350,14 @@ void popupPublic::refreshkeys()
KProcIO *encid=new KProcIO();
*encid << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
///////// when process ends, update dialog infos
- QObject::connect(encid, SIGNAL(processExited(KProcess *)),this, SLOT(slotpreselect()));
- QObject::connect(encid, SIGNAL(readReady(KProcIO *)),this, SLOT(slotprocread(KProcIO *)));
+ TQObject::connect(encid, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotpreselect()));
+ TQObject::connect(encid, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotprocread(KProcIO *)));
encid->start(KProcess::NotifyOnExit,true);
}
void popupPublic::slotpreselect()
{
-QListViewItem *it;
+TQListViewItem *it;
//if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2);
//else {
it=keysList->firstChild();
@@ -386,20 +386,20 @@ void popupPublic::slotprocread(KProcIO *p)
{
///////////////////////////////////////////////////////////////// extract encryption keys
bool dead;
- QString tst,keyname,keymail;
+ TQString tst,keyname,keymail;
- QString defaultKey ;// = KGpgSettings::defaultKey().right(8);
+ TQString defaultKey ;// = KGpgSettings::defaultKey().right(8);
while (p->readln(tst)!=-1) {
if (tst.startsWith("pub")) {
- QStringList keyString=QStringList::split(":",tst,true);
+ TQStringList keyString=TQStringList::split(":",tst,true);
dead=false;
- const QString trust=keyString[1];
- QString val=keyString[6];
- QString id=QString("0x"+keyString[4].right(8));
+ const TQString trust=keyString[1];
+ TQString val=keyString[6];
+ TQString id=TQString("0x"+keyString[4].right(8));
if (val.isEmpty())
val=i18n("Unlimited");
- QString tr;
+ TQString tr;
switch( trust[0] ) {
case 'o':
untrustedList<<id;
@@ -442,7 +442,7 @@ void popupPublic::slotprocread(KProcIO *p)
//if (keyname.find("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
- keymail=QString::null;
+ keymail=TQString::null;
keyname=tst;//.section('(',0,0);
}
@@ -480,9 +480,9 @@ void popupPublic::slotOk()
////// emit selected data
kdDebug(2100)<<"Ok pressed"<<endl;
- QStringList selectedKeys;
- QString userid;
- QPtrList<QListViewItem> list=keysList->selectedItems();
+ TQStringList selectedKeys;
+ TQString userid;
+ TQPtrList<TQListViewItem> list=keysList->selectedItems();
for ( uint i = 0; i < list.count(); ++i )
if ( list.at(i) ) {
@@ -492,7 +492,7 @@ kdDebug(2100)<<"Ok pressed"<<endl;
if (selectedKeys.isEmpty() && !CBsymmetric->isChecked())
return;
kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
- QStringList returnOptions;
+ TQStringList returnOptions;
if (CBuntrusted->isChecked())
returnOptions<<"--always-trust";
if (CBarmor->isChecked())
@@ -500,14 +500,14 @@ kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
if (CBhideid->isChecked())
returnOptions<<"--throw-keyid";
/*if ((KGpgSettings::allowCustomEncryptionOptions()) && (!customOptions.stripWhiteSpace().isEmpty()))
- returnOptions.operator+ (QStringList::split(QString(" "),customOptions.simplifyWhiteSpace()));*/
+ returnOptions.operator+ (TQStringList::split(TQString(" "),customOptions.simplifyWhiteSpace()));*/
//hide();
//MODIFIED for kopete
if (fmode)
- emit selectedKey(selectedKeys.first(),QString(),CBshred->isChecked(),CBsymmetric->isChecked());
+ emit selectedKey(selectedKeys.first(),TQString(),CBshred->isChecked(),CBsymmetric->isChecked());
else
- emit selectedKey(selectedKeys.first(),QString(),false,CBsymmetric->isChecked());
+ emit selectedKey(selectedKeys.first(),TQString(),false,CBsymmetric->isChecked());
accept();
}
diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h
index 7e147385..ac8ab068 100644
--- a/kopete/plugins/cryptography/popuppublic.h
+++ b/kopete/plugins/cryptography/popuppublic.h
@@ -36,22 +36,22 @@ class popupPublic : public KDialogBase //QDialog
Q_OBJECT
public:
- popupPublic(QWidget *parent=0, const char *name=0,QString sfile="",bool filemode=false,KShortcut goDefaultKey=QKeySequence(CTRL+Qt::Key_Home));
+ popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home));
~popupPublic();
KListView *keysList;
- QCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;
+ TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;
bool fmode,trusted;
- QPixmap keyPair,keySingle,keyGroup;
- QString seclist;
- QStringList untrustedList;
+ TQPixmap keyPair,keySingle,keyGroup;
+ TQString seclist;
+ TQStringList untrustedList;
private:
KConfig *config;
- QButtonGroup *boutonboxoptions;
- QString customOptions;
+ TQButtonGroup *boutonboxoptions;
+ TQString customOptions;
private slots:
- void customOpts(const QString &);
+ void customOpts(const TQString &);
void slotprocread(KProcIO *);
void slotpreselect();
void refreshkeys();
@@ -69,7 +69,7 @@ protected slots:
virtual void slotOk();
signals:
- void selectedKey(QString & ,QString,bool,bool);
+ void selectedKey(TQString & ,TQString,bool,bool);
void keyListFilled();
};
diff --git a/kopete/plugins/highlight/filter.h b/kopete/plugins/highlight/filter.h
index b2ac0794..876abf95 100644
--- a/kopete/plugins/highlight/filter.h
+++ b/kopete/plugins/highlight/filter.h
@@ -19,8 +19,8 @@
#define FILTER_H
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
/**
* @author Olivier Goffart <ogoffart @ kde.org>
@@ -31,8 +31,8 @@ public:
Filter();
~Filter();
- QString displayName;
- QString search;
+ TQString displayName;
+ TQString search;
bool caseSensitive;
bool isRegExp;
@@ -40,13 +40,13 @@ public:
unsigned int importance;
bool setFG;
- QColor FG;
+ TQColor FG;
bool setBG;
- QColor BG;
+ TQColor BG;
bool playSound;
- QString soundFN;
+ TQString soundFN;
bool raiseView;
};
diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp
index ba97e6a8..d6e04d7f 100644
--- a/kopete/plugins/highlight/highlightconfig.cpp
+++ b/kopete/plugins/highlight/highlightconfig.cpp
@@ -16,11 +16,11 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qstylesheet.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqstylesheet.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqdom.h>
#include <ksavefile.h>
#include <kstandarddirs.h>
@@ -53,7 +53,7 @@ void HighlightConfig::appendFilter(Filter *f)
m_filters.append(f);
}
-QPtrList<Filter> HighlightConfig::filters() const
+TQPtrList<Filter> HighlightConfig::filters() const
{
return m_filters;
}
@@ -78,68 +78,68 @@ void HighlightConfig::load()
{
m_filters.clear(); //clear filters
- QString filename = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) );
+ TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
if( filename.isEmpty() )
return ;
- QDomDocument filterList( QString::fromLatin1( "highlight-plugin" ) );
+ TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) );
- QFile filterListFile( filename );
+ TQFile filterListFile( filename );
filterListFile.open( IO_ReadOnly );
filterList.setContent( &filterListFile );
- QDomElement list = filterList.documentElement();
+ TQDomElement list = filterList.documentElement();
- QDomNode node = list.firstChild();
+ TQDomNode node = list.firstChild();
while( !node.isNull() )
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() )
{
-// if( element.tagName() == QString::fromLatin1("filter")
+// if( element.tagName() == TQString::fromLatin1("filter")
// {
Filter *filtre=newFilter();
- QDomNode filterNode = node.firstChild();
+ TQDomNode filterNode = node.firstChild();
while( !filterNode.isNull() )
{
- QDomElement filterElement = filterNode.toElement();
+ TQDomElement filterElement = filterNode.toElement();
if( !filterElement.isNull() )
{
- if( filterElement.tagName() == QString::fromLatin1( "display-name" ) )
+ if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) )
{
filtre->displayName = filterElement.text();
}
- else if( filterElement.tagName() == QString::fromLatin1( "search" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "search" ) )
{
filtre->search = filterElement.text();
- filtre->caseSensitive= ( filterElement.attribute( QString::fromLatin1( "caseSensitive" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ) );
- filtre->isRegExp= ( filterElement.attribute( QString::fromLatin1( "regExp" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->caseSensitive= ( filterElement.attribute( TQString::fromLatin1( "caseSensitive" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ) );
+ filtre->isRegExp= ( filterElement.attribute( TQString::fromLatin1( "regExp" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "FG" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) )
{
filtre->FG = filterElement.text();
- filtre->setFG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "BG" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) )
{
filtre->BG = filterElement.text();
- filtre->setBG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "importance" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) )
{
filtre->importance = filterElement.text().toUInt();
- filtre->setImportance= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "sound" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) )
{
filtre->soundFN = filterElement.text();
- filtre->playSound = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
- else if( filterElement.tagName() == QString::fromLatin1( "raise" ) )
+ else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) )
{
- filtre->raiseView = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) );
}
}
filterNode = filterNode.nextSibling();
@@ -154,50 +154,50 @@ void HighlightConfig::load()
void HighlightConfig::save()
{
- QString fileName = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) );
+ TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) );
KSaveFile file( fileName );
if( file.status() == 0 )
{
- QTextStream *stream = file.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = file.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
- QString xml = QString::fromLatin1(
+ TQString xml = TQString::fromLatin1(
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE kopete-highlight-plugin>\n"
"<highlight-plugin>\n" );
// Save metafilter information.
- QPtrListIterator<Filter> filtreIt( m_filters );
+ TQPtrListIterator<Filter> filtreIt( m_filters );
for( ; filtreIt.current(); ++filtreIt )
{
Filter *filtre = *filtreIt;
- xml += QString::fromLatin1( " <filter>\n <display-name>" )
- + QStyleSheet::escape(filtre->displayName)
- + QString::fromLatin1( "</display-name>\n" );
+ xml += TQString::fromLatin1( " <filter>\n <display-name>" )
+ + TQStyleSheet::escape(filtre->displayName)
+ + TQString::fromLatin1( "</display-name>\n" );
- xml += QString::fromLatin1(" <search caseSensitive=\"") + QString::number( static_cast<int>( filtre->caseSensitive ) ) +
- QString::fromLatin1("\" regExp=\"") + QString::number( static_cast<int>( filtre->isRegExp ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->search ) + QString::fromLatin1( "</search>\n" );
+ xml += TQString::fromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) +
+ TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "</search>\n" );
- xml += QString::fromLatin1(" <BG set=\"") + QString::number( static_cast<int>( filtre->setBG ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->BG.name() ) + QString::fromLatin1( "</BG>\n" );
- xml += QString::fromLatin1(" <FG set=\"") + QString::number( static_cast<int>( filtre->setFG ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->FG.name() ) + QString::fromLatin1( "</FG>\n" );
+ xml += TQString::fromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "</BG>\n" );
+ xml += TQString::fromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "</FG>\n" );
- xml += QString::fromLatin1(" <importance set=\"") + QString::number( static_cast<int>( filtre->setImportance ) ) +
- QString::fromLatin1( "\">" ) + QString::number( filtre->importance ) + QString::fromLatin1( "</importance>\n" );
+ xml += TQString::fromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) +
+ TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\n" );
- xml += QString::fromLatin1(" <sound set=\"") + QString::number( static_cast<int>( filtre->playSound ) ) +
- QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->soundFN ) + QString::fromLatin1( "</sound>\n" );
+ xml += TQString::fromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) +
+ TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\n" );
- xml += QString::fromLatin1(" <raise set=\"") + QString::number( static_cast<int>( filtre->raiseView ) ) +
- QString::fromLatin1( "\"></raise>\n" );
+ xml += TQString::fromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) +
+ TQString::fromLatin1( "\"></raise>\n" );
- xml += QString::fromLatin1( " </filter>\n" );
+ xml += TQString::fromLatin1( " </filter>\n" );
}
- xml += QString::fromLatin1( "</highlight-plugin>\n" );
+ xml += TQString::fromLatin1( "</highlight-plugin>\n" );
*stream << xml;
}
diff --git a/kopete/plugins/highlight/highlightconfig.h b/kopete/plugins/highlight/highlightconfig.h
index 35813403..b2d251c7 100644
--- a/kopete/plugins/highlight/highlightconfig.h
+++ b/kopete/plugins/highlight/highlightconfig.h
@@ -18,8 +18,8 @@
#ifndef HIGHLIGHTCONFIG_H
#define HIGHLIGHTCONFIG_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
class Filter;
@@ -32,13 +32,13 @@ public:
void load();
void save();
- QPtrList<Filter> filters() const;
+ TQPtrList<Filter> filters() const;
void removeFilter (Filter *f);
void appendFilter (Filter *f);
Filter* newFilter();
private:
- QPtrList<Filter> m_filters;
+ TQPtrList<Filter> m_filters;
};
#endif
diff --git a/kopete/plugins/highlight/highlightplugin.cpp b/kopete/plugins/highlight/highlightplugin.cpp
index 2f1cbb43..7ec6ba5e 100644
--- a/kopete/plugins/highlight/highlightplugin.cpp
+++ b/kopete/plugins/highlight/highlightplugin.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kgenericfactory.h>
#include <knotifyclient.h>
@@ -29,14 +29,14 @@
typedef KGenericFactory<HighlightPlugin> HighlightPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_highlight, HighlightPluginFactory( "kopete_highlight" ) )
-HighlightPlugin::HighlightPlugin( QObject *parent, const char *name, const QStringList &/*args*/ )
+HighlightPlugin::HighlightPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
: Kopete::Plugin( HighlightPluginFactory::instance(), parent, name )
{
if( !pluginStatic_ )
pluginStatic_=this;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotIncomingMessage( Kopete::Message & ) ) );
- connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) );
+ connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) );
m_config = new HighlightConfig;
@@ -63,14 +63,14 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg )
return; // FIXME: highlighted internal/actions messages are not showed correctly in the chat window (bad style)
// but they should maybe be highlinghted if needed
- QPtrList<Filter> filters=m_config->filters();
- QPtrListIterator<Filter> it( filters );
+ TQPtrList<Filter> filters=m_config->filters();
+ TQPtrListIterator<Filter> it( filters );
Filter *f;
while ((f = it.current()) != 0 )
{
++it;
if(f->isRegExp ?
- msg.plainBody().contains(QRegExp(f->search , f->caseSensitive)) :
+ msg.plainBody().contains(TQRegExp(f->search , f->caseSensitive)) :
msg.plainBody().contains(f->search , f->caseSensitive) )
{
if(f->setBG)
@@ -80,7 +80,7 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg )
if(f->setImportance)
msg.setImportance((Kopete::Message::MessageImportance)f->importance);
if(f->playSound)
- KNotifyClient::userEvent (QString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN );
+ KNotifyClient::userEvent (TQString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN );
if (f->raiseView &&
msg.manager() && msg.manager()->view()) {
diff --git a/kopete/plugins/highlight/highlightplugin.h b/kopete/plugins/highlight/highlightplugin.h
index 0a421f55..2ea151d9 100644
--- a/kopete/plugins/highlight/highlightplugin.h
+++ b/kopete/plugins/highlight/highlightplugin.h
@@ -18,9 +18,9 @@
#ifndef HighlightPLUGIN_H
#define HighlightPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "kopetemessage.h"
#include "kopeteplugin.h"
@@ -47,7 +47,7 @@ class HighlightPlugin : public Kopete::Plugin
public:
static HighlightPlugin *plugin();
- HighlightPlugin( QObject *parent, const char *name, const QStringList &args );
+ HighlightPlugin( TQObject *parent, const char *name, const TQStringList &args );
~HighlightPlugin();
public slots:
diff --git a/kopete/plugins/highlight/highlightpreferences.cpp b/kopete/plugins/highlight/highlightpreferences.cpp
index 9641d034..5e8da39c 100644
--- a/kopete/plugins/highlight/highlightpreferences.cpp
+++ b/kopete/plugins/highlight/highlightpreferences.cpp
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -39,35 +39,35 @@
typedef KGenericFactory<HighlightPreferences> HighlightPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_highlight, HighlightPreferencesFactory( "kcm_kopete_highlight" ) )
-HighlightPreferences::HighlightPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+HighlightPreferences::HighlightPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(HighlightPreferencesFactory::instance(), parent, args)
{
donttouch=true;
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new HighlightPrefsUI(this);
m_config = new HighlightConfig;
- connect(preferencesDialog->m_list , SIGNAL(selectionChanged()) , this , SLOT(slotCurrentFilterChanged()));
- connect(preferencesDialog->m_list , SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )) , this , SLOT(slotRenameFilter()));
- connect(preferencesDialog->m_add , SIGNAL(pressed()) , this , SLOT(slotAddFilter()));
- connect(preferencesDialog->m_remove , SIGNAL(pressed()) , this , SLOT(slotRemoveFilter()));
- connect(preferencesDialog->m_rename , SIGNAL(pressed()) , this , SLOT(slotRenameFilter()));
- connect(preferencesDialog->m_editregexp , SIGNAL(pressed()) , this , SLOT(slotEditRegExp()));
+ connect(preferencesDialog->m_list , TQT_SIGNAL(selectionChanged()) , this , TQT_SLOT(slotCurrentFilterChanged()));
+ connect(preferencesDialog->m_list , TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )) , this , TQT_SLOT(slotRenameFilter()));
+ connect(preferencesDialog->m_add , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotAddFilter()));
+ connect(preferencesDialog->m_remove , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotRemoveFilter()));
+ connect(preferencesDialog->m_rename , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotRenameFilter()));
+ connect(preferencesDialog->m_editregexp , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotEditRegExp()));
//Maybe here i should use a slot per widget, but i am too lazy
- connect(preferencesDialog->m_case , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_regexp , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_setImportance , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_setBG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_setFG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_sound , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_soundFN , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_raise , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_importance , SIGNAL(activated(int)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_FG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged()));
- connect(preferencesDialog->m_BG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_case , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_regexp , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_setImportance , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_setBG , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_setFG , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_search , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_sound , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_soundFN , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_raise , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_search , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_importance , TQT_SIGNAL(activated(int)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_FG , TQT_SIGNAL(changed(const TQColor&)) , this , TQT_SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_BG , TQT_SIGNAL(changed(const TQColor&)) , this , TQT_SLOT(slotSomethingHasChanged()));
load();
donttouch=false;
@@ -85,14 +85,14 @@ void HighlightPreferences::load()
preferencesDialog->m_list->clear();
m_filterItems.clear();
- QPtrList<Filter> filters=m_config->filters();
- QPtrListIterator<Filter> it( filters );
+ TQPtrList<Filter> filters=m_config->filters();
+ TQPtrListIterator<Filter> it( filters );
Filter *f;
bool first=true;
while ( (f=it.current()) != 0 )
{
++it;
- QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list);
+ TQListViewItem* lvi= new TQListViewItem(preferencesDialog->m_list);
lvi->setText(0,f->displayName );
m_filterItems.insert(lvi,f);
if(first)
@@ -172,7 +172,7 @@ void HighlightPreferences::slotCurrentFilterChanged()
void HighlightPreferences::slotAddFilter()
{
Filter *filtre=m_config->newFilter();
- QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list);
+ TQListViewItem* lvi= new TQListViewItem(preferencesDialog->m_list);
lvi->setText(0,filtre->displayName );
m_filterItems.insert(lvi,filtre);
preferencesDialog->m_list->setSelected(lvi, true);
@@ -180,7 +180,7 @@ void HighlightPreferences::slotAddFilter()
void HighlightPreferences::slotRemoveFilter()
{
- QListViewItem *lvi=preferencesDialog->m_list->selectedItem();
+ TQListViewItem *lvi=preferencesDialog->m_list->selectedItem();
if(!lvi)
return;
Filter *current=m_filterItems[lvi];
@@ -195,7 +195,7 @@ void HighlightPreferences::slotRemoveFilter()
void HighlightPreferences::slotRenameFilter()
{
- QListViewItem *lvi=preferencesDialog->m_list->selectedItem();
+ TQListViewItem *lvi=preferencesDialog->m_list->selectedItem();
if(!lvi)
return;
Filter *current=m_filterItems[lvi];
@@ -203,7 +203,7 @@ void HighlightPreferences::slotRenameFilter()
return;
bool ok;
- QString newname = KInputDialog::getText(
+ TQString newname = KInputDialog::getText(
i18n( "Rename Filter" ), i18n( "Please enter the new name for the filter:" ), current->displayName, &ok );
if( !ok )
return;
@@ -242,7 +242,7 @@ void HighlightPreferences::slotSomethingHasChanged()
void HighlightPreferences::slotEditRegExp()
{
- QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found fetch the editor interface
@@ -252,7 +252,7 @@ void HighlightPreferences::slotEditRegExp()
editor->setRegExp(preferencesDialog->m_search->text());
// Finally exec the dialog
- if(editorDialog->exec() == QDialog::Accepted )
+ if(editorDialog->exec() == TQDialog::Accepted )
{
preferencesDialog->m_search->setText(editor->regExp());
}
diff --git a/kopete/plugins/highlight/highlightpreferences.h b/kopete/plugins/highlight/highlightpreferences.h
index a2c7e31b..b6e2a8e1 100644
--- a/kopete/plugins/highlight/highlightpreferences.h
+++ b/kopete/plugins/highlight/highlightpreferences.h
@@ -19,7 +19,7 @@
#define HighlightPREFERENCES_H
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class HighlightPrefsUI;
class Filter;
@@ -33,7 +33,7 @@ class HighlightPreferences : public KCModule {
Q_OBJECT
public:
- HighlightPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ HighlightPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~HighlightPreferences();
virtual void save();
@@ -42,7 +42,7 @@ public:
private:
HighlightPrefsUI *preferencesDialog;
HighlightConfig *m_config;
- QMap <QListViewItem*,Filter*> m_filterItems;
+ TQMap <TQListViewItem*,Filter*> m_filterItems;
bool donttouch;
diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp
index 22f662bc..d2e4839d 100644
--- a/kopete/plugins/history/converter.cpp
+++ b/kopete/plugins/history/converter.cpp
@@ -28,9 +28,9 @@
#include <kprogress.h>
#include <kapplication.h>
#include <ksavefile.h>
-#include <qdir.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#define CBUFLENGTH 512 // buffer length for fgets()
@@ -40,27 +40,27 @@ void HistoryPlugin::convertOldHistory()
i18n( "Would you like to remove old history files?" ) , i18n( "History Converter" ), KStdGuiItem::del(), i18n("Keep") ) == KMessageBox::Yes;
KProgressDialog *progressDlg=new KProgressDialog(Kopete::UI::Global::mainWidget() , "history_progress_dlg" , i18n( "History converter" ) ,
- QString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents())
+ TQString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents())
progressDlg->setAllowCancel(false); //because i am too lazy to allow to cancel
- QString kopetedir=locateLocal( "data", QString::fromLatin1( "kopete"));
- QDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/
+ TQString kopetedir=locateLocal( "data", TQString::fromLatin1( "kopete"));
+ TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/
- d.setFilter( QDir::Dirs );
+ d.setFilter( TQDir::Dirs );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 )
{
- QString protocolId;
- QString accountId;
+ TQString protocolId;
+ TQString accountId;
if( Kopete::Protocol *p = dynamic_cast<Kopete::Protocol *>( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) )
{
protocolId=p->pluginId();
- QDictIterator<Kopete::Account> it(Kopete::AccountManager::self()->accounts(p));
+ TQDictIterator<Kopete::Account> it(Kopete::AccountManager::self()->accounts(p));
Kopete::Account *a = it.current();
if(a)
accountId=a->accountId();
@@ -103,12 +103,12 @@ void HistoryPlugin::convertOldHistory()
if(!protocolId.isEmpty() || !accountId.isEmpty())
{
- QDir d2( fi->absFilePath() );
- d2.setFilter( QDir::Files );
+ TQDir d2( fi->absFilePath() );
+ d2.setFilter( TQDir::Files );
d2.setNameFilter("*.log");
const QFileInfoList *list = d2.entryInfoList();
QFileInfoListIterator it2( *list );
- QFileInfo *fi2;
+ TQFileInfo *fi2;
progressDlg->progressBar()->reset();
progressDlg->progressBar()->setTotalSteps(d2.count());
@@ -118,7 +118,7 @@ void HistoryPlugin::convertOldHistory()
while ( (fi2 = it2.current()) != 0 )
{
//we assume that all "-" are dots. (like in hotmail.com)
- QString contactId=fi2->fileName().replace(".log" , QString::null).replace("-" , ".");
+ TQString contactId=fi2->fileName().replace(".log" , TQString::null).replace("-" , ".");
if(!contactId.isEmpty() )
{
@@ -127,48 +127,48 @@ void HistoryPlugin::convertOldHistory()
int month=0;
int year=0;
- QDomDocument doc;
- QDomElement docElem;
+ TQDomDocument doc;
+ TQDomElement docElem;
- QDomElement msgelement;
- QDomNode node;
- QDomDocument xmllist;
+ TQDomElement msgelement;
+ TQDomNode node;
+ TQDomDocument xmllist;
Kopete::Message::MessageDirection dir;
- QString body, date, nick;
- QString buffer, msgBlock;
+ TQString body, date, nick;
+ TQString buffer, msgBlock;
char cbuf[CBUFLENGTH]; // buffer for the log file
- QString logFileName = fi2->absFilePath();
+ TQString logFileName = fi2->absFilePath();
// open the file
- FILE *f = fopen(QFile::encodeName(logFileName), "r");
+ FILE *f = fopen(TQFile::encodeName(logFileName), "r");
// create a new <message> block
while ( ! feof( f ) )
{
fgets(cbuf, CBUFLENGTH, f);
- buffer = QString::fromUtf8(cbuf);
+ buffer = TQString::fromUtf8(cbuf);
while ( strchr(cbuf, '\n') == NULL && !feof(f) )
{
fgets( cbuf, CBUFLENGTH, f );
- buffer += QString::fromUtf8(cbuf);
+ buffer += TQString::fromUtf8(cbuf);
}
- if( buffer.startsWith( QString::fromLatin1( "<message " ) ) )
+ if( buffer.startsWith( TQString::fromLatin1( "<message " ) ) )
{
msgBlock = buffer;
// find the end of the message block
- while( !feof( f ) && buffer != QString::fromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ )
+ while( !feof( f ) && buffer != TQString::fromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ )
{
fgets(cbuf, CBUFLENGTH, f);
- buffer = QString::fromUtf8(cbuf);
+ buffer = TQString::fromUtf8(cbuf);
while ( strchr(cbuf, '\n') == NULL && !feof(f) )
{
fgets( cbuf, CBUFLENGTH, f );
- buffer += QString::fromUtf8(cbuf);
+ buffer += TQString::fromUtf8(cbuf);
}
msgBlock.append(buffer);
}
@@ -178,14 +178,14 @@ void HistoryPlugin::convertOldHistory()
msgelement = xmllist.documentElement();
node = msgelement.firstChild();
- if( msgelement.attribute( QString::fromLatin1( "direction" ) ) == QString::fromLatin1( "inbound" ) )
+ if( msgelement.attribute( TQString::fromLatin1( "direction" ) ) == TQString::fromLatin1( "inbound" ) )
dir = Kopete::Message::Inbound;
else
dir = Kopete::Message::Outbound;
// Read all the elements.
- QString tagname;
- QDomElement element;
+ TQString tagname;
+ TQDomElement element;
while ( ! node.isNull() )
{
@@ -194,12 +194,12 @@ void HistoryPlugin::convertOldHistory()
element = node.toElement();
tagname = element.tagName();
- if( tagname == QString::fromLatin1( "srcnick" ) )
+ if( tagname == TQString::fromLatin1( "srcnick" ) )
nick = element.text();
- else if( tagname == QString::fromLatin1( "date" ) )
+ else if( tagname == TQString::fromLatin1( "date" ) )
date = element.text();
- else if( tagname == QString::fromLatin1( "body" ) )
+ else if( tagname == TQString::fromLatin1( "body" ) )
body = element.text().stripWhiteSpace();
}
@@ -207,21 +207,21 @@ void HistoryPlugin::convertOldHistory()
}
//FIXME!! The date in logs writed with kopete running with QT 3.0 is Localised.
// so QT can't parse it correctly.
- QDateTime dt=QDateTime::fromString(date);
+ TQDateTime dt=TQDateTime::fromString(date);
if(dt.date().month() != month || dt.date().year() != year)
{
if(!docElem.isNull())
{
- QDate date(year,month,1);
- QString name = protocolId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
- QString::fromLatin1( "/" ) +
- contactId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
+ TQDate date(year,month,1);
+ TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
+ TQString::fromLatin1( "/" ) +
+ contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
date.toString(".yyyyMM");
- KSaveFile file( locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) );
+ KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) );
if( file.status() == 0 )
{
- QTextStream *stream = file.textStream();
- //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non?
+ TQTextStream *stream = file.textStream();
+ //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non?
doc.save( *stream , 1 );
file.close();
}
@@ -230,39 +230,39 @@ void HistoryPlugin::convertOldHistory()
month=dt.date().month();
year=dt.date().year();
- docElem=QDomElement();
+ docElem=TQDomElement();
}
if(docElem.isNull())
{
- doc=QDomDocument("Kopete-History");
+ doc=TQDomDocument("Kopete-History");
docElem= doc.createElement( "kopete-history" );
docElem.setAttribute ( "version" , "0.7" );
doc.appendChild( docElem );
- QDomElement headElem = doc.createElement( "head" );
+ TQDomElement headElem = doc.createElement( "head" );
docElem.appendChild( headElem );
- QDomElement dateElem = doc.createElement( "date" );
- dateElem.setAttribute( "year", QString::number(year) );
- dateElem.setAttribute( "month", QString::number(month) );
+ TQDomElement dateElem = doc.createElement( "date" );
+ dateElem.setAttribute( "year", TQString::number(year) );
+ dateElem.setAttribute( "month", TQString::number(month) );
headElem.appendChild(dateElem);
- QDomElement myselfElem = doc.createElement( "contact" );
+ TQDomElement myselfElem = doc.createElement( "contact" );
myselfElem.setAttribute( "type", "myself" );
myselfElem.setAttribute( "contactId", accountId );
headElem.appendChild(myselfElem);
- QDomElement contactElem = doc.createElement( "contact" );
+ TQDomElement contactElem = doc.createElement( "contact" );
contactElem.setAttribute( "contactId", contactId );
headElem.appendChild(contactElem);
- QDomElement importElem = doc.createElement( "imported" );
+ TQDomElement importElem = doc.createElement( "imported" );
importElem.setAttribute( "from", fi->fileName() );
- importElem.setAttribute( "date", QDateTime::currentDateTime().toString() );
+ importElem.setAttribute( "date", TQDateTime::currentDateTime().toString() );
headElem.appendChild(importElem);
}
- QDomElement msgElem = doc.createElement( "msg" );
+ TQDomElement msgElem = doc.createElement( "msg" );
msgElem.setAttribute( "in", dir==Kopete::Message::Outbound ? "0" : "1" );
msgElem.setAttribute( "from", dir==Kopete::Message::Outbound ? accountId : contactId );
msgElem.setAttribute( "nick", nick ); //do we have to set this?
- msgElem.setAttribute( "time", QString::number(dt.date().day()) + " " + QString::number(dt.time().hour()) + ":" + QString::number(dt.time().minute()) );
- QDomText msgNode = doc.createTextNode( body.stripWhiteSpace() );
+ msgElem.setAttribute( "time", TQString::number(dt.date().day()) + " " + TQString::number(dt.time().hour()) + ":" + TQString::number(dt.time().minute()) );
+ TQDomText msgNode = doc.createTextNode( body.stripWhiteSpace() );
docElem.appendChild( msgElem );
msgElem.appendChild( msgNode );
}
@@ -274,16 +274,16 @@ void HistoryPlugin::convertOldHistory()
if(!docElem.isNull())
{
- QDate date(year,month,1);
- QString name = protocolId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
- QString::fromLatin1( "/" ) +
- contactId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
+ TQDate date(year,month,1);
+ TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
+ TQString::fromLatin1( "/" ) +
+ contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
date.toString(".yyyyMM");
- KSaveFile file( locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) );
+ KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) );
if( file.status() == 0 )
{
- QTextStream *stream = file.textStream();
- //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non?
+ TQTextStream *stream = file.textStream();
+ //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non?
doc.save( *stream ,1 );
file.close();
}
@@ -304,22 +304,22 @@ void HistoryPlugin::convertOldHistory()
bool HistoryPlugin::detectOldHistory()
{
KGlobal::config()->setGroup("History Plugin");
- QString version=KGlobal::config()->readEntry( "Version" ,"0.6" );
+ TQString version=KGlobal::config()->readEntry( "Version" ,"0.6" );
if(version != "0.6")
return false;
- QDir d( locateLocal( "data", QString::fromLatin1( "kopete/logs")) );
- d.setFilter( QDir::Dirs );
+ TQDir d( locateLocal( "data", TQString::fromLatin1( "kopete/logs")) );
+ d.setFilter( TQDir::Dirs );
if(d.count() >= 3) // '.' and '..' are included
return false; //the new history already exists
- QDir d2( locateLocal( "data", QString::fromLatin1( "kopete")) );
- d2.setFilter( QDir::Dirs );
+ TQDir d2( locateLocal( "data", TQString::fromLatin1( "kopete")) );
+ d2.setFilter( TQDir::Dirs );
const QFileInfoList *list = d2.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 )
{
if( dynamic_cast<Kopete::Protocol *>( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) )
diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp
index 4dd98fee..5dc550be 100644
--- a/kopete/plugins/history/historydialog.cpp
+++ b/kopete/plugins/history/historydialog.cpp
@@ -32,15 +32,15 @@
#include <khtml_part.h>
#include <khtmlview.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qclipboard.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -60,30 +60,30 @@
class KListViewDateItem : public KListViewItem
{
public:
- KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc);
- QDate date() { return mDate; }
+ KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc);
+ TQDate date() { return mDate; }
Kopete::MetaContact *metaContact() { return mMetaContact; }
public:
- int compare(QListViewItem *i, int col, bool ascending) const;
+ int compare(TQListViewItem *i, int col, bool ascending) const;
private:
- QDate mDate;
+ TQDate mDate;
Kopete::MetaContact *mMetaContact;
};
-KListViewDateItem::KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc)
+KListViewDateItem::KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc)
: KListViewItem(parent, date.toString(Qt::ISODate), mc->displayName())
{
mDate = date;
mMetaContact = mc;
}
-int KListViewDateItem::compare(QListViewItem *i, int col, bool ascending) const
+int KListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const
{
if (col)
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
//compare dates - do NOT use ascending var here
KListViewDateItem* item = static_cast<KListViewDateItem*>(i);
@@ -93,16 +93,16 @@ int KListViewDateItem::compare(QListViewItem *i, int col, bool ascending) const
}
-HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent,
+HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent,
const char* name) : KDialogBase(parent, name, false,
i18n("History for %1").arg(mc->displayName()), 0), mSearching(false)
{
- QString fontSize;
- QString htmlCode;
- QString fontStyle;
+ TQString fontSize;
+ TQString htmlCode;
+ TQString fontStyle;
kdDebug(14310) << k_funcinfo << "called." << endl;
- setWFlags(Qt::WDestructiveClose); // send SIGNAL(closing()) on quit
+ setWFlags(Qt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit
// FIXME: Allow to show this dialog for only one contact
mMetaContact = mc;
@@ -118,7 +118,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent,
mMainWidget->contactComboBox->insertItem(i18n("All"));
mMetaContactList = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it(mMetaContactList);
+ TQPtrListIterator<Kopete::MetaContact> it(mMetaContactList);
for(; it.current(); ++it)
{
mMainWidget->contactComboBox->insertItem((*it)->displayName());
@@ -133,8 +133,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent,
setMainWidget(mMainWidget);
// Initializing HTML Part
- mMainWidget->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
- QVBoxLayout *l = new QVBoxLayout(mMainWidget->htmlFrame);
+ mMainWidget->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->htmlFrame);
mHtmlPart = new KHTMLPart(mMainWidget->htmlFrame, "htmlHistoryView");
//Security settings, we don't need this stuff
@@ -149,33 +149,33 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent,
mHtmlView->setMarginHeight(4);
mHtmlView->setFocusPolicy(NoFocus);
mHtmlView->setSizePolicy(
- QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
l->addWidget(mHtmlView);
- QTextOStream( &fontSize ) << KopetePrefs::prefs()->fontFace().pointSize();
+ TQTextOStream( &fontSize ) << KopetePrefs::prefs()->fontFace().pointSize();
fontStyle = "<style>.hf { font-size:" + fontSize + ".0pt; font-family:" + KopetePrefs::prefs()->fontFace().family() + "; color: " + KopetePrefs::prefs()->textColor().name() + "; }</style>";
mHtmlPart->begin();
htmlCode = "<html><head>" + fontStyle + "</head><body class=\"hf\"></body></html>";
- mHtmlPart->write( QString::fromLatin1( htmlCode.latin1() ) );
+ mHtmlPart->write( TQString::fromLatin1( htmlCode.latin1() ) );
mHtmlPart->end();
- connect(mHtmlPart->browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)),
- this, SLOT(slotOpenURLRequest(const KURL &, const KParts::URLArgs &)));
- connect(mMainWidget->dateListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(dateSelected(QListViewItem*)));
- connect(mMainWidget->searchButton, SIGNAL(clicked()), this, SLOT(slotSearch()));
- connect(mMainWidget->searchLine, SIGNAL(returnPressed()), this, SLOT(slotSearch()));
- connect(mMainWidget->searchLine, SIGNAL(textChanged(const QString&)), this, SLOT(slotSearchTextChanged(const QString&)));
- connect(mMainWidget->searchErase, SIGNAL(clicked()), this, SLOT(slotSearchErase()));
- connect(mMainWidget->contactComboBox, SIGNAL(activated(int)), this, SLOT(slotContactChanged(int)));
- connect(mMainWidget->messageFilterBox, SIGNAL(activated(int)), this, SLOT(slotFilterChanged(int )));
- connect(mHtmlPart, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotRightClick(const QString &, const QPoint &)));
+ connect(mHtmlPart->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)),
+ this, TQT_SLOT(slotOpenURLRequest(const KURL &, const KParts::URLArgs &)));
+ connect(mMainWidget->dateListView, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(dateSelected(TQListViewItem*)));
+ connect(mMainWidget->searchButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearch()));
+ connect(mMainWidget->searchLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotSearch()));
+ connect(mMainWidget->searchLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSearchTextChanged(const TQString&)));
+ connect(mMainWidget->searchErase, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchErase()));
+ connect(mMainWidget->contactComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotContactChanged(int)));
+ connect(mMainWidget->messageFilterBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFilterChanged(int )));
+ connect(mHtmlPart, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &)));
//initActions
KActionCollection* ac = new KActionCollection(this);
- mCopyAct = KStdAction::copy( this, SLOT(slotCopy()), ac );
- mCopyURLAct = new KAction( i18n( "Copy Link Address" ), QString::fromLatin1( "editcopy" ), 0, this, SLOT( slotCopyURL() ), ac );
+ mCopyAct = KStdAction::copy( this, TQT_SLOT(slotCopy()), ac );
+ mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), ac );
resize(650, 700);
centerOnScreen(this);
@@ -201,7 +201,7 @@ void HistoryDialog::init()
}
else
{
- QPtrListIterator<Kopete::MetaContact> it(mMetaContactList);
+ TQPtrListIterator<Kopete::MetaContact> it(mMetaContactList);
for(; it.current(); ++it)
{
HistoryLogger logger(*it, this);
@@ -211,7 +211,7 @@ void HistoryDialog::init()
}
initProgressBar(i18n("Loading..."),mInit.dateMCList.count());
- QTimer::singleShot(0,this,SLOT(slotLoadDays()));
+ TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays()));
}
void HistoryDialog::slotLoadDays()
@@ -219,7 +219,7 @@ void HistoryDialog::slotLoadDays()
if(mInit.dateMCList.isEmpty())
{
if (!mMainWidget->searchLine->text().isEmpty())
- QTimer::singleShot(0, this, SLOT(slotSearch()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSearch()));
doneProgressBar();
return;
}
@@ -227,23 +227,23 @@ void HistoryDialog::slotLoadDays()
DMPair pair(mInit.dateMCList.first());
mInit.dateMCList.pop_front();
HistoryLogger logger(pair.metaContact(), this);
- QValueList<int> dayList = logger.getDaysForMonth(pair.date());
+ TQValueList<int> dayList = logger.getDaysForMonth(pair.date());
for (unsigned int i=0; i<dayList.count(); i++)
{
- QDate c2Date(pair.date().year(),pair.date().month(),dayList[i]);
+ TQDate c2Date(pair.date().year(),pair.date().month(),dayList[i]);
if (mInit.dateMCList.find(pair) == mInit.dateMCList.end())
new KListViewDateItem(mMainWidget->dateListView, c2Date, pair.metaContact());
}
mMainWidget->searchProgress->advance(1);
- QTimer::singleShot(0,this,SLOT(slotLoadDays()));
+ TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays()));
}
void HistoryDialog::init(Kopete::MetaContact *mc)
{
- QPtrList<Kopete::Contact> contacts=mc->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ TQPtrList<Kopete::Contact> contacts=mc->contacts();
+ TQPtrListIterator<Kopete::Contact> it( contacts );
for( ; it.current(); ++it )
{
@@ -254,17 +254,17 @@ void HistoryDialog::init(Kopete::MetaContact *mc)
void HistoryDialog::init(Kopete::Contact *c)
{
// Get year and month list
- QRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" );
- const QString contact_in_filename=c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) );
- QFileInfo *fi;
+ TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" );
+ const TQString contact_in_filename=c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) );
+ TQFileInfo *fi;
// BEGIN check if there are Kopete 0.7.x
- QDir d1(locateLocal("data",QString("kopete/logs/")+
- c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-"))
+ TQDir d1(locateLocal("data",TQString("kopete/logs/")+
+ c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-"))
));
- d1.setFilter( QDir::Files | QDir::NoSymLinks );
- d1.setSorting( QDir::Name );
+ d1.setFilter( TQDir::Files | TQDir::NoSymLinks );
+ d1.setSorting( TQDir::Name );
const QFileInfoList *list1 = d1.entryInfoList();
if ( list1 != 0 )
@@ -276,7 +276,7 @@ void HistoryDialog::init(Kopete::Contact *c)
{
rx.search(fi->fileName());
- QDate cDate = QDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1);
+ TQDate cDate = TQDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1);
DMPair pair(cDate, c->metaContact());
mInit.dateMCList.append(pair);
@@ -287,14 +287,14 @@ void HistoryDialog::init(Kopete::Contact *c)
}
// END of kopete 0.7.x check
- QString logDir = locateLocal("data",QString("kopete/logs/")+
- c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) +
- QString::fromLatin1( "/" ) +
- c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) )
+ TQString logDir = locateLocal("data",TQString("kopete/logs/")+
+ c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) +
+ TQString::fromLatin1( "/" ) +
+ c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )
);
- QDir d(logDir);
- d.setFilter( QDir::Files | QDir::NoSymLinks );
- d.setSorting( QDir::Name );
+ TQDir d(logDir);
+ d.setFilter( TQDir::Files | TQDir::NoSymLinks );
+ d.setSorting( TQDir::Name );
const QFileInfoList *list = d.entryInfoList();
if ( list != 0 )
{
@@ -307,7 +307,7 @@ void HistoryDialog::init(Kopete::Contact *c)
rx.search(fi->fileName());
// We search for an item in the list view with the same year. If then we add the month
- QDate cDate = QDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1);
+ TQDate cDate = TQDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1);
DMPair pair(cDate, c->metaContact());
mInit.dateMCList.append(pair);
@@ -317,21 +317,21 @@ void HistoryDialog::init(Kopete::Contact *c)
}
}
-void HistoryDialog::dateSelected(QListViewItem* it)
+void HistoryDialog::dateSelected(TQListViewItem* it)
{
KListViewDateItem *item = static_cast<KListViewDateItem*>(it);
if (!item) return;
- QDate chosenDate = item->date();
+ TQDate chosenDate = item->date();
HistoryLogger logger(item->metaContact(), this);
- QValueList<Kopete::Message> msgs=logger.readMessages(chosenDate);
+ TQValueList<Kopete::Message> msgs=logger.readMessages(chosenDate);
setMessages(msgs);
}
-void HistoryDialog::setMessages(QValueList<Kopete::Message> msgs)
+void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs)
{
// Clear View
DOM::HTMLElement htmlBody = mHtmlPart->htmlDocument().body();
@@ -339,16 +339,16 @@ void HistoryDialog::setMessages(QValueList<Kopete::Message> msgs)
htmlBody.removeChild(htmlBody.childNodes().item(htmlBody.childNodes().length() - 1));
// ----
- QString dir = (QApplication::reverseLayout() ? QString::fromLatin1("rtl") :
- QString::fromLatin1("ltr"));
+ TQString dir = (TQApplication::reverseLayout() ? TQString::fromLatin1("rtl") :
+ TQString::fromLatin1("ltr"));
- QValueList<Kopete::Message>::iterator it = msgs.begin();
+ TQValueList<Kopete::Message>::iterator it = msgs.begin();
- QString accountLabel;
- QString resultHTML = "<b><font color=\"red\">" + (*it).timestamp().date().toString() + "</font></b><br/>";
- DOM::HTMLElement newNode = mHtmlPart->document().createElement(QString::fromLatin1("span"));
- newNode.setAttribute(QString::fromLatin1("dir"), dir);
+ TQString accountLabel;
+ TQString resultHTML = "<b><font color=\"red\">" + (*it).timestamp().date().toString() + "</font></b><br/>";
+ DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span"));
+ newNode.setAttribute(TQString::fromLatin1("dir"), dir);
newNode.setInnerHTML(resultHTML);
mHtmlPart->htmlDocument().body().appendChild(newNode);
@@ -370,7 +370,7 @@ void HistoryDialog::setMessages(QValueList<Kopete::Message> msgs)
}
accountLabel = (*it).from()->account()->accountLabel();
- QString body = (*it).parsedBody();
+ TQString body = (*it).parsedBody();
if (!mMainWidget->searchLine->text().isEmpty())
// If there is a search, then we hightlight the keywords
@@ -384,8 +384,8 @@ void HistoryDialog::setMessages(QValueList<Kopete::Message> msgs)
: "<font color=\"" + KopetePrefs::prefs()->textColor().light(200).name() + "\"><b>&lt;</b></font> ")
+ body + "<br/>";
- newNode = mHtmlPart->document().createElement(QString::fromLatin1("span"));
- newNode.setAttribute(QString::fromLatin1("dir"), dir);
+ newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span"));
+ newNode.setAttribute(TQString::fromLatin1("dir"), dir);
newNode.setInnerHTML(resultHTML);
mHtmlPart->htmlDocument().body().appendChild(newNode);
@@ -405,7 +405,7 @@ void HistoryDialog::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/
}
// Disable search button if there is no search text
-void HistoryDialog::slotSearchTextChanged(const QString& searchText)
+void HistoryDialog::slotSearchTextChanged(const TQString& searchText)
{
if (searchText.isEmpty())
{
@@ -442,8 +442,8 @@ void HistoryDialog::slotSearchErase()
* We do the search respecting the current metacontact filter item. To do this, we iterate over the
* elements in the KListView (KListViewDateItems) and, for each one, we iterate over its subcontacts,
* manually searching the log files of each one. To avoid searching files twice, the months that have
-* been searched already are stored in searchedMonths. The matches are placed in the matches QMap.
-* Finally, the current date item is checked in the matches QMap, and if it is present, it is shown.
+* been searched already are stored in searchedMonths. The matches are placed in the matches TQMap.
+* Finally, the current date item is checked in the matches TQMap, and if it is present, it is shown.
*
* Keyword highlighting is done in setMessages() : if the search field isn't empty, we highlight the
* search keyword.
@@ -454,9 +454,9 @@ void HistoryDialog::slotSearch()
{
if (mMainWidget->dateListView->childCount() == 0) return;
- QRegExp rx("^ <msg.*time=\"(\\d+) \\d+:\\d+:\\d+\" >([^<]*)<");
- QMap<QDate, QValueList<Kopete::MetaContact*> > monthsSearched;
- QMap<QDate, QValueList<Kopete::MetaContact*> > matches;
+ TQRegExp rx("^ <msg.*time=\"(\\d+) \\d+:\\d+:\\d+\" >([^<]*)<");
+ TQMap<TQDate, TQValueList<Kopete::MetaContact*> > monthsSearched;
+ TQMap<TQDate, TQValueList<Kopete::MetaContact*> > matches;
// cancel button pressed
if (mSearching)
@@ -480,18 +480,18 @@ void HistoryDialog::slotSearch()
qApp->processEvents();
if (!mSearching) return;
- QDate month(curItem->date().year(),curItem->date().month(),1);
+ TQDate month(curItem->date().year(),curItem->date().month(),1);
// if we haven't searched the relevant history logs, search them now
if (!monthsSearched[month].contains(curItem->metaContact()))
{
monthsSearched[month].push_back(curItem->metaContact());
- QPtrList<Kopete::Contact> contacts = curItem->metaContact()->contacts();
- for(QPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it)
+ TQPtrList<Kopete::Contact> contacts = curItem->metaContact()->contacts();
+ for(TQPtrListIterator<Kopete::Contact> it( contacts ); it.current(); ++it)
{
// get filename and open file
- QString filename(HistoryLogger::getFileName(*it, curItem->date()));
- if (!QFile::exists(filename)) continue;
- QFile file(filename);
+ TQString filename(HistoryLogger::getFileName(*it, curItem->date()));
+ if (!TQFile::exists(filename)) continue;
+ TQFile file(filename);
file.open(IO_ReadOnly);
if (!file.isOpen())
{
@@ -500,8 +500,8 @@ void HistoryDialog::slotSearch()
continue;
}
- QTextStream stream(&file);
- QString textLine;
+ TQTextStream stream(&file);
+ TQString textLine;
while(!stream.atEnd())
{
textLine = stream.readLine();
@@ -511,7 +511,7 @@ void HistoryDialog::slotSearch()
{
// only match message body
if (rx.cap(2).contains(mMainWidget->searchLine->text()))
- matches[QDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact());
+ matches[TQDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact());
}
// this will happen when multiline messages are searched, properly
// parsing the files would fix this
@@ -558,7 +558,7 @@ void HistoryDialog::slotContactChanged(int index)
}
}
-void HistoryDialog::initProgressBar(const QString& text, int nbSteps)
+void HistoryDialog::initProgressBar(const TQString& text, int nbSteps)
{
mMainWidget->searchProgress->setTotalSteps(nbSteps);
mMainWidget->searchProgress->setProgress(0);
@@ -572,7 +572,7 @@ void HistoryDialog::doneProgressBar()
mMainWidget->statusLabel->setText(i18n("Ready"));
}
-void HistoryDialog::slotRightClick(const QString &url, const QPoint &point)
+void HistoryDialog::slotRightClick(const TQString &url, const TQPoint &point)
{
KPopupMenu *chatWindowPopup = 0L;
chatWindowPopup = new KPopupMenu();
@@ -586,28 +586,28 @@ void HistoryDialog::slotRightClick(const QString &url, const QPoint &point)
mCopyAct->setEnabled( mHtmlPart->hasSelection() );
mCopyAct->plug( chatWindowPopup );
- connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) );
+ connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup, TQT_SLOT( deleteLater() ) );
chatWindowPopup->popup(point);
}
void HistoryDialog::slotCopy()
{
- QString qsSelection;
+ TQString qsSelection;
qsSelection = mHtmlPart->selectedText();
if ( qsSelection.isEmpty() ) return;
- disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection()));
- QApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard);
- QApplication::clipboard()->setText(qsSelection, QClipboard::Selection);
- connect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection()));
+ disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection()));
+ TQApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard);
+ TQApplication::clipboard()->setText(qsSelection, QClipboard::Selection);
+ connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection()));
}
void HistoryDialog::slotCopyURL()
{
- disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection()));
- QApplication::clipboard()->setText( mURL, QClipboard::Clipboard);
- QApplication::clipboard()->setText( mURL, QClipboard::Selection);
- connect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection()));
+ disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection()));
+ TQApplication::clipboard()->setText( mURL, QClipboard::Clipboard);
+ TQApplication::clipboard()->setText( mURL, QClipboard::Selection);
+ connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection()));
}
#include "historydialog.moc"
diff --git a/kopete/plugins/history/historydialog.h b/kopete/plugins/history/historydialog.h
index cf26037d..63b08470 100644
--- a/kopete/plugins/history/historydialog.h
+++ b/kopete/plugins/history/historydialog.h
@@ -19,8 +19,8 @@
#ifndef _HISTORYDIALOG_H
#define _HISTORYDIALOG_H
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
#include <klistview.h>
@@ -45,13 +45,13 @@ class KListViewDateItem;
class DMPair
{
public:
- DMPair() {md = QDate(0, 0, 0); mc = 0; }
- DMPair(QDate d, Kopete::MetaContact *c) { md = d; mc =c; }
- QDate date() const { return md; }
+ DMPair() {md = TQDate(0, 0, 0); mc = 0; }
+ DMPair(TQDate d, Kopete::MetaContact *c) { md = d; mc =c; }
+ TQDate date() const { return md; }
Kopete::MetaContact* metaContact() const { return mc; }
bool operator==(const DMPair p1) const { return p1.date() == this->date() && p1.metaContact() == this->metaContact(); }
private:
- QDate md;
+ TQDate md;
Kopete::MetaContact *mc;
};
@@ -64,7 +64,7 @@ class HistoryDialog : public KDialogBase
Q_OBJECT
public:
- HistoryDialog(Kopete::MetaContact *mc, QWidget* parent=0,
+ HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent=0,
const char* name="HistoryDialog");
~HistoryDialog();
@@ -80,20 +80,20 @@ class HistoryDialog : public KDialogBase
void slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/);
// Called when a date is selected in the treeview
- void dateSelected(QListViewItem *);
+ void dateSelected(TQListViewItem *);
void slotSearch();
// Reinitialise search
void slotSearchErase();
- void slotSearchTextChanged(const QString& txt); // To enable/disable search button
+ void slotSearchTextChanged(const TQString& txt); // To enable/disable search button
void slotContactChanged(int index);
void slotFilterChanged(int index);
void init();
void slotLoadDays();
- void slotRightClick(const QString &url, const QPoint &point);
+ void slotRightClick(const TQString &url, const TQPoint &point);
void slotCopy();
void slotCopyURL();
@@ -101,7 +101,7 @@ class HistoryDialog : public KDialogBase
enum Disabled { Prev=1, Next=2 };
void refreshEnabled( /*Disabled*/ uint disabled );
- void initProgressBar(const QString& text, int nbSteps);
+ void initProgressBar(const TQString& text, int nbSteps);
void doneProgressBar();
void init(Kopete::MetaContact *mc);
void init(Kopete::Contact *c);
@@ -109,7 +109,7 @@ class HistoryDialog : public KDialogBase
/**
* Show the messages in the HTML View
*/
- void setMessages(QValueList<Kopete::Message> m);
+ void setMessages(TQValueList<Kopete::Message> m);
void listViewShowElements(bool s);
@@ -123,7 +123,7 @@ class HistoryDialog : public KDialogBase
*/
Kopete::MetaContact *mMetaContact;
- QPtrList<Kopete::MetaContact> mMetaContactList;
+ TQPtrList<Kopete::MetaContact> mMetaContactList;
// History View
KHTMLView *mHtmlView;
@@ -133,14 +133,14 @@ class HistoryDialog : public KDialogBase
struct Init
{
- QValueList<DMPair> dateMCList; // mc for MetaContact
+ TQValueList<DMPair> dateMCList; // mc for MetaContact
} mInit;
bool mSearching;
KAction *mCopyAct;
KAction *mCopyURLAct;
- QString mURL;
+ TQString mURL;
};
#endif
diff --git a/kopete/plugins/history/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp
index 133e50a3..4b1798ae 100644
--- a/kopete/plugins/history/historyguiclient.cpp
+++ b/kopete/plugins/history/historyguiclient.cpp
@@ -28,7 +28,7 @@
class HistoryPlugin;
HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name)
- : QObject(parent, name), KXMLGUIClient(parent)
+ : TQObject(parent, name), KXMLGUIClient(parent)
{
setInstance(KGenericFactory<HistoryPlugin>::instance());
@@ -38,12 +38,12 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name
if(!m_manager || m_manager->members().isEmpty())
deleteLater();
- QPtrList<Kopete::Contact> mb=m_manager->members();
+ TQPtrList<Kopete::Contact> mb=m_manager->members();
m_logger=new HistoryLogger( mb.first() , this );
- actionLast=new KAction( i18n("History Last" ), QString::fromLatin1( "finish" ), 0, this, SLOT(slotLast()), actionCollection() , "historyLast" );
- actionPrev = KStdAction::back( this, SLOT(slotPrevious()), actionCollection() , "historyPrevious" );
- actionNext = KStdAction::forward( this, SLOT(slotNext()), actionCollection() , "historyNext" );
+ actionLast=new KAction( i18n("History Last" ), TQString::fromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" );
+ actionPrev = KStdAction::back( this, TQT_SLOT(slotPrevious()), actionCollection() , "historyPrevious" );
+ actionNext = KStdAction::forward( this, TQT_SLOT(slotNext()), actionCollection() , "historyNext" );
// we are generally at last when begining
actionPrev->setEnabled(true);
@@ -64,8 +64,8 @@ void HistoryGUIClient::slotPrevious()
KopeteView *m_currentView = m_manager->view(true);
m_currentView->clear();
- QPtrList<Kopete::Contact> mb = m_manager->members();
- QValueList<Kopete::Message> msgs = m_logger->readMessages(
+ TQPtrList<Kopete::Contact> mb = m_manager->members();
+ TQValueList<Kopete::Message> msgs = m_logger->readMessages(
HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L,
HistoryLogger::AntiChronological, true);
@@ -81,9 +81,9 @@ void HistoryGUIClient::slotLast()
KopeteView *m_currentView = m_manager->view(true);
m_currentView->clear();
- QPtrList<Kopete::Contact> mb = m_manager->members();
+ TQPtrList<Kopete::Contact> mb = m_manager->members();
m_logger->setPositionToLast();
- QValueList<Kopete::Message> msgs = m_logger->readMessages(
+ TQValueList<Kopete::Message> msgs = m_logger->readMessages(
HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L,
HistoryLogger::AntiChronological, true);
@@ -100,8 +100,8 @@ void HistoryGUIClient::slotNext()
KopeteView *m_currentView = m_manager->view(true);
m_currentView->clear();
- QPtrList<Kopete::Contact> mb = m_manager->members();
- QValueList<Kopete::Message> msgs = m_logger->readMessages(
+ TQPtrList<Kopete::Contact> mb = m_manager->members();
+ TQValueList<Kopete::Message> msgs = m_logger->readMessages(
HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L,
HistoryLogger::Chronological, false);
diff --git a/kopete/plugins/history/historyguiclient.h b/kopete/plugins/history/historyguiclient.h
index 420795e0..792325fc 100644
--- a/kopete/plugins/history/historyguiclient.h
+++ b/kopete/plugins/history/historyguiclient.h
@@ -16,7 +16,7 @@
#ifndef HISTORYGUICLIENT_H
#define HISTORYGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -26,7 +26,7 @@ class KAction;
/**
*@author Olivier Goffart
*/
-class HistoryGUIClient : public QObject , public KXMLGUIClient
+class HistoryGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
public:
diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp
index 7848136f..96f4d6dc 100644
--- a/kopete/plugins/history/historylogger.cpp
+++ b/kopete/plugins/history/historylogger.cpp
@@ -18,12 +18,12 @@
#include "historylogger.h"
#include "historyconfig.h"
-#include <qregexp.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -37,37 +37,37 @@
#include "kopetechatsession.h"
// -----------------------------------------------------------------------------
-HistoryLogger::HistoryLogger( Kopete::MetaContact *m, QObject *parent, const char *name )
- : QObject(parent, name)
+HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const char *name )
+ : TQObject(parent, name)
{
m_saveTimer=0L;
m_saveTimerTime=0;
m_metaContact=m;
m_hideOutgoing=false;
m_cachedMonth=-1;
- m_realMonth=QDate::currentDate().month();
+ m_realMonth=TQDate::currentDate().month();
m_oldSens=Default;
//the contact may be destroyed, for example, if the contact changes its metacontact
- connect(m_metaContact , SIGNAL(destroyed(QObject *)) , this , SLOT(slotMCDeleted()));
+ connect(m_metaContact , TQT_SIGNAL(destroyed(TQObject *)) , this , TQT_SLOT(slotMCDeleted()));
setPositionToLast();
}
-HistoryLogger::HistoryLogger( Kopete::Contact *c, QObject *parent, const char *name )
- : QObject(parent, name)
+HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *parent, const char *name )
+ : TQObject(parent, name)
{
m_saveTimer=0L;
m_saveTimerTime=0;
m_cachedMonth=-1;
m_metaContact=c->metaContact();
m_hideOutgoing=false;
- m_realMonth=QDate::currentDate().month();
+ m_realMonth=TQDate::currentDate().month();
m_oldSens=Default;
//the contact may be destroyed, for example, if the contact changes its metacontact
- connect(m_metaContact , SIGNAL(destroyed(QObject *)) , this , SLOT(slotMCDeleted()));
+ connect(m_metaContact , TQT_SIGNAL(destroyed(TQObject *)) , this , TQT_SLOT(slotMCDeleted()));
setPositionToLast();
}
@@ -105,16 +105,16 @@ void HistoryLogger::setCurrentMonth(int month)
}
-QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain)
+TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain)
{
- if(m_realMonth!=QDate::currentDate().month())
+ if(m_realMonth!=TQDate::currentDate().month())
{ //We changed month, our indice are not correct anymore, clean memory.
// or we will see what i called "the 31 midnight bug"(TM) :-) -Olivier
m_documents.clear();
m_cachedMonth=-1;
m_currentMonth++; //Not usre it's ok, but should work;
m_oldMonth++; // idem
- m_realMonth=QDate::currentDate().month();
+ m_realMonth=TQDate::currentDate().month();
}
if(!m_metaContact)
@@ -122,22 +122,22 @@ QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int m
if(c && c->metaContact())
m_metaContact=c->metaContact();
else
- return QDomDocument();
+ return TQDomDocument();
}
if(!m_metaContact->contacts().contains(c))
{
if(contain)
*contain=false;
- return QDomDocument();
+ return TQDomDocument();
}
- QMap<unsigned int , QDomDocument> documents = m_documents[c];
+ TQMap<unsigned int , TQDomDocument> documents = m_documents[c];
if (documents.contains(month))
return documents[month];
- QDomDocument doc = getDocument(c, QDate::currentDate().addMonths(0-month), canLoad, contain);
+ TQDomDocument doc = getDocument(c, TQDate::currentDate().addMonths(0-month), canLoad, contain);
documents.insert(month, doc);
m_documents[c]=documents;
@@ -146,35 +146,35 @@ QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int m
}
-QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const QDate date , bool canLoad , bool* contain)
+TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate date , bool canLoad , bool* contain)
{
if(!m_metaContact)
{ //this may happen if the contact has been moved, and the MC deleted
if(c && c->metaContact())
m_metaContact=c->metaContact();
else
- return QDomDocument();
+ return TQDomDocument();
}
if(!m_metaContact->contacts().contains(c))
{
if(contain)
*contain=false;
- return QDomDocument();
+ return TQDomDocument();
}
if(!canLoad)
{
if(contain)
*contain=false;
- return QDomDocument();
+ return TQDomDocument();
}
QString FileName = getFileName(c, date);
- QDomDocument doc( "Kopete-History" );
+ TQDomDocument doc( "Kopete-History" );
- QFile file( FileName );
+ TQFile file( FileName );
if ( !file.open( IO_ReadOnly ) )
{
if(contain)
@@ -207,7 +207,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co
const Kopete::Contact *c = ct;
if(!c && msg.manager() )
{
- QPtrList<Kopete::Contact> mb=msg.manager()->members() ;
+ TQPtrList<Kopete::Contact> mb=msg.manager()->members() ;
c = mb.first();
}
if(!c) //If the contact is still not initialized, use the message author.
@@ -225,8 +225,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co
if(!c || !m_metaContact->contacts().contains(c) )
{
- /*QPtrList<Kopete::Contact> contacts= m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ /*TQPtrList<Kopete::Contact> contacts= m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> it( contacts );
for( ; it.current(); ++it )
{
if( (*it)->protocol()->pluginId() == msg.from()->protocol()->pluginId() )
@@ -242,36 +242,36 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co
return;
}
- QDomDocument doc=getDocument(c,0);
- QDomElement docElem = doc.documentElement();
+ TQDomDocument doc=getDocument(c,0);
+ TQDomElement docElem = doc.documentElement();
if(docElem.isNull())
{
docElem= doc.createElement( "kopete-history" );
docElem.setAttribute ( "version" , "0.9" );
doc.appendChild( docElem );
- QDomElement headElem = doc.createElement( "head" );
+ TQDomElement headElem = doc.createElement( "head" );
docElem.appendChild( headElem );
- QDomElement dateElem = doc.createElement( "date" );
- dateElem.setAttribute( "year", QString::number(QDate::currentDate().year()) );
- dateElem.setAttribute( "month", QString::number(QDate::currentDate().month()) );
+ TQDomElement dateElem = doc.createElement( "date" );
+ dateElem.setAttribute( "year", TQString::number(TQDate::currentDate().year()) );
+ dateElem.setAttribute( "month", TQString::number(TQDate::currentDate().month()) );
headElem.appendChild(dateElem);
- QDomElement myselfElem = doc.createElement( "contact" );
+ TQDomElement myselfElem = doc.createElement( "contact" );
myselfElem.setAttribute( "type", "myself" );
myselfElem.setAttribute( "contactId", c->account()->myself()->contactId() );
headElem.appendChild(myselfElem);
- QDomElement contactElem = doc.createElement( "contact" );
+ TQDomElement contactElem = doc.createElement( "contact" );
contactElem.setAttribute( "contactId", c->contactId() );
headElem.appendChild(contactElem);
}
- QDomElement msgElem = doc.createElement( "msg" );
+ TQDomElement msgElem = doc.createElement( "msg" );
msgElem.setAttribute( "in", msg.direction()==Kopete::Message::Outbound ? "0" : "1" );
msgElem.setAttribute( "from", msg.from()->contactId() );
msgElem.setAttribute( "nick", msg.from()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); //do we have to set this?
msgElem.setAttribute( "time", msg.timestamp().toString("d h:m:s") );
- QDomText msgNode = doc.createTextNode( msg.plainBody() );
+ TQDomText msgNode = doc.createTextNode( msg.plainBody() );
docElem.appendChild( msgElem );
msgElem.appendChild( msgNode );
@@ -280,7 +280,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co
// On hight-traffic channel, saving can take lots of CPU. (because the file is big)
// So i wait a time proportional to the time needed to save..
- const QString filename=getFileName(c,QDate::currentDate());
+ const TQString filename=getFileName(c,TQDate::currentDate());
if(!m_toSaveFileName.isEmpty() && m_toSaveFileName != filename)
{ //that mean the contact or the month has changed, save it now.
saveToDisk();
@@ -291,8 +291,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co
if(!m_saveTimer)
{
- m_saveTimer=new QTimer(this);
- connect( m_saveTimer, SIGNAL( timeout() ) , this, SLOT(saveToDisk()) );
+ m_saveTimer=new TQTimer(this);
+ connect( m_saveTimer, TQT_SIGNAL( timeout() ) , this, TQT_SLOT(saveToDisk()) );
}
if(!m_saveTimer->isActive())
m_saveTimer->start( m_saveTimerTime, true /*singleshot*/ );
@@ -305,14 +305,14 @@ void HistoryLogger::saveToDisk()
if(m_toSaveFileName.isEmpty() || m_toSaveDocument.isNull())
return;
- QTime t;
+ TQTime t;
t.start(); //mesure the time needed to save.
KSaveFile file( m_toSaveFileName );
if( file.status() == 0 )
{
- QTextStream *stream = file.textStream();
- //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non?
+ TQTextStream *stream = file.textStream();
+ //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non?
m_toSaveDocument.save( *stream, 1 );
file.close();
@@ -323,36 +323,36 @@ void HistoryLogger::saveToDisk()
// But it may take 500 ms if the file to save becomes too big (1Mb).
kdDebug(14310) << k_funcinfo << m_toSaveFileName << " saved in " << t.elapsed() << " ms " <<endl ;
- m_toSaveFileName=QString::null;
- m_toSaveDocument=QDomDocument();
+ m_toSaveFileName=TQString::null;
+ m_toSaveDocument=TQDomDocument();
}
else
kdError(14310) << k_funcinfo << "impossible to save the history file " << m_toSaveFileName << endl;
}
-QValueList<Kopete::Message> HistoryLogger::readMessages(QDate date)
+TQValueList<Kopete::Message> HistoryLogger::readMessages(TQDate date)
{
- QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility)
- QValueList<Kopete::Message> messages;
+ TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility)
+ TQValueList<Kopete::Message> messages;
- QPtrList<Kopete::Contact> ct=m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( ct );
+ TQPtrList<Kopete::Contact> ct=m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> it( ct );
for( ; it.current(); ++it )
{
- QDomDocument doc=getDocument(*it,date, true, 0L);
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomDocument doc=getDocument(*it,date, true, 0L);
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
while(!n.isNull())
{
- QDomElement msgElem2 = n.toElement();
+ TQDomElement msgElem2 = n.toElement();
if( !msgElem2.isNull() && msgElem2.tagName()=="msg")
{
rxTime.search(msgElem2.attribute("time"));
- QDateTime dt( QDate(date.year() , date.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) );
+ TQDateTime dt( TQDate(date.year() , date.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) );
if (dt.date() != date)
{
@@ -366,7 +366,7 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(QDate date)
if(!m_hideOutgoing || dir != Kopete::Message::Outbound)
{ //parse only if we don't hide it
- QString f=msgElem2.attribute("from" );
+ TQString f=msgElem2.attribute("from" );
const Kopete::Contact *from=f.isNull()? 0L : (*it)->account()->contacts()[f];
if(!from)
@@ -376,13 +376,13 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(QDate date)
to.append( dir==Kopete::Message::Inbound ? (*it)->account()->myself() : *it );
Kopete::Message msg(dt, from, to, msgElem2.text(), dir);
- msg.setBody( QString::fromLatin1("<span title=\"%1\">%2</span>")
+ msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>")
.arg( dt.toString(Qt::LocalDate), msg.escapedBody() ),
Kopete::Message::RichText);
// We insert it at the good place, given its date
- QValueListIterator<Kopete::Message> msgIt;
+ TQValueListIterator<Kopete::Message> msgIt;
for (msgIt = messages.begin(); msgIt != messages.end(); ++msgIt)
{
@@ -400,15 +400,15 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(QDate date)
return messages;
}
-QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
+TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
const Kopete::Contact *c, Sens sens, bool reverseOrder, bool colorize)
{
- //QDate dd = QDate::currentDate().addMonths(0-m_currentMonth);
+ //TQDate dd = TQDate::currentDate().addMonths(0-m_currentMonth);
- QValueList<Kopete::Message> messages;
+ TQValueList<Kopete::Message> messages;
// A regexp useful for this function
- QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility)
+ TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility)
if(!m_metaContact)
{ //this may happen if the contact has been moved, and the MC deleted
@@ -436,7 +436,7 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
m_oldSens=sens;
//getting the color for messages:
- QColor fgColor = HistoryConfig::history_color();
+ TQColor fgColor = HistoryConfig::history_color();
//Hello guest!
@@ -448,7 +448,7 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
// we see what contact we have to read first, and we look at the firt date before another contact
// has a message with a bigger date.
- QDateTime timeLimit;
+ TQDateTime timeLimit;
const Kopete::Contact *currentContact=c;
if(!c && m_metaContact->contacts().count()==1)
currentContact=m_metaContact->contacts().first();
@@ -459,26 +459,26 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
while(messages.count() < lines)
{
- timeLimit=QDateTime();
- QDomElement msgElem; //here is the message element
- QDateTime timestamp; //and the timestamp of this message
+ timeLimit=TQDateTime();
+ TQDomElement msgElem; //here is the message element
+ TQDateTime timestamp; //and the timestamp of this message
if(!c && m_metaContact->contacts().count()>1)
{ //we have to merge the differents subcontact history
- QPtrList<Kopete::Contact> ct=m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( ct );
+ TQPtrList<Kopete::Contact> ct=m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> it( ct );
for( ; it.current(); ++it )
{ //we loop over each contact. we are searching the contact with the next message with the smallest date,
// it will becomes our current contact, and the contact with the mext message with the second smallest
// date, this date will bocomes the limit.
- QDomNode n;
+ TQDomNode n;
if(m_currentElements.contains(*it))
n=m_currentElements[*it];
else //there is not yet "next message" register, so we will take the first (for the current month)
{
- QDomDocument doc=getDocument(*it,m_currentMonth);
- QDomElement docElem = doc.documentElement();
+ TQDomDocument doc=getDocument(*it,m_currentMonth);
+ TQDomElement docElem = doc.documentElement();
n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild();
//i can't drop the root element
@@ -486,12 +486,12 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
}
while(!n.isNull())
{
- QDomElement msgElem2 = n.toElement();
+ TQDomElement msgElem2 = n.toElement();
if( !msgElem2.isNull() && msgElem2.tagName()=="msg")
{
rxTime.search(msgElem2.attribute("time"));
- QDate d=QDate::currentDate().addMonths(0-m_currentMonth);
- QDateTime dt( QDate(d.year() , d.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) );
+ TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth);
+ TQDateTime dt( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) );
if(!timestamp.isValid() || ((sens==Chronological )? dt < timestamp : dt > timestamp) )
{
timeLimit=timestamp;
@@ -516,10 +516,10 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
msgElem=m_currentElements[currentContact];
else
{
- QDomDocument doc=getDocument(currentContact,m_currentMonth);
- QDomElement docElem = doc.documentElement();
- QDomNode n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild();
- msgElem=QDomElement();
+ TQDomDocument doc=getDocument(currentContact,m_currentMonth);
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild();
+ msgElem=TQDomElement();
while(!n.isNull()) //continue until we get a msg
{
msgElem=n.toElement();
@@ -572,9 +572,9 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
if(!m_hideOutgoing || dir != Kopete::Message::Outbound)
{ //parse only if we don't hide it
- if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(QRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) ))
+ if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) ))
{
- QString f=msgElem.attribute("from" );
+ TQString f=msgElem.attribute("from" );
const Kopete::Contact *from=(f.isNull() || !currentContact) ? 0L : currentContact->account()->contacts()[f];
if(!from)
@@ -587,14 +587,14 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
{
//parse timestamp only if it was not already parsed
rxTime.search(msgElem.attribute("time"));
- QDate d=QDate::currentDate().addMonths(0-m_currentMonth);
- timestamp=QDateTime( QDate(d.year() , d.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) );
+ TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth);
+ timestamp=TQDateTime( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) );
}
Kopete::Message msg(timestamp, from, to, msgElem.text(), dir);
if (colorize)
{
- msg.setBody( QString::fromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>")
+ msg.setBody( TQString::fromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>")
.arg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ),
Kopete::Message::RichText
);
@@ -602,7 +602,7 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
}
else
{
- msg.setBody( QString::fromLatin1("<span title=\"%1\">%2</span>")
+ msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>")
.arg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ),
Kopete::Message::RichText
);
@@ -617,10 +617,10 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
//here is the point of workaround. If i drop the root element, this crashes
//get the next message
- QDomNode node = ( (sens==Chronological) ? msgElem.nextSibling() :
+ TQDomNode node = ( (sens==Chronological) ? msgElem.nextSibling() :
msgElem.previousSibling() );
- msgElem = QDomElement(); //n.toElement();
+ msgElem = TQDomElement(); //n.toElement();
while (!node.isNull() && msgElem.isNull())
{
msgElem = node.toElement();
@@ -632,19 +632,19 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
{
// In case of hideoutgoing messages, it is faster to do
// this, so we don't parse the date if it is not needed
- QRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)");
+ TQRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)");
rx.search(msgElem.attribute("time"));
- QDate d = QDate::currentDate().addMonths(0-m_currentMonth);
- timestamp = QDateTime(
- QDate(d.year(), d.month(), rx.cap(1).toUInt()),
- QTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) );
+ TQDate d = TQDate::currentDate().addMonths(0-m_currentMonth);
+ timestamp = TQDateTime(
+ TQDate(d.year(), d.month(), rx.cap(1).toUInt()),
+ TQTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) );
}
else
- timestamp = QDateTime(); //invalid
+ timestamp = TQDateTime(); //invalid
}
else
- msgElem = QDomElement();
+ msgElem = TQDomElement();
}
node = (sens == Chronological) ? node.nextSibling() :
@@ -660,30 +660,30 @@ QValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines,
return messages;
}
-QString HistoryLogger::getFileName(const Kopete::Contact* c, QDate date)
+TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date)
{
- QString name = c->protocol()->pluginId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
- QString::fromLatin1( "/" ) +
- c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
- QString::fromLatin1( "/" ) +
- c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
+ TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
+ TQString::fromLatin1( "/" ) +
+ c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
+ TQString::fromLatin1( "/" ) +
+ c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
date.toString(".yyyyMM");
- QString filename=locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ;
+ TQString filename=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ;
//Check if there is a kopete 0.7.x file
- QFileInfo fi(filename);
+ TQFileInfo fi(filename);
if(!fi.exists())
{
- name = c->protocol()->pluginId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
- QString::fromLatin1( "/" ) +
- c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) +
+ name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
+ TQString::fromLatin1( "/" ) +
+ c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) +
date.toString(".yyyyMM");
- QString filename2=locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ;
+ TQString filename2=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ;
- QFileInfo fi2(filename2);
+ TQFileInfo fi2(filename2);
if(fi2.exists())
return filename2;
}
@@ -697,25 +697,25 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c)
if(!c)
return getFirstMonth();
- QRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" );
- QFileInfo *fi;
+ TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" );
+ TQFileInfo *fi;
// BEGIN check if there are Kopete 0.7.x
- QDir d1(locateLocal("data",QString("kopete/logs/")+
- c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-"))
+ TQDir d1(locateLocal("data",TQString("kopete/logs/")+
+ c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-"))
));
- d1.setFilter( QDir::Files | QDir::NoSymLinks );
- d1.setSorting( QDir::Name );
+ d1.setFilter( TQDir::Files | TQDir::NoSymLinks );
+ d1.setSorting( TQDir::Name );
const QFileInfoList *list1 = d1.entryInfoList();
QFileInfoListIterator it1( *list1 );
while ( (fi = it1.current()) != 0 )
{
- if(fi->fileName().contains(c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) )))
+ if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )))
{
rx.search(fi->fileName());
- int result = 12*(QDate::currentDate().year() - rx.cap(1).toUInt()) +QDate::currentDate().month() - rx.cap(2).toUInt();
+ int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt();
if(result < 0)
{
@@ -729,23 +729,23 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c)
// END of kopete 0.7.x check
- QDir d(locateLocal("data",QString("kopete/logs/")+
- c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) +
- QString::fromLatin1( "/" ) +
- c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) )
+ TQDir d(locateLocal("data",TQString("kopete/logs/")+
+ c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) +
+ TQString::fromLatin1( "/" ) +
+ c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )
));
- d.setFilter( QDir::Files | QDir::NoSymLinks );
- d.setSorting( QDir::Name );
+ d.setFilter( TQDir::Files | TQDir::NoSymLinks );
+ d.setSorting( TQDir::Name );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
while ( (fi = it.current()) != 0 )
{
- if(fi->fileName().contains(c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) )))
+ if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) )))
{
rx.search(fi->fileName());
- int result = 12*(QDate::currentDate().year() - rx.cap(1).toUInt()) +QDate::currentDate().month() - rx.cap(2).toUInt();
+ int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt();
if(result < 0)
{
kdWarning(14310) << k_funcinfo << "Kopete only found log file made in the future. Check your date!" << endl;
@@ -767,8 +767,8 @@ unsigned int HistoryLogger::getFirstMonth()
return 0;
int m=0;
- QPtrList<Kopete::Contact> contacts=m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it( contacts );
+ TQPtrList<Kopete::Contact> contacts=m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> it( contacts );
for( ; it.current(); ++it )
{
int m2=getFirstMonth(*it);
@@ -788,14 +788,14 @@ void HistoryLogger::slotMCDeleted()
m_metaContact = 0;
}
-void HistoryLogger::setFilter(const QString& filter, bool caseSensitive , bool isRegExp)
+void HistoryLogger::setFilter(const TQString& filter, bool caseSensitive , bool isRegExp)
{
m_filter=filter;
m_filterCaseSensitive=caseSensitive;
m_filterRegExp=isRegExp;
}
-QString HistoryLogger::filter() const
+TQString HistoryLogger::filter() const
{
return m_filter;
}
@@ -810,26 +810,26 @@ bool HistoryLogger::filterRegExp() const
return m_filterRegExp;
}
-QValueList<int> HistoryLogger::getDaysForMonth(QDate date)
+TQValueList<int> HistoryLogger::getDaysForMonth(TQDate date)
{
- QRegExp rxTime("time=\"(\\d+) \\d+:\\d+(:\\d+)?\""); //(with a 0.7.x compatibility)
+ TQRegExp rxTime("time=\"(\\d+) \\d+:\\d+(:\\d+)?\""); //(with a 0.7.x compatibility)
- QValueList<int> dayList;
+ TQValueList<int> dayList;
- QPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
- QPtrListIterator<Kopete::Contact> it(contacts);
+ TQPtrList<Kopete::Contact> contacts = m_metaContact->contacts();
+ TQPtrListIterator<Kopete::Contact> it(contacts);
int lastDay=0;
for(; it.current(); ++it)
{
// kdDebug() << getFileName(*it, date) << endl;
- QFile file(getFileName(*it, date));
+ TQFile file(getFileName(*it, date));
if(!file.open(IO_ReadOnly))
{
continue;
}
- QTextStream stream(&file);
- QString fullText = stream.read();
+ TQTextStream stream(&file);
+ TQString fullText = stream.read();
file.close();
int pos = 0;
diff --git a/kopete/plugins/history/historylogger.h b/kopete/plugins/history/historylogger.h
index 85cdbdd7..49e368d9 100644
--- a/kopete/plugins/history/historylogger.h
+++ b/kopete/plugins/history/historylogger.h
@@ -17,7 +17,7 @@
#ifndef HISTORYLOGGER_H
#define HISTORYLOGGER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kopetemessage.h" //TODO: REMOVE
namespace Kopete { class Contact; }
@@ -46,8 +46,8 @@ public:
/**
* Constructor, takes the contact, and the color of messages
*/
- HistoryLogger( Kopete::MetaContact *m , QObject *parent = 0, const char *name = 0);
- HistoryLogger( Kopete::Contact *c , QObject *parent = 0, const char *name = 0);
+ HistoryLogger( Kopete::MetaContact *m , TQObject *parent = 0, const char *name = 0);
+ HistoryLogger( Kopete::Contact *c , TQObject *parent = 0, const char *name = 0);
~HistoryLogger();
@@ -62,10 +62,10 @@ public:
* set a searching filter
* @param filter is the string to search
* @param caseSensitive say if the case is important
- * @param isRegExp say if the filter is a QRegExp, or a simle string
+ * @param isRegExp say if the filter is a TQRegExp, or a simle string
*/
- void setFilter(const QString& filter, bool caseSensitive=false , bool isRegExp=false);
- QString filter() const;
+ void setFilter(const TQString& filter, bool caseSensitive=false , bool isRegExp=false);
+ TQString filter() const;
bool filterCaseSensitive() const ;
bool filterRegExp() const;
@@ -83,7 +83,7 @@ public:
* read @param lines message from the current position
* from Kopete::Contact @param c in the given @param sens
*/
- QValueList<Kopete::Message> readMessages(unsigned int lines,
+ TQValueList<Kopete::Message> readMessages(unsigned int lines,
const Kopete::Contact *c=0, Sens sens=Default,
bool reverseOrder=false, bool colorize=true);
@@ -92,7 +92,7 @@ public:
* because its structure is really different.
* Read all the messages for the given @param date
*/
- QValueList<Kopete::Message> readMessages(QDate date);
+ TQValueList<Kopete::Message> readMessages(TQDate date);
/**
@@ -113,40 +113,40 @@ public:
/**
* @return The list of the days for which there is a log for m_metaContact for month of * @param date (don't care of the day)
*/
- QValueList<int> getDaysForMonth(QDate date);
+ TQValueList<int> getDaysForMonth(TQDate date);
/**
* Get the filename of the xml file which contains the history from the
* contact in the specified @param date. Specify @param date in order to get the filename for
* the given date.year() date.month().
*/
- static QString getFileName(const Kopete::Contact* , QDate date);
+ static TQString getFileName(const Kopete::Contact* , TQDate date);
private:
bool m_hideOutgoing;
bool m_filterCaseSensitive;
bool m_filterRegExp;
- QString m_filter;
+ TQString m_filter;
/*
- *contais all QDomDocument, for a KC, for a specified Month
+ *contais all TQDomDocument, for a KC, for a specified Month
*/
- QMap<const Kopete::Contact*,QMap<unsigned int , QDomDocument> > m_documents;
+ TQMap<const Kopete::Contact*,TQMap<unsigned int , TQDomDocument> > m_documents;
/**
* Contains the current message.
* in fact, this is the next, still not showed
*/
- QMap<const Kopete::Contact*, QDomElement> m_currentElements;
+ TQMap<const Kopete::Contact*, TQDomElement> m_currentElements;
/**
* Get the document, open it is @param canload is true, contain is set to false if the document
* is not already contained
*/
- QDomDocument getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad=true , bool* contain=0L);
+ TQDomDocument getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad=true , bool* contain=0L);
- QDomDocument getDocument(const Kopete::Contact *c, const QDate date, bool canLoad=true, bool* contain=0L);
+ TQDomDocument getDocument(const Kopete::Contact *c, const TQDate date, bool canLoad=true, bool* contain=0L);
/**
* look over files to get the last month for this contact
@@ -175,16 +175,16 @@ private:
/*
* keep the old position in memory, so if we change the sens, we can begin here
*/
- QMap<const Kopete::Contact*, QDomElement> m_oldElements;
+ TQMap<const Kopete::Contact*, TQDomElement> m_oldElements;
unsigned int m_oldMonth;
Sens m_oldSens;
/**
* the timer used to save the file
*/
- QTimer *m_saveTimer;
- QDomDocument m_toSaveDocument;
- QString m_toSaveFileName;
+ TQTimer *m_saveTimer;
+ TQDomDocument m_toSaveDocument;
+ TQString m_toSaveFileName;
unsigned int m_saveTimerTime; //time in ms between each save
/**
@@ -199,7 +199,7 @@ private:
* due to a bug in QT, i have to keep the document element in the memory to
* prevent crashes
*/
- QValueList<QDomElement> workaround;
+ TQValueList<TQDomElement> workaround;
private slots:
/**
diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp
index bf8d70b4..af92fc09 100644
--- a/kopete/plugins/history/historyplugin.cpp
+++ b/kopete/plugins/history/historyplugin.cpp
@@ -41,22 +41,22 @@ typedef KGenericFactory<HistoryPlugin> HistoryPluginFactory;
static const KAboutData aboutdata("kopete_history", I18N_NOOP("History") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( kopete_history, HistoryPluginFactory( &aboutdata ) )
-HistoryPlugin::HistoryPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( HistoryPluginFactory::instance(), parent, name ), m_loggerFactory( this )
{
KAction *viewMetaContactHistory = new KAction( i18n("View &History" ),
- QString::fromLatin1( "history" ), 0, this, SLOT(slotViewHistory()),
+ TQString::fromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()),
actionCollection(), "viewMetaContactHistory" );
viewMetaContactHistory->setEnabled(
Kopete::ContactList::self()->selectedMetaContacts().count() == 1 );
- connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)),
- viewMetaContactHistory, SLOT(setEnabled(bool)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactSelected(bool)),
+ viewMetaContactHistory, TQT_SLOT(setEnabled(bool)));
- connect(Kopete::ChatSessionManager::self(), SIGNAL(viewCreated(KopeteView*)),
- this, SLOT(slotViewCreated(KopeteView*)));
+ connect(Kopete::ChatSessionManager::self(), TQT_SIGNAL(viewCreated(KopeteView*)),
+ this, TQT_SLOT(slotViewCreated(KopeteView*)));
- connect(this, SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged()));
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotSettingsChanged()));
setXMLFile("historyui.rc");
if(detectOldHistory())
@@ -73,14 +73,14 @@ HistoryPlugin::HistoryPlugin( QObject *parent, const char *name, const QStringLi
// Add GUI action to all existing kmm objects
// (Needed if the plugin is enabled while kopete is already running)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
{
if(!m_loggers.contains(*it))
{
m_loggers.insert(*it, new HistoryGUIClient( *it ) );
- connect( *it, SIGNAL(closing(Kopete::ChatSession*)),
- this, SLOT(slotKMMClosed(Kopete::ChatSession*)));
+ connect( *it, TQT_SIGNAL(closing(Kopete::ChatSession*)),
+ this, TQT_SLOT(slotKMMClosed(Kopete::ChatSession*)));
}
}
}
@@ -105,14 +105,14 @@ void HistoryPlugin::messageDisplayed(const Kopete::Message &m)
if(!m_loggers.contains(m.manager()))
{
m_loggers.insert(m.manager() , new HistoryGUIClient( m.manager() ) );
- connect(m.manager(), SIGNAL(closing(Kopete::ChatSession*)),
- this, SLOT(slotKMMClosed(Kopete::ChatSession*)));
+ connect(m.manager(), TQT_SIGNAL(closing(Kopete::ChatSession*)),
+ this, TQT_SLOT(slotKMMClosed(Kopete::ChatSession*)));
}
HistoryLogger *l=m_loggers[m.manager()]->logger();
if(l)
{
- QPtrList<Kopete::Contact> mb=m.manager()->members();
+ TQPtrList<Kopete::Contact> mb=m.manager()->members();
l->appendMessage(m,mb.first());
}
@@ -136,7 +136,7 @@ void HistoryPlugin::slotViewHistory()
void HistoryPlugin::slotViewCreated( KopeteView* v )
{
- if(v->plugin()->pluginInfo()->pluginName() != QString::fromLatin1("kopete_chatwindow") )
+ if(v->plugin()->pluginInfo()->pluginName() != TQString::fromLatin1("kopete_chatwindow") )
return; //Email chat windows are not supported.
bool autoChatWindow = HistoryConfig::auto_chatwindow();
@@ -144,7 +144,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v )
KopeteView *m_currentView = v;
Kopete::ChatSession *m_currentChatSession = v->msgManager();
- QPtrList<Kopete::Contact> mb = m_currentChatSession->members();
+ TQPtrList<Kopete::Contact> mb = m_currentChatSession->members();
if(!m_currentChatSession)
return; //i am sorry
@@ -152,8 +152,8 @@ void HistoryPlugin::slotViewCreated( KopeteView* v )
if(!m_loggers.contains(m_currentChatSession))
{
m_loggers.insert(m_currentChatSession , new HistoryGUIClient( m_currentChatSession ) );
- connect( m_currentChatSession, SIGNAL(closing(Kopete::ChatSession*)),
- this , SLOT(slotKMMClosed(Kopete::ChatSession*)));
+ connect( m_currentChatSession, TQT_SIGNAL(closing(Kopete::ChatSession*)),
+ this , TQT_SLOT(slotKMMClosed(Kopete::ChatSession*)));
}
if(!autoChatWindow || nbAutoChatWindow == 0)
@@ -163,7 +163,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v )
logger->setPositionToLast();
- QValueList<Kopete::Message> msgs = logger->readMessages(nbAutoChatWindow,
+ TQValueList<Kopete::Message> msgs = logger->readMessages(nbAutoChatWindow,
/*mb.first()*/ 0L, HistoryLogger::AntiChronological, true, true);
// make sure the last message is not the one which will be appened right
diff --git a/kopete/plugins/history/historyplugin.h b/kopete/plugins/history/historyplugin.h
index 63e2c87b..8c0f553d 100644
--- a/kopete/plugins/history/historyplugin.h
+++ b/kopete/plugins/history/historyplugin.h
@@ -18,9 +18,9 @@
#ifndef HISTORYPLUGIN_H
#define HISTORYPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "kopeteplugin.h"
@@ -75,7 +75,7 @@ class HistoryPlugin : public Kopete::Plugin
{
Q_OBJECT
public:
- HistoryPlugin( QObject *parent, const char *name, const QStringList &args );
+ HistoryPlugin( TQObject *parent, const char *name, const TQStringList &args );
~HistoryPlugin();
/**
@@ -97,7 +97,7 @@ class HistoryPlugin : public Kopete::Plugin
private:
HistoryMessageLoggerFactory m_loggerFactory;
- QMap<Kopete::ChatSession*,HistoryGUIClient*> m_loggers;
+ TQMap<Kopete::ChatSession*,HistoryGUIClient*> m_loggers;
Kopete::Message m_lastmessage;
};
diff --git a/kopete/plugins/history/historypreferences.cpp b/kopete/plugins/history/historypreferences.cpp
index 61fce469..370e6721 100644
--- a/kopete/plugins/history/historypreferences.cpp
+++ b/kopete/plugins/history/historypreferences.cpp
@@ -20,29 +20,29 @@
#include "historyprefsui.h"
#include <kgenericfactory.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <kcolorbutton.h>
#include <knuminput.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
typedef KGenericFactory<HistoryPreferences> HistoryConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_history, HistoryConfigFactory( "kcm_kopete_history" ) )
-HistoryPreferences::HistoryPreferences(QWidget *parent, const char*/*name*/, const QStringList &args)
+HistoryPreferences::HistoryPreferences(TQWidget *parent, const char*/*name*/, const TQStringList &args)
: KCModule(HistoryConfigFactory::instance(), parent, args)
{
kdDebug(14310) << k_funcinfo << "called." << endl;
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
p = new HistoryPrefsUI(this);
- connect(p->chkShowPrevious, SIGNAL(toggled(bool)), this, SLOT(slotShowPreviousChanged(bool)));
- connect(p->Number_Auto_chatwindow, SIGNAL(valueChanged(int)),
- this, SLOT(slotModified()));
- connect(p->Number_ChatWindow, SIGNAL(valueChanged(int)),
- this, SLOT(slotModified()));
- connect(p->History_color, SIGNAL(changed(const QColor&)),
- this, SLOT(slotModified()));
+ connect(p->chkShowPrevious, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotShowPreviousChanged(bool)));
+ connect(p->Number_Auto_chatwindow, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotModified()));
+ connect(p->Number_ChatWindow, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotModified()));
+ connect(p->History_color, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(slotModified()));
load();
}
diff --git a/kopete/plugins/history/historypreferences.h b/kopete/plugins/history/historypreferences.h
index 247e2bc8..bed6de7b 100644
--- a/kopete/plugins/history/historypreferences.h
+++ b/kopete/plugins/history/historypreferences.h
@@ -19,7 +19,7 @@
#define HISTORYPREFERENCES_H
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class HistoryPrefsUI;
@@ -30,8 +30,8 @@ class HistoryPreferences : public KCModule
{
Q_OBJECT
public:
- HistoryPreferences(QWidget *parent=0, const char* name=0,
- const QStringList &args = QStringList());
+ HistoryPreferences(TQWidget *parent=0, const char* name=0,
+ const TQStringList &args = TQStringList());
~HistoryPreferences();
virtual void save();
diff --git a/kopete/plugins/latex/latexguiclient.cpp b/kopete/plugins/latex/latexguiclient.cpp
index 8d7cbf3e..ea9420fb 100644
--- a/kopete/plugins/latex/latexguiclient.cpp
+++ b/kopete/plugins/latex/latexguiclient.cpp
@@ -17,14 +17,14 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kaction.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
#include "kopetechatsession.h"
#include "kopeteview.h"
@@ -34,14 +34,14 @@
#include "latexguiclient.h"
LatexGUIClient::LatexGUIClient( Kopete::ChatSession *parent, const char *name )
-: QObject( parent, name ), KXMLGUIClient( parent )
+: TQObject( parent, name ), KXMLGUIClient( parent )
{
setInstance( LatexPlugin::plugin()->instance() );
- connect( LatexPlugin::plugin(), SIGNAL( destroyed( QObject * ) ), this, SLOT( deleteLater() ) );
+ connect( LatexPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) );
m_manager = parent;
- new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, SLOT( slotPreview() ), actionCollection(), "latexPreview" );
+ new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, TQT_SLOT( slotPreview() ), actionCollection(), "latexPreview" );
setXMLFile( "latexchatui.rc" );
}
@@ -56,10 +56,10 @@ void LatexGUIClient::slotPreview()
return;
Kopete::Message msg = m_manager->view()->currentMessage();
- QString messageText = msg.plainBody();
+ TQString messageText = msg.plainBody();
if(!messageText.contains("$$")) //we haven't found any latex strings
{
- KMessageBox::sorry(reinterpret_cast<QWidget*>(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") );
+ KMessageBox::sorry(reinterpret_cast<TQWidget*>(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") );
return;
}
diff --git a/kopete/plugins/latex/latexguiclient.h b/kopete/plugins/latex/latexguiclient.h
index c8ca9e99..03fdbd9e 100644
--- a/kopete/plugins/latex/latexguiclient.h
+++ b/kopete/plugins/latex/latexguiclient.h
@@ -20,7 +20,7 @@
#ifndef TRANSLATORGUICLIENT_H
#define TRANSLATORGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
#include <kio/job.h>
@@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; }
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-class LatexGUIClient : public QObject , public KXMLGUIClient
+class LatexGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp
index 7ceab209..11537aba 100644
--- a/kopete/plugins/latex/latexplugin.cpp
+++ b/kopete/plugins/latex/latexplugin.cpp
@@ -16,11 +16,11 @@
*************************************************************************
*/
-#include <qregexp.h>
-#include <qimage.h>
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqstylesheet.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -41,7 +41,7 @@
typedef KGenericFactory<LatexPlugin> LatexPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_latex, LatexPluginFactory( "kopete_latex" ) )
-LatexPlugin::LatexPlugin( QObject *parent, const char *name, const QStringList &/*args*/ )
+LatexPlugin::LatexPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
: Kopete::Plugin( LatexPluginFactory::instance(), parent, name )
{
// kdDebug() << k_funcinfo << endl;
@@ -49,18 +49,18 @@ LatexPlugin::LatexPlugin( QObject *parent, const char *name, const QStringList &
s_pluginStatic = this;
mMagickNotFoundShown = false;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotMessageAboutToShow( Kopete::Message & ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend(Kopete::Message& ) ), this, SLOT(slotMessageAboutToSend(Kopete::Message& ) ) );
- connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
- this, SLOT( slotNewChatSession( Kopete::ChatSession * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), TQT_SLOT( slotMessageAboutToShow( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend(Kopete::Message& ) ), this, TQT_SLOT(slotMessageAboutToSend(Kopete::Message& ) ) );
+ connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
+ this, TQT_SLOT( slotNewChatSession( Kopete::ChatSession * ) ) );
m_convScript = KStandardDirs::findExe("kopete_latexconvert.sh");
slotSettingsChanged();
//Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
slotNewChatSession( *it );
}
@@ -84,7 +84,7 @@ void LatexPlugin::slotNewChatSession( Kopete::ChatSession *KMM )
void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
{
- QString mMagick = KStandardDirs::findExe("convert");
+ TQString mMagick = KStandardDirs::findExe("convert");
if ( mMagick.isEmpty() )
{
// show just once
@@ -100,7 +100,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
return;
}
- QString messageText = msg.plainBody();
+ TQString messageText = msg.plainBody();
if( !messageText.contains("$$"))
return;
@@ -110,14 +110,14 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
// \$\$.+?\$\$
// this searches for $$formula$$
- QRegExp rg("\\$\\$.+\\$\\$");
+ TQRegExp rg("\\$\\$.+\\$\\$");
rg.setMinimal(true);
// this searches for [latex]formula[/latex]
- //QRegExp rg("\\[([^]\]).*?\\[/$1\\]");
+ //TQRegExp rg("\\[([^]\]).*?\\[/$1\\]");
int pos = 0;
- QMap<QString, QString> replaceMap;
+ TQMap<TQString, TQString> replaceMap;
while (pos >= 0 && (unsigned int)pos < messageText.length())
{
// kdDebug() << k_funcinfo << " searching pos: " << pos << endl;
@@ -125,27 +125,27 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
if (pos >= 0 )
{
- QString match = rg.cap(0);
+ TQString match = rg.cap(0);
pos += rg.matchedLength();
- QString formul=match;
+ TQString formul=match;
if(!securityCheck(formul))
continue;
- QString fileName=handleLatex(formul.replace("$$",""));
+ TQString fileName=handleLatex(formul.replace("$$",""));
// get the image and encode it with base64
#if ENCODED_IMAGE_MODE
- QImage renderedImage( fileName );
+ TQImage renderedImage( fileName );
imagePxWidth = renderedImage.width();
imagePxHeight = renderedImage.height();
if ( !renderedImage.isNull() )
{
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
renderedImage.save( &buffer, "PNG" );
- QString imageURL = QString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) );
+ TQString imageURL = TQString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) );
replaceMap[match] = imageURL;
}
#else
@@ -160,15 +160,15 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
messageText= msg.escapedBody();
int imagePxWidth,imagePxHeight;
- for (QMap<QString,QString>::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it)
+ for (TQMap<TQString,TQString>::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it)
{
- QImage theImage(*it);
+ TQImage theImage(*it);
if(theImage.isNull())
continue;
imagePxWidth = theImage.width();
imagePxHeight = theImage.height();
- QString escapedLATEX=QStyleSheet::escape(it.key()).replace("\"","&quot;"); //we need the escape quotes because that string will be in a title="" argument, but not the \n
- messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + QString::number(imagePxWidth) + "\" height=\"" + QString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
+ TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","&quot;"); //we need the escape quotes because that string will be in a title="" argument, but not the \n
+ messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
}
msg.setBody( messageText, Kopete::Message::RichText );
@@ -186,62 +186,62 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
if(!config->readBoolEntry("ParseOutgoing", false))
return;
- QString messageText = msg.plainBody();
+ TQString messageText = msg.plainBody();
if( !messageText.contains("$$"))
return;
/* if( msg.from()->protocol()->pluginId()!="MSNProtocol" )
return;*/
// this searches for $$formula$$
- QRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$");
+ TQRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$");
if( rg.search(messageText) != -1 )
{
- QString latexFormula = rg.cap(1);
+ TQString latexFormula = rg.cap(1);
if(!securityCheck( latexFormula ))
return;
- QString url = handleLatex(latexFormula);
+ TQString url = handleLatex(latexFormula);
if(!url.isNull())
{
- QString escapedLATEX= QStyleSheet::escape(messageText).replace("\"","&quot;");
- QString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />";
+ TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","&quot;");
+ TQString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />";
msg.setBody( messageText, Kopete::Message::RichText );
}
}
#endif
}
-QString LatexPlugin::handleLatex(const QString &latexFormula)
+TQString LatexPlugin::handleLatex(const TQString &latexFormula)
{
KTempFile *tempFile=new KTempFile( locateLocal( "tmp", "kopetelatex-" ), ".png" );
tempFile->setAutoDelete(true);
m_tempFiles.append(tempFile);
m_tempFiles.setAutoDelete(true);
- QString fileName = tempFile->name();
+ TQString fileName = tempFile->name();
KProcess p;
- QString argumentRes = "-r %1x%2";
- QString argumentOut = "-o %1";
- //QString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif
+ TQString argumentRes = "-r %1x%2";
+ TQString argumentOut = "-o %1";
+ //TQString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif
int hDPI, vDPI;
hDPI = LatexConfig::self()->horizontalDPI();
vDPI = LatexConfig::self()->verticalDPI();
- p << m_convScript << argumentRes.arg(QString::number(hDPI), QString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ;
+ p << m_convScript << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ;
- kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(QString::number(hDPI), QString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl;
+ kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl;
// FIXME our sucky sync filter API limitations :-)
p.start(KProcess::Block);
return fileName;
}
-bool LatexPlugin::securityCheck(const QString &latexFormula)
+bool LatexPlugin::securityCheck(const TQString &latexFormula)
{
- return !latexFormula.contains(QRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include"
+ return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include"
"|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode"
"|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks"
"|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]"));
diff --git a/kopete/plugins/latex/latexplugin.h b/kopete/plugins/latex/latexplugin.h
index a0fcd7fd..ebff5f8d 100644
--- a/kopete/plugins/latex/latexplugin.h
+++ b/kopete/plugins/latex/latexplugin.h
@@ -21,8 +21,8 @@
#ifndef LATEXPLUGIN_H
#define LATEXPLUGIN_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <ktempfile.h>
@@ -46,7 +46,7 @@ class LatexPlugin : public Kopete::Plugin
public:
static LatexPlugin *plugin();
- LatexPlugin( QObject *parent, const char *name, const QStringList &args );
+ LatexPlugin( TQObject *parent, const char *name, const TQStringList &args );
~LatexPlugin();
public slots:
@@ -59,19 +59,19 @@ public:
/**
* gives a latex formula, and return the filename of the file where the latex is stored.
*/
- QString handleLatex(const QString &latex);
+ TQString handleLatex(const TQString &latex);
/**
* return false if the latex formula may contains malicious commands
*/
- bool securityCheck(const QString & formula);
+ bool securityCheck(const TQString & formula);
private:
static LatexPlugin* s_pluginStatic;
- QString m_convScript;
+ TQString m_convScript;
bool mMagickNotFoundShown;
- QPtrList<KTempFile> m_tempFiles;
+ TQPtrList<KTempFile> m_tempFiles;
};
#endif
diff --git a/kopete/plugins/latex/latexpreferences.cpp b/kopete/plugins/latex/latexpreferences.cpp
index 1727ae49..ff02c831 100644
--- a/kopete/plugins/latex/latexpreferences.cpp
+++ b/kopete/plugins/latex/latexpreferences.cpp
@@ -15,7 +15,7 @@
*************************************************************************
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kparts/componentfactory.h>
#include <klocale.h>
#include <kgenericfactory.h>
@@ -30,17 +30,17 @@
typedef KGenericFactory<LatexPreferences> LatexPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_latex, LatexPreferencesFactory( "kcm_kopete_latex" ) )
-LatexPreferences::LatexPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+LatexPreferences::LatexPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(LatexPreferencesFactory::instance(), parent, args)
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
m_preferencesDialog = new LatexPrefsUI(this);
// connect widget signals here
m_preferencesDialog->horizontalDPI->setMinValue(1);
m_preferencesDialog->verticalDPI->setMinValue(1);
- connect(m_preferencesDialog->horizontalDPI, SIGNAL(valueChanged(int)), this, SLOT(slotModified()));
- connect(m_preferencesDialog->verticalDPI, SIGNAL(valueChanged(int)), this, SLOT(slotModified()));
+ connect(m_preferencesDialog->horizontalDPI, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified()));
+ connect(m_preferencesDialog->verticalDPI, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified()));
load();
}
diff --git a/kopete/plugins/latex/latexpreferences.h b/kopete/plugins/latex/latexpreferences.h
index c08b35b5..5bfc2f8f 100644
--- a/kopete/plugins/latex/latexpreferences.h
+++ b/kopete/plugins/latex/latexpreferences.h
@@ -19,7 +19,7 @@
#define LatexPREFERENCES_H
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class LatexPrefsUI;
class QListViewItem;
@@ -33,7 +33,7 @@ class LatexPreferences : public KCModule
Q_OBJECT
public:
- LatexPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ LatexPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~LatexPreferences();
virtual void save();
diff --git a/kopete/plugins/motionautoaway/motionawayplugin.cpp b/kopete/plugins/motionautoaway/motionawayplugin.cpp
index d534a186..8dbd8853 100644
--- a/kopete/plugins/motionautoaway/motionawayplugin.cpp
+++ b/kopete/plugins/motionautoaway/motionawayplugin.cpp
@@ -36,7 +36,7 @@
#include <time.h>
#include <unistd.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -92,7 +92,7 @@ typedef __signed__ long long __s64;
typedef KGenericFactory<MotionAwayPlugin> MotionAwayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_motionaway, MotionAwayPluginFactory( "kopete_motionaway" ) )
-MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+MotionAwayPlugin::MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( MotionAwayPluginFactory::instance(), parent, name )
{
kdDebug(14305) << k_funcinfo << "Called." << endl;
@@ -106,11 +106,11 @@ MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QSt
/* We haven't took the first picture yet */
m_tookFirst = false;
- m_captureTimer = new QTimer(this);
- m_awayTimer = new QTimer(this);
+ m_captureTimer = new TQTimer(this);
+ m_awayTimer = new TQTimer(this);
- connect( m_captureTimer, SIGNAL(timeout()), this, SLOT(slotCapture()) );
- connect( m_awayTimer, SIGNAL(timeout()), this, SLOT(slotTimeout()) );
+ connect( m_captureTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCapture()) );
+ connect( m_awayTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) );
signal(SIGCHLD, SIG_IGN);
@@ -143,7 +143,7 @@ MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QSt
m_awayTimer->start( awayTimeout * 60 * 1000 );
}
loadSettings();
- connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) );
}
MotionAwayPlugin::~MotionAwayPlugin()
@@ -163,7 +163,7 @@ void MotionAwayPlugin::loadSettings(){
m_awayTimer->changeInterval(awayTimeout * 60 * 1000);
}
-int MotionAwayPlugin::getImage(int _dev, QByteArray &_image, int _width, int _height, int _input, int _norm, int _fmt)
+int MotionAwayPlugin::getImage(int _dev, TQByteArray &_image, int _width, int _height, int _input, int _norm, int _fmt)
{
struct video_capability vid_caps;
struct video_channel vid_chnl;
diff --git a/kopete/plugins/motionautoaway/motionawayplugin.h b/kopete/plugins/motionautoaway/motionawayplugin.h
index 98e7e343..84172f33 100644
--- a/kopete/plugins/motionautoaway/motionawayplugin.h
+++ b/kopete/plugins/motionautoaway/motionawayplugin.h
@@ -38,7 +38,7 @@ class MotionAwayPlugin : public Kopete::Plugin
Q_OBJECT
public:
- MotionAwayPlugin( QObject *parent, const char *name, const QStringList &args );
+ MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList &args );
~MotionAwayPlugin();
public slots:
@@ -50,12 +50,12 @@ public slots:
private:
int awayTimeout;
bool becomeAvailableWithActivity;
- QString videoDevice;
+ TQString videoDevice;
- QTimer *m_captureTimer;
- QTimer *m_awayTimer;
+ TQTimer *m_captureTimer;
+ TQTimer *m_awayTimer;
- int getImage(int, QByteArray& ,int ,int ,int ,int ,int );
+ int getImage(int, TQByteArray& ,int ,int ,int ,int ,int );
bool m_tookFirst;
bool m_wentAway;
@@ -70,10 +70,10 @@ private:
int shots;
int m_gap;
- QByteArray m_imageRef;
- QByteArray m_imageNew;
- QByteArray m_imageOld;
- QByteArray m_imageOut;
+ TQByteArray m_imageRef;
+ TQByteArray m_imageNew;
+ TQByteArray m_imageOld;
+ TQByteArray m_imageOut;
/*
time_t currenttimep;
diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.cpp b/kopete/plugins/motionautoaway/motionawaypreferences.cpp
index a4962c5c..889d4d30 100644
--- a/kopete/plugins/motionautoaway/motionawaypreferences.cpp
+++ b/kopete/plugins/motionautoaway/motionawaypreferences.cpp
@@ -15,9 +15,9 @@
*************************************************************************
*/
-#include <qlayout.h>
-#include <qobject.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqobject.h>
+#include <tqcheckbox.h>
#include <kgenericfactory.h>
#include <klineedit.h>
@@ -30,15 +30,15 @@
typedef KGenericFactory<MotionAwayPreferences> MotionAwayPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_motionaway, MotionAwayPreferencesFactory("kcm_kopete_motionaway"))
-MotionAwayPreferences::MotionAwayPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+MotionAwayPreferences::MotionAwayPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(MotionAwayPreferencesFactory::instance(), parent, args)
{
// Add actuall widget generated from ui file.
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new motionawayPrefsUI(this);
- connect(preferencesDialog->BecomeAvailableWithActivity, SIGNAL(toggled(bool)), this, SLOT(slotWidgetModified()));
- connect(preferencesDialog->AwayTimeout, SIGNAL(valueChanged(int)), this, SLOT(slotWidgetModified()));
- connect(preferencesDialog->VideoDevice, SIGNAL(textChanged(const QString &)), this, SLOT(slotWidgetModified()));
+ connect(preferencesDialog->BecomeAvailableWithActivity, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWidgetModified()));
+ connect(preferencesDialog->AwayTimeout, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWidgetModified()));
+ connect(preferencesDialog->VideoDevice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotWidgetModified()));
load();
}
diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.h b/kopete/plugins/motionautoaway/motionawaypreferences.h
index 43b33411..c93784d3 100644
--- a/kopete/plugins/motionautoaway/motionawaypreferences.h
+++ b/kopete/plugins/motionautoaway/motionawaypreferences.h
@@ -30,7 +30,7 @@ class MotionAwayPreferences : public KCModule
{
Q_OBJECT
public:
- MotionAwayPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ MotionAwayPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
virtual void save();
virtual void load();
diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.cpp b/kopete/plugins/netmeeting/netmeetingguiclient.cpp
index e024a872..9dffde7f 100644
--- a/kopete/plugins/netmeeting/netmeetingguiclient.cpp
+++ b/kopete/plugins/netmeeting/netmeetingguiclient.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <kaction.h>
@@ -33,12 +33,12 @@
class NetMeetingPlugin;
NetMeetingGUIClient::NetMeetingGUIClient( MSNChatSession *parent, const char *name )
-: QObject( parent, name ) , KXMLGUIClient(parent)
+: TQObject( parent, name ) , KXMLGUIClient(parent)
{
setInstance(KGenericFactory<NetMeetingPlugin>::instance());
m_manager=parent;
- new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ;
+ new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, TQT_SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ;
setXMLFile("netmeetingchatui.rc");
}
@@ -50,7 +50,7 @@ NetMeetingGUIClient::~NetMeetingGUIClient()
void NetMeetingGUIClient::slotStartInvitation()
{
- QPtrList<Kopete::Contact> c=m_manager->members();
+ TQPtrList<Kopete::Contact> c=m_manager->members();
NetMeetingInvitation *i=new NetMeetingInvitation(false, static_cast<MSNContact*>(c.first()),m_manager);
m_manager->initInvitation(i);
}
diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.h b/kopete/plugins/netmeeting/netmeetingguiclient.h
index fa84b694..c847a5cd 100644
--- a/kopete/plugins/netmeeting/netmeetingguiclient.h
+++ b/kopete/plugins/netmeeting/netmeetingguiclient.h
@@ -20,7 +20,7 @@
#ifndef TRANSLATORGUICLIENT_H
#define TRANSLATORGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -31,7 +31,7 @@ class NetMeetingPlugin;
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-class NetMeetingGUIClient : public QObject , public KXMLGUIClient
+class NetMeetingGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.cpp b/kopete/plugins/netmeeting/netmeetinginvitation.cpp
index 191bc140..5fb799c1 100644
--- a/kopete/plugins/netmeeting/netmeetinginvitation.cpp
+++ b/kopete/plugins/netmeeting/netmeetinginvitation.cpp
@@ -29,11 +29,11 @@
#include <kglobal.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kprocess.h>
-NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, QObject *parent)
- : QObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") )
+NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, TQObject *parent)
+ : TQObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") )
{
m_contact=c;
oki=false;
@@ -45,20 +45,20 @@ NetMeetingInvitation::~NetMeetingInvitation()
}
-QString NetMeetingInvitation::invitationHead()
+TQString NetMeetingInvitation::invitationHead()
{
- QTimer::singleShot( 10*60000, this, SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused
- return QString( MSNInvitation::invitationHead()+
+ TQTimer::singleShot( 10*60000, this, TQT_SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused
+ return TQString( MSNInvitation::invitationHead()+
"Session-Protocol: SM1\r\n"
"Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME i don't know what is the session id
"\r\n").utf8();
}
-void NetMeetingInvitation::parseInvitation(const QString& msg)
+void NetMeetingInvitation::parseInvitation(const TQString& msg)
{
- QRegExp rx("Invitation-Command: ([A-Z]*)");
+ TQRegExp rx("Invitation-Command: ([A-Z]*)");
rx.search(msg);
- QString command=rx.cap(1);
+ TQString command=rx.cap(1);
if( msg.contains("Invitation-Command: INVITE") )
{
MSNInvitation::parseInvitation(msg); //for the cookie
@@ -73,12 +73,12 @@ void NetMeetingInvitation::parseInvitation(const QString& msg)
{
if(result==3) // Yes == 3
{
- QCString message=QString(
+ TQCString message=TQString(
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: ACCEPT\r\n"
- "Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
"Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME
"Session-Protocol: SM1\r\n"
"Launch-Application: TRUE\r\n"
@@ -89,7 +89,7 @@ void NetMeetingInvitation::parseInvitation(const QString& msg)
manager->service()->sendCommand( "MSG" , "N", true, message );
oki=false;
- QTimer::singleShot( 10* 60000, this, SLOT( slotTimeout() ) ); //TIMOUT afte 10 min
+ TQTimer::singleShot( 10* 60000, this, TQT_SLOT( slotTimeout() ) ); //TIMOUT afte 10 min
}
else //No
{
@@ -105,12 +105,12 @@ void NetMeetingInvitation::parseInvitation(const QString& msg)
MSNChatSession* manager=dynamic_cast<MSNChatSession*>(m_contact->manager());
if(manager && manager->service())
{
- QCString message=QString(
+ TQCString message=TQString(
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
"\r\n"
"Invitation-Command: ACCEPT\r\n"
- "Invitation-Cookie: " + QString::number(cookie()) + "\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
"Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME: what is session id?
"Session-Protocol: SM1\r\n"
"Launch-Application: TRUE\r\n"
@@ -119,17 +119,17 @@ void NetMeetingInvitation::parseInvitation(const QString& msg)
"\r\n" ).utf8();
manager->service()->sendCommand( "MSG" , "N", true, message );
}
- rx=QRegExp("IP-Address: ([0-9\\:\\.]*)");
+ rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)");
rx.search(msg);
- QString ip_address = rx.cap(1);
+ TQString ip_address = rx.cap(1);
startMeeting(ip_address);
kdDebug() << k_funcinfo << ip_address << endl;
}
else
{
- rx=QRegExp("IP-Address: ([0-9\\:\\.]*)");
+ rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)");
rx.search(msg);
- QString ip_address = rx.cap(1);
+ TQString ip_address = rx.cap(1);
startMeeting(ip_address);
}
@@ -156,20 +156,20 @@ void NetMeetingInvitation::slotTimeout()
}
-void NetMeetingInvitation::startMeeting(const QString & ip_address)
+void NetMeetingInvitation::startMeeting(const TQString & ip_address)
{
//TODO: use KProcess
KConfig *config=KGlobal::config();
config->setGroup("Netmeeting Plugin");
- QString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address);
+ TQString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address);
kdDebug() << k_funcinfo << app << endl ;
- QStringList args=QStringList::split(" ", app);
+ TQStringList args=TQStringList::split(" ", app);
KProcess p;
- for(QStringList::Iterator it=args.begin() ; it != args.end() ; ++it)
+ for(TQStringList::Iterator it=args.begin() ; it != args.end() ; ++it)
{
p << *it;
}
diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.h b/kopete/plugins/netmeeting/netmeetinginvitation.h
index 0fbaf318..eb4b2ba6 100644
--- a/kopete/plugins/netmeeting/netmeetinginvitation.h
+++ b/kopete/plugins/netmeeting/netmeetinginvitation.h
@@ -17,7 +17,7 @@
#ifndef MSNVOICEINVITATION_H
#define MSNVOICEINVITATION_H
-#include <qobject.h>
+#include <tqobject.h>
#include "msninvitation.h"
class MSNContact;
@@ -25,19 +25,19 @@ class MSNContact;
/**
*@author Olivier Goffart
*/
-class NetMeetingInvitation : public QObject , public MSNInvitation
+class NetMeetingInvitation : public TQObject , public MSNInvitation
{
Q_OBJECT
public:
- NetMeetingInvitation(bool incoming ,MSNContact*, QObject *parent = 0);
+ NetMeetingInvitation(bool incoming ,MSNContact*, TQObject *parent = 0);
~NetMeetingInvitation();
- static QString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; }
- QString invitationHead();
+ static TQString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; }
+ TQString invitationHead();
- virtual void parseInvitation(const QString& invitation);
+ virtual void parseInvitation(const TQString& invitation);
- virtual QObject* object() { return this; }
+ virtual TQObject* object() { return this; }
signals:
void done( MSNInvitation * );
@@ -48,7 +48,7 @@ private slots:
private:
MSNContact *m_contact;
bool oki;
- void startMeeting(const QString & ip_address);
+ void startMeeting(const TQString & ip_address);
};
diff --git a/kopete/plugins/netmeeting/netmeetingplugin.cpp b/kopete/plugins/netmeeting/netmeetingplugin.cpp
index d2ea501c..2d71c257 100644
--- a/kopete/plugins/netmeeting/netmeetingplugin.cpp
+++ b/kopete/plugins/netmeeting/netmeetingplugin.cpp
@@ -35,19 +35,19 @@
static const KAboutData aboutdata("kopete_netmeeting", I18N_NOOP("NetMeeting") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( kopete_netmeeting, KGenericFactory<NetMeetingPlugin>( &aboutdata ) )
-NetMeetingPlugin::NetMeetingPlugin( QObject *parent, const char *name, const QStringList &/*args*/ )
+NetMeetingPlugin::NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
: Kopete::Plugin( KGlobal::instance(), parent, name )
{
if(MSNProtocol::protocol())
slotPluginLoaded(MSNProtocol::protocol());
else
- connect(Kopete::PluginManager::self() , SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, SLOT(slotPluginLoaded(Kopete::Plugin*)));
+ connect(Kopete::PluginManager::self() , TQT_SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*)));
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
//Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
{
slotNewKMM(*it);
}
@@ -62,8 +62,8 @@ void NetMeetingPlugin::slotPluginLoaded(Kopete::Plugin *p)
{
if(p->pluginId()=="MSNProtocol")
{
- connect( p , SIGNAL(invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* )) ,
- this, SLOT( slotInvitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* )));
+ connect( p , TQT_SIGNAL(invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* )) ,
+ this, TQT_SLOT( slotInvitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* )));
}
}
@@ -72,14 +72,14 @@ void NetMeetingPlugin::slotNewKMM(Kopete::ChatSession *KMM)
MSNChatSession *msnMM=dynamic_cast<MSNChatSession*>(KMM);
if(msnMM)
{
- connect(this , SIGNAL( destroyed(QObject*)) ,
+ connect(this , TQT_SIGNAL( destroyed(TQObject*)) ,
new NetMeetingGUIClient(msnMM)
- , SLOT(deleteLater()));
+ , TQT_SLOT(deleteLater()));
}
}
-void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c )
+void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c )
{
if(!invitation && bodyMSG.contains(NetMeetingInvitation::applicationID()))
{
diff --git a/kopete/plugins/netmeeting/netmeetingplugin.h b/kopete/plugins/netmeeting/netmeetingplugin.h
index 7427bbf8..495eb510 100644
--- a/kopete/plugins/netmeeting/netmeetingplugin.h
+++ b/kopete/plugins/netmeeting/netmeetingplugin.h
@@ -31,13 +31,13 @@ class NetMeetingPlugin : public Kopete::Plugin
Q_OBJECT
public:
- NetMeetingPlugin( QObject *parent, const char *name, const QStringList &args );
+ NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &args );
~NetMeetingPlugin();
private slots:
void slotNewKMM(Kopete::ChatSession *);
void slotPluginLoaded(Kopete::Plugin*);
- void slotInvitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
+ void slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
};
diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.cpp b/kopete/plugins/netmeeting/netmeetingpreferences.cpp
index b28dfe09..313eb197 100644
--- a/kopete/plugins/netmeeting/netmeetingpreferences.cpp
+++ b/kopete/plugins/netmeeting/netmeetingpreferences.cpp
@@ -14,8 +14,8 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -39,13 +39,13 @@
typedef KGenericFactory<NetmeetingPreferences> NetmeetingPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_netmeeting, NetmeetingPreferencesFactory( "kcm_kopete_netmeeting" ) )
-NetmeetingPreferences::NetmeetingPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+NetmeetingPreferences::NetmeetingPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(NetmeetingPreferencesFactory::instance(), parent, args)
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new NetmeetingPrefsUI(this);
- connect(preferencesDialog->m_app , SIGNAL(textChanged(const QString &)) , this , SLOT(slotChanged()));
+ connect(preferencesDialog->m_app , TQT_SIGNAL(textChanged(const TQString &)) , this , TQT_SLOT(slotChanged()));
load();
}
diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.h b/kopete/plugins/netmeeting/netmeetingpreferences.h
index 94a7031e..6ad09f58 100644
--- a/kopete/plugins/netmeeting/netmeetingpreferences.h
+++ b/kopete/plugins/netmeeting/netmeetingpreferences.h
@@ -18,7 +18,7 @@
#define NetmeetingPREFERENCES_H
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class NetmeetingPrefsUI;
@@ -30,7 +30,7 @@ class NetmeetingPreferences : public KCModule {
Q_OBJECT
public:
- NetmeetingPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ NetmeetingPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~NetmeetingPreferences();
virtual void save();
diff --git a/kopete/plugins/nowlistening/nlamarok.cpp b/kopete/plugins/nowlistening/nlamarok.cpp
index 15d19411..9101758c 100644
--- a/kopete/plugins/nowlistening/nlamarok.cpp
+++ b/kopete/plugins/nowlistening/nlamarok.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "nlmediaplayer.h"
#include "nlamarok.h"
@@ -38,10 +38,10 @@ void NLamaroK::update()
{
m_playing = false;
m_newTrack = false;
- QString newTrack;
- QByteArray data, replyData;
- QCString replyType;
- QString result;
+ TQString newTrack;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
// see if amaroK is registered with DCOP
if ( !m_client->isApplicationRegistered( "amarok" ) )
@@ -64,7 +64,7 @@ void NLamaroK::update()
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
}
@@ -74,7 +74,7 @@ void NLamaroK::update()
{
int status = 0;
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "int" ) {
reply >> status;
kdDebug( 14307 ) << k_funcinfo << "Amarok status()=" << status << endl;
@@ -89,9 +89,9 @@ void NLamaroK::update()
if ( m_client->call( "amarok", "player", "title()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> newTrack;
}
}
@@ -105,9 +105,9 @@ void NLamaroK::update()
if ( m_client->call( "amarok", "player", "album()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_album;
}
}
@@ -115,9 +115,9 @@ void NLamaroK::update()
if ( m_client->call( "amarok", "player", "artist()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_artist;
}
}
diff --git a/kopete/plugins/nowlistening/nljuk.cpp b/kopete/plugins/nowlistening/nljuk.cpp
index 41de23bc..422e0db9 100644
--- a/kopete/plugins/nowlistening/nljuk.cpp
+++ b/kopete/plugins/nowlistening/nljuk.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "nlmediaplayer.h"
#include "nljuk.h"
@@ -37,62 +37,62 @@ NLJuk::NLJuk( DCOPClient *client ) : NLMediaPlayer()
void NLJuk::update()
{
m_playing = false;
- QString newTrack;
+ TQString newTrack;
// see if JuK is registered with DCOP
if ( m_client->isApplicationRegistered( "juk" ) )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
- QString result;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
if ( m_client->call( "juk", "Player", "playing()", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
}
}
{
- QDataStream arg( data, IO_WriteOnly );
- arg << QString::fromLatin1("Album");
- if ( m_client->call( "juk", "Player", "trackProperty(QString)", data,
+ TQDataStream arg( data, IO_WriteOnly );
+ arg << TQString::fromLatin1("Album");
+ if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_album;
}
}
}
{
- QDataStream arg( data, IO_WriteOnly );
- arg << QString::fromLatin1("Artist");
- if ( m_client->call( "juk", "Player", "trackProperty(QString)", data,
+ TQDataStream arg( data, IO_WriteOnly );
+ arg << TQString::fromLatin1("Artist");
+ if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> m_artist;
}
}
}
{
- QDataStream arg( data, IO_WriteOnly );
- arg << QString::fromLatin1("Title");
- if ( m_client->call( "juk", "Player", "trackProperty(QString)", data,
+ TQDataStream arg( data, IO_WriteOnly );
+ arg << TQString::fromLatin1("Title");
+ if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> newTrack;
}
}
diff --git a/kopete/plugins/nowlistening/nlkaffeine.cpp b/kopete/plugins/nowlistening/nlkaffeine.cpp
index fe02077f..d5823298 100644
--- a/kopete/plugins/nowlistening/nlkaffeine.cpp
+++ b/kopete/plugins/nowlistening/nlkaffeine.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "nlmediaplayer.h"
#include "nlkaffeine.h"
@@ -38,17 +38,17 @@ void NLKaffeine::update()
{
m_playing = false;
m_newTrack = false;
- QString newTrack;
+ TQString newTrack;
bool error = true; // Asume we have a error first.
- QCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()");
+ TQCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()");
// see if kaffeine is registered with DCOP
if ( m_client->isApplicationRegistered( "kaffeine" ) )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
- QString result;
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
if ( !m_client->call( "kaffeine", kaffeineIface, "isPlaying()", data,
replyType, replyData ) )
{
@@ -73,7 +73,7 @@ void NLKaffeine::update()
// If we didn't get any DCOP error, check if Kaffeine is playing.
if(!error)
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
kdDebug( 14307 ) << "checked if Kaffeine is playing!" << endl;
@@ -83,9 +83,9 @@ void NLKaffeine::update()
if ( m_client->call( "kaffeine", kaffeineIface, kaffeineGetTrack, data,
replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ if ( replyType == "TQString" ) {
reply >> newTrack;
}
}
diff --git a/kopete/plugins/nowlistening/nlkscd.cpp b/kopete/plugins/nowlistening/nlkscd.cpp
index a20c809b..06bf6c28 100644
--- a/kopete/plugins/nowlistening/nlkscd.cpp
+++ b/kopete/plugins/nowlistening/nlkscd.cpp
@@ -22,7 +22,7 @@
*/
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "nlmediaplayer.h"
@@ -38,13 +38,13 @@ NLKscd::NLKscd( DCOPClient *client ) : NLMediaPlayer()
void NLKscd::update()
{
m_playing = false;
- QString newTrack;
+ TQString newTrack;
// see if it's registered with DCOP
if ( m_client->isApplicationRegistered( "kscd" ) )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if ( !m_client->call( "kscd", "CDPlayer", "playing()", data,
replyType, replyData ) )
{
@@ -55,7 +55,7 @@ void NLKscd::update()
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" ) {
reply >> m_playing;
// kdDebug( 14307 ) << "NLKscd::update() - KsCD is " <<
@@ -68,8 +68,8 @@ void NLKscd::update()
kdDebug( 14307 ) << "NLKscd::update() DCOP error"
<< endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" )
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" )
reply >> m_artist;
else
kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl;
@@ -81,8 +81,8 @@ void NLKscd::update()
kdDebug( 14307 ) << "NLKscd::update() DCOP error"
<< endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" )
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" )
reply >> m_album;
else
kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl;
@@ -93,8 +93,8 @@ void NLKscd::update()
"currentTrackTitle()", data, replyType, replyData ) )
kdDebug( 14307 ) << "NLKscd::update() - there was some error using DCOP." << endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" ) {
reply >> newTrack;
//kdDebug( 14307 ) << "the result is: " << newTrack.latin1()
// << endl;
diff --git a/kopete/plugins/nowlistening/nlmediaplayer.h b/kopete/plugins/nowlistening/nlmediaplayer.h
index 5c619150..dad13190 100644
--- a/kopete/plugins/nowlistening/nlmediaplayer.h
+++ b/kopete/plugins/nowlistening/nlmediaplayer.h
@@ -38,19 +38,19 @@ class NLMediaPlayer
virtual void update() = 0;
bool playing() const { return m_playing; }
bool newTrack() const { return m_newTrack; }
- QString artist() const { return m_artist; }
- QString album() const { return m_album; }
- QString track() const { return m_track; }
- QString name() const{ return m_name; }
+ TQString artist() const { return m_artist; }
+ TQString album() const { return m_album; }
+ TQString track() const { return m_track; }
+ TQString name() const{ return m_name; }
NLMediaType mediaType() const { return m_type; }
protected:
// The name of the application
- QString m_name;
+ TQString m_name;
bool m_playing;
bool m_newTrack;
- QString m_artist;
- QString m_album;
- QString m_track;
+ TQString m_artist;
+ TQString m_album;
+ TQString m_track;
NLMediaType m_type;
};
diff --git a/kopete/plugins/nowlistening/nlnoatun.cpp b/kopete/plugins/nowlistening/nlnoatun.cpp
index 62bdc8ba..c9c504c2 100644
--- a/kopete/plugins/nowlistening/nlnoatun.cpp
+++ b/kopete/plugins/nowlistening/nlnoatun.cpp
@@ -37,14 +37,14 @@ void NLNoatun::update()
{
// Thanks mETz for telling me about Noatun's currentProperty()
m_playing = false;
- QString newTrack;
+ TQString newTrack;
// see if it's registered with DCOP
- QCString appname = find();
+ TQCString appname = find();
if ( !appname.isEmpty() )
{
// see if it's playing
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if ( !m_client->call( appname, "Noatun", "state()", data,
replyType, replyData ) )
{
@@ -52,7 +52,7 @@ void NLNoatun::update()
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "int" ) {
int state = 0;
reply >> state;
@@ -64,7 +64,7 @@ void NLNoatun::update()
// Using properties
m_artist = currentProperty( appname, "author" );
m_album = currentProperty( appname, "album" );
- QString title = currentProperty( appname, "title" );
+ TQString title = currentProperty( appname, "title" );
// if properties not set ( no id3 tags... ) fallback to filename
if ( !title.isEmpty() )
newTrack = title;
@@ -75,8 +75,8 @@ void NLNoatun::update()
kdDebug( 14307 ) << "NLNoatun::update() DCOP error on " << appname
<< endl;
else {
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" ) {
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" ) {
reply >> newTrack;
} else
kdDebug( 14307 ) << "NLNoatun::update(), title() returned unexpected reply type!" << endl;
@@ -97,9 +97,9 @@ void NLNoatun::update()
kdDebug( 14307 ) << "NLNoatun::update() - noatun not found" << endl;
}
-QCString NLNoatun::find() const
+TQCString NLNoatun::find() const
{
- QCString app = "noatun";
+ TQCString app = "noatun";
if ( !m_client->isApplicationRegistered( app ) )
{
// looking for a registered app prefixed with 'app'
@@ -121,23 +121,23 @@ QCString NLNoatun::find() const
return app;
}
-QString NLNoatun::currentProperty( QCString appname, QString property ) const
+TQString NLNoatun::currentProperty( TQCString appname, TQString property ) const
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
- QString result = "";
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
+ TQString result = "";
arg << property;
if ( !m_client->call( appname, "Noatun",
- "currentProperty(QString)", data, replyType, replyData ) )
+ "currentProperty(TQString)", data, replyType, replyData ) )
{
kdDebug( 14307 ) << "NLNoatun::currentProperty() DCOP error on "
<< appname << endl;
}
else
{
- QDataStream reply( replyData, IO_ReadOnly );
- if ( replyType == "QString" )
+ TQDataStream reply( replyData, IO_ReadOnly );
+ if ( replyType == "TQString" )
{
reply >> result;
}
diff --git a/kopete/plugins/nowlistening/nlnoatun.h b/kopete/plugins/nowlistening/nlnoatun.h
index 88441754..85e1aaac 100644
--- a/kopete/plugins/nowlistening/nlnoatun.h
+++ b/kopete/plugins/nowlistening/nlnoatun.h
@@ -32,8 +32,8 @@ class NLNoatun : public NLMediaPlayer
NLNoatun( DCOPClient *client );
virtual void update();
protected:
- QCString find() const;
- QString currentProperty( QCString appname, QString property ) const;
+ TQCString find() const;
+ TQString currentProperty( TQCString appname, TQString property ) const;
DCOPClient *m_client;
};
diff --git a/kopete/plugins/nowlistening/nlxmms.cpp b/kopete/plugins/nowlistening/nlxmms.cpp
index a2d3637d..3f5bb675 100644
--- a/kopete/plugins/nowlistening/nlxmms.cpp
+++ b/kopete/plugins/nowlistening/nlxmms.cpp
@@ -49,7 +49,7 @@ void NLXmms::update()
if ( xmmslib &&
xmms_remote_get_version( 0 ) )
{
- QString newTrack;
+ TQString newTrack;
// see if it's playing
if ( xmms_remote_is_playing( 0 ) && !xmms_remote_is_paused( 0 ) )
{
diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp
index 8e7b1908..c5e47ef0 100644
--- a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp
@@ -30,12 +30,12 @@
#include <kmessagebox.h>
NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *parent, NowListeningPlugin *plugin )
- : QObject(parent) , KXMLGUIClient(parent)
+ : TQObject(parent) , KXMLGUIClient(parent)
{
- connect(plugin, SIGNAL(readyForUnload()), SLOT(slotPluginUnloaded()));
+ connect(plugin, TQT_SIGNAL(readyForUnload()), TQT_SLOT(slotPluginUnloaded()));
m_msgManager = parent;
m_action = new KAction( i18n( "Send Media Info" ), 0, this,
- SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" );
+ TQT_SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" );
setXMLFile("nowlisteningchatui.rc");
}
@@ -47,13 +47,13 @@ void NowListeningGUIClient::slotAdvertToCurrentChat()
if (!NowListeningPlugin::plugin())
return;
- QString message = NowListeningPlugin::plugin()->mediaPlayerAdvert();
+ TQString message = NowListeningPlugin::plugin()->mediaPlayerAdvert();
// We warn in a mode appropriate to the mode the user invoked the
// plugin - GUI on menu action, in message if they typed '/media'
if ( message.isEmpty() )
{
- QWidget * origin = 0L;
+ TQWidget * origin = 0L;
if ( m_msgManager && m_msgManager->view() )
origin = m_msgManager->view()->mainWidget();
KMessageBox::queuedMessageBox( origin, KMessageBox::Sorry,
diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.h b/kopete/plugins/nowlistening/nowlisteningguiclient.h
index 9f89d351..b12b0424 100644
--- a/kopete/plugins/nowlistening/nowlisteningguiclient.h
+++ b/kopete/plugins/nowlistening/nowlisteningguiclient.h
@@ -21,7 +21,7 @@
#ifndef NOWLISTENINGGUICLIENT_H
#define NOWLISTENINGGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
class KAction;
@@ -31,7 +31,7 @@ namespace Kopete {
class ChatSession;
}
-class NowListeningGUIClient : public QObject, public KXMLGUIClient
+class NowListeningGUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
index e28316be..4c286b0f 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
@@ -18,9 +18,9 @@
*************************************************************************
*/
-#include <qtimer.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -59,7 +59,7 @@ public:
{}
// abstracted media player interfaces
- QPtrList<NLMediaPlayer> m_mediaPlayerList;
+ TQPtrList<NLMediaPlayer> m_mediaPlayerList;
NLMediaPlayer *m_currentMediaPlayer;
// Needed for DCOP interprocess communication
@@ -69,16 +69,16 @@ public:
// Used when using automatic advertising to know who has already gotten
// the music information
- QStringList m_musicSentTo;
+ TQStringList m_musicSentTo;
// Used when advertising to status message.
- QTimer *advertTimer;
+ TQTimer *advertTimer;
};
typedef KGenericFactory<NowListeningPlugin> NowListeningPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_nowlistening, NowListeningPluginFactory( "kopete_nowlistening" ) )
-NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const QStringList& /*args*/ )
+NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, const TQStringList& /*args*/ )
: Kopete::Plugin( NowListeningPluginFactory::instance(), parent, name )
{
if ( pluginStatic_ )
@@ -91,18 +91,18 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const
kdDebug(14307) << k_funcinfo << endl;
// Connection for the "/media" command (always needed)
- connect( Kopete::ChatSessionManager::self(), SIGNAL(
- chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM(
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL(
+ chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM(
Kopete::ChatSession * ) ) );
// If autoadvertising is on...
connect(Kopete::ChatSessionManager::self(),
- SIGNAL(aboutToSend(Kopete::Message&)),
+ TQT_SIGNAL(aboutToSend(Kopete::Message&)),
this,
- SLOT(slotOutgoingMessage(Kopete::Message&)));
+ TQT_SLOT(slotOutgoingMessage(Kopete::Message&)));
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
slotNewKMM( *it );
// get a pointer to the dcop client
@@ -130,16 +130,16 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const
Kopete::CommandHandler::commandHandler()->registerCommand(
this,
"media",
- SLOT( slotMediaCommand( const QString &, Kopete::ChatSession * ) ),
+ TQT_SLOT( slotMediaCommand( const TQString &, Kopete::ChatSession * ) ),
i18n("USAGE: /media - Displays information on current song"),
0
);
- connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
+ connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) );
// Advert the accounts with the current listened track.
- d->advertTimer = new QTimer(this);
- connect(d->advertTimer, SIGNAL( timeout() ), this, SLOT( slotAdvertCurrentMusic() ) );
+ d->advertTimer = new TQTimer(this);
+ connect(d->advertTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAdvertCurrentMusic() ) );
d->advertTimer->start(5000); // Update every 5 seconds
}
@@ -162,9 +162,9 @@ NowListeningPlugin* NowListeningPlugin::plugin()
return pluginStatic_ ;
}
-void NowListeningPlugin::slotMediaCommand( const QString &args, Kopete::ChatSession *theChat )
+void NowListeningPlugin::slotMediaCommand( const TQString &args, Kopete::ChatSession *theChat )
{
- QString advert = mediaPlayerAdvert();
+ TQString advert = mediaPlayerAdvert();
if ( advert.isEmpty() )
{
// Catch no players/no track playing message case:
@@ -189,14 +189,14 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
if(!NowListeningConfig::self()->chatAdvertising())
return;
- QString originalBody = msg.plainBody();
+ TQString originalBody = msg.plainBody();
// If it is a /media message, don't process it
if(originalBody.startsWith(NowListeningConfig::self()->header()))
return;
// What will be sent
- QString newBody;
+ TQString newBody;
// Getting the list of contacts the message will be sent to to determine if at least
// one of them has never gotten the current music information.
@@ -204,7 +204,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
bool mustSendAnyway = false;
for( Kopete::Contact *c = dest.first() ; c ; c = dest.next() )
{
- const QString& cId = c->contactId();
+ const TQString& cId = c->contactId();
if( 0 == d->m_musicSentTo.contains( cId ) )
{
mustSendAnyway = true;
@@ -220,7 +220,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg)
// has changed since it was last sent.
if ( mustSendAnyway || newTrack )
{
- QString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update
+ TQString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update
if( !advert.isEmpty() )
newBody = originalBody + "<br>" + advert;
@@ -252,9 +252,9 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
// This slot is called every 5 seconds, so we check if we have a new track playing.
if( newTrackPlaying() )
{
- QString advert;
+ TQString advert;
- QPtrList<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
for( Kopete::Account* a = accountsList.first(); a; a = accountsList.next() )
{
/*
@@ -266,7 +266,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
*/
if( a->protocol()->pluginId() == "MSNProtocol" && !NowListeningConfig::self()->appendStatusAdvertising() )
{
- QString track, artist, album, mediaList;
+ TQString track, artist, album, mediaList;
bool isPlaying=false;
if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer )
@@ -298,7 +298,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
// KDE4 TODO: Use the new status message framework, and remove this "hack".
if( isPlaying )
{
- advert = QString("[Music]%1").arg(mediaList);
+ advert = TQString("[Music]%1").arg(mediaList);
}
}
@@ -308,21 +308,21 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
{
// Check for the now listening message in parenthesis,
// include the header to not override other messages in parenthesis.
- QRegExp statusSong( QString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
+ TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
// HACK: Don't keep appending the now listened song. Replace it in the status message.
advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
// Remove the braces when they are no listened song.
- QString mediaAdvert = mediaPlayerAdvert(false);
+ TQString mediaAdvert = mediaPlayerAdvert(false);
if(!mediaAdvert.isEmpty())
{
if(statusSong.search(advert) != -1)
{
- advert = advert.replace(statusSong, QString(" (%1)").arg(mediaPlayerAdvert(false)) );
+ advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) );
}
else
{
- advert += QString(" (%1)").arg( mediaPlayerAdvert(false) );
+ advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) );
}
}
else
@@ -341,10 +341,10 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
}
}
-QString NowListeningPlugin::mediaPlayerAdvert(bool update)
+TQString NowListeningPlugin::mediaPlayerAdvert(bool update)
{
// generate message for all players
- QString message;
+ TQString message;
if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer != 0L )
{
@@ -363,9 +363,9 @@ QString NowListeningPlugin::mediaPlayerAdvert(bool update)
return message;
}
-void NowListeningPlugin::buildTrackMessage(QString &message, NLMediaPlayer *player, bool update)
+void NowListeningPlugin::buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update)
{
- QString perTrack = NowListeningConfig::self()->perTrack();
+ TQString perTrack = NowListeningConfig::self()->perTrack();
if(update)
player->update();
@@ -401,17 +401,17 @@ bool NowListeningPlugin::newTrackPlaying(void) const
return false;
}
-QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
- QString in, bool inBrackets ) const
+TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
+ TQString in, bool inBrackets ) const
{
- QString track = player->track();
- QString artist = player->artist();
- QString album = player->album();
- QString playerName = player->name();
+ TQString track = player->track();
+ TQString artist = player->artist();
+ TQString album = player->album();
+ TQString playerName = player->name();
for ( unsigned int i = 0; i < in.length(); i++ )
{
- QChar c = in.at( i );
+ TQChar c = in.at( i );
//kdDebug(14307) << "Now working on:" << in << " char is: " << c << endl;
if ( c == '(' )
{
@@ -420,7 +420,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
//kdDebug(14307) << "Looking for ')'" << endl;
for ( unsigned int j = i + 1; j < in.length(); j++ )
{
- QChar d = in.at( j );
+ TQChar d = in.at( j );
//kdDebug(14307) << "Got " << d << endl;
if ( d == '(' )
depth++;
@@ -430,7 +430,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
if ( depth == 0 )
{
// recursively replace contents of matching ()
- QString substitution = substDepthFirst( player,
+ TQString substitution = substDepthFirst( player,
in.mid( i + 1, j - i - 1), true ) ;
in.replace ( i, j - i + 1, substitution );
// perform substitution and return the result
@@ -484,7 +484,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player,
return in;
}
-void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, QString message )
+void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, TQString message )
{
Kopete::ContactPtrList pl = theChat->members();
@@ -522,27 +522,27 @@ void NowListeningPlugin::slotSettingsChanged()
updateCurrentMediaPlayer();
disconnect(Kopete::ChatSessionManager::self(),
- SIGNAL(aboutToSend(Kopete::Message&)),
+ TQT_SIGNAL(aboutToSend(Kopete::Message&)),
this,
- SLOT(slotOutgoingMessage(Kopete::Message&)));
+ TQT_SLOT(slotOutgoingMessage(Kopete::Message&)));
d->advertTimer->stop();
- disconnect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic()));
+ disconnect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic()));
if( NowListeningConfig::self()->chatAdvertising() )
{
kdDebug(14307) << k_funcinfo << "Now using chat window advertising." << endl;
connect(Kopete::ChatSessionManager::self(),
- SIGNAL(aboutToSend(Kopete::Message&)),
+ TQT_SIGNAL(aboutToSend(Kopete::Message&)),
this,
- SLOT(slotOutgoingMessage(Kopete::Message&)));
+ TQT_SLOT(slotOutgoingMessage(Kopete::Message&)));
}
else if( NowListeningConfig::self()->statusAdvertising() || NowListeningConfig::self()->appendStatusAdvertising() )
{
kdDebug(14307) << k_funcinfo << "Now using status message advertising." << endl;
- connect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic()));
+ connect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic()));
d->advertTimer->start(5000);
}
}
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.h b/kopete/plugins/nowlistening/nowlisteningplugin.h
index 7a608fd2..848b8aef 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.h
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.h
@@ -23,7 +23,7 @@
#include "kopeteplugin.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
namespace Kopete { class ChatSession; class Message; }
@@ -41,12 +41,12 @@ class NowListeningPlugin : public Kopete::Plugin
friend class NowListeningGUIClient;
public:
- NowListeningPlugin( QObject *parent, const char *name, const QStringList &args );
+ NowListeningPlugin( TQObject *parent, const char *name, const TQStringList &args );
virtual ~NowListeningPlugin();
static NowListeningPlugin* plugin();
public slots:
- void slotMediaCommand( const QString &, Kopete::ChatSession *theChat );
+ void slotMediaCommand( const TQString &, Kopete::ChatSession *theChat );
void slotOutgoingMessage(Kopete::Message&);
void slotAdvertCurrentMusic();
@@ -57,17 +57,17 @@ friend class NowListeningGUIClient;
* useful to set it to false if one already has called
* update somewhere else, for instance in newTrackPlaying().
*/
- QString mediaPlayerAdvert(bool update = true);
+ TQString mediaPlayerAdvert(bool update = true);
/**
* @internal Build the message for @ref mediaPlayerAdvert
- * @param message Reference to the messsage, because return QString cause data loss.
+ * @param message Reference to the messsage, because return TQString cause data loss.
* @param player Pointer to the current Media Player.
* Used to get the information about the current track playing.
* @param update Whether the players must update their data. It can be
* useful to set it to false if one already has called
* update somewhere else, for instance in newTrackPlaying().
*/
- void buildTrackMessage(QString &message, NLMediaPlayer *player, bool update);
+ void buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update);
/**
* @return true if one of the players has changed track since the last message.
*/
@@ -78,11 +78,11 @@ friend class NowListeningGUIClient;
* @p in - the source format string
* @p bool - is this call within a set of brackets for conditional expansion?
*/
- QString substDepthFirst( NLMediaPlayer *player, QString in, bool inBrackets) const;
+ TQString substDepthFirst( NLMediaPlayer *player, TQString in, bool inBrackets) const;
/**
* Sends a message to a single chat
*/
- void advertiseToChat( Kopete::ChatSession* theChat, QString message );
+ void advertiseToChat( Kopete::ChatSession* theChat, TQString message );
/**
* Update the currentMedia pointer on config change.
*/
diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp
index 179ce3a5..118b37da 100644
--- a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp
@@ -17,10 +17,10 @@
* *
*************************************************************************
*/
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <klistbox.h>
#include <klocale.h>
@@ -36,22 +36,22 @@ typedef KGenericFactory<NowListeningPreferences> NowListeningPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) )
-NowListeningPreferences::NowListeningPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule( NowListeningPreferencesFactory::instance(), parent, args )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new NowListeningPrefsUI( this );
addConfig( NowListeningConfig::self(), preferencesDialog );
// Fill the media player listbox.
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kscd"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Noatun"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Juk"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("amaroK"));
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kaffeine"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kscd"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Noatun"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Juk"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("amaroK"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kaffeine"));
#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS
- preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("XMMS"));
+ preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("XMMS"));
#endif
load();
}
diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.h b/kopete/plugins/nowlistening/nowlisteningpreferences.h
index 14d9ceea..078b1a0c 100644
--- a/kopete/plugins/nowlistening/nowlisteningpreferences.h
+++ b/kopete/plugins/nowlistening/nowlisteningpreferences.h
@@ -33,7 +33,7 @@ class NowListeningPreferences : public KCModule
{
Q_OBJECT
public:
- NowListeningPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ NowListeningPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
virtual ~NowListeningPreferences();
virtual void save();
virtual void load();
diff --git a/kopete/plugins/smpppdcs/detectordcop.cpp b/kopete/plugins/smpppdcs/detectordcop.cpp
index 2536674d..f5f5f992 100644
--- a/kopete/plugins/smpppdcs/detectordcop.cpp
+++ b/kopete/plugins/smpppdcs/detectordcop.cpp
@@ -23,7 +23,7 @@
#include "detectordcop.h"
#include "iconnector.h"
-QCString DetectorDCOP::m_kinternetApp = "";
+TQCString DetectorDCOP::m_kinternetApp = "";
DetectorDCOP::DetectorDCOP(IConnector * connector)
: Detector(connector) {}
@@ -33,7 +33,7 @@ DetectorDCOP::~DetectorDCOP() {}
/*!
\fn DetectorDCOP::getKInternetDCOP()
*/
-QCString DetectorDCOP::getKInternetDCOP() const {
+TQCString DetectorDCOP::getKInternetDCOP() const {
DCOPClient * client = kapp->dcopClient();
if(m_kinternetApp.isEmpty() && client && client->isAttached()) {
// get all registered dcop apps and search for kinternet
diff --git a/kopete/plugins/smpppdcs/detectordcop.h b/kopete/plugins/smpppdcs/detectordcop.h
index 5306998b..6a9602d3 100644
--- a/kopete/plugins/smpppdcs/detectordcop.h
+++ b/kopete/plugins/smpppdcs/detectordcop.h
@@ -41,11 +41,11 @@ protected:
ERROR
};
- QCString getKInternetDCOP() const;
+ TQCString getKInternetDCOP() const;
KInternetDCOPState getConnectionStatusDCOP() const;
protected:
- static QCString m_kinternetApp;
+ static TQCString m_kinternetApp;
};
#endif
diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp
index 60dff658..cb9a393a 100644
--- a/kopete/plugins/smpppdcs/detectornetstat.cpp
+++ b/kopete/plugins/smpppdcs/detectornetstat.cpp
@@ -21,7 +21,7 @@
#include "detectornetstat.h"
DetectorNetstat::DetectorNetstat(IConnector* connector)
- : Detector(connector), m_buffer(QString::null), m_process(NULL) {}
+ : Detector(connector), m_buffer(TQString::null), m_process(NULL) {}
DetectorNetstat::~DetectorNetstat() {
delete m_process;
@@ -37,7 +37,7 @@ void DetectorNetstat::checkStatus() const {
return;
}
- m_buffer = QString::null;
+ m_buffer = TQString::null;
// Use KProcess to run netstat -r. We'll then parse the output of
// netstat -r in slotProcessStdout() to see if it mentions the
@@ -45,8 +45,8 @@ void DetectorNetstat::checkStatus() const {
m_process = new KProcess;
*m_process << "netstat" << "-r";
- connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotProcessStdout( KProcess *, char *, int)));
- connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *)));
+ connect(m_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotProcessStdout( KProcess *, char *, int)));
+ connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *)));
if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stdout)) {
kdWarning(14312) << k_funcinfo << "Unable to start netstat process!" << endl;
@@ -59,7 +59,7 @@ void DetectorNetstat::checkStatus() const {
void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) {
// Look for a default gateway
kdDebug(14312) << k_funcinfo << endl;
- m_buffer += QString::fromLatin1(buffer, buflen);
+ m_buffer += TQString::fromLatin1(buffer, buflen);
kdDebug(14312) << m_buffer << endl;
}
@@ -67,7 +67,7 @@ void DetectorNetstat::slotProcessExited(KProcess *process) {
kdDebug(14312) << k_funcinfo << m_buffer << endl;
if(process == m_process) {
m_connector->setConnectedStatus(m_buffer.contains("default"));
- m_buffer = QString::null;
+ m_buffer = TQString::null;
delete m_process;
m_process = 0L;
}
diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h
index d51a6d97..bd41ae58 100644
--- a/kopete/plugins/smpppdcs/detectornetstat.h
+++ b/kopete/plugins/smpppdcs/detectornetstat.h
@@ -17,7 +17,7 @@
#ifndef DETECTORNETSTAT_H
#define DETECTORNETSTAT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "detector.h"
@@ -27,7 +27,7 @@ class IConnector;
/**
@author Heiko Sch&auml;fer <heiko@rangun.de>
*/
-class DetectorNetstat : protected QObject, public Detector {
+class DetectorNetstat : protected TQObject, public Detector {
Q_OBJECT
DetectorNetstat(const DetectorNetstat&);
@@ -49,7 +49,7 @@ private slots:
void slotProcessExited(KProcess *process);
private:
- mutable QString m_buffer;
+ mutable TQString m_buffer;
mutable KProcess * m_process;
};
diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp
index 921718b7..e2b1ae19 100644
--- a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp
+++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp
@@ -26,8 +26,8 @@ DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector)
: Detector(connector), m_connManager(NULL) {
m_connManager = ConnectionManager::self();
- connect(m_connManager, SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus)),
- this, SLOT(statusChanged(const QString&, NetworkStatus::EnumStatus)));
+ connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus)),
+ this, TQT_SLOT(statusChanged(const TQString&, NetworkStatus::EnumStatus)));
}
DetectorNetworkStatus::~DetectorNetworkStatus() {}
@@ -36,7 +36,7 @@ void DetectorNetworkStatus::checkStatus() const {
// needs to do nothing
}
-void DetectorNetworkStatus::statusChanged(const QString& host, NetworkStatus::EnumStatus status) {
+void DetectorNetworkStatus::statusChanged(const TQString& host, NetworkStatus::EnumStatus status) {
switch(status) {
case NetworkStatus::Offline:
kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl;
diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.h b/kopete/plugins/smpppdcs/detectornetworkstatus.h
index 20315902..dd3a7394 100644
--- a/kopete/plugins/smpppdcs/detectornetworkstatus.h
+++ b/kopete/plugins/smpppdcs/detectornetworkstatus.h
@@ -17,7 +17,7 @@
#ifndef DETECTORNETWORKSTATUS_H
#define DETECTORNETWORKSTATUS_H
-#include <qobject.h>
+#include <tqobject.h>
#include "detector.h"
@@ -27,7 +27,7 @@ class ConnectionManager;
/**
@author Heiko Sch&auml;fer <heiko@rangun.de>
*/
-class DetectorNetworkStatus : protected QObject, public Detector
+class DetectorNetworkStatus : protected TQObject, public Detector
{
Q_OBJECT
@@ -41,7 +41,7 @@ public:
virtual void checkStatus() const;
protected slots:
- void statusChanged(const QString& host, NetworkStatus::EnumStatus status);
+ void statusChanged(const TQString& host, NetworkStatus::EnumStatus status);
private:
ConnectionManager * m_connManager;
diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.cpp b/kopete/plugins/smpppdcs/detectorsmpppd.cpp
index 35ed1e05..772090d9 100644
--- a/kopete/plugins/smpppdcs/detectorsmpppd.cpp
+++ b/kopete/plugins/smpppdcs/detectorsmpppd.cpp
@@ -58,7 +58,7 @@ void DetectorSMPPPD::checkStatus() const {
SMPPPD::Client c;
unsigned int port = SMPPPDCSConfig::self()->port();
- QString server = SMPPPDCSConfig::self()->server();
+ TQString server = SMPPPDCSConfig::self()->server();
c.setPassword(SMPPPDCSConfig::self()->password().utf8());
diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.h b/kopete/plugins/smpppdcs/detectorsmpppd.h
index 0f72d46d..197fe65b 100644
--- a/kopete/plugins/smpppdcs/detectorsmpppd.h
+++ b/kopete/plugins/smpppdcs/detectorsmpppd.h
@@ -17,7 +17,7 @@
#ifndef DETECTORSMPPPD_H
#define DETECTORSMPPPD_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "detectordcop.h"
diff --git a/kopete/plugins/smpppdcs/kinternetiface.h b/kopete/plugins/smpppdcs/kinternetiface.h
index b0ac8aa7..6e5f0203 100644
--- a/kopete/plugins/smpppdcs/kinternetiface.h
+++ b/kopete/plugins/smpppdcs/kinternetiface.h
@@ -29,7 +29,7 @@ class KInternetIface : public DCOPObject
public:
- KInternetIface (const QCString& name) : DCOPObject (name) { }
+ KInternetIface (const TQCString& name) : DCOPObject (name) { }
k_dcop:
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp
index d386b669..5ff1654b 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp
@@ -22,7 +22,7 @@
using namespace SMPPPD;
Client::Client()
- : m_state(NULL), m_sock(NULL), m_serverID(QString::null), m_serverVer(QString::null), m_password(QString::null) {
+ : m_state(NULL), m_sock(NULL), m_serverID(TQString::null), m_serverVer(TQString::null), m_password(TQString::null) {
changeState(Unsettled::instance());
}
@@ -30,7 +30,7 @@ Client::~Client() {
disconnect();
}
-bool Client::connect(const QString& server, uint port) {
+bool Client::connect(const TQString& server, uint port) {
return m_state->connect(this, server, port);
}
@@ -38,27 +38,27 @@ void Client::disconnect() {
m_state->disconnect(this);
}
-QStringList Client::getInterfaceConfigurations() {
+TQStringList Client::getInterfaceConfigurations() {
return m_state->getInterfaceConfigurations(this);
}
-bool Client::statusInterface(const QString& ifcfg) {
+bool Client::statusInterface(const TQString& ifcfg) {
return m_state->statusInterface(this, ifcfg);
}
-QString Client::serverID() const {
+TQString Client::serverID() const {
return m_serverID;
}
-QString Client::serverVersion() const {
+TQString Client::serverVersion() const {
return m_serverVer;
}
-QStringList Client::read() const {
- QStringList qsl;
+TQStringList Client::read() const {
+ TQStringList qsl;
if(isReady()) {
- QDataStream stream(m_sock);
+ TQDataStream stream(m_sock);
char s[1024];
stream.readRawBytes(s, 1023);
@@ -78,7 +78,7 @@ QStringList Client::read() const {
void Client::write(const char * cmd) {
if(isReady()) {
- QDataStream stream(m_sock);
+ TQDataStream stream(m_sock);
stream.writeRawBytes(cmd, strlen(cmd));
stream.writeRawBytes("\n", strlen("\n"));
m_sock->flush();
@@ -92,7 +92,7 @@ bool Client::isReady() const {
bool Client::isOnline() {
if(isReady()) {
- QStringList ifcfgs = getInterfaceConfigurations();
+ TQStringList ifcfgs = getInterfaceConfigurations();
for(uint i = 0; i < ifcfgs.count(); i++) {
if(statusInterface(ifcfgs[i])) {
return true;
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h
index a123cd4c..badda45c 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h
@@ -17,7 +17,7 @@
#ifndef SMPPPDCLIENT_H
#define SMPPPDCLIENT_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KNetwork {
class KStreamSocket;
@@ -40,38 +40,38 @@ public:
bool isReady() const;
- bool connect(const QString& server, uint port = 3185);
+ bool connect(const TQString& server, uint port = 3185);
void disconnect();
- QStringList getInterfaceConfigurations();
- bool statusInterface(const QString& ifcfg);
+ TQStringList getInterfaceConfigurations();
+ bool statusInterface(const TQString& ifcfg);
bool isOnline();
- QString serverID() const;
- QString serverVersion() const;
+ TQString serverID() const;
+ TQString serverVersion() const;
- void setPassword(const QString& password);
+ void setPassword(const TQString& password);
private:
friend class State;
void changeState(State * newState);
- QStringList read() const;
+ TQStringList read() const;
void write(const char * cmd);
private:
State * m_state;
KNetwork::KStreamSocket * m_sock;
- QString m_serverID;
- QString m_serverVer;
- QString m_password;
+ TQString m_serverID;
+ TQString m_serverVer;
+ TQString m_password;
};
inline void Client::changeState(State * newState) {
m_state = newState;
}
-inline void Client::setPassword(const QString& password) {
+inline void Client::setPassword(const TQString& password) {
m_password = password;
}
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp
index 421914bb..f51aa301 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp
@@ -14,7 +14,7 @@
*************************************************************************
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kstreamsocket.h>
@@ -48,33 +48,33 @@ void Ready::disconnect(Client * client) {
delete socket(client);
setSocket(client, NULL);
- setServerID(client, QString::null);
- setServerVersion(client, QString::null);
+ setServerID(client, TQString::null);
+ setServerVersion(client, TQString::null);
}
changeState(client, Unsettled::instance());
}
-QStringList Ready::getInterfaceConfigurations(Client * client) {
+TQStringList Ready::getInterfaceConfigurations(Client * client) {
- QStringList ifcfgs;
+ TQStringList ifcfgs;
// we want all ifcfgs
kdDebug(14312) << k_funcinfo << "smpppd req: list-ifcfgs" << endl;
write(client, "list-ifcfgs");
- QStringList stream = read(client);
+ TQStringList stream = read(client);
kdDebug(14312) << k_funcinfo << "smpppd ack: " << stream[0] << endl;
if(stream[0].startsWith("ok")) {
- // we have now a QStringList with all ifcfgs
+ // we have now a TQStringList with all ifcfgs
// we extract them and put them in the global ifcfgs-list
// stream[1] tells us how many ifcfgs are coming next
- QRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*");
+ TQRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*");
if(numIfcfgsRex.exactMatch(stream[1])) {
int count_ifcfgs = numIfcfgsRex.cap(1).toInt();
kdDebug(14312) << k_funcinfo << "ifcfgs: " << count_ifcfgs << endl;
for(int i = 0; i < count_ifcfgs; i++) {
- QRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*");
+ TQRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*");
if(ifcfgRex.exactMatch(stream[i+2])) {
ifcfgs.push_back(ifcfgRex.cap(1));
}
@@ -85,14 +85,14 @@ QStringList Ready::getInterfaceConfigurations(Client * client) {
return ifcfgs;
}
-bool Ready::statusInterface(Client * client, const QString& ifcfg) {
+bool Ready::statusInterface(Client * client, const TQString& ifcfg) {
- QString cmd = "list-status " + ifcfg;
+ TQString cmd = "list-status " + ifcfg;
write(client, cmd.latin1());
socket(client)->waitForMore(0);
- QStringList stream = read(client);
+ TQStringList stream = read(client);
if(stream[0].startsWith("ok")) {
if(stream[2].startsWith("status connected")) {
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h
index 9ec3ab93..f3be8667 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h
@@ -37,8 +37,8 @@ public:
static Ready * instance();
virtual void disconnect(Client * client);
- virtual QStringList getInterfaceConfigurations(Client * client);
- virtual bool statusInterface(Client * client, const QString& ifcfg);
+ virtual TQStringList getInterfaceConfigurations(Client * client);
+ virtual bool statusInterface(Client * client, const TQString& ifcfg);
private:
static Ready * m_instance;
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp
index 9e4bd508..8ae0f1d4 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp
@@ -25,7 +25,7 @@ State::State() {}
State::~State() {}
-QStringList State::read(Client * client) const {
+TQStringList State::read(Client * client) const {
return client->read();
}
@@ -41,19 +41,19 @@ KNetwork::KStreamSocket * State::socket(Client * client) const {
return client->m_sock;
}
-QString State::password(Client * client) const {
+TQString State::password(Client * client) const {
return client->m_password;
}
-void State::setPassword(Client * client, const QString& pass) {
+void State::setPassword(Client * client, const TQString& pass) {
client->m_password = pass;
}
-void State::setServerID(Client * client, const QString& id) {
+void State::setServerID(Client * client, const TQString& id) {
client->m_serverID = id;
}
-void State::setServerVersion(Client * client, const QString& ver) {
+void State::setServerVersion(Client * client, const TQString& ver) {
client->m_serverVer = ver;
}
@@ -61,16 +61,16 @@ void State::setSocket(Client * client, KNetwork::KStreamSocket * sock) {
client->m_sock = sock;
}
-bool State::connect(Client * /* client */, const QString& /* server */, uint /* port */) {
+bool State::connect(Client * /* client */, const TQString& /* server */, uint /* port */) {
return false;
}
void State::disconnect(Client * /* client */) {}
-QStringList State::getInterfaceConfigurations(Client * /* client */) {
- return QStringList();
+TQStringList State::getInterfaceConfigurations(Client * /* client */) {
+ return TQStringList();
}
-bool State::statusInterface(Client * /* client */, const QString& /* ifcfg */) {
+bool State::statusInterface(Client * /* client */, const TQString& /* ifcfg */) {
return false;
}
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h
index 0e7d393b..8f1ac32e 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h
@@ -17,7 +17,7 @@
#ifndef SMPPPDSTATE_H
#define SMPPPDSTATE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace SMPPPD {
@@ -34,22 +34,22 @@ public:
State();
virtual ~State();
- virtual bool connect(Client * client, const QString& server, uint port = 3185);
+ virtual bool connect(Client * client, const TQString& server, uint port = 3185);
virtual void disconnect(Client * client);
- virtual QStringList getInterfaceConfigurations(Client * client);
- virtual bool statusInterface(Client * client, const QString& ifcfg);
+ virtual TQStringList getInterfaceConfigurations(Client * client);
+ virtual bool statusInterface(Client * client, const TQString& ifcfg);
protected:
- QStringList read(Client * client) const;
+ TQStringList read(Client * client) const;
void write(Client * client, const char * cmd);
void changeState(Client * client, State * state);
KNetwork::KStreamSocket * socket(Client * client) const;
void setSocket(Client * client, KNetwork::KStreamSocket * sock);
- QString password(Client * client) const;
- void setPassword(Client * client, const QString& pass);
- void setServerID(Client * client, const QString& id);
- void setServerVersion(Client * client, const QString& ver);
+ TQString password(Client * client) const;
+ void setPassword(Client * client, const TQString& pass);
+ void setServerID(Client * client, const TQString& id);
+ void setServerVersion(Client * client, const TQString& ver);
};
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp
index 7ed5f516..3d1f8a79 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp
@@ -17,7 +17,7 @@
#include <cstdlib>
#include <openssl/md5.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kstreamsocket.h>
@@ -41,12 +41,12 @@ Unsettled * Unsettled::instance() {
return m_instance;
}
-bool Unsettled::connect(Client * client, const QString& server, uint port) {
+bool Unsettled::connect(Client * client, const TQString& server, uint port) {
if(!socket(client) ||
socket(client)->state() != KNetwork::KStreamSocket::Connected ||
socket(client)->state() != KNetwork::KStreamSocket::Connecting) {
- QString resolvedServer = server;
+ TQString resolvedServer = server;
changeState(client, Ready::instance());
disconnect(client);
@@ -58,7 +58,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) {
if(resolver.wait(500)) {
KNetwork::KResolverResults results = resolver.results();
if(!results.empty()) {
- QString ip = results[0].address().asInet().ipAddress().toString();
+ TQString ip = results[0].address().asInet().ipAddress().toString();
kdDebug(14312) << k_funcinfo << "Found IP-Address for " << server << ": " << ip << endl;
resolvedServer = ip;
} else {
@@ -70,7 +70,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) {
return false;
}
- setSocket(client, new KNetwork::KStreamSocket(resolvedServer, QString::number(port)));
+ setSocket(client, new KNetwork::KStreamSocket(resolvedServer, TQString::number(port)));
socket(client)->setBlocking(TRUE);
if(!socket(client)->connect()) {
@@ -78,25 +78,25 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) {
} else {
kdDebug(14312) << k_funcinfo << "Successfully connected to smpppd \"" << server << ":" << port << "\"" << endl;
- static QString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$";
- static QString clgRex = "^challenge = (.*)$";
+ static TQString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$";
+ static TQString clgRex = "^challenge = (.*)$";
- QRegExp ver(verRex);
- QRegExp clg(clgRex);
+ TQRegExp ver(verRex);
+ TQRegExp clg(clgRex);
- QString response = read(client)[0];
+ TQString response = read(client)[0];
- if(response != QString::null &&
+ if(response != TQString::null &&
ver.exactMatch(response)) {
setServerID(client, response);
setServerVersion(client, ver.cap(1));
changeState(client, Ready::instance());
return true;
- } else if(response != QString::null &&
+ } else if(response != TQString::null &&
clg.exactMatch(response)) {
- if(password(client) != QString::null) {
+ if(password(client) != TQString::null) {
// we are challenged, ok, respond
- write(client, QString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1());
+ write(client, TQString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1());
response = read(client)[0];
if(ver.exactMatch(response)) {
setServerID(client, response);
@@ -119,7 +119,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) {
return false;
}
-QString Unsettled::make_response(const QString& chex, const QString& password) const {
+TQString Unsettled::make_response(const TQString& chex, const TQString& password) const {
int size = chex.length ();
if (size & 1)
@@ -127,9 +127,9 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c
size >>= 1;
// convert challenge from hex to bin
- QString cbin;
+ TQString cbin;
for (int i = 0; i < size; i++) {
- QString tmp = chex.mid (2 * i, 2);
+ TQString tmp = chex.mid (2 * i, 2);
cbin.append ((char) strtol (tmp.ascii (), 0, 16));
}
@@ -142,7 +142,7 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c
MD5_Final (rbin, &md5);
// convert response from bin to hex
- QString rhex;
+ TQString rhex;
for (int i = 0; i < MD5_DIGEST_LENGTH; i++) {
char buffer[3];
snprintf (buffer, 3, "%02x", rbin[i]);
diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h
index 57a83752..bf19035e 100644
--- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h
+++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h
@@ -35,10 +35,10 @@ public:
static Unsettled * instance();
- virtual bool connect(Client * client, const QString& server, uint port = 3185);
+ virtual bool connect(Client * client, const TQString& server, uint port = 3185);
private:
- QString make_response(const QString& chex, const QString& password) const;
+ TQString make_response(const TQString& chex, const TQString& password) const;
private:
static Unsettled * m_instance;
diff --git a/kopete/plugins/smpppdcs/smpppdcsiface.h b/kopete/plugins/smpppdcs/smpppdcsiface.h
index face60ad..7bd8febe 100644
--- a/kopete/plugins/smpppdcs/smpppdcsiface.h
+++ b/kopete/plugins/smpppdcs/smpppdcsiface.h
@@ -29,7 +29,7 @@ class SMPPPDCSIFace : virtual public DCOPObject
k_dcop:
- virtual QString detectionMethod() const = 0;
+ virtual TQString detectionMethod() const = 0;
virtual bool isOnline() const = 0;
};
diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp
index 2ed8455c..f17f2ca9 100644
--- a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp
+++ b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp
@@ -19,7 +19,7 @@
#include "onlineinquiry.h"
#include "smpppdcsplugin.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -37,7 +37,7 @@
typedef KGenericFactory<SMPPPDCSPlugin> SMPPPDCSPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs"))
-SMPPPDCSPlugin::SMPPPDCSPlugin(QObject *parent, const char * name, const QStringList& /* args */)
+SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *parent, const char * name, const TQStringList& /* args */)
: DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name),
m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL),
m_onlineInquiry(NULL) {
@@ -56,13 +56,13 @@ m_onlineInquiry(NULL) {
// we wait for the allPluginsLoaded signal, to connect
// as early as possible after startup, but not before
// all accounts are ready
- connect(Kopete::PluginManager::self(), SIGNAL(allPluginsLoaded()),
- this, SLOT(allPluginsLoaded()));
+ connect(Kopete::PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()),
+ this, TQT_SLOT(allPluginsLoaded()));
// if kopete was already running and the plugin
// was loaded later, we check once after 15 secs
// if all other plugins have been loaded
- QTimer::singleShot(15000, this, SLOT(allPluginsLoaded()));
+ TQTimer::singleShot(15000, this, TQT_SLOT(allPluginsLoaded()));
}
SMPPPDCSPlugin::~SMPPPDCSPlugin() {
@@ -79,8 +79,8 @@ SMPPPDCSPlugin::~SMPPPDCSPlugin() {
void SMPPPDCSPlugin::allPluginsLoaded() {
if(Kopete::PluginManager::self()->isAllPluginsLoaded()) {
- m_timer = new QTimer();
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCheckStatus()));
+ m_timer = new TQTimer();
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus()));
if(SMPPPDCSConfig::self()->useSmpppd()) {
m_timer->start(30000);
@@ -137,10 +137,10 @@ void SMPPPDCSPlugin::setConnectedStatus( bool connected ) {
void SMPPPDCSPlugin::connectAllowed() {
- QStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
+ TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
Kopete::AccountManager * m = Kopete::AccountManager::self();
- for(QPtrListIterator<Kopete::Account> it(m->accounts())
+ for(TQPtrListIterator<Kopete::Account> it(m->accounts())
;
it.current();
++it) {
@@ -162,10 +162,10 @@ void SMPPPDCSPlugin::connectAllowed() {
void SMPPPDCSPlugin::disconnectAllowed() {
- QStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
+ TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
Kopete::AccountManager * m = Kopete::AccountManager::self();
- for(QPtrListIterator<Kopete::Account> it(m->accounts())
+ for(TQPtrListIterator<Kopete::Account> it(m->accounts())
;
it.current();
++it) {
@@ -184,7 +184,7 @@ void SMPPPDCSPlugin::disconnectAllowed() {
}
}
-QString SMPPPDCSPlugin::detectionMethod() const {
+TQString SMPPPDCSPlugin::detectionMethod() const {
if(SMPPPDCSConfig::self()->useSmpppd()) {
return "smpppd";
} else {
@@ -193,11 +193,11 @@ QString SMPPPDCSPlugin::detectionMethod() const {
}
/*!
- \fn SMPPPDCSPlugin::smpppdServerChanged(const QString& server)
+ \fn SMPPPDCSPlugin::smpppdServerChanged(const TQString& server)
*/
-void SMPPPDCSPlugin::smpppdServerChanged(const QString& server) {
+void SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) {
- QString oldServer = SMPPPDCSConfig::self()->server().utf8();
+ TQString oldServer = SMPPPDCSConfig::self()->server().utf8();
if(oldServer != server) {
kdDebug(14312) << k_funcinfo << "Detected a server change" << endl;
diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h
index 789d9c41..5c4ba2e6 100644
--- a/kopete/plugins/smpppdcs/smpppdcsplugin.h
+++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h
@@ -55,7 +55,7 @@ public:
/**
* @brief Creates an <code>SMPPPDCSPlugin</code> instance
*/
- SMPPPDCSPlugin( QObject *parent, const char *name, const QStringList &args );
+ SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args );
/**
* @brief Destroys an <code>SMPPPDCSPlugin</code> instance
@@ -78,12 +78,12 @@ public:
*/
virtual void setConnectedStatus( bool newStatus );
- virtual QString detectionMethod() const;
+ virtual TQString detectionMethod() const;
virtual void aboutToUnload();
public slots:
- void smpppdServerChanged(const QString& server);
+ void smpppdServerChanged(const TQString& server);
private slots:
void slotCheckStatus();
@@ -100,7 +100,7 @@ private:
Detector * m_detectorNetstat;
Detector * m_detectorNetworkStatus;
bool m_pluginConnected;
- QTimer * m_timer;
+ TQTimer * m_timer;
OnlineInquiry * m_onlineInquiry;
};
diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp
index ddce3572..671008bc 100644
--- a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp
+++ b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp
@@ -14,9 +14,9 @@
*************************************************************************
*/
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqradiobutton.h>
#include <klistview.h>
#include <klineedit.h>
@@ -35,17 +35,17 @@
typedef KGenericFactory<SMPPPDCSPreferences> SMPPPDCSPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs"))
-SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name */, const QStringList& args)
+SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name */, const TQStringList& args)
: KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) {
Kopete::AccountManager * manager = Kopete::AccountManager::self();
- (new QVBoxLayout(this))->setAutoAdd(true);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
m_ui = new SMPPPDCSPrefs(this);
- for(QPtrListIterator<Kopete::Account> it(manager->accounts()); it.current(); ++it)
+ for(TQPtrListIterator<Kopete::Account> it(manager->accounts()); it.current(); ++it)
{
- QString protoName;
- QRegExp rex("(.*)Protocol");
+ TQString protoName;
+ TQRegExp rex("(.*)Protocol");
if(rex.search((*it)->protocol()->pluginId()) > -1) {
protoName = rex.cap(1);
@@ -54,11 +54,11 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name
}
if(it.current()->inherits("Kopete::ManagedConnectionAccount")) {
- protoName += QString(", %1").arg(i18n("connection status is managed by Kopete"));
+ protoName += TQString(", %1").arg(i18n("connection status is managed by Kopete"));
}
- QCheckListItem * cli = new QCheckListItem(m_ui->accountList,
- (*it)->accountId() + " (" + protoName + ")", QCheckListItem::CheckBox);
+ TQCheckListItem * cli = new TQCheckListItem(m_ui->accountList,
+ (*it)->accountId() + " (" + protoName + ")", TQCheckListItem::CheckBox);
cli->setPixmap(0, (*it)->accountIcon());
m_accountMapOld[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId());
@@ -66,15 +66,15 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name
m_ui->accountList->insertItem(cli);
}
- connect(m_ui->accountList, SIGNAL(clicked(QListViewItem *)), this, SLOT(listClicked(QListViewItem *)));
+ connect(m_ui->accountList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(listClicked(TQListViewItem *)));
// connect for modified
- connect(m_ui->useNetstat, SIGNAL(clicked()), this, SLOT(slotModified()));
- connect(m_ui->useSmpppd, SIGNAL(clicked()), this, SLOT(slotModified()));
+ connect(m_ui->useNetstat, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified()));
+ connect(m_ui->useSmpppd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified()));
- connect(m_ui->SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified()));
- connect(m_ui->SMPPPDLocation->port, SIGNAL(valueChanged(int)), this, SLOT(slotModified()));
- connect(m_ui->SMPPPDLocation->Password, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified()));
+ connect(m_ui->SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified()));
+ connect(m_ui->SMPPPDLocation->port, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified()));
+ connect(m_ui->SMPPPDLocation->Password, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified()));
load();
}
@@ -83,9 +83,9 @@ SMPPPDCSPreferences::~SMPPPDCSPreferences() {
delete m_ui;
}
-void SMPPPDCSPreferences::listClicked(QListViewItem * item)
+void SMPPPDCSPreferences::listClicked(TQListViewItem * item)
{
- QCheckListItem * cli = dynamic_cast<QCheckListItem *>(item);
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(item);
if(cli->isOn() != m_accountMapCur[cli->text(0)].m_on) {
AccountMap::iterator itOld = m_accountMapOld.begin();
@@ -105,9 +105,9 @@ void SMPPPDCSPreferences::listClicked(QListViewItem * item)
void SMPPPDCSPreferences::defaults()
{
- QListViewItemIterator it(m_ui->accountList);
+ TQListViewItemIterator it(m_ui->accountList);
while(it.current()) {
- QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current());
cli->setOn(FALSE);
++it;
}
@@ -127,12 +127,12 @@ void SMPPPDCSPreferences::load()
SMPPPDCSConfig::self()->readConfig();
- static QString rexStr = "^(.*) \\((.*)\\)";
- QRegExp rex(rexStr);
- QStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
- QListViewItemIterator it(m_ui->accountList);
+ static TQString rexStr = "^(.*) \\((.*)\\)";
+ TQRegExp rex(rexStr);
+ TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts();
+ TQListViewItemIterator it(m_ui->accountList);
while(it.current()) {
- QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current());
if(rex.search(cli->text(0)) > -1) {
bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1));
// m_accountMapOld[cli->text(0)].m_on = isOn;
@@ -154,11 +154,11 @@ void SMPPPDCSPreferences::load()
void SMPPPDCSPreferences::save()
{
- QStringList list;
- QListViewItemIterator it(m_ui->accountList);
+ TQStringList list;
+ TQListViewItemIterator it(m_ui->accountList);
while(it.current()) {
- QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current());
+ TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current());
if(cli->isOn()) {
list.append(m_accountMapCur[cli->text(0)].m_id);
}
diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.h b/kopete/plugins/smpppdcs/smpppdcspreferences.h
index 8bbeff69..dba3470b 100644
--- a/kopete/plugins/smpppdcs/smpppdcspreferences.h
+++ b/kopete/plugins/smpppdcs/smpppdcspreferences.h
@@ -25,10 +25,10 @@ class SMPPPDCSPrefs;
class AccountPrivMap {
public:
- AccountPrivMap(bool isOn = FALSE, const QString& id = QString::null)
+ AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString::null)
: m_on(isOn), m_id(id) {}
bool m_on;
- QString m_id;
+ TQString m_id;
};
/**
@@ -43,12 +43,12 @@ class SMPPPDCSPreferences : public KCModule {
SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&);
public:
- typedef QMap<QString, AccountPrivMap> AccountMap;
+ typedef TQMap<TQString, AccountPrivMap> AccountMap;
/**
* @brief Creates an <code>SMPPPDCSPreferences</code> instance
*/
- SMPPPDCSPreferences(QWidget * parent = 0, const char * name = 0, const QStringList &args = QStringList());
+ SMPPPDCSPreferences(TQWidget * parent = 0, const char * name = 0, const TQStringList &args = TQStringList());
/**
* @brief Destroys an <code>SMPPPDCSPreferences</code> instance
@@ -60,7 +60,7 @@ public:
virtual void defaults();
protected slots:
- void listClicked(QListViewItem * item);
+ void listClicked(TQListViewItem * item);
private slots:
void slotModified();
diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp
index 5a834c97..4dbedc54 100644
--- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp
+++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp
@@ -17,7 +17,7 @@
#include <arpa/inet.h>
#include <netdb.h>
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include <kstandarddirs.h>
#include <kapplication.h>
@@ -35,7 +35,7 @@
#include "smpppdcsprefsimpl.h"
#include "smpppdsearcher.h"
-SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl)
+SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl)
: SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) {
// search for our main-plugin instance
@@ -45,17 +45,17 @@ SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl)
}
// signals and slots connections
- connect(useNetstat, SIGNAL(toggled(bool)), this, SLOT(disableSMPPPDSettings()));
- connect(useSmpppd, SIGNAL(toggled(bool)), this, SLOT(enableSMPPPDSettings()));
- connect(autoCSTest, SIGNAL(clicked()), this, SLOT(determineCSType()));
+ connect(useNetstat, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(disableSMPPPDSettings()));
+ connect(useSmpppd, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableSMPPPDSettings()));
+ connect(autoCSTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(determineCSType()));
if(m_plugin) {
- connect((QObject *)SMPPPDLocation->server, SIGNAL(textChanged(const QString&)),
- m_plugin, SLOT(smpppdServerChanged(const QString&)));
+ connect((TQObject *)SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)),
+ m_plugin, TQT_SLOT(smpppdServerChanged(const TQString&)));
}
// if netstat is NOT available, disable the option and set to SMPPPD
- if(KStandardDirs::findExe("netstat") == QString::null) {
+ if(KStandardDirs::findExe("netstat") == TQString::null) {
autoCSTest->setEnabled(FALSE);
useNetstat->setEnabled(FALSE);
useNetstat->setChecked(FALSE);
@@ -79,11 +79,11 @@ void SMPPPDCSPrefs::determineCSType() {
SMPPPDSearcher searcher;
m_curSearcher = &searcher;
- connect(&searcher, SIGNAL(smpppdFound(const QString&)), this, SLOT(smpppdFound(const QString&)));
- connect(&searcher, SIGNAL(smpppdNotFound()), this, SLOT(smpppdNotFound()));
- connect(&searcher, SIGNAL(scanStarted(uint)), this, SLOT(scanStarted(uint)));
- connect(&searcher, SIGNAL(scanProgress(uint)), this, SLOT(scanProgress(uint)));
- connect(&searcher, SIGNAL(scanFinished()), this, SLOT(scanFinished()));
+ connect(&searcher, TQT_SIGNAL(smpppdFound(const TQString&)), this, TQT_SLOT(smpppdFound(const TQString&)));
+ connect(&searcher, TQT_SIGNAL(smpppdNotFound()), this, TQT_SLOT(smpppdNotFound()));
+ connect(&searcher, TQT_SIGNAL(scanStarted(uint)), this, TQT_SLOT(scanStarted(uint)));
+ connect(&searcher, TQT_SIGNAL(scanProgress(uint)), this, TQT_SLOT(scanProgress(uint)));
+ connect(&searcher, TQT_SIGNAL(scanFinished()), this, TQT_SLOT(scanFinished()));
searcher.searchNetwork();
m_curSearcher = NULL;
@@ -99,7 +99,7 @@ void SMPPPDCSPrefs::scanStarted(uint total) {
m_scanProgressDlg->setAllowCancel(TRUE);
m_scanProgressDlg->setMinimumDuration(2000);
- connect(m_scanProgressDlg, SIGNAL(cancelClicked()), this, SLOT(cancelScanning()));
+ connect(m_scanProgressDlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelScanning()));
}
m_scanProgressDlg->progressBar()->setTotalSteps(total);
m_scanProgressDlg->progressBar()->setProgress(0);
@@ -117,10 +117,10 @@ void SMPPPDCSPrefs::cancelScanning() {
m_curSearcher->cancelSearch();
}
-void SMPPPDCSPrefs::smpppdFound(const QString& host) {
+void SMPPPDCSPrefs::smpppdFound(const TQString& host) {
kdDebug(14312) << k_funcinfo << endl;
- QString myHost = host;
+ TQString myHost = host;
// try to get the domain name
struct in_addr addr;
diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h
index 181ba9fa..4dcbe46b 100644
--- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h
+++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h
@@ -17,7 +17,7 @@
#ifndef SMPPPDCSPREFSIMPL_H
#define SMPPPDCSPREFSIMPL_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kprogress.h>
@@ -38,7 +38,7 @@ class SMPPPDCSPrefs : public SMPPPDCSPrefsBase
public:
- SMPPPDCSPrefs(QWidget* parent, const char* name = 0, WFlags fl = 0);
+ SMPPPDCSPrefs(TQWidget* parent, const char* name = 0, WFlags fl = 0);
~SMPPPDCSPrefs();
signals:
@@ -48,7 +48,7 @@ protected slots:
void enableSMPPPDSettings();
void disableSMPPPDSettings();
void determineCSType();
- void smpppdFound(const QString & host);
+ void smpppdFound(const TQString & host);
void smpppdNotFound();
void scanStarted(uint total);
void scanProgress(uint cur);
diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp
index b20509d9..44de2552 100644
--- a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp
+++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp
@@ -18,12 +18,12 @@
#include "smpppdlocationwidget.h"
-SMPPPDLocationWidget::SMPPPDLocationWidget(QWidget* parent, const char* name, WFlags fl)
+SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* parent, const char* name, WFlags fl)
: SMPPPDLocationWidgetBase(parent, name, fl) {}
SMPPPDLocationWidget::~SMPPPDLocationWidget() {}
-void SMPPPDLocationWidget::setServer(const QString& serv) {
+void SMPPPDLocationWidget::setServer(const TQString& serv) {
server->setText(serv);
}
diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.h b/kopete/plugins/smpppdcs/smpppdlocationwidget.h
index 00fa9157..16d1edfb 100644
--- a/kopete/plugins/smpppdcs/smpppdlocationwidget.h
+++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.h
@@ -30,10 +30,10 @@ class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase
SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&);
public:
- SMPPPDLocationWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ SMPPPDLocationWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0);
~SMPPPDLocationWidget();
- void setServer(const QString& serv);
+ void setServer(const TQString& serv);
};
#endif
diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp
index 6ee9c878..a06e30a9 100644
--- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp
+++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp
@@ -14,8 +14,8 @@
*************************************************************************
*/
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@ void SMPPPDSearcher::searchNetwork() {
m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output
*m_procNetstat << "/bin/netstat" << "-rn";
- connect(m_procNetstat, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int)));
+ connect(m_procNetstat, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int)));
if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) {
kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl;
@@ -64,11 +64,11 @@ void SMPPPDSearcher::searchNetwork() {
void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) {
kdDebug(14312) << k_funcinfo << endl;
- QString myBuf = QString::fromLatin1(buf,len);
- QRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})");
+ TQString myBuf = TQString::fromLatin1(buf,len);
+ TQRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})");
// tokenize the string into lines
- QStringList toks = QStringList::split("\n", myBuf);
- for(QStringList::size_type i = 0; i < toks.count(); i++) {
+ TQStringList toks = TQStringList::split("\n", myBuf);
+ for(TQStringList::size_type i = 0; i < toks.count(); i++) {
if(rex.exactMatch(toks[i])) {
if(scan(rex.cap(1), rex.cap(2))) {
return;
@@ -81,8 +81,8 @@ void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * bu
void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) {
kdDebug(14312) << k_funcinfo << endl;
- QRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*");
- QString myBuf = QString::fromLatin1(buf,len);
+ TQRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*");
+ TQString myBuf = TQString::fromLatin1(buf,len);
if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) {
// if netstat -r found no gateway we search the network
@@ -90,7 +90,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf
m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output
*m_procIfconfig << "/sbin/ifconfig";
- connect(m_procIfconfig, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int)));
+ connect(m_procIfconfig, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int)));
if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) {
kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl;
@@ -105,7 +105,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf
/*!
\fn SMPPPDSearcher::scan() const
*/
-bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) {
+bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) {
kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl;
SMPPPD::Client client;
@@ -124,12 +124,12 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) {
uint max_range = 255;
// calculate ip range (only last mask entry)
- QRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})");
+ TQRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})");
if(lastRex.exactMatch(ip)) {
uint lastWordIP = lastRex.cap(4).toUInt();
- QStringList ipToks;
+ TQStringList ipToks;
for(int i = 1; i < 5; i++) {
ipToks.push_back(lastRex.cap(i));
}
@@ -164,7 +164,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) {
emit scanProgress(i);
}
- if(client.connect(QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)), 3185)) {
+ if(client.connect(TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)), 3185)) {
client.disconnect();
emit smpppdFound(ip);
if(range > 1) {
@@ -174,7 +174,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) {
}
#ifndef NDEBUG
else {
- kdDebug(14312) << k_funcinfo << "No smpppd found at " << QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)) << endl;
+ kdDebug(14312) << k_funcinfo << "No smpppd found at " << TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)) << endl;
}
#endif
}
diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h
index af36637d..81c9cb03 100644
--- a/kopete/plugins/smpppdcs/smpppdsearcher.h
+++ b/kopete/plugins/smpppdcs/smpppdsearcher.h
@@ -28,7 +28,7 @@ class KProcess;
* @todo Use of the SLP to find the smpppd
* @author Heiko Sch&auml;fer <heiko@rangun.de>
*/
-class SMPPPDSearcher : public QObject {
+class SMPPPDSearcher : public TQObject {
Q_OBJECT
SMPPPDSearcher(const SMPPPDSearcher&);
@@ -65,7 +65,7 @@ protected:
* @param mask the network mask
* @return <code>TRUE</code> if an smpppd was found
*/
- bool scan(const QString& ip, const QString& mask);
+ bool scan(const TQString& ip, const TQString& mask);
signals:
/**
@@ -73,7 +73,7 @@ signals:
*
* @param host the host there the smpppd was found
*/
- void smpppdFound(const QString& host);
+ void smpppdFound(const TQString& host);
/**
* @brief No smpppd was found
diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.cpp b/kopete/plugins/smpppdcs/unittest/clienttest.cpp
index 5affd83c..f668135f 100644
--- a/kopete/plugins/smpppdcs/unittest/clienttest.cpp
+++ b/kopete/plugins/smpppdcs/unittest/clienttest.cpp
@@ -45,7 +45,7 @@ void ClientTest::testConnect() {
void ClientTest::testCommunicationBeforeConnect() {
SMPPPD::Client c;
- QStringList l = c.getInterfaceConfigurations();
+ TQStringList l = c.getInterfaceConfigurations();
CHECK(l.count() == 0, true);
CHECK(c.statusInterface("ifcfg0"), false);
@@ -53,12 +53,12 @@ void ClientTest::testCommunicationBeforeConnect() {
void ClientTest::testServerIDBeforeConnect() {
SMPPPD::Client c;
- CHECK(c.serverID(), QString::null);
+ CHECK(c.serverID(), TQString::null);
}
void ClientTest::testServerVersionBeforeConnect() {
SMPPPD::Client c;
- CHECK(c.serverVersion(), QString::null);
+ CHECK(c.serverVersion(), TQString::null);
}
void ClientTest::testCommunicationAfterConnect() {
@@ -102,7 +102,7 @@ void ClientTest::testServerIDAfterDisconnect() {
SMPPPD::Client c;
if(c.connect("warwar", 3185)) {
c.disconnect();
- CHECK(c.serverID(), QString::null);
+ CHECK(c.serverID(), TQString::null);
} else {
SKIP("Test skipped because no smpppd at warwar:3185");
}
@@ -112,7 +112,7 @@ void ClientTest::testServerVersionAfterDisconnect() {
SMPPPD::Client c;
if(c.connect("warwar", 3185)) {
c.disconnect();
- CHECK(c.serverVersion(), QString::null);
+ CHECK(c.serverVersion(), TQString::null);
} else {
SKIP("Test skipped because no smpppd at warwar:3185");
}
diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp
index e9068fe5..821b8f59 100644
--- a/kopete/plugins/statistics/statisticscontact.cpp
+++ b/kopete/plugins/statistics/statisticscontact.cpp
@@ -16,8 +16,8 @@
#include <stdlib.h>
-#include <qvaluelist.h>
-#include <quuid.h>
+#include <tqvaluelist.h>
+#include <tquuid.h>
#include <kdebug.h>
#include <klocale.h>
@@ -31,7 +31,7 @@
StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown)
{
m_isChatWindowOpen = false;
- m_oldStatusDateTime = QDateTime::currentDateTime();
+ m_oldStatusDateTime = TQDateTime::currentDateTime();
// Last*Changed are always false at start
m_timeBetweenTwoMessagesChanged = false;
@@ -48,9 +48,9 @@ StatisticsContact::~StatisticsContact()
if (m_statisticsContactId.isEmpty())
return;
- commonStatsSave("timebetweentwomessages",QString::number(m_timeBetweenTwoMessages),
- QString::number(m_timeBetweenTwoMessagesOn), m_timeBetweenTwoMessagesChanged);
- commonStatsSave("messagelength",QString::number(m_messageLength), QString::number(m_messageLengthOn), m_messageLengthChanged);
+ commonStatsSave("timebetweentwomessages",TQString::number(m_timeBetweenTwoMessages),
+ TQString::number(m_timeBetweenTwoMessagesOn), m_timeBetweenTwoMessagesChanged);
+ commonStatsSave("messagelength",TQString::number(m_messageLength), TQString::number(m_messageLengthOn), m_messageLengthChanged);
commonStatsSave("lasttalk", m_lastTalk.toString(), "", m_lastTalkChanged);
commonStatsSave("lastpresent", m_lastPresent.toString(), "", m_lastPresentChanged);
}
@@ -58,7 +58,7 @@ StatisticsContact::~StatisticsContact()
void StatisticsContact::initialize(Kopete::Contact *c)
{
// Generate statisticsContactId or get it from database
- QStringList buffer = m_db->query(QString("SELECT statisticid FROM contacts "
+ TQStringList buffer = m_db->query(TQString("SELECT statisticid FROM contacts "
"WHERE contactid LIKE '%1';"
).arg(c->contactId()));
@@ -66,7 +66,7 @@ void StatisticsContact::initialize(Kopete::Contact *c)
{
// Check if we don't have old data
if ( !c->metaContact()->metaContactId().isEmpty() &&
- !m_db->query(QString("SELECT metacontactid FROM commonstats "
+ !m_db->query(TQString("SELECT metacontactid FROM commonstats "
"WHERE metacontactid LIKE '%1';"
).arg(c->metaContact()->metaContactId())).isEmpty())
{
@@ -80,7 +80,7 @@ void StatisticsContact::initialize(Kopete::Contact *c)
}
// Assign contactId to m_statisticsContactId
- m_db->query(QString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');"
+ m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');"
).arg(m_statisticsContactId).arg(c->contactId()));
}
else
@@ -94,8 +94,8 @@ void StatisticsContact::initialize(Kopete::Contact *c)
commonStatsCheck("messagelength", m_messageLength, m_messageLengthOn, 0, 0);
// Check for last talk
- QString lastTalk;
- QString dummy = "";
+ TQString lastTalk;
+ TQString dummy = "";
commonStatsCheck("lasttalk", lastTalk, dummy);
if (lastTalk.isEmpty())
{
@@ -103,15 +103,15 @@ void StatisticsContact::initialize(Kopete::Contact *c)
m_lastTalkChanged = true;
}
else
- m_lastTalk = QDateTime::fromString(lastTalk);
+ m_lastTalk = TQDateTime::fromString(lastTalk);
// Get last time a message was received
- m_lastMessageReceived = QDateTime::currentDateTime();
+ m_lastMessageReceived = TQDateTime::currentDateTime();
// Check for lastPresent
- QString lastPresent = "";
+ TQString lastPresent = "";
commonStatsCheck("lastpresent", lastPresent, dummy);
if (lastPresent.isEmpty())
{
@@ -119,7 +119,7 @@ void StatisticsContact::initialize(Kopete::Contact *c)
m_lastPresentChanged = true;
}
else
- m_lastPresent = QDateTime::fromString(lastPresent);
+ m_lastPresent = TQDateTime::fromString(lastPresent);
}
void StatisticsContact::contactAdded( Kopete::Contact *c )
@@ -127,12 +127,12 @@ void StatisticsContact::contactAdded( Kopete::Contact *c )
if ( !m_statisticsContactId.isEmpty() )
{
// Check if contact is allready in database if not add it
- if (m_db->query(QString("SELECT id FROM contacts "
+ if (m_db->query(TQString("SELECT id FROM contacts "
"WHERE statisticid LIKE '%1' AND contactid LIKE '%2';"
).arg(m_statisticsContactId).arg(c->contactId())).isEmpty())
{
// Assign contactId to m_statisticsContactId
- m_db->query(QString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');"
+ m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');"
).arg(m_statisticsContactId).arg(c->contactId()));
}
kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl;
@@ -150,7 +150,7 @@ void StatisticsContact::contactRemoved( Kopete::Contact *c )
return;
kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl;
- m_db->query(QString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';"
+ m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';"
).arg(m_statisticsContactId).arg(c->contactId()));
}
@@ -160,14 +160,14 @@ void StatisticsContact::removeFromDB()
return;
kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl;
- m_db->query(QString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId));
- m_db->query(QString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId));
- m_db->query(QString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId));
+ m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId));
+ m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId));
+ m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId));
- m_statisticsContactId = QString::null;
+ m_statisticsContactId = TQString::null;
}
-void StatisticsContact::commonStatsSave(const QString name, const QString statVar1, const QString statVar2, const bool statVarChanged)
+void StatisticsContact::commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged)
{
// Only update the database if there was a change
if (!statVarChanged) return;
@@ -175,28 +175,28 @@ void StatisticsContact::commonStatsSave(const QString name, const QString statVa
if (m_statisticsContactId.isEmpty())
return;
- m_db->query(QString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'"
+ m_db->query(TQString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'"
"WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").arg(statVar1).arg(statVar2).arg(name).arg(m_statisticsContactId));
}
-void StatisticsContact::commonStatsCheck(const QString name, int& statVar1, int& statVar2, const int defaultValue1, const int defaultValue2)
+void StatisticsContact::commonStatsCheck(const TQString name, int& statVar1, int& statVar2, const int defaultValue1, const int defaultValue2)
{
- QString a = QString::number(statVar1);
- QString b = QString::number(statVar2);
+ TQString a = TQString::number(statVar1);
+ TQString b = TQString::number(statVar2);
- commonStatsCheck(name, a, b, QString::number(defaultValue1), QString::number(defaultValue2));
+ commonStatsCheck(name, a, b, TQString::number(defaultValue1), TQString::number(defaultValue2));
statVar1 = a.toInt();
statVar2 = b.toInt();
}
-void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, QString& statVar2, const QString defaultValue1, const QString defaultValue2)
+void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1, TQString& statVar2, const TQString defaultValue1, const TQString defaultValue2)
{
if (m_statisticsContactId.isEmpty())
return;
- QStringList buffer = m_db->query(QString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId));
+ TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId));
if (!buffer.isEmpty())
{
statVar1 = buffer[0];
@@ -204,7 +204,7 @@ void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1,
}
else
{
- m_db->query(QString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name));
+ m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name));
statVar1 = defaultValue1;
statVar2 = defaultValue2;
}
@@ -234,7 +234,7 @@ void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1,
void StatisticsContact::newMessageReceived(Kopete::Message& m)
{
kdDebug() << "statistics: new message received" << endl;
- QDateTime currentDateTime = QDateTime::currentDateTime();
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen)
{
@@ -269,17 +269,17 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta
if (m_statisticsContactId.isEmpty())
return;
- QDateTime currentDateTime = QDateTime::currentDateTime();
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
/// We don't want to log if oldStatus is unknown
/// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged
if (m_oldStatus != Kopete::OnlineStatus::Unknown)
{
- kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< QString::number(m_oldStatus) << endl;
- m_db->query(QString("INSERT INTO contactstatus "
+ kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl;
+ m_db->query(TQString("INSERT INTO contactstatus "
"(metacontactid, status, datetimebegin, datetimeend) "
- "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(QString::number(m_oldStatusDateTime.toTime_t())).arg(QString::number(currentDateTime.toTime_t())));
+ "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(TQString::number(m_oldStatusDateTime.toTime_t())).arg(TQString::number(currentDateTime.toTime_t())));
}
if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == Kopete::OnlineStatus::Away)
@@ -294,12 +294,12 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta
}
-bool StatisticsContact::wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType status)
+bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status)
{
if (m_statisticsContactId.isEmpty())
return false;
- QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend "
+ TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 "
"AND status LIKE '%4' "
"ORDER BY datetimebegin;"
@@ -310,12 +310,12 @@ bool StatisticsContact::wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType
return false;
}
-QString StatisticsContact::statusAt(QDateTime dt)
+TQString StatisticsContact::statusAt(TQDateTime dt)
{
if (m_statisticsContactId.isEmpty())
return "";
- QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend "
+ TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 "
"ORDER BY datetimebegin;"
).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t()));
@@ -324,28 +324,28 @@ QString StatisticsContact::statusAt(QDateTime dt)
else return "";
}
-QString StatisticsContact::mainStatusDate(const QDate& date)
+TQString StatisticsContact::mainStatusDate(const TQDate& date)
{
if (m_statisticsContactId.isEmpty())
return "";
- QDateTime dt1(date, QTime(0,0,0));
- QDateTime dt2(date.addDays(1), QTime(0,0,0));
+ TQDateTime dt1(date, TQTime(0,0,0));
+ TQDateTime dt2(date.addDays(1), TQTime(0,0,0));
kdDebug() << "dt1:" << dt1.toString() << " dt2:" << dt2.toString() << endl;
- QString request = QString("SELECT status, datetimebegin, datetimeend, metacontactid "
+ TQString request = TQString("SELECT status, datetimebegin, datetimeend, metacontactid "
"FROM contactstatus WHERE metacontactid = '%1' AND "
"(datetimebegin >= %2 AND datetimebegin <= %3 OR "
"datetimeend >= %4 AND datetimeend <= %5) "
"ORDER BY datetimebegin;"
).arg(m_statisticsContactId).arg(dt1.toTime_t()).arg(dt2.toTime_t()).arg(dt1.toTime_t()).arg(dt2.toTime_t());
kdDebug() << request << endl;
- QStringList values = m_db->query(request);
+ TQStringList values = m_db->query(request);
unsigned int online = 0, offline = 0, away = 0;
for(uint i=0; i<values.count(); i+=4)
{
unsigned int datetimebegin = values[i+1].toInt(), datetimeend = values[i+2].toInt();
- kdDebug() << "statistics: id "<< values[i+3]<< " status " << values[i] << " datetimeend " << QString::number(datetimeend) << " datetimebegin " << QString::number(datetimebegin) << endl;
+ kdDebug() << "statistics: id "<< values[i+3]<< " status " << values[i] << " datetimeend " << TQString::number(datetimeend) << " datetimebegin " << TQString::number(datetimebegin) << endl;
if (datetimebegin <= dt1.toTime_t()) datetimebegin = dt1.toTime_t();
if (datetimeend >= dt2.toTime_t()) datetimeend = dt2.toTime_t();
@@ -366,35 +366,35 @@ QString StatisticsContact::mainStatusDate(const QDate& date)
return "";
}
-// QDateTime StatisticsContact::nextOfflineEvent()
+// TQDateTime StatisticsContact::nextOfflineEvent()
// {
// return nextEvent(Kopete::OnlineStatus::Offline);
// }
//
-// QDateTime StatisticsContact::nextOnlineEvent()
+// TQDateTime StatisticsContact::nextOnlineEvent()
// {
// return nextEvent(Kopete::OnlineStatus::Online);
// }
-// QDateTime StatisticsContact::nextEvent(const Kopete::OnlineStatus::StatusType& status)
+// TQDateTime StatisticsContact::nextEvent(const Kopete::OnlineStatus::StatusType& status)
// {
//
// }
-QValueList<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status)
+TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status)
{
- QStringList buffer;
- QValueList<QTime> mainEvents;
+ TQStringList buffer;
+ TQValueList<TQTime> mainEvents;
if (m_statisticsContactId.isEmpty())
return mainEvents;
- QDateTime currentDateTime = QDateTime::currentDateTime();
- buffer = m_db->query(QString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId));
+ TQDateTime currentDateTime = TQDateTime::currentDateTime();
+ buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId));
// Only select the events for which the previous is not Unknown AND the status is status.
- QStringList values;
+ TQStringList values;
for (uint i=0; i<buffer.count(); i += 3)
{
if (buffer[i+2] == Kopete::OnlineStatus::statusTypeToString(status)
@@ -409,7 +409,7 @@ QValueList<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat
// First we compute the average number of events/day : avEventsPerDay;
int avEventsPerDay = 0;
- QDateTime dt1, dt2;
+ TQDateTime dt1, dt2;
dt1.setTime_t(values[0].toInt());
dt2.setTime_t(values[values.count()-1].toInt());
@@ -417,19 +417,19 @@ QValueList<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat
kdDebug() << "statistics: average events per day : " <<avEventsPerDay << endl;
// We want to work on hours
- QValueList<int> hoursValues;
+ TQValueList<int> hoursValues;
for (uint i=0; i<values.count(); i++)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(values[i].toInt());
- hoursValues.push_back(QTime(0, 0, 0).secsTo(dt.time()));
+ hoursValues.push_back(TQTime(0, 0, 0).secsTo(dt.time()));
}
// Sort the list
qHeapSort(hoursValues);
// Then we put some centroids (centroids in [0..24[)
- QValueList<int> centroids;
+ TQValueList<int> centroids;
int incr=qRound((double)hoursValues.count()/(double)avEventsPerDay);
incr = incr ? incr : 1;
for (uint i=0; i<hoursValues.count(); i+=incr)
@@ -447,7 +447,7 @@ QValueList<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat
{
kdDebug() << "statistics: new centroid : " << centroids[i] << endl;
- QTime dt(0, 0, 0);
+ TQTime dt(0, 0, 0);
dt = dt.addSecs(centroids[i]);
mainEvents.push_back(dt);
}
@@ -456,12 +456,12 @@ QValueList<QTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat
return mainEvents;
}
-QValueList<int> StatisticsContact::computeCentroids(const QValueList<int>& centroids, const QValueList<int>& values)
+TQValueList<int> StatisticsContact::computeCentroids(const TQValueList<int>& centroids, const TQValueList<int>& values)
{
kdDebug() << "statistics: enter compute centroids"<< endl;
- QValueList<int> whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one
- QValueList<int> newCentroids;
+ TQValueList<int> whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one
+ TQValueList<int> newCentroids;
for (uint i=0; i<values.count(); i++)
// Iterates over the values. For each one we need to get the closest centroid.
{
diff --git a/kopete/plugins/statistics/statisticscontact.h b/kopete/plugins/statistics/statisticscontact.h
index 217000db..719a65da 100644
--- a/kopete/plugins/statistics/statisticscontact.h
+++ b/kopete/plugins/statistics/statisticscontact.h
@@ -52,7 +52,7 @@ public:
/** \brief Access method
* \return m_statisticsContactId
*/
- QString statisticsContactId() { return m_statisticsContactId; }
+ TQString statisticsContactId() { return m_statisticsContactId; }
/** \brief Access method
* \return m_oldStatus
@@ -62,7 +62,7 @@ public:
/** \brief Access method
* \return m_oldStatusDateTime
*/
- QDateTime oldStatusDateTime() { return m_oldStatusDateTime; }
+ TQDateTime oldStatusDateTime() { return m_oldStatusDateTime; }
/** \brief Access method
* \return m_messageLength
@@ -76,12 +76,12 @@ public:
* \brief Access method
* \return m_lastTalk
*/
- QDateTime lastTalk() { return m_lastTalk; }
+ TQDateTime lastTalk() { return m_lastTalk; }
/**
* \brief Access method
* \return m_lastPresent
*/
- QDateTime lastPresent() { return m_lastPresent; }
+ TQDateTime lastPresent() { return m_lastPresent; }
/**
* \brief sets \p m_isChatWindowOpen to true
*/
@@ -106,17 +106,17 @@ public:
/**
* \returns true if contact was status at dt, false else.
*/
- bool wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType status);
+ bool wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status);
/**
* \returns the status of the contact at dt. Return false if dt is invalid.
*/
- QString statusAt(QDateTime dt);
+ TQString statusAt(TQDateTime dt);
/**
* \returns the main (most used) status of the contact at date (not time) dt. return false if dt is invalid.
*/
- QString mainStatusDate(const QDate& date);
+ TQString mainStatusDate(const TQDate& date);
/*
* Prevision methods
*/
@@ -126,25 +126,25 @@ public:
// * \param status the status to be checked.
// * \retval nextEventDateTime the next event average prevision datetime.
// */
-// QDateTime nextEvent(const Kopete::OnlineStatus::StatusType& status);
+// TQDateTime nextEvent(const Kopete::OnlineStatus::StatusType& status);
//
// /**
// * \brief Convenience method for nextEvent with Offline status
// */
-// QDateTime nextOfflineEvent();
+// TQDateTime nextOfflineEvent();
//
// /**
// * \brief Convenience method for nextEvent with Online status
// */
-// QDateTime nextOnlineEvent();
+// TQDateTime nextOnlineEvent();
/**
* \brief computes the main "status" events for the contact
*/
- QValueList<QTime> mainEvents(const Kopete::OnlineStatus::StatusType& status);
+ TQValueList<TQTime> mainEvents(const Kopete::OnlineStatus::StatusType& status);
/// \brief used by mainEvents()
- QValueList<int> computeCentroids(const QValueList<int>& centroids, const QValueList<int>& values);
+ TQValueList<int> computeCentroids(const TQValueList<int>& centroids, const TQValueList<int>& values);
/**
* \brief adds contact to "contacts" database and generates m_statisticsContactId if needed
@@ -179,13 +179,13 @@ private:
* \retval statvar1
* \retval statvar2
*/
- void commonStatsCheck(const QString name, QString& statVar1, QString& statVar2, const QString defaultValue1 = "", const QString defaultValue2 = "");
+ void commonStatsCheck(const TQString name, TQString& statVar1, TQString& statVar2, const TQString defaultValue1 = "", const TQString defaultValue2 = "");
/**
* @brief Same as commonStatsCheck for integers.
* Provided for convenience
*/
- void commonStatsCheck(const QString name, int& statVar1, int& statVar2, const int defaultValue1 = 0, const int defaultValue2 = -1);
+ void commonStatsCheck(const TQString name, int& statVar1, int& statVar2, const int defaultValue1 = 0, const int defaultValue2 = -1);
/**
* @brief Save a value in the "commonstats" table
@@ -194,7 +194,7 @@ private:
* \param statVar2 the second stat we can save in this table for this entry
* \param statVarChanged if this param is true, we save. Else, we don't. Spare some disk usage.
*/
- void commonStatsSave(const QString name, const QString statVar1, const QString statVar2, const bool statVarChanged);
+ void commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged);
/**
* Kopete::MetaContact linked to this StatisticsContact
@@ -213,7 +213,7 @@ private:
*/
Kopete::OnlineStatus::StatusType m_oldStatus;
/// We keep the old status datetime here
- QDateTime m_oldStatusDateTime;
+ TQDateTime m_oldStatusDateTime;
/**
* Average time this user takes between two of his messages
@@ -223,7 +223,7 @@ private:
bool m_timeBetweenTwoMessagesChanged;
/// Date at which the last message was received.
/// Used to compute m_timeBetweenTwoMessages
- QDateTime m_lastMessageReceived;
+ TQDateTime m_lastMessageReceived;
/// This is the ponderation corresponding to m_timeBetweenTwoMessagesOn
int m_timeBetweenTwoMessagesOn;
/// We don't count time if a chatwindow isn't open
@@ -240,20 +240,20 @@ private:
/**
* Last time user talked with this contact
*/
- QDateTime m_lastTalk;
+ TQDateTime m_lastTalk;
bool m_lastTalkChanged;
/**
* Last time user was present (=online or away)
*/
- QDateTime m_lastPresent;
+ TQDateTime m_lastPresent;
bool m_lastPresentChanged;
/**
* Unique id that identifies StatisticsContact
* It's also identifier for database records
*/
- QString m_statisticsContactId;
+ TQString m_statisticsContactId;
};
diff --git a/kopete/plugins/statistics/statisticsdb.cpp b/kopete/plugins/statistics/statisticsdb.cpp
index 450c4371..c0a41232 100644
--- a/kopete/plugins/statistics/statisticsdb.cpp
+++ b/kopete/plugins/statistics/statisticsdb.cpp
@@ -14,7 +14,7 @@
*************************************************************************
*/
-#include <qfile.h>
+#include <tqfile.h>
#include "sqlite/sqlite3.h"
@@ -33,15 +33,15 @@
StatisticsDB::StatisticsDB()
{
- QCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1();
+ TQCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1();
kdDebug() << "statistics: DB path:" << path << endl;
// Open database file and check for correctness
bool failOpen = true;
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_ReadOnly ) )
{
- QString format;
+ TQString format;
file.readLine( format, 50 );
if ( !format.startsWith( "SQLite format 3" ) )
{
@@ -59,18 +59,18 @@ StatisticsDB::StatisticsDB()
if ( failOpen )
{
// Remove old db file; create new
- QFile::remove( path );
+ TQFile::remove( path );
sqlite3_open( path, &m_db );
}
kdDebug() << "[Statistics] Contructor"<< endl;
// Creates the tables if they do not exist.
- QStringList result = query("SELECT name FROM sqlite_master WHERE type='table'");
+ TQStringList result = query("SELECT name FROM sqlite_master WHERE type='table'");
if (!result.contains("contacts"))
{
- query(QString("CREATE TABLE contacts "
+ query(TQString("CREATE TABLE contacts "
"(id INTEGER PRIMARY KEY,"
"statisticid TEXT,"
"contactid TEXT"
@@ -80,7 +80,7 @@ StatisticsDB::StatisticsDB()
if (!result.contains("contactstatus"))
{
kdDebug() << "[Statistics] Database empty"<< endl;
- query(QString("CREATE TABLE contactstatus "
+ query(TQString("CREATE TABLE contactstatus "
"(id INTEGER PRIMARY KEY,"
"metacontactid TEXT,"
"status TEXT,"
@@ -92,7 +92,7 @@ StatisticsDB::StatisticsDB()
if (!result.contains("commonstats"))
{
// To store things like the contact answer time etc.
- query(QString("CREATE TABLE commonstats"
+ query(TQString("CREATE TABLE commonstats"
" (id INTEGER PRIMARY KEY,"
"metacontactid TEXT,"
"statname TEXT," // for instance, answertime, lastmessage, messagelength ...
@@ -104,7 +104,7 @@ StatisticsDB::StatisticsDB()
/// @fixme This is not used anywhere
if (!result.contains("statsgroup"))
{
- query(QString("CREATE TABLE statsgroup"
+ query(TQString("CREATE TABLE statsgroup"
"(id INTEGER PRIMARY KEY,"
"datetimebegin INTEGER,"
"datetimeend INTEGER,"
@@ -123,9 +123,9 @@ StatisticsDB::~StatisticsDB()
* @param statement SQL program to execute. Only one SQL statement is allowed.
* @param debug Set to true for verbose debug output.
* @retval names Will contain all column names, set to NULL if not used.
- * @return The queried data, or QStringList() on error.
+ * @return The queried data, or TQStringList() on error.
*/
- QStringList StatisticsDB::query( const QString& statement, QStringList* const names, bool debug )
+ TQStringList StatisticsDB::query( const TQString& statement, TQStringList* const names, bool debug )
{
if ( debug )
@@ -136,11 +136,11 @@ StatisticsDB::~StatisticsDB()
if ( !m_db )
{
kdError() << k_funcinfo << "[CollectionDB] SQLite pointer == NULL.\n";
- return QStringList();
+ return TQStringList();
}
int error;
- QStringList values;
+ TQStringList values;
const char* tail;
sqlite3_stmt* stmt;
@@ -153,7 +153,7 @@ StatisticsDB::~StatisticsDB()
kdError() << sqlite3_errmsg( m_db ) << endl;
kdError() << "on query: " << statement << endl;
- return QStringList();
+ return TQStringList();
}
int busyCnt = 0;
@@ -180,8 +180,8 @@ StatisticsDB::~StatisticsDB()
//iterate over columns
for ( int i = 0; i < number; i++ )
{
- values << QString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) );
- if ( names ) *names << QString( sqlite3_column_name( stmt, i ) );
+ values << TQString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) );
+ if ( names ) *names << TQString( sqlite3_column_name( stmt, i ) );
}
}
//deallocate vm ressources
@@ -193,7 +193,7 @@ StatisticsDB::~StatisticsDB()
kdError() << sqlite3_errmsg( m_db ) << endl;
kdError() << "on query: " << statement << endl;
- return QStringList();
+ return TQStringList();
}
if ( debug )
diff --git a/kopete/plugins/statistics/statisticsdb.h b/kopete/plugins/statistics/statisticsdb.h
index 130b1d0e..444e80c0 100644
--- a/kopete/plugins/statistics/statisticsdb.h
+++ b/kopete/plugins/statistics/statisticsdb.h
@@ -26,8 +26,8 @@ public:
StatisticsDB();
~StatisticsDB();
//sql helper methods
- QStringList query( const QString& statement, QStringList* const names = 0, bool debug = false );
- QString escapeString( QString string );
+ TQStringList query( const TQString& statement, TQStringList* const names = 0, bool debug = false );
+ TQString escapeString( TQString string );
private:
sqlite3 *m_db;
};
diff --git a/kopete/plugins/statistics/statisticsdcopiface.h b/kopete/plugins/statistics/statisticsdcopiface.h
index b45a2c95..9a769935 100644
--- a/kopete/plugins/statistics/statisticsdcopiface.h
+++ b/kopete/plugins/statistics/statisticsdcopiface.h
@@ -29,46 +29,46 @@ k_dcop:
/**
* Shows the statistics dialog for contact which has KABC id \var contactId
*/
- virtual void dcopStatisticsDialog(QString contactId) = 0;
+ virtual void dcopStatisticsDialog(TQString contactId) = 0;
/**
* \returns true if contact was online at time timeStamp, false else. Returns false if contact does not exist.
*/
- virtual bool dcopWasOnline(QString id, int timeStamp) = 0;
+ virtual bool dcopWasOnline(TQString id, int timeStamp) = 0;
/**
* \returns true if contact was online at dt, false else. Returns false if contact does not exist or if date is invalid.
*/
- virtual bool dcopWasOnline(QString id, QString datetime) = 0;
+ virtual bool dcopWasOnline(TQString id, TQString datetime) = 0;
/**
* \returns true if contact was away at time timeStamp, false else. Returns false if contact does not exist.
*/
- virtual bool dcopWasAway(QString id, int timeStamp) = 0;
+ virtual bool dcopWasAway(TQString id, int timeStamp) = 0;
/**
* \returns true if contact was away at dt, false else. Returns false if contact does not exist or if date is invalid.
*/
- virtual bool dcopWasAway(QString id, QString datetime) = 0;
+ virtual bool dcopWasAway(TQString id, TQString datetime) = 0;
/**
* \returns true if contact was offline at time timeStamp, false else. Returns false if contact does not exist.
*/
- virtual bool dcopWasOffline(QString id, int timeStamp) = 0;
+ virtual bool dcopWasOffline(TQString id, int timeStamp) = 0;
/**
* \returns true if contact was offline at dt, false else. Returns false if contact does not exist or if date is invalid.
*/
- virtual bool dcopWasOffline(QString id, QString datetime) = 0;
+ virtual bool dcopWasOffline(TQString id, TQString datetime) = 0;
/**
* \returns return the status of the contact at datetime.
*/
- virtual QString dcopStatus(QString id, QString datetime) = 0;
+ virtual TQString dcopStatus(TQString id, TQString datetime) = 0;
/**
* \returns return the status of the contact at timeStamp.
*/
- virtual QString dcopStatus(QString id, int timeStamp) = 0;
+ virtual TQString dcopStatus(TQString id, int timeStamp) = 0;
/**
* \returns the main status (most used status) of the contact id at date (not time) timeStamp. Will take the day where timeStamp is.
*/
- virtual QString dcopMainStatus(QString id, int timeStamp) = 0;
+ virtual TQString dcopMainStatus(TQString id, int timeStamp) = 0;
};
#endif // STATISTICSDCOP_H
diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp
index 485eb7ad..461dd696 100644
--- a/kopete/plugins/statistics/statisticsdialog.cpp
+++ b/kopete/plugins/statistics/statisticsdialog.cpp
@@ -14,14 +14,14 @@
*/
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qcombobox.h>
-#include <qstring.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqcombobox.h>
+#include <tqstring.h>
#include "kdialogbase.h"
#include "klocale.h"
@@ -40,7 +40,7 @@
#include "statisticsplugin.h"
#include "statisticsdb.h"
-StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, QWidget* parent,
+StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQWidget* parent,
const char* name) : KDialogBase(parent, name, false,
i18n("Statistics for %1").arg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact)
{
@@ -51,20 +51,20 @@ StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db,
setMinimumHeight(400);
adjustSize();
- QHBox *hbox = new QHBox(this);
+ TQHBox *hbox = new TQHBox(this);
generalHTMLPart = new KHTMLPart(hbox);
generalHTMLPart->setOnlyLocalReferences(true);
- connect ( generalHTMLPart->browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect ( generalHTMLPart->browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
mainWidget->tabWidget->insertTab(hbox, i18n("General"), 0);
mainWidget->tabWidget->setCurrentPage(0);
- mainWidget->timePicker->setTime(QTime::currentTime());
- mainWidget->datePicker->setDate(QDate::currentDate());
- connect(mainWidget->askButton, SIGNAL(clicked()), this, SLOT(slotAskButtonClicked()));
+ mainWidget->timePicker->setTime(TQTime::currentTime());
+ mainWidget->datePicker->setDate(TQDate::currentDate());
+ connect(mainWidget->askButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAskButtonClicked()));
setFocus();
setEscapeButton(Close);
@@ -89,14 +89,14 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs
}
}
-/*void StatisticsDialog::parseTemplate(QString Template)
+/*void StatisticsDialog::parseTemplate(TQString Template)
{
- QString fileString = ::locate("appdata", "kopete_statistics.template.html");
- QString templateString;
- QFile file(file);
+ TQString fileString = ::locate("appdata", "kopete_statistics.template.html");
+ TQString templateString;
+ TQFile file(file);
if (file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
templateString = stream.read();
file.close();
}
@@ -106,14 +106,14 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs
void StatisticsDialog::generatePageForMonth(const int monthOfYear)
{
- QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend "
+ TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId()));
- QStringList values2;
+ TQStringList values2;
for (uint i=0; i<values.count(); i+=3)
{
- QDateTime dateTimeBegin;
+ TQDateTime dateTimeBegin;
dateTimeBegin.setTime_t(values[i+1].toInt());
/// @todo Same as for Day, check if second datetime is on the same month
if (dateTimeBegin.date().month() == monthOfYear)
@@ -123,21 +123,21 @@ void StatisticsDialog::generatePageForMonth(const int monthOfYear)
values2.push_back(values[i+2]);
}
}
- generatePageFromQStringList(values2, QDate::longMonthName(monthOfYear));
+ generatePageFromQStringList(values2, TQDate::longMonthName(monthOfYear));
}
void StatisticsDialog::generatePageForDay(const int dayOfWeek)
{
- QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend "
+ TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId()));
- QStringList values2;
+ TQStringList values2;
for (uint i=0; i<values.count(); i+=3)
{
- QDateTime dateTimeBegin;
+ TQDateTime dateTimeBegin;
dateTimeBegin.setTime_t(values[i+1].toInt());
- QDateTime dateTimeEnd;
+ TQDateTime dateTimeEnd;
dateTimeEnd.setTime_t(values[i+2].toInt());
if (dateTimeBegin.date().dayOfWeek() == dayOfWeek)
{
@@ -149,9 +149,9 @@ void StatisticsDialog::generatePageForDay(const int dayOfWeek)
// datetime from value[i+1]
- dateTimeBegin = QDateTime(dateTimeBegin.date(), QTime(0, 0, 0));
- dateTimeBegin.addSecs(dateTimeBegin.time().secsTo(QTime(23, 59, 59)));
- values2.push_back(QString::number(dateTimeBegin.toTime_t()));
+ dateTimeBegin = TQDateTime(dateTimeBegin.date(), TQTime(0, 0, 0));
+ dateTimeBegin.addSecs(dateTimeBegin.time().secsTo(TQTime(23, 59, 59)));
+ values2.push_back(TQString::number(dateTimeBegin.toTime_t()));
}
else
{
@@ -161,15 +161,15 @@ void StatisticsDialog::generatePageForDay(const int dayOfWeek)
}
}
}
- generatePageFromQStringList(values2, QDate::longDayName(dayOfWeek));
+ generatePageFromQStringList(values2, TQDate::longDayName(dayOfWeek));
}
/// @todo chart problem at midnight.
-void StatisticsDialog::generatePageFromQStringList(QStringList values, const QString & subTitle)
+void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQString & subTitle)
{
generalHTMLPart->begin();
- generalHTMLPart->write(QString("<html><head><style>.bar { margin:0px;} "
+ generalHTMLPart->write(TQString("<html><head><style>.bar { margin:0px;} "
"body"
"{"
"font-size:11px"
@@ -223,7 +223,7 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
// mainWidget->listView->addColumn(i18n("Start Date"));
// mainWidget->listView->addColumn(i18n("End Date"));
- QString todayString;
+ TQString todayString;
todayString.append(i18n("<div class=\"statgroup\" title=\"Contact status history for today\"><h2>Today</h2><table width=\"100%\"><tr><td>Status</td><td>From</td><td>To</td></tr>"));
bool today;
@@ -259,13 +259,13 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
// it is the STARTDATE from the database
- QDateTime dateTime1;
+ TQDateTime dateTime1;
dateTime1.setTime_t(values[i+1].toInt());
// it is the ENDDATE from the database
- QDateTime dateTime2;
+ TQDateTime dateTime2;
dateTime2.setTime_t(values[i+2].toInt());
- if (dateTime1.date() == QDate::currentDate() || dateTime2.date() == QDate::currentDate())
+ if (dateTime1.date() == TQDate::currentDate() || dateTime2.date() == TQDate::currentDate())
today = true;
else today = false;
@@ -330,10 +330,10 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
- QString color;
+ TQString color;
if (today)
{
- QString status;
+ TQString status;
if (Kopete::OnlineStatus::statusStringToType(values[i]) == Kopete::OnlineStatus::Online)
{
color="blue";
@@ -351,12 +351,12 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
}
else color="white";
- todayString.append(QString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").arg(color, status, dateTime1.time().toString(), dateTime2.time().toString()));
+ todayString.append(TQString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").arg(color, status, dateTime1.time().toString(), dateTime2.time().toString()));
}
// We add a listview item to the log list
- // QDateTime listViewDT1, listViewDT2;
+ // TQDateTime listViewDT1, listViewDT2;
// listViewDT1.setTime_t(values[i+1].toInt());
// listViewDT2.setTime_t(values[i+2].toInt());
// new KListViewItem(mainWidget->listView, values[i], values[i+1], values[i+2], listViewDT1.toString(), listViewDT2.toString());
@@ -391,83 +391,83 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
"Total online time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOnlineTime)));
generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 away\">Total busy time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalAwayTime)));
generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 offline\">Total offline time :</b> %2 hour(s)").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOfflineTime)));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
if (subTitle == i18n("General information"))
/*
* General stats that should not be shown on "day" or "month" pages
*/
{
- generalHTMLPart->write(QString("<div class=\"statgroup\">"));
+ generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
generalHTMLPart->write(i18n("<b>Average message length :</b> %1 characters<br>").arg(m_contact->messageLength()));
generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").arg(m_contact->timeBetweenTwoMessages()));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
- generalHTMLPart->write(QString("<div class=\"statgroup\">"));
+ generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
generalHTMLPart->write(i18n("<b title=\"The last time you talked with %1\">Last talk :</b> %2<br>").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastTalk())));
generalHTMLPart->write(i18n("<b title=\"The last time I have seen %1 online or away\">Last time contact was present :</b> %2").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastPresent())));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
- //generalHTMLPart->write(QString("<div class=\"statgroup\">"));
+ //generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
//generalHTMLPart->write(i18n("<b title=\"%1 uses to set his status online at these hours (EXPERIMENTAL)\">Main online events :</b><br>").arg(m_contact->metaContact()->displayName()));
- //QValueList<QTime> mainEvents = m_contact->mainEvents(Kopete::OnlineStatus::Online);
+ //TQValueList<TQTime> mainEvents = m_contact->mainEvents(Kopete::OnlineStatus::Online);
//for (uint i=0; i<mainEvents.count(); i++)
- //generalHTMLPart->write(QString("%1<br>").arg(mainEvents[i].toString()));
- //generalHTMLPart->write(QString("</div>"));
+ //generalHTMLPart->write(TQString("%1<br>").arg(mainEvents[i].toString()));
+ //generalHTMLPart->write(TQString("</div>"));
generalHTMLPart->write("<div title=\"" +i18n("Current status") + "\" class=\"statgroup\">");
generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").arg(
Kopete::OnlineStatus(m_contact->oldStatus()).description(),
KGlobal::locale()->formatDateTime(m_contact->oldStatusDateTime())));
- generalHTMLPart->write(QString("</div>"));
+ generalHTMLPart->write(TQString("</div>"));
}
/*
* Chart which show the hours where plugin has seen this contact online
*/
- generalHTMLPart->write(QString("<div class=\"statgroup\">"));
- generalHTMLPart->write(QString("<table width=\"100%\"><tr><td colspan=\"3\">") + i18n("When have I seen this contact ?") + QString("</td></tr>"));
- generalHTMLPart->write(QString("<tr><td height=\"200\" valign=\"bottom\" colspan=\"3\" class=\"chart\">"));
+ generalHTMLPart->write(TQString("<div class=\"statgroup\">"));
+ generalHTMLPart->write(TQString("<table width=\"100%\"><tr><td colspan=\"3\">") + i18n("When have I seen this contact ?") + TQString("</td></tr>"));
+ generalHTMLPart->write(TQString("<tr><td height=\"200\" valign=\"bottom\" colspan=\"3\" class=\"chart\">"));
- QString chartString;
- QString colorPath = ::locate("appdata", "pics/statistics/black.png");
+ TQString chartString;
+ TQString colorPath = ::locate("appdata", "pics/statistics/black.png");
for (uint i=0; i<24; i++)
{
int hrWidth = qRound((double)hours[i]/(double)hours[iMaxHours]*100.);
- chartString += QString("<img class=\"margin:0px;\" height=\"")
- +(totalTime ? QString::number(hrWidth) : QString::number(0))
- +QString("\" src=\"file://")
+ chartString += TQString("<img class=\"margin:0px;\" height=\"")
+ +(totalTime ? TQString::number(hrWidth) : TQString::number(0))
+ +TQString("\" src=\"file://")
+colorPath
+"\" width=\"4%\" title=\""
+i18n("Between %1:00 and %2:00, I was able to see %3 status %4% of the hour.").arg(i).arg((i+1)%24).arg(m_contact->metaContact()->displayName()).arg(hrWidth)
- +QString("\">");
+ +TQString("\">");
}
generalHTMLPart->write(chartString);
- generalHTMLPart->write(QString("</td></tr>"));
+ generalHTMLPart->write(TQString("</td></tr>"));
- generalHTMLPart->write(QString( "<tr>"
- "<td>")+i18n("Online time")+QString("</td><td>")+i18n("Away time")+QString("</td><td>")+i18n("Offline time")+QString("</td>"
+ generalHTMLPart->write(TQString( "<tr>"
+ "<td>")+i18n("Online time")+TQString("</td><td>")+i18n("Away time")+TQString("</td><td>")+i18n("Offline time")+TQString("</td>"
"</tr>"
"<td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
generalHTMLPart->write(generateHTMLChart(hoursOnline, hoursAway, hoursOffline, i18n("online"), "blue"));
- generalHTMLPart->write(QString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
+ generalHTMLPart->write(TQString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
generalHTMLPart->write(generateHTMLChart(hoursAway, hoursOnline, hoursOffline, i18n("away"), "navy"));
- generalHTMLPart->write(QString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
+ generalHTMLPart->write(TQString("</td><td valign=\"bottom\" width=\"33%\" class=\"chart\">"));
generalHTMLPart->write(generateHTMLChart(hoursOffline, hoursAway, hoursOnline, i18n("offline"), "gray"));
- generalHTMLPart->write(QString("</td></tr></table></div>"));
+ generalHTMLPart->write(TQString("</td></tr></table></div>"));
if (subTitle == i18n("General information"))
/* On main page, show the different status of the contact today
*/
{
- generalHTMLPart->write(QString(todayString));
+ generalHTMLPart->write(TQString(todayString));
}
- generalHTMLPart->write(QString("</body></html>"));
+ generalHTMLPart->write(TQString("</body></html>"));
generalHTMLPart->end();
@@ -475,18 +475,18 @@ void StatisticsDialog::generatePageFromQStringList(QStringList values, const QSt
void StatisticsDialog::generatePageGeneral()
{
- QStringList values;
- values = m_db->query(QString("SELECT status, datetimebegin, datetimeend "
+ TQStringList values;
+ values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend "
"FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;")
.arg(m_contact->statisticsContactId()));
generatePageFromQStringList(values, i18n("General information"));
}
-QString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const QString & caption, const QString & color)
+TQString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const TQString & caption, const TQString & color)
{
- QString chartString;
+ TQString chartString;
- QString colorPath = ::locate("appdata", "pics/statistics/"+color+".png");
+ TQString colorPath = ::locate("appdata", "pics/statistics/"+color+".png");
for (uint i=0; i<24; i++)
@@ -494,9 +494,9 @@ QString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2,
int totalTime = hours[i] + hours2[i] + hours3[i];
int hrWidth = qRound((double)hours[i]/(double)totalTime*100.);
- chartString += QString("<img class=\"margin:0px;\" height=\"")
- +(totalTime ? QString::number(hrWidth) : QString::number(0))
- +QString("\" src=\"file://")
+ chartString += TQString("<img class=\"margin:0px;\" height=\"")
+ +(totalTime ? TQString::number(hrWidth) : TQString::number(0))
+ +TQString("\" src=\"file://")
+colorPath
+"\" width=\"4%\" title=\""+
i18n("Between %1:00 and %2:00, I have seen %3 %4% %5.").
@@ -510,23 +510,23 @@ QString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2,
return chartString;
}
-QString StatisticsDialog::stringFromSeconds(const int seconds)
+TQString StatisticsDialog::stringFromSeconds(const int seconds)
{
int h, m, s;
h = seconds/3600;
m = (seconds % 3600)/60;
s = (seconds % 3600) % 60;
- return QString::number(h)+":"+QString::number(m)+":"+QString::number(s);
+ return TQString::number(h)+":"+TQString::number(m)+":"+TQString::number(s);
}
void StatisticsDialog::slotAskButtonClicked()
{
if (mainWidget->questionComboBox->currentItem()==0)
{
- QString text = i18n("1 is date, 2 is contact name, 3 is online status", "%1, %2 was %3")
- .arg(KGlobal::locale()->formatDateTime(QDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())))
+ TQString text = i18n("1 is date, 2 is contact name, 3 is online status", "%1, %2 was %3")
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())))
.arg(m_contact->metaContact()->displayName())
- .arg(m_contact->statusAt(QDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())));
+ .arg(m_contact->statusAt(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time())));
mainWidget->answerEdit->setText(text);
}
else if (mainWidget->questionComboBox->currentItem()==1)
diff --git a/kopete/plugins/statistics/statisticsdialog.h b/kopete/plugins/statistics/statisticsdialog.h
index 32a5aaaf..294ec2a8 100644
--- a/kopete/plugins/statistics/statisticsdialog.h
+++ b/kopete/plugins/statistics/statisticsdialog.h
@@ -16,7 +16,7 @@
#ifndef _STATISTICSDIALOG_H
#define _STATISTICSDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include "kopetemetacontact.h"
@@ -40,12 +40,12 @@ class StatisticsDialog : public KDialogBase
{
Q_OBJECT
public:
- StatisticsDialog(StatisticsContact *contact, StatisticsDB* db, QWidget* parent=0,
+ StatisticsDialog(StatisticsContact *contact, StatisticsDB* db, TQWidget* parent=0,
const char* name="StatisticsDialog");
private:
- QString generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const QString & caption, const QString & color);
- QString generateHTMLChartBar(int height, const QString & color, const QString & caption);
- QString stringFromSeconds(const int seconds);
+ TQString generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const TQString & caption, const TQString & color);
+ TQString generateHTMLChartBar(int height, const TQString & color, const TQString & caption);
+ TQString stringFromSeconds(const int seconds);
StatisticsWidget *mainWidget;
KHTMLPart *generalHTMLPart;
@@ -55,7 +55,7 @@ class StatisticsDialog : public KDialogBase
/// Metacontact for which we get the statistics from m_db
StatisticsContact *m_contact;
- void generatePageFromQStringList(QStringList values, const QString & subTitle);
+ void generatePageFromQStringList(TQStringList values, const TQString & subTitle);
/// Generates the main page
void generatePageGeneral();
diff --git a/kopete/plugins/statistics/statisticsplugin.cpp b/kopete/plugins/statistics/statisticsplugin.cpp
index f0d190b3..bef49af8 100644
--- a/kopete/plugins/statistics/statisticsplugin.cpp
+++ b/kopete/plugins/statistics/statisticsplugin.cpp
@@ -14,9 +14,9 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qdict.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqdict.h>
+#include <tqtimer.h>
#include <kgenericfactory.h>
#include <kaboutdata.h>
@@ -46,34 +46,34 @@ typedef KGenericFactory<StatisticsPlugin> StatisticsPluginFactory;
static const KAboutData aboutdata("kopete_statistics", I18N_NOOP("Statistics") , "0.1" );
K_EXPORT_COMPONENT_FACTORY( kopete_statistics, StatisticsPluginFactory( &aboutdata ) )
-StatisticsPlugin::StatisticsPlugin( QObject *parent, const char *name, const QStringList &)
+StatisticsPlugin::StatisticsPlugin( TQObject *parent, const char *name, const TQStringList &)
: DCOPObject("StatisticsDCOPIface"),
Kopete::Plugin( StatisticsPluginFactory::instance(), parent, name )
{
KAction *viewMetaContactStatistics = new KAction( i18n("View &Statistics" ),
- QString::fromLatin1( "log" ), 0, this, SLOT(slotViewStatistics()),
+ TQString::fromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()),
actionCollection(), "viewMetaContactStatistics" );
viewMetaContactStatistics->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count() == 1);
- connect(Kopete::ChatSessionManager::self(),SIGNAL(chatSessionCreated(Kopete::ChatSession*)),
- this, SLOT(slotViewCreated(Kopete::ChatSession*)));
- connect(Kopete::ChatSessionManager::self(),SIGNAL(aboutToReceive(Kopete::Message&)),
- this, SLOT(slotAboutToReceive(Kopete::Message&)));
+ connect(Kopete::ChatSessionManager::self(),TQT_SIGNAL(chatSessionCreated(Kopete::ChatSession*)),
+ this, TQT_SLOT(slotViewCreated(Kopete::ChatSession*)));
+ connect(Kopete::ChatSessionManager::self(),TQT_SIGNAL(aboutToReceive(Kopete::Message&)),
+ this, TQT_SLOT(slotAboutToReceive(Kopete::Message&)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)),
- viewMetaContactStatistics, SLOT(setEnabled(bool)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactAdded(Kopete::MetaContact*)),
- this, SLOT(slotMetaContactAdded(Kopete::MetaContact*)));
- connect(Kopete::ContactList::self(), SIGNAL(metaContactRemoved(Kopete::MetaContact*)),
- this, SLOT(slotMetaContactRemoved(Kopete::MetaContact*)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactSelected(bool)),
+ viewMetaContactStatistics, TQT_SLOT(setEnabled(bool)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactAdded(Kopete::MetaContact*)),
+ this, TQT_SLOT(slotMetaContactAdded(Kopete::MetaContact*)));
+ connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactRemoved(Kopete::MetaContact*)),
+ this, TQT_SLOT(slotMetaContactRemoved(Kopete::MetaContact*)));
setXMLFile("statisticsui.rc");
/* Initialization reads the database, so it could be a bit time-consuming
due to disk access. This should overcome the problem and makes it non-blocking. */
- QTimer::singleShot(0, this, SLOT(slotInitialize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotInitialize()));
}
void StatisticsPlugin::slotInitialize()
@@ -81,8 +81,8 @@ void StatisticsPlugin::slotInitialize()
// Initializes the database
m_db = new StatisticsDB();
- QPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
- QPtrListIterator<Kopete::MetaContact> it( list );
+ TQPtrList<Kopete::MetaContact> list = Kopete::ContactList::self()->metaContacts();
+ TQPtrListIterator<Kopete::MetaContact> it( list );
for (; it.current(); ++it)
{
slotMetaContactAdded(it.current());
@@ -91,7 +91,7 @@ void StatisticsPlugin::slotInitialize()
StatisticsPlugin::~StatisticsPlugin()
{
- QMap<Kopete::MetaContact*, StatisticsContact*>::Iterator it;
+ TQMap<Kopete::MetaContact*, StatisticsContact*>::Iterator it;
for ( it = statisticsMetaContactMap.begin(); it != statisticsMetaContactMap.end(); ++it )
{
delete it.data();
@@ -107,13 +107,13 @@ void StatisticsPlugin::slotAboutToReceive(Kopete::Message& m)
void StatisticsPlugin::slotViewCreated(Kopete::ChatSession* session)
{
- connect(session, SIGNAL(closing(Kopete::ChatSession*)), this, SLOT(slotViewClosed(Kopete::ChatSession*)));
+ connect(session, TQT_SIGNAL(closing(Kopete::ChatSession*)), this, TQT_SLOT(slotViewClosed(Kopete::ChatSession*)));
}
void StatisticsPlugin::slotViewClosed(Kopete::ChatSession* session)
{
- QPtrList<Kopete::Contact> list = session->members();
- QPtrListIterator<Kopete::Contact> it( list );
+ TQPtrList<Kopete::Contact> list = session->members();
+ TQPtrListIterator<Kopete::Contact> it( list );
for (; it.current(); ++it)
{
@@ -145,7 +145,7 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc)
{
statisticsMetaContactMap[mc] = new StatisticsContact(mc, db());
- QPtrList<Kopete::Contact> clist = mc->contacts();
+ TQPtrList<Kopete::Contact> clist = mc->contacts();
Kopete::Contact *contact;
// we need to call slotContactAdded if MetaContact allready have contacts
@@ -154,12 +154,12 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc)
this->slotContactAdded(contact);
}
- connect(mc, SIGNAL(onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType)), this,
- SLOT(slotOnlineStatusChanged(Kopete::MetaContact*, Kopete::OnlineStatus::StatusType)));
- connect(mc, SIGNAL(contactAdded( Kopete::Contact *)), this,
- SLOT(slotContactAdded( Kopete::Contact *)));
- connect(mc, SIGNAL(contactRemoved( Kopete::Contact *)), this,
- SLOT(slotContactRemoved( Kopete::Contact *)));
+ connect(mc, TQT_SIGNAL(onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType)), this,
+ TQT_SLOT(slotOnlineStatusChanged(Kopete::MetaContact*, Kopete::OnlineStatus::StatusType)));
+ connect(mc, TQT_SIGNAL(contactAdded( Kopete::Contact *)), this,
+ TQT_SLOT(slotContactAdded( Kopete::Contact *)));
+ connect(mc, TQT_SIGNAL(contactRemoved( Kopete::Contact *)), this,
+ TQT_SLOT(slotContactRemoved( Kopete::Contact *)));
}
void StatisticsPlugin::slotMetaContactRemoved(Kopete::MetaContact *mc)
@@ -191,7 +191,7 @@ void StatisticsPlugin::slotContactRemoved( Kopete::Contact *c)
statisticsContactMap.remove(c->contactId());
}
-void StatisticsPlugin::dcopStatisticsDialog(QString id)
+void StatisticsPlugin::dcopStatisticsDialog(TQString id)
{
kdDebug() << k_funcinfo << "statistics - DCOP dialog :" << id << endl;
@@ -201,43 +201,43 @@ void StatisticsPlugin::dcopStatisticsDialog(QString id)
}
}
-bool StatisticsPlugin::dcopWasOnline(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasOnline(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Online);
}
-bool StatisticsPlugin::dcopWasOnline(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasOnline(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online);
}
-bool StatisticsPlugin::dcopWasAway(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasAway(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Away);
}
-bool StatisticsPlugin::dcopWasAway(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasAway(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away);
}
-bool StatisticsPlugin::dcopWasOffline(QString id, int timeStamp)
+bool StatisticsPlugin::dcopWasOffline(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopWasStatus(id, dt, Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWasOffline(QString id, QString dateTime)
+bool StatisticsPlugin::dcopWasOffline(TQString id, TQString dateTime)
{
- return dcopWasStatus(id, QDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
+ return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline);
}
-bool StatisticsPlugin::dcopWasStatus(QString id, QDateTime dateTime, Kopete::OnlineStatus::StatusType status)
+bool StatisticsPlugin::dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status)
{
kdDebug() << k_funcinfo << "statistics - DCOP wasOnline :" << id << endl;
@@ -249,17 +249,17 @@ bool StatisticsPlugin::dcopWasStatus(QString id, QDateTime dateTime, Kopete::Onl
return false;
}
-QString StatisticsPlugin::dcopStatus(QString id, int timeStamp)
+TQString StatisticsPlugin::dcopStatus(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
return dcopStatus(id, dt.toString());
}
-QString StatisticsPlugin::dcopStatus(QString id, QString dateTime)
+TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime)
{
- QDateTime dt = QDateTime::fromString(dateTime);
+ TQDateTime dt = TQDateTime::fromString(dateTime);
if (dt.isValid() && statisticsContactMap.contains(id))
{
@@ -269,9 +269,9 @@ QString StatisticsPlugin::dcopStatus(QString id, QString dateTime)
return "";
}
-QString StatisticsPlugin::dcopMainStatus(QString id, int timeStamp)
+TQString StatisticsPlugin::dcopMainStatus(TQString id, int timeStamp)
{
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(timeStamp);
if (dt.isValid() && statisticsContactMap.contains(id))
{
diff --git a/kopete/plugins/statistics/statisticsplugin.h b/kopete/plugins/statistics/statisticsplugin.h
index d757b424..1492cd41 100644
--- a/kopete/plugins/statistics/statisticsplugin.h
+++ b/kopete/plugins/statistics/statisticsplugin.h
@@ -17,10 +17,10 @@
#ifndef STATISTICSPLUGIN_H
#define STATISTICSPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
@@ -101,7 +101,7 @@ class StatisticsPlugin : public Kopete::Plugin, virtual public StatisticsDCOPIfa
Q_OBJECT
public:
/// Standard plugin constructors
- StatisticsPlugin(QObject *parent, const char *name, const QStringList &args);
+ StatisticsPlugin(TQObject *parent, const char *name, const TQStringList &args);
~StatisticsPlugin();
/// Method to access m_db member
@@ -179,34 +179,34 @@ public slots:
* DCOP functions
* See statisticsdcopiface.h for the documentation
*/
- void dcopStatisticsDialog(QString id);
+ void dcopStatisticsDialog(TQString id);
- bool dcopWasOnline(QString id, int timeStamp);
- bool dcopWasOnline(QString id, QString dt);
+ bool dcopWasOnline(TQString id, int timeStamp);
+ bool dcopWasOnline(TQString id, TQString dt);
- bool dcopWasAway(QString id, int timeStamp);
- bool dcopWasAway(QString id, QString dt);
+ bool dcopWasAway(TQString id, int timeStamp);
+ bool dcopWasAway(TQString id, TQString dt);
- bool dcopWasOffline(QString id, int timeStamp);
- bool dcopWasOffline(QString id, QString dt);
+ bool dcopWasOffline(TQString id, int timeStamp);
+ bool dcopWasOffline(TQString id, TQString dt);
- bool dcopWasStatus(QString id, QDateTime dateTime, Kopete::OnlineStatus::StatusType status);
+ bool dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status);
- QString dcopStatus(QString id, QString dateTime);
- QString dcopStatus(QString id, int timeStamp);
+ TQString dcopStatus(TQString id, TQString dateTime);
+ TQString dcopStatus(TQString id, int timeStamp);
- QString dcopMainStatus(QString id, int timeStamp);
+ TQString dcopMainStatus(TQString id, int timeStamp);
private:
StatisticsDB *m_db;
/** Associate a Kopete::Contact id to a StatisticsContact to retrieve
* the StatisticsContact corresponding to the Kopete::Contact
*/
- QMap<QString, StatisticsContact*> statisticsContactMap;
+ TQMap<TQString, StatisticsContact*> statisticsContactMap;
/** Associate a Kopete::MetaContact to a StatisticsContact to retrieve
* the StatisticsContact corresponding to the MetaContact
*/
- QMap<Kopete::MetaContact*, StatisticsContact*> statisticsMetaContactMap;
+ TQMap<Kopete::MetaContact*, StatisticsContact*> statisticsMetaContactMap;
};
diff --git a/kopete/plugins/texteffect/texteffectconfig.cpp b/kopete/plugins/texteffect/texteffectconfig.cpp
index 9ecca3f0..2f6da206 100644
--- a/kopete/plugins/texteffect/texteffectconfig.cpp
+++ b/kopete/plugins/texteffect/texteffectconfig.cpp
@@ -16,7 +16,7 @@
*************************************************************************
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -47,9 +47,9 @@ void TextEffectConfig::load()
mWaves = config->readBoolEntry("WaVeS", false);
}
-QStringList TextEffectConfig::defaultColorList()
+TQStringList TextEffectConfig::defaultColorList()
{
- return QStringList::split( ",", "#00BBDD,#0088DD,#0000DD,#8800DD,#DD00DD,#DD0088,#DD0000,#DD8800,#DDBB00,#88BB00,#00BB00" );
+ return TQStringList::split( ",", "#00BBDD,#0088DD,#0000DD,#8800DD,#DD00DD,#DD0088,#DD0000,#DD8800,#DDBB00,#88BB00,#00BB00" );
}
void TextEffectConfig::save()
@@ -69,7 +69,7 @@ void TextEffectConfig::save()
config->sync();
}
-QStringList TextEffectConfig::colors() const
+TQStringList TextEffectConfig::colors() const
{
return mColors;
}
@@ -104,7 +104,7 @@ bool TextEffectConfig::waves() const
return mWaves;
}
-void TextEffectConfig::setColors(const QStringList &newColors)
+void TextEffectConfig::setColors(const TQStringList &newColors)
{
mColors = newColors;
}
diff --git a/kopete/plugins/texteffect/texteffectconfig.h b/kopete/plugins/texteffect/texteffectconfig.h
index 80b19151..103ba772 100644
--- a/kopete/plugins/texteffect/texteffectconfig.h
+++ b/kopete/plugins/texteffect/texteffectconfig.h
@@ -30,7 +30,7 @@ public:
void save();
//accessor functions
- QStringList colors() const;
+ TQStringList colors() const;
bool colorLines() const;
bool colorWords() const;
bool colorChar() const;
@@ -38,18 +38,18 @@ public:
bool lamer() const;
bool waves() const;
- void setColors(const QStringList &newColors = QStringList());
+ void setColors(const TQStringList &newColors = TQStringList());
void setColorLines(bool newLines);
void setColorChar(bool newChar);
void setColorWords(bool newWords);
void setColorRandom(bool newRandom);
void setLamer(bool newLamer);
void setWaves(bool newWaves);
- QStringList defaultColorList();
+ TQStringList defaultColorList();
private:
- QStringList mColors;
+ TQStringList mColors;
bool mColorLines;
bool mColorWords;
bool mColorChar;
diff --git a/kopete/plugins/texteffect/texteffectplugin.cpp b/kopete/plugins/texteffect/texteffectplugin.cpp
index 5374b2ca..47bdbc14 100644
--- a/kopete/plugins/texteffect/texteffectplugin.cpp
+++ b/kopete/plugins/texteffect/texteffectplugin.cpp
@@ -28,7 +28,7 @@
typedef KGenericFactory<TextEffectPlugin> TextEffectPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_texteffect, TextEffectPluginFactory( "kopete_texteffect" ) )
-TextEffectPlugin::TextEffectPlugin( QObject *parent, const char *name, const QStringList &/*args*/ )
+TextEffectPlugin::TextEffectPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
: Kopete::Plugin( TextEffectPluginFactory::instance(), parent, name )
{
if( !pluginStatic_ )
@@ -36,11 +36,11 @@ TextEffectPlugin::TextEffectPlugin( QObject *parent, const char *name, const QSt
m_config = new TextEffectConfig;
- connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
+ connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) );
connect( Kopete::ChatSessionManager::self(),
- SIGNAL( aboutToSend( Kopete::Message & ) ),
- SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+ TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
last_color=0;
}
@@ -64,19 +64,19 @@ void TextEffectPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(msg.direction() != Kopete::Message::Outbound)
return;
- QStringList colors=m_config->colors();
+ TQStringList colors=m_config->colors();
if(m_config->colorChar() || m_config->colorWords() || m_config->lamer() || m_config->waves() )
{
- QString original=msg.plainBody();
- QString resultat;
+ TQString original=msg.plainBody();
+ TQString resultat;
unsigned int c=0;
bool wavein=false;
for(unsigned int f=0;f<original.length();f++)
{
- QChar x=original[f];
+ TQChar x=original[f];
if(f==0 || m_config->colorChar() || (m_config->colorWords() && x==' ' ))
{
if(f!=0)
@@ -184,7 +184,7 @@ void TextEffectPlugin::slotOutgoingMessage( Kopete::Message& msg )
last_color=0;
}
- msg.setFg(QColor (colors[last_color]));
+ msg.setFg(TQColor (colors[last_color]));
}
}
diff --git a/kopete/plugins/texteffect/texteffectplugin.h b/kopete/plugins/texteffect/texteffectplugin.h
index db34fdcb..63441435 100644
--- a/kopete/plugins/texteffect/texteffectplugin.h
+++ b/kopete/plugins/texteffect/texteffectplugin.h
@@ -18,9 +18,9 @@
#ifndef TextEffectPLUGIN_H
#define TextEffectPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "kopetemessage.h"
#include "kopeteplugin.h"
@@ -45,7 +45,7 @@ class TextEffectPlugin : public Kopete::Plugin
public:
static TextEffectPlugin *plugin();
- TextEffectPlugin( QObject *parent, const char *name, const QStringList &args );
+ TextEffectPlugin( TQObject *parent, const char *name, const TQStringList &args );
~TextEffectPlugin();
public slots:
diff --git a/kopete/plugins/texteffect/texteffectpreferences.cpp b/kopete/plugins/texteffect/texteffectpreferences.cpp
index c9f0c03b..9fb2994c 100644
--- a/kopete/plugins/texteffect/texteffectpreferences.cpp
+++ b/kopete/plugins/texteffect/texteffectpreferences.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kcolordialog.h>
@@ -35,12 +35,12 @@
typedef KGenericFactory<TextEffectPreferences> TextEffectPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_texteffect, TextEffectPreferencesFactory( "kcm_kopete_texteffect" ) )
-TextEffectPreferences::TextEffectPreferences(QWidget *parent,
+TextEffectPreferences::TextEffectPreferences(TQWidget *parent,
const char* /*name*/,
- const QStringList &args)
+ const TQStringList &args)
: KCModule(TextEffectPreferencesFactory::instance(), parent, args)
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
kdDebug( 14310 ) << "Creating preferences dialog" << endl;
@@ -52,32 +52,32 @@ TextEffectPreferences::TextEffectPreferences(QWidget *parent,
kdDebug( 14310 ) << "Setting up connections" << endl;
- connect(preferencesDialog->mColorsAdd , SIGNAL(pressed()) ,
- this , SLOT(slotAddPressed()));
+ connect(preferencesDialog->mColorsAdd , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotAddPressed()));
- connect(preferencesDialog->mColorsRemove , SIGNAL(pressed()) ,
- this , SLOT(slotRemovePressed()));
+ connect(preferencesDialog->mColorsRemove , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotRemovePressed()));
- connect(preferencesDialog->mColorsUp , SIGNAL(pressed()) ,
- this , SLOT(slotUpPressed()));
+ connect(preferencesDialog->mColorsUp , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotUpPressed()));
- connect(preferencesDialog->mColorsDown , SIGNAL(pressed()) ,
- this , SLOT(slotDownPressed()));
+ connect(preferencesDialog->mColorsDown , TQT_SIGNAL(pressed()) ,
+ this , TQT_SLOT(slotDownPressed()));
// Connect up all the check boxes
- connect( preferencesDialog->m_lamer, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_casewaves, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
-
- connect( preferencesDialog->m_colorRandom, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_fg, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_char, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
- connect( preferencesDialog->m_words, SIGNAL( clicked() ),
- this, SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_lamer, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_casewaves, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+
+ connect( preferencesDialog->m_colorRandom, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_fg, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_char, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
+ connect( preferencesDialog->m_words, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotSettingChanged() ) );
//setMainWidget( preferencesDialog, "Text Effect Plugin" );
@@ -142,9 +142,9 @@ void TextEffectPreferences::save()
kdDebug() << k_funcinfo << "EXIT" << endl;
}
-QStringList TextEffectPreferences::colors()
+TQStringList TextEffectPreferences::colors()
{
- QStringList ret;
+ TQStringList ret;
for(unsigned int f=0; f<preferencesDialog->mColorsListBox->count() ; f++)
{
ret.append(preferencesDialog->mColorsListBox->text(f));
@@ -154,7 +154,7 @@ QStringList TextEffectPreferences::colors()
void TextEffectPreferences::slotAddPressed()
{
- QColor myColor;
+ TQColor myColor;
if( KColorDialog::getColor( myColor ) == KColorDialog::Accepted )
{
preferencesDialog->mColorsListBox->insertItem(myColor.name());
@@ -177,7 +177,7 @@ void TextEffectPreferences::slotUpPressed()
int p=preferencesDialog->mColorsListBox->currentItem();
if(p <= 0 )
return;
- QListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
+ TQListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
if(!i)
return;
preferencesDialog->mColorsListBox->setSelected(i,false);
@@ -194,7 +194,7 @@ void TextEffectPreferences::slotDownPressed()
int p=preferencesDialog->mColorsListBox->currentItem();
if(p < 0 )
return;
- QListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
+ TQListBoxItem *i=preferencesDialog->mColorsListBox->selectedItem();
if(!i)
return;
preferencesDialog->mColorsListBox->setSelected(i,false);
diff --git a/kopete/plugins/texteffect/texteffectpreferences.h b/kopete/plugins/texteffect/texteffectpreferences.h
index 21dc7bff..e455e737 100644
--- a/kopete/plugins/texteffect/texteffectpreferences.h
+++ b/kopete/plugins/texteffect/texteffectpreferences.h
@@ -32,7 +32,7 @@ class TextEffectPreferences : public KCModule {
Q_OBJECT
public:
- TextEffectPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ TextEffectPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
~TextEffectPreferences();
// Overloaded from parent
@@ -41,7 +41,7 @@ public:
virtual void defaults();
private:
- QStringList colors();
+ TQStringList colors();
TextEffectPrefs *preferencesDialog;
TextEffectConfig *config;
diff --git a/kopete/plugins/translator/translatordialog.cpp b/kopete/plugins/translator/translatordialog.cpp
index c03921fc..02e405ec 100644
--- a/kopete/plugins/translator/translatordialog.cpp
+++ b/kopete/plugins/translator/translatordialog.cpp
@@ -21,7 +21,7 @@
#include "translatordialog.h"
-TranslatorDialog::TranslatorDialog(const QString &text,QWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok)
+TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok)
{
m_textEdit=new KTextEdit(this);
setMainWidget(m_textEdit);
@@ -31,7 +31,7 @@ TranslatorDialog::~TranslatorDialog()
{
}
-QString TranslatorDialog::translatedText()
+TQString TranslatorDialog::translatedText()
{
return m_textEdit->text();
}
diff --git a/kopete/plugins/translator/translatordialog.h b/kopete/plugins/translator/translatordialog.h
index 70fd46c0..40a5523e 100644
--- a/kopete/plugins/translator/translatordialog.h
+++ b/kopete/plugins/translator/translatordialog.h
@@ -18,7 +18,7 @@
#ifndef TRANSLATORDIALOG_H
#define TRANSLATORDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
//#include <kopetemessage.h>
@@ -33,10 +33,10 @@ class TranslatorDialog : public KDialogBase
Q_OBJECT
public:
- TranslatorDialog(const QString &translated, QWidget *parent=0, const char *name=0);
+ TranslatorDialog(const TQString &translated, TQWidget *parent=0, const char *name=0);
~TranslatorDialog();
- QString translatedText();
+ TQString translatedText();
private:
KTextEdit *m_textEdit;
diff --git a/kopete/plugins/translator/translatorguiclient.cpp b/kopete/plugins/translator/translatorguiclient.cpp
index ae175f41..6af66f37 100644
--- a/kopete/plugins/translator/translatorguiclient.cpp
+++ b/kopete/plugins/translator/translatorguiclient.cpp
@@ -17,7 +17,7 @@
*************************************************************************
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdebug.h>
#include <kaction.h>
@@ -34,14 +34,14 @@
#include "translatorlanguages.h"
TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *parent, const char *name )
-: QObject( parent, name ), KXMLGUIClient( parent )
+: TQObject( parent, name ), KXMLGUIClient( parent )
{
setInstance( TranslatorPlugin::plugin()->instance() );
- connect( TranslatorPlugin::plugin(), SIGNAL( destroyed( QObject * ) ), this, SLOT( deleteLater() ) );
+ connect( TranslatorPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) );
m_manager = parent;
- new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" );
+ new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, TQT_SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" );
setXMLFile( "translatorchatui.rc" );
}
@@ -56,14 +56,14 @@ void TranslatorGUIClient::slotTranslateChat()
return;
Kopete::Message msg = m_manager->view()->currentMessage();
- QString body = msg.plainBody();
+ TQString body = msg.plainBody();
if ( body.isEmpty() )
return;
- QString src_lang = TranslatorPlugin::plugin()->m_myLang;
- QString dst_lang;
+ TQString src_lang = TranslatorPlugin::plugin()->m_myLang;
+ TQString dst_lang;
- QPtrList<Kopete::Contact> list = m_manager->members();
+ TQPtrList<Kopete::Contact> list = m_manager->members();
Kopete::MetaContact *to = list.first()->metaContact();
dst_lang = to->pluginData( TranslatorPlugin::plugin(), "languageKey" );
if ( dst_lang.isEmpty() || dst_lang == "null" )
@@ -73,12 +73,12 @@ void TranslatorGUIClient::slotTranslateChat()
}
// We search for src_dst
- TranslatorPlugin::plugin()->translateMessage( body, src_lang, dst_lang, this, SLOT( messageTranslated( const QVariant & ) ) );
+ TranslatorPlugin::plugin()->translateMessage( body, src_lang, dst_lang, this, TQT_SLOT( messageTranslated( const TQVariant & ) ) );
}
-void TranslatorGUIClient::messageTranslated( const QVariant &result )
+void TranslatorGUIClient::messageTranslated( const TQVariant &result )
{
- QString translated = result.toString();
+ TQString translated = result.toString();
if ( translated.isEmpty() )
{
kdDebug( 14308 ) << k_funcinfo << "Empty string returned" << endl;
diff --git a/kopete/plugins/translator/translatorguiclient.h b/kopete/plugins/translator/translatorguiclient.h
index 32ff015f..68cb4fa7 100644
--- a/kopete/plugins/translator/translatorguiclient.h
+++ b/kopete/plugins/translator/translatorguiclient.h
@@ -20,7 +20,7 @@
#ifndef TRANSLATORGUICLIENT_H
#define TRANSLATORGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
#include <kio/job.h>
@@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; }
* @author Olivier Goffart <ogoffart @ kde.org>
*/
-class TranslatorGUIClient : public QObject , public KXMLGUIClient
+class TranslatorGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
@@ -44,7 +44,7 @@ public:
private slots:
void slotTranslateChat();
- void messageTranslated(const QVariant&);
+ void messageTranslated(const TQVariant&);
private:
Kopete::ChatSession *m_manager;
diff --git a/kopete/plugins/translator/translatorlanguages.cpp b/kopete/plugins/translator/translatorlanguages.cpp
index d0a1e0a0..5eecbf22 100644
--- a/kopete/plugins/translator/translatorlanguages.cpp
+++ b/kopete/plugins/translator/translatorlanguages.cpp
@@ -19,8 +19,8 @@
*************************************************************************
*/
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <klocale.h>
#include "translatorlanguages.h"
@@ -83,7 +83,7 @@ TranslatorLanguages::TranslatorLanguages()
m_supported["google"].append("it_en");
m_supported["google"].append("pt_en");
- QMap<QString,QString>::ConstIterator i;
+ TQMap<TQString,TQString>::ConstIterator i;
for ( i = m_langs.begin(); i != m_langs.end() ; ++i )
{
diff --git a/kopete/plugins/translator/translatorlanguages.h b/kopete/plugins/translator/translatorlanguages.h
index cbd6385f..3ef4fb16 100644
--- a/kopete/plugins/translator/translatorlanguages.h
+++ b/kopete/plugins/translator/translatorlanguages.h
@@ -22,8 +22,8 @@
#ifndef TRANSLATORLANGUAGES_H_
#define TRANSLATORLANGUAGES_H_
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
class QString;
@@ -37,28 +37,28 @@ public:
* Language APIs *
***************************************************************************/
- const QString& languageName( const QString &key )
+ const TQString& languageName( const TQString &key )
{ return m_langs[key]; };
- const int languageIndex ( const QString &key )
+ const int languageIndex ( const TQString &key )
{ return m_langKeyIntMap[key]; };
- const QString& languageKey( const int index )
+ const TQString& languageKey( const int index )
{ return m_langIntKeyMap[index]; };
- const QMap<QString,QString>& languagesMap()
+ const TQMap<TQString,TQString>& languagesMap()
{ return m_langs; };
- const QMap<QString,QString>& servicesMap()
+ const TQMap<TQString,TQString>& servicesMap()
{ return m_services; };
- const QStringList& supported( const QString &servicekey )
+ const TQStringList& supported( const TQString &servicekey )
{ return m_supported[servicekey]; };
- const int serviceIndex ( const QString &key )
+ const int serviceIndex ( const TQString &key )
{ return m_servicesKeyIntMap[key]; };
- const QString& serviceKey( const int index )
+ const TQString& serviceKey( const int index )
{ return m_servicesIntKeyMap[index]; };
int numLanguages() { return m_lc; };
@@ -68,21 +68,21 @@ public:
private:
/* Known Languages key -> desc ie: en -> English */
- QMap< QString, QString> m_langs;
+ TQMap< TQString, TQString> m_langs;
/* Known Services key -> desc ie: en -> English */
- QMap< QString, QString> m_services;
+ TQMap< TQString, TQString> m_services;
/* Supported translations per service, src_dst format ( ie: en_es )*/
- QMap< QString, QStringList > m_supported;
+ TQMap< TQString, TQStringList > m_supported;
/* int to lang key and viceversa*/
- QMap<int, QString> m_langIntKeyMap;
- QMap<QString, int> m_langKeyIntMap;
+ TQMap<int, TQString> m_langIntKeyMap;
+ TQMap<TQString, int> m_langKeyIntMap;
/* int to services key and viceversa*/
- QMap<int, QString> m_servicesIntKeyMap;
- QMap<QString, int> m_servicesKeyIntMap;
+ TQMap<int, TQString> m_servicesIntKeyMap;
+ TQMap<TQString, int> m_servicesKeyIntMap;
/* Lang counter */
int m_lc;
diff --git a/kopete/plugins/translator/translatorplugin.cpp b/kopete/plugins/translator/translatorplugin.cpp
index 4ac8367f..0767e24e 100644
--- a/kopete/plugins/translator/translatorplugin.cpp
+++ b/kopete/plugins/translator/translatorplugin.cpp
@@ -20,10 +20,10 @@
google translation page layout (13-sept-2007)
*/
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qsignal.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqsignal.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kaction.h>
@@ -51,7 +51,7 @@ K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( &aboutda
K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( "kopete_translator" ) )
#endif
-TranslatorPlugin::TranslatorPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+TranslatorPlugin::TranslatorPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( TranslatorPluginFactory::instance(), parent, name )
{
kdDebug( 14308 ) << k_funcinfo << endl;
@@ -64,32 +64,32 @@ TranslatorPlugin::TranslatorPlugin( QObject *parent, const char *name, const QSt
m_languages = new TranslatorLanguages;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ),
- this, SLOT( slotIncomingMessage( Kopete::Message & ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ),
- this, SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
- this, SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ),
+ this, TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ this, TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
+ this, TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
- QStringList keys;
- QMap<QString, QString> m = m_languages->languagesMap();
+ TQStringList keys;
+ TQMap<TQString, TQString> m = m_languages->languagesMap();
for ( int k = 0; k <= m_languages->numLanguages(); k++ )
keys << m[ m_languages->languageKey( k ) ];
m_actionLanguage = new KSelectAction( i18n( "Set &Language" ), "locale", 0, actionCollection(), "contactLanguage" );
m_actionLanguage->setItems( keys );
- connect( m_actionLanguage, SIGNAL( activated() ), this, SLOT(slotSetLanguage() ) );
- connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotSelectionChanged( bool ) ) );
+ connect( m_actionLanguage, TQT_SIGNAL( activated() ), this, TQT_SLOT(slotSetLanguage() ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotSelectionChanged( bool ) ) );
setXMLFile( "translatorui.rc" );
//Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
slotNewKMM( *it );
loadSettings();
- connect( this, SIGNAL( settingsChanged() ), this, SLOT( loadSettings() ) );
+ connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( loadSettings() ) );
}
TranslatorPlugin::~TranslatorPlugin()
@@ -147,7 +147,7 @@ void TranslatorPlugin::slotSelectionChanged( bool b )
if( !m )
return;
- QString languageKey = m->pluginData( this, "languageKey" );
+ TQString languageKey = m->pluginData( this, "languageKey" );
if ( !languageKey.isEmpty() && languageKey != "null" )
m_actionLanguage->setCurrentItem( m_languages->languageIndex( languageKey ) );
else
@@ -164,8 +164,8 @@ void TranslatorPlugin::slotIncomingMessage( Kopete::Message &msg )
if ( m_incomingMode == DontTranslate )
return;
- QString src_lang;
- QString dst_lang;
+ TQString src_lang;
+ TQString dst_lang;
if ( ( msg.direction() == Kopete::Message::Inbound ) && !msg.plainBody().isEmpty() )
{
@@ -193,8 +193,8 @@ void TranslatorPlugin::slotOutgoingMessage( Kopete::Message &msg )
if ( m_outgoingMode == DontTranslate )
return;
- QString src_lang;
- QString dst_lang;
+ TQString src_lang;
+ TQString dst_lang;
if ( ( msg.direction() == Kopete::Message::Outbound ) && ( !msg.plainBody().isEmpty() ) )
{
@@ -218,12 +218,12 @@ void TranslatorPlugin::slotOutgoingMessage( Kopete::Message &msg )
}
}
-void TranslatorPlugin::translateMessage( const QString &msg, const QString &from, const QString &to, QObject *obj, const char* slot )
+void TranslatorPlugin::translateMessage( const TQString &msg, const TQString &from, const TQString &to, TQObject *obj, const char* slot )
{
- QSignal completeSignal;
+ TQSignal completeSignal;
completeSignal.connect( obj, slot );
- QString result = translateMessage( msg, from, to );
+ TQString result = translateMessage( msg, from, to );
if(!result.isNull())
{
@@ -232,19 +232,19 @@ void TranslatorPlugin::translateMessage( const QString &msg, const QString &from
}
}
-QString TranslatorPlugin::translateMessage( const QString &msg, const QString &from, const QString &to )
+TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString &from, const TQString &to )
{
if ( from == to )
{
kdDebug( 14308 ) << k_funcinfo << "Src and Dst languages are the same" << endl;
- return QString::null;
+ return TQString::null;
}
// We search for src_dst
if(! m_languages->supported( m_service ).contains( from + "_" + to ) )
{
kdDebug( 14308 ) << k_funcinfo << from << "_" << to << " is not supported by service " << m_service << endl;
- return QString::null;
+ return TQString::null;
}
@@ -253,19 +253,19 @@ QString TranslatorPlugin::translateMessage( const QString &msg, const QString &f
else if ( m_service == "google" )
return googleTranslateMessage( msg ,from, to );
else
- return QString::null;
+ return TQString::null;
}
-QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QString &from, const QString &to )
+TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQString &from, const TQString &to )
{
KURL translatorURL ( "http://translate.google.com/translate_t");
- QString body = KURL::encode_string( msg );
- QString lp = from + "|" + to;
+ TQString body = KURL::encode_string( msg );
+ TQString lp = from + "|" + to;
- QCString postData = QString( "text=" + body + "&langpair=" + lp ).utf8();
+ TQCString postData = TQString( "text=" + body + "&langpair=" + lp ).utf8();
- QString gurl = "http://translate.google.com/translate_t?text=" + body +"&langpair=" + lp;
+ TQString gurl = "http://translate.google.com/translate_t?text=" + body +"&langpair=" + lp;
kdDebug(14308) << k_funcinfo << " URL: " << gurl << endl;
KURL geturl ( gurl );
@@ -275,8 +275,8 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr
//job->addMetaData( "content-type", "application/x-www-form-urlencoded" );
//job->addMetaData( "referrer", "http://www.google.com" );
- QObject::connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) );
- QObject::connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) );
+ TQObject::connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) );
+ TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) );
// KIO is async and we use a sync API, so use the processEvents hack to work around that
// FIXME: We need to make the libkopete API async to get rid of this processEvents.
@@ -284,7 +284,7 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr
while ( !m_completed[ job ] )
qApp->processEvents();
- QString data = QString::fromLatin1( m_data[ job ] );
+ TQString data = TQString::fromLatin1( m_data[ job ] );
// After hacks, we need to clean
m_data.remove( job );
@@ -292,27 +292,27 @@ QString TranslatorPlugin::googleTranslateMessage( const QString &msg, const QStr
// kdDebug( 14308 ) << k_funcinfo << "Google response:"<< endl << data << endl;
-// QRegExp re( "<textarea name=q rows=5 cols=45 wrap=PHYSICAL>(.*)</textarea>" );
- QRegExp re( "<textarea name=utrans wrap=PHYSICAL dilr=ltr rows=5 id=suggestion>(.*)</textarea>");
+// TQRegExp re( "<textarea name=q rows=5 cols=45 wrap=PHYSICAL>(.*)</textarea>" );
+ TQRegExp re( "<textarea name=utrans wrap=PHYSICAL dilr=ltr rows=5 id=suggestion>(.*)</textarea>");
re.setMinimal( true );
re.search( data );
return re.cap( 1 );
}
-QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QString &from, const QString &to )
+TQString TranslatorPlugin::babelTranslateMessage( const TQString &msg, const TQString &from, const TQString &to )
{
- QString body = KURL::encode_string( msg);
- QString lp = from + "_" + to;
- QString gurl = "http://babelfish.altavista.com/babelfish/tr?enc=utf8&doit=done&tt=urltext&urltext=" + body + "&lp=" + lp;
+ TQString body = KURL::encode_string( msg);
+ TQString lp = from + "_" + to;
+ TQString gurl = "http://babelfish.altavista.com/babelfish/tr?enc=utf8&doit=done&tt=urltext&urltext=" + body + "&lp=" + lp;
KURL geturl ( gurl );
kdDebug( 14308 ) << k_funcinfo << "URL: " << gurl << endl;
KIO::TransferJob *job = KIO::get( geturl, false, true );
- QObject::connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) );
- QObject::connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) );
+ TQObject::connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) );
+ TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) );
// KIO is async and we use a sync API, so use the processEvents hack to work around that
// FIXME: We need to make the libkopete API async to get rid of this processEvents.
@@ -320,7 +320,7 @@ QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QStri
while ( !m_completed[ job ] )
qApp->processEvents();
- QString data = QString::fromUtf8( m_data[ job ] );
+ TQString data = TQString::fromUtf8( m_data[ job ] );
// After hacks, we need to clean
m_data.remove( job );
@@ -328,15 +328,15 @@ QString TranslatorPlugin::babelTranslateMessage( const QString &msg, const QStri
//kdDebug( 14308 ) << k_funcinfo << "Babelfish response: " << endl << data << endl;
-// QRegExp re( "<Div style=padding:10px; lang=..>(.*)</div" );
- QRegExp re( "<div style=padding:10px;>(.*)</div>" );
+// TQRegExp re( "<Div style=padding:10px; lang=..>(.*)</div" );
+ TQRegExp re( "<div style=padding:10px;>(.*)</div>" );
re.setMinimal( true );
re.search( data );
return re.cap( 1 );
}
-void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const QString &translated )
+void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const TQString &translated )
{
if ( translated.isEmpty() )
{
@@ -381,16 +381,16 @@ void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const QString &tra
};
}
-void TranslatorPlugin::slotDataReceived ( KIO::Job *job, const QByteArray &data )
+void TranslatorPlugin::slotDataReceived ( KIO::Job *job, const TQByteArray &data )
{
- m_data[ job ] += QCString( data, data.size() + 1 );
+ m_data[ job ] += TQCString( data, data.size() + 1 );
}
void TranslatorPlugin::slotJobDone ( KIO::Job *job )
{
m_completed[ job ] = true;
- QObject::disconnect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotDataReceived( KIO::Job *, const QByteArray & ) ) );
- QObject::disconnect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobDone( KIO::Job * ) ) );
+ TQObject::disconnect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotDataReceived( KIO::Job *, const TQByteArray & ) ) );
+ TQObject::disconnect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobDone( KIO::Job * ) ) );
}
void TranslatorPlugin::slotSetLanguage()
diff --git a/kopete/plugins/translator/translatorplugin.h b/kopete/plugins/translator/translatorplugin.h
index 2a04b509..823b6eef 100644
--- a/kopete/plugins/translator/translatorplugin.h
+++ b/kopete/plugins/translator/translatorplugin.h
@@ -21,10 +21,10 @@
#ifndef BABELFISHPLUGIN_H
#define BABELFISHPLUGIN_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qintdict.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqintdict.h>
#include <kio/job.h>
@@ -58,7 +58,7 @@ friend class TranslatorGUIClient;
public:
static TranslatorPlugin *plugin();
- TranslatorPlugin( QObject *parent, const char *name, const QStringList &args );
+ TranslatorPlugin( TQObject *parent, const char *name, const TQStringList &args );
~TranslatorPlugin();
enum TranslateMode
@@ -72,7 +72,7 @@ public:
private slots:
void slotIncomingMessage( Kopete::Message& msg );
void slotOutgoingMessage( Kopete::Message& msg );
- void slotDataReceived ( KIO::Job *, const QByteArray &data);
+ void slotDataReceived ( KIO::Job *, const TQByteArray &data);
void slotJobDone ( KIO::Job *);
void slotSetLanguage();
void slotSelectionChanged(bool);
@@ -80,17 +80,17 @@ private slots:
void loadSettings();
public:
- QString translateMessage( const QString &, const QString &, const QString & );
- void translateMessage( const QString &, const QString &, const QString & , QObject * , const char*);
+ TQString translateMessage( const TQString &, const TQString &, const TQString & );
+ void translateMessage( const TQString &, const TQString &, const TQString & , TQObject * , const char*);
protected:
- QString googleTranslateMessage( const QString &, const QString &, const QString & );
- QString babelTranslateMessage(const QString &, const QString &, const QString & );
+ TQString googleTranslateMessage( const TQString &, const TQString &, const TQString & );
+ TQString babelTranslateMessage(const TQString &, const TQString &, const TQString & );
private:
- QMap< KIO::Job *, QCString> m_data;
- QMap< KIO::Job *, bool> m_completed;
+ TQMap< KIO::Job *, TQCString> m_data;
+ TQMap< KIO::Job *, bool> m_completed;
KSelectAction* m_actionLanguage;
@@ -98,13 +98,13 @@ private:
TranslatorLanguages *m_languages;
//Settings
- QString m_myLang;
- QString m_service;
+ TQString m_myLang;
+ TQString m_service;
unsigned int m_outgoingMode;
unsigned int m_incomingMode;
private:
- void sendTranslation(Kopete::Message &msg, const QString &translated);
+ void sendTranslation(Kopete::Message &msg, const TQString &translated);
};
#endif
diff --git a/kopete/plugins/translator/translatorprefs.cpp b/kopete/plugins/translator/translatorprefs.cpp
index cb67c4c6..8d06b49f 100644
--- a/kopete/plugins/translator/translatorprefs.cpp
+++ b/kopete/plugins/translator/translatorprefs.cpp
@@ -20,7 +20,7 @@
#include "kcautoconfigmodule.h"
#include "translatorprefsbase.h"
#include "translatorlanguages.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
class TranslatorPreferences;
@@ -30,13 +30,13 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_translator, TranslatorConfigFactory( "kcm
class TranslatorPreferences : public KCAutoConfigModule
{
public:
- TranslatorPreferences( QWidget *parent = 0, const char * = 0, const QStringList &args = QStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args )
+ TranslatorPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args )
{
TranslatorPrefsUI *preferencesDialog = new TranslatorPrefsUI(this);
TranslatorLanguages languages;
- QMap<QString,QString>::ConstIterator i;
- QMap<QString,QString> m;
+ TQMap<TQString,TQString>::ConstIterator i;
+ TQMap<TQString,TQString> m;
m = languages.languagesMap();
for ( i = m.begin(); i != m.end() ; ++i )
diff --git a/kopete/plugins/webpresence/webpresenceplugin.cpp b/kopete/plugins/webpresence/webpresenceplugin.cpp
index 1856d94c..bb7b9d4c 100644
--- a/kopete/plugins/webpresence/webpresenceplugin.cpp
+++ b/kopete/plugins/webpresence/webpresenceplugin.cpp
@@ -20,9 +20,9 @@
#include "config.h"
-#include <qdom.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -51,18 +51,18 @@
typedef KGenericFactory<WebPresencePlugin> WebPresencePluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_webpresence, WebPresencePluginFactory( "kopete_webpresence" ) )
-WebPresencePlugin::WebPresencePlugin( QObject *parent, const char *name, const QStringList& /*args*/ )
+WebPresencePlugin::WebPresencePlugin( TQObject *parent, const char *name, const TQStringList& /*args*/ )
: Kopete::Plugin( WebPresencePluginFactory::instance(), parent, name ),
shuttingDown( false ), resultFormatting( WEB_HTML )
{
- m_writeScheduler = new QTimer( this );
- connect ( m_writeScheduler, SIGNAL( timeout() ), this, SLOT( slotWriteFile() ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)),
- this, SLOT( listenToAllAccounts() ) );
- connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(Kopete::Account*)),
- this, SLOT( listenToAllAccounts() ) );
-
- connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
+ m_writeScheduler = new TQTimer( this );
+ connect ( m_writeScheduler, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotWriteFile() ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)),
+ this, TQT_SLOT( listenToAllAccounts() ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(Kopete::Account*)),
+ this, TQT_SLOT( listenToAllAccounts() ) );
+
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) );
loadSettings();
listenToAllAccounts();
}
@@ -113,8 +113,8 @@ void WebPresencePlugin::listenToAllAccounts()
for ( ProtocolList::Iterator it = protocols.begin();
it != protocols.end(); ++it )
{
- QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( *it );
- QDictIterator<Kopete::Account> acIt( accounts );
+ TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( *it );
+ TQDictIterator<Kopete::Account> acIt( accounts );
for( ; Kopete::Account *account = acIt.current(); ++acIt )
{
@@ -130,18 +130,18 @@ void WebPresencePlugin::listenToAccount( Kopete::Account* account )
{
// Connect to the account's status changed signal
// because we can't know if the account has already connected
- QObject::disconnect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *,
+ TQObject::disconnect( account->myself(),
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *,
const Kopete::OnlineStatus &,
const Kopete::OnlineStatus & ) ),
this,
- SLOT( slotWaitMoreStatusChanges() ) ) ;
- QObject::connect( account->myself(),
- SIGNAL(onlineStatusChanged( Kopete::Contact *,
+ TQT_SLOT( slotWaitMoreStatusChanges() ) ) ;
+ TQObject::connect( account->myself(),
+ TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *,
const Kopete::OnlineStatus &,
const Kopete::OnlineStatus & ) ),
this,
- SLOT( slotWaitMoreStatusChanges() ) );
+ TQT_SLOT( slotWaitMoreStatusChanges() ) );
}
}
@@ -197,8 +197,8 @@ void WebPresencePlugin::slotWriteFile()
// upload it to the specified URL
KURL src( m_output->name() );
KIO::FileCopyJob *job = KIO::file_move( src, dest, -1, true, false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotUploadJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotUploadJobResult( KIO::Job * ) ) );
}
void WebPresencePlugin::slotUploadJobResult( KIO::Job *job )
@@ -215,26 +215,26 @@ KTempFile* WebPresencePlugin::generateFile()
{
// generate the (temporary) XML file representing the current contactlist
kdDebug( 14309 ) << k_funcinfo << endl;
- QString notKnown = i18n( "Not yet known" );
+ TQString notKnown = i18n( "Not yet known" );
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild( doc.createProcessingInstruction( "xml",
"version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement root = doc.createElement( "webpresence" );
+ TQDomElement root = doc.createElement( "webpresence" );
doc.appendChild( root );
// insert the current date/time
- QDomElement date = doc.createElement( "listdate" );
- QDomText t = doc.createTextNode(
- KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ TQDomElement date = doc.createElement( "listdate" );
+ TQDomText t = doc.createTextNode(
+ KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
date.appendChild( t );
root.appendChild( date );
// insert the user's name
- QDomElement name = doc.createElement( "name" );
- QDomText nameText;
+ TQDomElement name = doc.createElement( "name" );
+ TQDomText nameText;
if ( !useImName && !userName.isEmpty() )
nameText = doc.createTextNode( userName );
else
@@ -243,37 +243,37 @@ KTempFile* WebPresencePlugin::generateFile()
root.appendChild( name );
// insert the list of the user's accounts
- QDomElement accounts = doc.createElement( "accounts" );
+ TQDomElement accounts = doc.createElement( "accounts" );
root.appendChild( accounts );
- QPtrList<Kopete::Account> list = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> list = Kopete::AccountManager::self()->accounts();
// If no accounts, stop here
if ( !list.isEmpty() )
{
- for( QPtrListIterator<Kopete::Account> it( list );
+ for( TQPtrListIterator<Kopete::Account> it( list );
Kopete::Account *account=it.current();
++it )
{
- QDomElement acc = doc.createElement( "account" );
+ TQDomElement acc = doc.createElement( "account" );
//output += h.openTag( "account" );
- QDomElement protoName = doc.createElement( "protocol" );
- QDomText protoNameText = doc.createTextNode(
+ TQDomElement protoName = doc.createElement( "protocol" );
+ TQDomText protoNameText = doc.createTextNode(
account->protocol()->pluginId() );
protoName.appendChild( protoNameText );
acc.appendChild( protoName );
Kopete::Contact* me = account->myself();
- QString displayName = me->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
- QDomElement accName = doc.createElement( "accountname" );
- QDomText accNameText = doc.createTextNode( ( me )
+ TQString displayName = me->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
+ TQDomElement accName = doc.createElement( "accountname" );
+ TQDomText accNameText = doc.createTextNode( ( me )
? displayName
: notKnown );
accName.appendChild( accNameText );
acc.appendChild( accName );
- QDomElement accStatus = doc.createElement( "accountstatus" );
- QDomText statusText = doc.createTextNode( ( me )
+ TQDomElement accStatus = doc.createElement( "accountstatus" );
+ TQDomText statusText = doc.createTextNode( ( me )
? statusAsString( me->onlineStatus() )
: notKnown ) ;
accStatus.appendChild( statusText );
@@ -299,8 +299,8 @@ KTempFile* WebPresencePlugin::generateFile()
if ( showAddresses )
{
- QDomElement accAddress = doc.createElement( "accountaddress" );
- QDomText addressText = doc.createTextNode( ( me )
+ TQDomElement accAddress = doc.createElement( "accountaddress" );
+ TQDomText addressText = doc.createTextNode( ( me )
? me->contactId()
: notKnown );
accAddress.appendChild( addressText );
@@ -313,8 +313,8 @@ KTempFile* WebPresencePlugin::generateFile()
// write the XML to a temporary file
KTempFile* file = new KTempFile();
- QTextStream *stream = file->textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream *stream = file->textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
doc.save( *stream, 4 );
file->close();
return file;
@@ -327,7 +327,7 @@ bool WebPresencePlugin::transform( KTempFile * src, KTempFile * dest )
xmlSubstituteEntitiesDefault( 1 );
xmlLoadExtDtdDefaultValue = 1;
- QFile sheet;
+ TQFile sheet;
switch ( resultFormatting ) {
case WEB_XML:
@@ -374,7 +374,7 @@ bool WebPresencePlugin::transform( KTempFile * src, KTempFile * dest )
goto end;
}
- doc = xmlParseFile( QFile::encodeName( src->name() ) );
+ doc = xmlParseFile( TQFile::encodeName( src->name() ) );
if ( !doc ) {
kdDebug(14309) << k_funcinfo << "ERROR: XML parsing failed" << endl;
retval = false;
@@ -430,12 +430,12 @@ ProtocolList WebPresencePlugin::allProtocols()
return result;
}
-QString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus )
+TQString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus )
{
if (shuttingDown)
return "OFFLINE";
- QString status;
+ TQString status;
switch ( newStatus.status() )
{
case Kopete::OnlineStatus::Online:
diff --git a/kopete/plugins/webpresence/webpresenceplugin.h b/kopete/plugins/webpresence/webpresenceplugin.h
index 3aea9af0..6e8ba946 100644
--- a/kopete/plugins/webpresence/webpresenceplugin.h
+++ b/kopete/plugins/webpresence/webpresenceplugin.h
@@ -20,7 +20,7 @@
#ifndef WEBPRESENCEPLUGIN_H
#define WEBPRESENCEPLUGIN_H
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kio/job.h>
@@ -33,7 +33,7 @@ namespace Kopete { class MetaContact; }
class KToggleAction;
class KActionCollection;
-typedef QValueList<Kopete::Protocol*> ProtocolList;
+typedef TQValueList<Kopete::Protocol*> ProtocolList;
class WebPresencePlugin : public Kopete::Plugin
{
@@ -43,8 +43,8 @@ private:
int frequency;
bool showAddresses;
bool useImName;
- QString userName;
- QString userStyleSheet;
+ TQString userName;
+ TQString userStyleSheet;
bool useImagesInHTML;
// Is set to true when Kopete has notified us
@@ -59,10 +59,10 @@ private:
WEB_UNDEFINED
} resultFormatting;
- QString resultURL;
+ TQString resultURL;
public:
- WebPresencePlugin( QObject *parent, const char *name, const QStringList &args );
+ WebPresencePlugin( TQObject *parent, const char *name, const TQStringList &args );
virtual ~WebPresencePlugin();
virtual void aboutToUnload();
@@ -108,11 +108,11 @@ protected:
/**
* Converts numeric status to a string
*/
- QString statusAsString( const Kopete::OnlineStatus &newStatus );
+ TQString statusAsString( const Kopete::OnlineStatus &newStatus );
/**
* Schedules writes
*/
- QTimer* m_writeScheduler;
+ TQTimer* m_writeScheduler;
// The file to be uploaded to the WWW
KTempFile *m_output;
diff --git a/kopete/plugins/webpresence/webpresencepreferences.cpp b/kopete/plugins/webpresence/webpresencepreferences.cpp
index 9b00435a..8aebcd53 100644
--- a/kopete/plugins/webpresence/webpresencepreferences.cpp
+++ b/kopete/plugins/webpresence/webpresencepreferences.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kgenericfactory.h>
#include <kautoconfig.h>
@@ -27,19 +27,19 @@
typedef KGenericFactory<WebPresencePreferences> WebPresencePreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_webpresence, WebPresencePreferencesFactory("kcm_kopete_webpresence"))
-WebPresencePreferences::WebPresencePreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+WebPresencePreferences::WebPresencePreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCModule(WebPresencePreferencesFactory::instance(), parent, args)
{
// Add actuall widget generated from ui file.
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new WebPresencePrefsUI(this);
preferencesDialog->uploadURL->setMode( KFile::File );
preferencesDialog->formatStylesheetURL->setFilter( "*.xsl" );
// KAutoConfig stuff
kautoconfig = new KAutoConfig(KGlobal::config(), this, "kautoconfig");
- connect(kautoconfig, SIGNAL(widgetModified()), SLOT(widgetModified()));
- connect(kautoconfig, SIGNAL(settingsChanged()), SLOT(widgetModified()));
+ connect(kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(widgetModified()));
+ connect(kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified()));
kautoconfig->addWidget(preferencesDialog, "Web Presence Plugin");
kautoconfig->retrieveSettings(true);
}
diff --git a/kopete/plugins/webpresence/webpresencepreferences.h b/kopete/plugins/webpresence/webpresencepreferences.h
index 120e7a9a..8c272cdc 100644
--- a/kopete/plugins/webpresence/webpresencepreferences.h
+++ b/kopete/plugins/webpresence/webpresencepreferences.h
@@ -31,7 +31,7 @@ class WebPresencePreferences : public KCModule {
Q_OBJECT
public:
- WebPresencePreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ WebPresencePreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
virtual void save();
virtual void defaults();