diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-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 'ksirc')
163 files changed, 3198 insertions, 3198 deletions
diff --git a/ksirc/FilterRuleEditor.cpp b/ksirc/FilterRuleEditor.cpp index 08ac6584..a94c5d6d 100644 --- a/ksirc/FilterRuleEditor.cpp +++ b/ksirc/FilterRuleEditor.cpp @@ -9,10 +9,10 @@ #include "FilterRuleEditor.h" -#include <qregexp.h> -#include <qpushbutton.h> -#include <qlistbox.h> -#include <qlineedit.h> +#include <tqregexp.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> +#include <tqlineedit.h> #include <kapplication.h> #include <kconfig.h> @@ -23,7 +23,7 @@ FilterRuleEditor::FilterRuleEditor ( - QWidget* parent, + TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Filter Rules" ), @@ -37,20 +37,20 @@ FilterRuleEditor::FilterRuleEditor newHighlight(0); // ### split "OkPressed()" into 2 slots - connect( filter->ModifyButton, SIGNAL(clicked()), SLOT(OkPressed()) ); - connect( filter->InsertButton, SIGNAL(clicked()), SLOT(OkPressed()) ); + connect( filter->ModifyButton, TQT_SIGNAL(clicked()), TQT_SLOT(OkPressed()) ); + connect( filter->InsertButton, TQT_SIGNAL(clicked()), TQT_SLOT(OkPressed()) ); - connect( filter->NewButton, SIGNAL(clicked()), SLOT(newRule()) ); - connect( filter->DeleteButton, SIGNAL(clicked()), SLOT(deleteRule()) ); + connect( filter->NewButton, TQT_SIGNAL(clicked()), TQT_SLOT(newRule()) ); + connect( filter->DeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteRule()) ); - connect( filter->UpButton, SIGNAL(clicked()), SLOT(raiseRule()) ); - connect( filter->DownButton, SIGNAL(clicked()), SLOT(lowerRule()) ); + connect( filter->UpButton, TQT_SIGNAL(clicked()), TQT_SLOT(raiseRule()) ); + connect( filter->DownButton, TQT_SIGNAL(clicked()), TQT_SLOT(lowerRule()) ); - connect( filter->RuleList, SIGNAL(highlighted(int)), SLOT(newHighlight(int)) ); - connect( filter->RuleList, SIGNAL(selected(int)), SLOT(newHighlight(int)) ); + connect( filter->RuleList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(newHighlight(int)) ); + connect( filter->RuleList, TQT_SIGNAL(selected(int)), TQT_SLOT(newHighlight(int)) ); - filter->RuleList->setHScrollBarMode( QListBox::AlwaysOff ); + filter->RuleList->setHScrollBarMode( TQListBox::AlwaysOff ); filter->RuleList->setMultiSelection( FALSE ); filter->DownButton->setPixmap( BarIcon( "down", KIcon::SizeSmall ) ); @@ -64,10 +64,10 @@ FilterRuleEditor::~FilterRuleEditor() void FilterRuleEditor::newRule() { - filter->LineTitle->setText( QString::null ); - filter->LineSearch->setText( QString::null ); - filter->LineFrom->setText( QString::null ); - filter->LineTo->setText( QString::null ); + filter->LineTitle->setText( TQString::null ); + filter->LineSearch->setText( TQString::null ); + filter->LineFrom->setText( TQString::null ); + filter->LineTo->setText( TQString::null ); filter->LineTitle->setFocus(); filter->InsertButton->setEnabled( true ); @@ -92,10 +92,10 @@ void FilterRuleEditor::OkPressed() return; } - QString name = filter->LineTitle->text(); - QString search = filter->LineSearch->text(); - QString from = filter->LineFrom->text(); - QString to = filter->LineTo->text(); + TQString name = filter->LineTitle->text(); + TQString search = filter->LineSearch->text(); + TQString from = filter->LineFrom->text(); + TQString to = filter->LineTo->text(); if( name.isEmpty() || search.isEmpty() || from.isEmpty() || to.isEmpty() ){ KMessageBox::error(this, i18n("Cannot create the rule since not\n" @@ -104,7 +104,7 @@ void FilterRuleEditor::OkPressed() } else{ kConfig->setGroup("FilterRules"); - QString key; + TQString key; key.sprintf("name-%d", number); kConfig->writeEntry(key, convertSpecial(name)); key.sprintf("search-%d", number); @@ -126,7 +126,7 @@ void FilterRuleEditor::updateListBox(int citem ) filter->RuleList->clear(); for(; number > 0; number--){ - QString key; + TQString key; key.sprintf("name-%d", number); filter->RuleList->insertItem(kConfig->readEntry(key), 0); } @@ -144,8 +144,8 @@ void FilterRuleEditor::moveRule(int from, int to) { KConfig *kConfig = kapp->config(); kConfig->setGroup("FilterRules"); - QString src; - QString dest; + TQString src; + TQString dest; src.sprintf("name-%d", from); dest.sprintf("name-%d", to); kConfig->writeEntry(dest, kConfig->readEntry(src)); @@ -187,7 +187,7 @@ void FilterRuleEditor::newHighlight(int i) i++; KConfig *kConfig = kapp->config(); kConfig->setGroup("FilterRules"); - QString key; + TQString key; key.sprintf("name-%d", i); filter->LineTitle->setText(convertSpecialBack(kConfig->readEntry(key))); key.sprintf("search-%d", i); @@ -226,15 +226,15 @@ void FilterRuleEditor::lowerRule() } } -QString FilterRuleEditor::convertSpecial(QString str) +TQString FilterRuleEditor::convertSpecial(TQString str) { - str.replace(QRegExp("\\$"), "$$"); + str.replace(TQRegExp("\\$"), "$$"); return str; } -QString FilterRuleEditor::convertSpecialBack(QString str) +TQString FilterRuleEditor::convertSpecialBack(TQString str) { - str.replace(QRegExp("\\$\\$"), "$"); + str.replace(TQRegExp("\\$\\$"), "$"); return str; } diff --git a/ksirc/FilterRuleEditor.h b/ksirc/FilterRuleEditor.h index c9cf0437..b8bf1a0e 100644 --- a/ksirc/FilterRuleEditor.h +++ b/ksirc/FilterRuleEditor.h @@ -10,7 +10,7 @@ #ifndef FilterRuleEditor_h #define FilterRuleEditor_h -#include <qstring.h> +#include <tqstring.h> #include <kdialogbase.h> @@ -24,7 +24,7 @@ public: FilterRuleEditor ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -42,8 +42,8 @@ protected slots: protected: void updateListBox(int citem = 0); void moveRule(int, int); - QString convertSpecial(QString); - QString convertSpecialBack(QString); + TQString convertSpecial(TQString); + TQString convertSpecialBack(TQString); FilterRuleWidget *filter; }; diff --git a/ksirc/KSOpenkSirc/enter_combo.cpp b/ksirc/KSOpenkSirc/enter_combo.cpp index 3394423d..197f8f21 100644 --- a/ksirc/KSOpenkSirc/enter_combo.cpp +++ b/ksirc/KSOpenkSirc/enter_combo.cpp @@ -1,10 +1,10 @@ #include "enter_combo.h" -void EnterCombo::keyPressEvent( QKeyEvent *e ){ +void EnterCombo::keyPressEvent( TQKeyEvent *e ){ if(e->key() == Key_Return || e->key() == Key_Enter) emit(enterPressed()); else - QComboBox::keyPressEvent(e); + TQComboBox::keyPressEvent(e); } #include "enter_combo.moc" diff --git a/ksirc/KSOpenkSirc/enter_combo.h b/ksirc/KSOpenkSirc/enter_combo.h index f0752a2d..7af88d8f 100644 --- a/ksirc/KSOpenkSirc/enter_combo.h +++ b/ksirc/KSOpenkSirc/enter_combo.h @@ -1,29 +1,29 @@ #ifndef ENTER_COMBO_H #define ENTER_COMBO_H -#include <qcombobox.h> -#include <qevent.h> -#include <qkeycode.h> -#include <qlineedit.h> +#include <tqcombobox.h> +#include <tqevent.h> +#include <tqkeycode.h> +#include <tqlineedit.h> #undef KeyPress // X headers... -class EnterCombo : public QComboBox { +class EnterCombo : public TQComboBox { Q_OBJECT public: - EnterCombo ( QWidget * parent=0, const char * name=0 ) - : QComboBox(TRUE, parent, name) + EnterCombo ( TQWidget * parent=0, const char * name=0 ) + : TQComboBox(TRUE, parent, name) { } - EnterCombo ( bool rw, QWidget * parent=0, const char * name=0 ) - : QComboBox(rw, parent, name) + EnterCombo ( bool rw, TQWidget * parent=0, const char * name=0 ) + : TQComboBox(rw, parent, name) { - QKeyEvent ke(QEvent::KeyPress, SHIFT|Key_Home, 0, 0); + TQKeyEvent ke(TQEvent::KeyPress, SHIFT|Key_Home, 0, 0); keyPressEvent(&ke); } virtual void show(){ - QComboBox::show(); + TQComboBox::show(); lineEdit()->selectAll(); } @@ -31,7 +31,7 @@ signals: void enterPressed(); protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); }; #endif diff --git a/ksirc/KSOpenkSirc/open_ksirc.cpp b/ksirc/KSOpenkSirc/open_ksirc.cpp index 5a4a4799..d3ff7488 100644 --- a/ksirc/KSOpenkSirc/open_ksirc.cpp +++ b/ksirc/KSOpenkSirc/open_ksirc.cpp @@ -12,11 +12,11 @@ #include "serverFileParser.h" #include "enter_combo.h" #include "../ksircserver.h" -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qdict.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqdict.h> #include <stdlib.h> #include <unistd.h> @@ -28,14 +28,14 @@ #include <kmessagebox.h> #include <kmdcodec.h> -QPtrList<Server> Groups; +TQPtrList<Server> Groups; #undef Inherited #define Inherited open_ksircData open_ksirc::open_ksirc ( - QWidget* parent, + TQWidget* parent, const char* name ) : @@ -47,7 +47,7 @@ open_ksirc::open_ksirc // if it don't exist use $KDEDIR/share/apps/ksirc/servers.txt // changes are written to ~/.kde/share/apps/ksirc/servers.txt - QString filename = locate("appdata", "servers.txt"); + TQString filename = locate("appdata", "servers.txt"); serverFileParser::readDatafile( filename ); Groups.setAutoDelete(TRUE); @@ -66,29 +66,29 @@ open_ksirc::open_ksirc KConfig *conf = kapp->config(); conf->setGroup("ServerList"); CheckB_StorePassword->setChecked( conf->readBoolEntry("StorePasswords") ); - QStringList recent = conf->readListEntry("RecentServers"); - for(QStringList::ConstIterator it = recent.begin(); it != recent.end(); ++it){ + TQStringList recent = conf->readListEntry("RecentServers"); + for(TQStringList::ConstIterator it = recent.begin(); it != recent.end(); ++it){ if(conf->hasGroup("RecentServer-" + *it)){ conf->setGroup("RecentServer-" + *it); - QPtrList<port> rp; + TQPtrList<port> rp; rp.inSort(new port(conf->readEntry("Port", "6667"))); - QString password = decryptPassword(conf->readEntry("Password")); + TQString password = decryptPassword(conf->readEntry("Password")); bool ssl = conf->readBoolEntry("SSL"); Groups.insert(0, new Server(i18n("Recent"), *it, rp, i18n("Recent Server"), "", password, ssl)); } else { - QStringList info = QStringList::split(":", *it); + TQStringList info = TQStringList::split(":", *it); if (info.isEmpty()) continue; - QString name = info[0]; - QPtrList<port> rp; + TQString name = info[0]; + TQPtrList<port> rp; if (info.count() > 1) rp.inSort(new port(info[1])); else rp.inSort(new port("6667")); - QString password; + TQString password; if (info.count() > 2) password = decryptPassword(info[2]); @@ -107,24 +107,24 @@ open_ksirc::open_ksirc insertGroupList(); - QString blah = i18n("Recent"); + TQString blah = i18n("Recent"); setGroup(blah); - connect(ComboB_ServerGroup, SIGNAL(activated( const QString& )), - this, SLOT(setGroup( const QString& ))); - connect(ComboB_ServerName, SIGNAL(activated( const QString& )), - this, SLOT(setServer( const QString& ))); + connect(ComboB_ServerGroup, TQT_SIGNAL(activated( const TQString& )), + this, TQT_SLOT(setGroup( const TQString& ))); + connect(ComboB_ServerName, TQT_SIGNAL(activated( const TQString& )), + this, TQT_SLOT(setServer( const TQString& ))); - connect(PB_Connect, SIGNAL(clicked()), this, SLOT(clickConnect())); - connect(PB_Edit, SIGNAL(clicked()), this, SLOT(clickEdit())); - connect(PB_Cancel, SIGNAL(clicked()), this, SLOT(clickCancel())); + connect(PB_Connect, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickConnect())); + connect(PB_Edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickEdit())); + connect(PB_Cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickCancel())); PB_Connect->setDefault(TRUE); PB_Connect->setAutoDefault(TRUE); PB_Edit->setEnabled(false); // Not yet implemented. ComboB_ServerName->setFocus(); - connect(ComboB_ServerName, SIGNAL(enterPressed()), this, SLOT(clickConnect())); + connect(ComboB_ServerName, TQT_SIGNAL(enterPressed()), this, TQT_SLOT(clickConnect())); } // insert a sorted list of groups into ComboB_ServerGroup, note that @@ -133,7 +133,7 @@ open_ksirc::open_ksirc void open_ksirc::insertGroupList() { - QStrList tempgroups; + TQStrList tempgroups; Server *serv; for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) { @@ -154,7 +154,7 @@ void open_ksirc::insertGroupList() void open_ksirc::insertServerList( const char * group ) { - QListBox *newListBox = new QListBox(); + TQListBox *newListBox = new TQListBox(); Server *serv; for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) { @@ -174,11 +174,11 @@ void open_ksirc::insertServerList( const char * group ) // note that this only takes the first occurrance if there is two // entiies with the same server. -void open_ksirc::setServer( const QString &serveraddress ) +void open_ksirc::setServer( const TQString &serveraddress ) { - QListBox *newListBox = new QListBox(); + TQListBox *newListBox = new TQListBox(); Server *serv; - QPtrList<port> portlist; + TQPtrList<port> portlist; port *p; bool defaultport = FALSE; @@ -209,7 +209,7 @@ void open_ksirc::setServer( const QString &serveraddress ) // Sets the server description if the isn't one set it to "Not Available" -void open_ksirc::setServerDesc( QString description ) +void open_ksirc::setServerDesc( TQString description ) { if (description.isNull() || description.isEmpty()) { Label_ServerDesc->setText( i18n("Not available")); @@ -224,34 +224,34 @@ void open_ksirc::setServerDesc( QString description ) // and then each byte of the UTF-8 password is xored with the corresponding // byte of the random string. The returned value is a base64 encoding of // that random string followed by the scrambled password. -QString open_ksirc::encryptPassword( const QString &password ) +TQString open_ksirc::encryptPassword( const TQString &password ) { - QCString utf8 = password.utf8(); + TQCString utf8 = password.utf8(); // Can contain NULL bytes after XORing unsigned int utf8Length(utf8.length()); - QByteArray result(utf8Length << 1); + TQByteArray result(utf8Length << 1); memcpy(result.data(), kapp->randomString(utf8Length).latin1(), utf8Length); for (unsigned int i = 0; i < utf8Length; ++i) result[i + utf8Length] = utf8[i] ^ result[i]; - return QString::fromLatin1(KCodecs::base64Encode(result)); + return TQString::fromLatin1(KCodecs::base64Encode(result)); } -QString open_ksirc::decryptPassword( const QString &scrambled ) +TQString open_ksirc::decryptPassword( const TQString &scrambled ) { - QByteArray base64, orig; + TQByteArray base64, orig; base64.duplicate(scrambled.latin1(), scrambled.length()); KCodecs::base64Decode(base64, orig); - QCString result; + TQCString result; for (unsigned int i = 0; i < (orig.size() >> 1); ++i) result += orig[i] ^ orig[i + (orig.size() >> 1)]; - return QString::fromUtf8(result); + return TQString::fromUtf8(result); } -void open_ksirc::setGroup( const QString &group ) +void open_ksirc::setGroup( const TQString &group ) { insertServerList( group ); if (ComboB_ServerName->count() > 0) { - QString blah = QString(ComboB_ServerName->text( 0 )); + TQString blah = TQString(ComboB_ServerName->text( 0 )); setServer(blah); } else { setServerDesc( "" ); @@ -272,9 +272,9 @@ void open_ksirc::clickConnect() return; } - QString server; - QString port; - QString script; + TQString server; + TQString port; + TQString script; Server *serv; KConfig *conf = kapp->config(); @@ -296,7 +296,7 @@ void open_ksirc::clickConnect() if(port.isEmpty()) port = "6667"; - QString plain, scrambled; + TQString plain, scrambled; if (!LineE_Password->text().isEmpty()) { plain = LineE_Password->text(); @@ -306,9 +306,9 @@ void open_ksirc::clickConnect() conf->setGroup("ServerList"); conf->writeEntry("StorePasswords", CheckB_StorePassword->isChecked()); - QStringList recent = conf->readListEntry("RecentServers"); + TQStringList recent = conf->readListEntry("RecentServers"); if(recent.contains(server)){ - QStringList::Iterator it = recent.find(server); + TQStringList::Iterator it = recent.find(server); recent.remove(it); } @@ -320,10 +320,10 @@ void open_ksirc::clickConnect() //scrambled is now "server:port" or "server:port:scrambledpass" if //a password was given and "store password" is checked - for (QStringList::Iterator it = recent.begin(); it != recent.end(); ) { + for (TQStringList::Iterator it = recent.begin(); it != recent.end(); ) { if ((*it).startsWith(server)) // ignore password { - QStringList::Iterator del = it++; + TQStringList::Iterator del = it++; recent.remove(del); } else @@ -362,7 +362,7 @@ void open_ksirc::clickEdit() // TODO open new server editor } -void open_ksirc::passwordChanged( const QString& password ) +void open_ksirc::passwordChanged( const TQString& password ) { CheckB_StorePassword->setEnabled( !password.isEmpty() ); } diff --git a/ksirc/KSOpenkSirc/open_ksirc.h b/ksirc/KSOpenkSirc/open_ksirc.h index 81145fca..29fb4f60 100644 --- a/ksirc/KSOpenkSirc/open_ksirc.h +++ b/ksirc/KSOpenkSirc/open_ksirc.h @@ -12,7 +12,7 @@ #include "open_ksircData.h" -#include <qdict.h> +#include <tqdict.h> class KSircServer; @@ -24,26 +24,26 @@ public: open_ksirc ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); virtual ~open_ksirc(); protected slots: - void setGroup( const QString& ); - void setServer( const QString& ); + void setGroup( const TQString& ); + void setServer( const TQString& ); void clickConnect(); void clickCancel(); void clickEdit(); - void passwordChanged( const QString& ); + void passwordChanged( const TQString& ); private: void insertGroupList(); void insertServerList( const char * ); - void setServerDesc( QString ); - QString encryptPassword( const QString & ); - QString decryptPassword( const QString & ); + void setServerDesc( TQString ); + TQString encryptPassword( const TQString & ); + TQString decryptPassword( const TQString & ); signals: // void open_ksircprocess( const char *, int, const char * ); diff --git a/ksirc/KSOpenkSirc/serverDataType.h b/ksirc/KSOpenkSirc/serverDataType.h index 80b94e27..157be09e 100644 --- a/ksirc/KSOpenkSirc/serverDataType.h +++ b/ksirc/KSOpenkSirc/serverDataType.h @@ -1,18 +1,18 @@ #ifndef SERVERDATATYPE_H #define SERVERDATATYPE_H -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> class port { public: - port( const QString &portnum ) { p=portnum; } - QString portnum() const { return p; } + port( const TQString &portnum ) { p=portnum; } + TQString portnum() const { return p; } private: - QString p; + TQString p; }; @@ -21,12 +21,12 @@ class Server { public: - Server( const QString &group, - const QString &server, - QPtrList<port> ports, - const QString &serverdesc, - const QString &script, - const QString &password = QString::null, + Server( const TQString &group, + const TQString &server, + TQPtrList<port> ports, + const TQString &serverdesc, + const TQString &script, + const TQString &password = TQString::null, bool dossl = false ) { g=group; s=server; p=ports; sd=serverdesc; sc=script; @@ -34,21 +34,21 @@ public: ssl = dossl; p.setAutoDelete(TRUE); } - QString group() const { return g; } - QString server() const { return s; } - QPtrList<port> ports() const { return p; } - QString serverdesc() const { return sd; } - QString script() const { return sc; } - QString password() const { return pass; } + TQString group() const { return g; } + TQString server() const { return s; } + TQPtrList<port> ports() const { return p; } + TQString serverdesc() const { return sd; } + TQString script() const { return sc; } + TQString password() const { return pass; } bool usessl() const { return ssl; } private: - QString g; - QString s; - QPtrList<port> p; - QString sd; - QString sc; - QString pass; + TQString g; + TQString s; + TQPtrList<port> p; + TQString sd; + TQString sc; + TQString pass; bool ssl; }; diff --git a/ksirc/KSOpenkSirc/serverFileParser.cpp b/ksirc/KSOpenkSirc/serverFileParser.cpp index 8e6ba80e..10960650 100644 --- a/ksirc/KSOpenkSirc/serverFileParser.cpp +++ b/ksirc/KSOpenkSirc/serverFileParser.cpp @@ -1,12 +1,12 @@ #include "serverFileParser.h" #include "serverDataType.h" -#include <qfile.h> +#include <tqfile.h> #include <stdlib.h> #include <kstandarddirs.h> #include <kdebug.h> -extern QPtrList<Server> Groups; +extern TQPtrList<Server> Groups; // Opens, reads and parses server information from a server file, // sets the information in the global variable and returns 1 if @@ -16,30 +16,30 @@ int serverFileParser::readDatafile( const char *fileName ) { Groups.setAutoDelete( TRUE ); Groups.clear(); - QFile serverFile( fileName ); + TQFile serverFile( fileName ); if ( !serverFile.open( IO_ReadOnly ) ) return -1; - QTextStream fileStream(&serverFile); + TQTextStream fileStream(&serverFile); // the file is layed out as follows: // service:servername:serveraddress:ports:script: // so we parse it this way while( !fileStream.eof() ) { - QString str = fileStream.readLine(); + TQString str = fileStream.readLine(); const char *strC = str.ascii(); char *token; char groupC[1024], servernameC[1024], serveraddressC[1024], portsC[1024]; int pos = 0; - QString group; - QString servername; - QString serveraddress; - QPtrList<port> ports; - QString script; + TQString group; + TQString servername; + TQString serveraddress; + TQPtrList<port> ports; + TQString script; - QString buf; - QString portbuff; + TQString buf; + TQString portbuff; pos = sscanf(strC, "%1023[^:]:%1024[^:]:%1023[^:]:%1023[^:]:", groupC, servernameC, serveraddressC, portsC); if(pos != 4){ @@ -109,6 +109,6 @@ int serverFileParser::readDatafile( const char *fileName ) int writeDataFile() { - QString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt"); + TQString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt"); return 1; } diff --git a/ksirc/KSOpenkSirc/serverFileParser.h b/ksirc/KSOpenkSirc/serverFileParser.h index f3fd67e1..f17884c5 100644 --- a/ksirc/KSOpenkSirc/serverFileParser.h +++ b/ksirc/KSOpenkSirc/serverFileParser.h @@ -1,7 +1,7 @@ #ifndef serverFileParser_included #define serverFileParser_included -#include <qobject.h> +#include <tqobject.h> class serverFileParser { diff --git a/ksirc/KSPrefs/ksprefs.cpp b/ksirc/KSPrefs/ksprefs.cpp index 2bf97e84..40ccc56f 100644 --- a/ksirc/KSPrefs/ksprefs.cpp +++ b/ksirc/KSPrefs/ksprefs.cpp @@ -7,7 +7,7 @@ * * ***************************************************************************/ -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kiconloader.h> @@ -26,37 +26,37 @@ #include "page_looknfeel.h" #include "page_shortcuts.h" -KSPrefs::KSPrefs(QWidget * parent, const char * name): +KSPrefs::KSPrefs(TQWidget * parent, const char * name): KDialogBase(KDialogBase::IconList, i18n("Configure KSirc"), KDialogBase::Help | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Default, KDialogBase::Ok, parent, name) { setWFlags( getWFlags() | WDestructiveClose ); - QFrame *itemLooknFeel= addPage( i18n( "Look and Feel" ), i18n( "Controls how kSirc looks" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); - QFrame *itemGeneral = addPage( i18n( "General" ), i18n( "General KSirc Settings" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); - QFrame *itemStartup = addPage( i18n( "Startup" ), i18n( "KSirc Startup Settings" ), BarIcon( "gear", KIcon::SizeMedium ) ); - QFrame *itemColors = addPage( i18n( "Colors" ), i18n( "KSirc Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); - QFrame *itemIRCColors = addPage( i18n( "IRC Colors" ), i18n( "KSirc IRC Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); + TQFrame *itemLooknFeel= addPage( i18n( "Look and Feel" ), i18n( "Controls how kSirc looks" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); + TQFrame *itemGeneral = addPage( i18n( "General" ), i18n( "General KSirc Settings" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); + TQFrame *itemStartup = addPage( i18n( "Startup" ), i18n( "KSirc Startup Settings" ), BarIcon( "gear", KIcon::SizeMedium ) ); + TQFrame *itemColors = addPage( i18n( "Colors" ), i18n( "KSirc Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); + TQFrame *itemIRCColors = addPage( i18n( "IRC Colors" ), i18n( "KSirc IRC Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); - QFrame *itemRMBMenu = addPage( i18n( "User Menu" ), i18n( "User Menu Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QFrame *itemServChan = addPage( i18n( "Server/Channel" ), i18n( "Server/Channel Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QFrame *itemAutoConnect = addPage( i18n( "Auto Connect" ), i18n( "Auto Connect Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QFrame *itemFont = addPage( i18n( "Fonts" ), i18n( "Font Settings" ), BarIcon( "fonts", KIcon::SizeMedium ) ); - QFrame *itemShortcuts = addPage( i18n( "Shortcuts" ), i18n( "Shortcut Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemRMBMenu = addPage( i18n( "User Menu" ), i18n( "User Menu Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemServChan = addPage( i18n( "Server/Channel" ), i18n( "Server/Channel Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemAutoConnect = addPage( i18n( "Auto Connect" ), i18n( "Auto Connect Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemFont = addPage( i18n( "Fonts" ), i18n( "Font Settings" ), BarIcon( "fonts", KIcon::SizeMedium ) ); + TQFrame *itemShortcuts = addPage( i18n( "Shortcuts" ), i18n( "Shortcut Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QVBoxLayout *fontTopLayout = new QVBoxLayout( itemFont, 0, 6 ); + TQVBoxLayout *fontTopLayout = new TQVBoxLayout( itemFont, 0, 6 ); - QVBoxLayout *looknfeelTopLayout= new QVBoxLayout( itemLooknFeel, 0, 6 ); - QVBoxLayout *generalTopLayout = new QVBoxLayout( itemGeneral, 0, 6 ); - QVBoxLayout *startupTopLayout = new QVBoxLayout( itemStartup, 0, 6 ); - QVBoxLayout *colorsTopLayout = new QVBoxLayout( itemColors, 0, 6 ); - QVBoxLayout *ircColorsTopLayout = new QVBoxLayout( itemIRCColors, 0, 6 ); + TQVBoxLayout *looknfeelTopLayout= new TQVBoxLayout( itemLooknFeel, 0, 6 ); + TQVBoxLayout *generalTopLayout = new TQVBoxLayout( itemGeneral, 0, 6 ); + TQVBoxLayout *startupTopLayout = new TQVBoxLayout( itemStartup, 0, 6 ); + TQVBoxLayout *colorsTopLayout = new TQVBoxLayout( itemColors, 0, 6 ); + TQVBoxLayout *ircColorsTopLayout = new TQVBoxLayout( itemIRCColors, 0, 6 ); - QVBoxLayout *rmbMenuTopLayout = new QVBoxLayout( itemRMBMenu, 0, 6 ); - QVBoxLayout *servChanTopLayout = new QVBoxLayout( itemServChan, 0, 6 ); - QVBoxLayout *autoConnectTopLayout = new QVBoxLayout( itemAutoConnect, 0, 6 ); - QVBoxLayout *autoShortcutsTopLayout = new QVBoxLayout( itemShortcuts, 0, 6 ); + TQVBoxLayout *rmbMenuTopLayout = new TQVBoxLayout( itemRMBMenu, 0, 6 ); + TQVBoxLayout *servChanTopLayout = new TQVBoxLayout( itemServChan, 0, 6 ); + TQVBoxLayout *autoConnectTopLayout = new TQVBoxLayout( itemAutoConnect, 0, 6 ); + TQVBoxLayout *autoShortcutsTopLayout = new TQVBoxLayout( itemShortcuts, 0, 6 ); pageLooknFeel= new PageLooknFeel( itemLooknFeel ); pageGeneral = new PageGeneral( itemGeneral ); @@ -69,20 +69,20 @@ KSPrefs::KSPrefs(QWidget * parent, const char * name): pageAutoConnect = new PageAutoConnect( itemAutoConnect ); pageShortcuts = new PageShortcuts( itemShortcuts ); - connect(pageLooknFeel, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageGeneral, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageStartup, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageColors, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageIRCColors, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageFont, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageRMBMenu, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageServChan, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageAutoConnect, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageShortcuts, SIGNAL( modified() ), SLOT( modified() ) ); - - connect(this, SIGNAL( applyClicked() ), this, SLOT( saveConfig() ) ); - connect(this, SIGNAL( okClicked() ), this, SLOT( saveConfig() ) ); - connect(this, SIGNAL( defaultClicked() ), this, SLOT(defaultConfig() ) ); + connect(pageLooknFeel, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageGeneral, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageStartup, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageColors, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageIRCColors, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageFont, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageRMBMenu, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageServChan, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageAutoConnect, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageShortcuts, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + + connect(this, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( saveConfig() ) ); + connect(this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( saveConfig() ) ); + connect(this, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT(defaultConfig() ) ); looknfeelTopLayout->addWidget( pageLooknFeel ); generalTopLayout->addWidget( pageGeneral ); diff --git a/ksirc/KSPrefs/ksprefs.h b/ksirc/KSPrefs/ksprefs.h index 6c41fd9a..1e5beaf0 100644 --- a/ksirc/KSPrefs/ksprefs.h +++ b/ksirc/KSPrefs/ksprefs.h @@ -30,7 +30,7 @@ class KSPrefs : public KDialogBase Q_OBJECT public: - KSPrefs(QWidget * parent = 0, const char * name = 0); + KSPrefs(TQWidget * parent = 0, const char * name = 0); ~KSPrefs(); public slots: diff --git a/ksirc/KSPrefs/page_autoconnect.cpp b/ksirc/KSPrefs/page_autoconnect.cpp index a6532915..c9ab585d 100644 --- a/ksirc/KSPrefs/page_autoconnect.cpp +++ b/ksirc/KSPrefs/page_autoconnect.cpp @@ -10,12 +10,12 @@ #include "page_autoconnect.h" -#include <qregexp.h> +#include <tqregexp.h> #include <klocale.h> #include <klistview.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> #include <kapplication.h> #include <kconfig.h> #include <kdebug.h> @@ -26,7 +26,7 @@ #define PASS 2 #define SSL 3 -PageAutoConnect::PageAutoConnect( QWidget *parent, const char *name ) : PageAutoConnectBase( parent, name) +PageAutoConnect::PageAutoConnect( TQWidget *parent, const char *name ) : PageAutoConnectBase( parent, name) { KLVAutoConnect->setSorting( 0 ); //KLVAutoConnect->header()->hide(); @@ -46,34 +46,34 @@ void PageAutoConnect::saveConfig() KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers; + TQStringList servers; - for(QListViewItem *it = KLVAutoConnect->firstChild(); + for(TQListViewItem *it = KLVAutoConnect->firstChild(); it != 0; it = it->nextSibling()){ - QString server = it->text(NAME); + TQString server = it->text(NAME); if(it->text(PK).length() > 0) server += ":" + it->text(1); if(it->text(SSL).length() > 0) server += " (SSL)"; if(it->text(PASS).length() > 0) - server += QString(" (pass: %1)").arg(it->text(PASS)); + server += TQString(" (pass: %1)").arg(it->text(PASS)); servers << server; - QStringList channels; + TQStringList channels; - for(QListViewItem *ch = it->firstChild(); + for(TQListViewItem *ch = it->firstChild(); ch != 0; ch = ch->nextSibling()){ - QString channel; + TQString channel; channel = ch->text(NAME); if(ch->text(PK).length() > 0) - channel += QString(" (key: %1)").arg(ch->text(PK)); + channel += TQString(" (key: %1)").arg(ch->text(PK)); channels << channel; @@ -94,17 +94,17 @@ void PageAutoConnect::readConfig() { KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); servers.sort(); - QStringList::ConstIterator ser = servers.begin(); + TQStringList::ConstIterator ser = servers.begin(); for( ; ser != servers.end(); ser++){ - QStringList channels = conf->readListEntry(*ser); - QString server = *ser; - QString port = "6667"; - QString ssl = QString::null; - QString pass = QString::null; + TQStringList channels = conf->readListEntry(*ser); + TQString server = *ser; + TQString port = "6667"; + TQString ssl = TQString::null; + TQString pass = TQString::null; - QRegExp rx("(.+) \\(SSL\\)(.*)"); + TQRegExp rx("(.+) \\(SSL\\)(.*)"); if(rx.search(server) >= 0){ server = rx.cap(1) + rx.cap(3); ssl = i18n("SSL"); @@ -121,19 +121,19 @@ void PageAutoConnect::readConfig() port = rx.cap(2); } kdDebug(5008) << server << ": Done " << port << " " << ssl << " " << pass << endl; - QListViewItem *s = new QListViewItem(KLVAutoConnect, server, port, pass, ssl); + TQListViewItem *s = new TQListViewItem(KLVAutoConnect, server, port, pass, ssl); s->setOpen(TRUE); channels.sort(); - QStringList::ConstIterator chan = channels.begin(); + TQStringList::ConstIterator chan = channels.begin(); for(; chan != channels.end(); chan++){ - QString channel = *chan; - QString key = QString::null; - QRegExp crx("(.+) \\(key: (\\S+)\\)"); + TQString channel = *chan; + TQString key = TQString::null; + TQRegExp crx("(.+) \\(key: (\\S+)\\)"); if(crx.search(channel) >= 0){ channel = crx.cap(1); key = crx.cap(2); } - new QListViewItem(s, channel, key); + new TQListViewItem(s, channel, key); } } } @@ -152,26 +152,26 @@ void PageAutoConnect::changed() void PageAutoConnect::add_pressed() { int fnd = 0; - QListViewItem *s = 0; + TQListViewItem *s = 0; s = KLVAutoConnect->selectedItem(); if(!s){ /* new item */ - QString server = ServerLE->text(); - QString ssl = QString::null; - QString port; + TQString server = ServerLE->text(); + TQString ssl = TQString::null; + TQString port; port.setNum(PortKI->value()); if(sslCB->isChecked()) ssl = i18n("SSL"); - s = new QListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl); + s = new TQListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl); s->setOpen(TRUE); - s = new QListViewItem(s, ChannelLE->text(), KeyLE->text()); + s = new TQListViewItem(s, ChannelLE->text(), KeyLE->text()); KLVAutoConnect->setCurrentItem(s); } else { /* update the existing one */ - QListViewItem *parent; - QListViewItem *child; + TQListViewItem *parent; + TQListViewItem *child; if(s->parent()){ parent = s->parent(); @@ -183,12 +183,12 @@ void PageAutoConnect::add_pressed() } parent->setText(NAME, ServerLE->text()); - parent->setText(PK, QString("%1").arg(PortKI->value())); + parent->setText(PK, TQString("%1").arg(PortKI->value())); parent->setText(PASS, PassLE->text()); if(sslCB->isChecked()) parent->setText(SSL, i18n("SSL")); else - parent->setText(SSL, QString::null); + parent->setText(SSL, TQString::null); if(child){ child->setText(NAME, ChannelLE->text()); @@ -197,7 +197,7 @@ void PageAutoConnect::add_pressed() else { if(ChannelLE->text().length() > 0){ fnd = 0; - QListViewItem *c = parent->firstChild(); + TQListViewItem *c = parent->firstChild(); for( ; c != 0 && fnd == 0; c = c->nextSibling()){ if(c->text(NAME) == ChannelLE->text()){ c->setText(PK, KeyLE->text()); @@ -205,7 +205,7 @@ void PageAutoConnect::add_pressed() } } if(fnd == 0){ - new QListViewItem(parent, ChannelLE->text(), KeyLE->text()); + new TQListViewItem(parent, ChannelLE->text(), KeyLE->text()); } } } @@ -228,13 +228,13 @@ void PageAutoConnect::new_pressed() void PageAutoConnect::delete_pressed() { - for(QListViewItem *it = KLVAutoConnect->firstChild(); + for(TQListViewItem *it = KLVAutoConnect->firstChild(); it != 0; it = it->nextSibling()){ if(it->text(NAME) == ServerLE->text()){ if(ChannelLE->text().isEmpty() == FALSE){ - for(QListViewItem *ch = it->firstChild(); + for(TQListViewItem *ch = it->firstChild(); ch != 0; ch = ch->nextSibling()){ if(ch->text(NAME) == ChannelLE->text()){ @@ -257,7 +257,7 @@ void PageAutoConnect::delete_pressed() changed(); } -void PageAutoConnect::kvl_clicked(QListViewItem *it) +void PageAutoConnect::kvl_clicked(TQListViewItem *it) { if(it != 0){ if(it->parent() != 0){ diff --git a/ksirc/KSPrefs/page_autoconnect.h b/ksirc/KSPrefs/page_autoconnect.h index efd9a4ed..04b5b821 100644 --- a/ksirc/KSPrefs/page_autoconnect.h +++ b/ksirc/KSPrefs/page_autoconnect.h @@ -9,7 +9,7 @@ class PageAutoConnect : public PageAutoConnectBase Q_OBJECT public: - PageAutoConnect( QWidget* parent = 0, const char* name = 0); + PageAutoConnect( TQWidget* parent = 0, const char* name = 0); ~PageAutoConnect(); void saveConfig(); @@ -29,7 +29,7 @@ protected slots: virtual void new_pressed(); virtual void delete_pressed(); - virtual void kvl_clicked(QListViewItem *); + virtual void kvl_clicked(TQListViewItem *); }; diff --git a/ksirc/KSPrefs/page_colors.cpp b/ksirc/KSPrefs/page_colors.cpp index f6d68a52..e7b36af4 100644 --- a/ksirc/KSPrefs/page_colors.cpp +++ b/ksirc/KSPrefs/page_colors.cpp @@ -9,17 +9,17 @@ #include "page_colors.h" -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qradiobutton.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqradiobutton.h> +#include <tqlabel.h> #include <kconfig.h> #include <kapplication.h> #include <kcolorbutton.h> #include <kdebug.h> -PageColors::PageColors( QWidget *parent, const char *name ) : PageColorsBase( parent, name) +PageColors::PageColors( TQWidget *parent, const char *name ) : PageColorsBase( parent, name) { changing = 0; m_dcol.setAutoDelete(true); @@ -52,13 +52,13 @@ void PageColors::saveConfig() } else if(autoOtherColRB->isChecked()){ ksopts->nickColourization = true; - ksopts->nickForeground = QColor(); - ksopts->nickBackground = QColor(); + ksopts->nickForeground = TQColor(); + ksopts->nickBackground = TQColor(); } else { ksopts->nickColourization = false; - ksopts->nickForeground = QColor(); - ksopts->nickBackground = QColor(); + ksopts->nickForeground = TQColor(); + ksopts->nickBackground = TQColor(); } ksopts->msgContainNick = ownContainNickCBtn->color(); @@ -68,7 +68,7 @@ void PageColors::saveConfig() ksopts->msg1Regex = msg1Regex->isChecked(); } else { - ksopts->msg1Contain = QColor(); + ksopts->msg1Contain = TQColor(); ksopts->msg1String = msg1LE->text(); ksopts->msg1Regex = false; } @@ -78,7 +78,7 @@ void PageColors::saveConfig() ksopts->msg2Regex = msg2Regex->isChecked(); } else { - ksopts->msg2Contain = QColor(); + ksopts->msg2Contain = TQColor(); ksopts->msg2String = msg2LE->text(); ksopts->msg2Regex = false; } @@ -88,8 +88,8 @@ void PageColors::saveConfig() ksopts->colourTheme = themeLB->currentText(); KConfig *conf = kapp->config(); - QDictIterator<KSOColors> it(m_dcol); - QStringList names; + TQDictIterator<KSOColors> it(m_dcol); + TQStringList names; for(; it.current(); ++it){ names << it.currentKey(); conf->setGroup("ColourSchemes-"+ it.currentKey()); @@ -128,8 +128,8 @@ void PageColors::readConfig( const KSOColors *opts ) if( opts->nickColourization ){ autoOtherColRB->setChecked( true ); - nickFGCBtn->setColor( QColor() ); - nickBGCBtn->setColor( QColor() ); + nickFGCBtn->setColor( TQColor() ); + nickBGCBtn->setColor( TQColor() ); } else if( opts->nickForeground.isValid() || @@ -140,8 +140,8 @@ void PageColors::readConfig( const KSOColors *opts ) } else { noOtherColRB->setChecked( true ); - nickFGCBtn->setColor( QColor() ); - nickBGCBtn->setColor( QColor() ); + nickFGCBtn->setColor( TQColor() ); + nickBGCBtn->setColor( TQColor() ); } @@ -161,7 +161,7 @@ void PageColors::readConfig( const KSOColors *opts ) KConfig *conf = kapp->config(); conf->setGroup("ColourSchemes"); themeLB->clear(); - QStringList names = conf->readListEntry("Names"); + TQStringList names = conf->readListEntry("Names"); if(names.contains("Custom")){ names.remove(names.find("Custom")); } @@ -175,7 +175,7 @@ void PageColors::readConfig( const KSOColors *opts ) m_dcol.clear(); - QStringList::Iterator it = names.begin(); + TQStringList::Iterator it = names.begin(); for( ; it != names.end(); ++it){ conf->setGroup("ColourSchemes-"+ *it); m_dcol.insert(*it, new KSOColors); @@ -207,12 +207,12 @@ void PageColors::changed() emit modified(); } -void PageColors::theme_clicked(QListBoxItem *li) +void PageColors::theme_clicked(TQListBoxItem *li) { if(li == 0x0) return; - QString name = li->text(); + TQString name = li->text(); changing = 1; backCBtn->setColor( m_dcol[name]->backgroundColor ); @@ -239,7 +239,7 @@ void PageColors::themeNewPB_clicked() void PageColors::themeAddPB_clicked() { - QString name = themeLE->text(); + TQString name = themeLE->text(); kdDebug(5008) << "Got add: " << themeLB->currentText() << endl; diff --git a/ksirc/KSPrefs/page_colors.h b/ksirc/KSPrefs/page_colors.h index 188fe0a8..5401aecc 100644 --- a/ksirc/KSPrefs/page_colors.h +++ b/ksirc/KSPrefs/page_colors.h @@ -13,16 +13,16 @@ #include "page_colorsbase.h" #include "ksopts.h" -#include <qlistbox.h> -#include <qstringlist.h> -#include <qdict.h> +#include <tqlistbox.h> +#include <tqstringlist.h> +#include <tqdict.h> class PageColors : public PageColorsBase { Q_OBJECT public: - PageColors( QWidget *parent = 0, const char *name = 0 ); + PageColors( TQWidget *parent = 0, const char *name = 0 ); ~PageColors(); void saveConfig(); @@ -33,7 +33,7 @@ protected slots: void changed(); public slots: - virtual void theme_clicked(QListBoxItem*); + virtual void theme_clicked(TQListBoxItem*); virtual void themeNewPB_clicked(); virtual void themeAddPB_clicked(); virtual void themeDelPB_clicked(); @@ -47,7 +47,7 @@ private: private: int changing; - QDict<KSOColors> m_dcol; + TQDict<KSOColors> m_dcol; }; #endif diff --git a/ksirc/KSPrefs/page_font.cpp b/ksirc/KSPrefs/page_font.cpp index e9f9e0e6..5ea0dd9b 100644 --- a/ksirc/KSPrefs/page_font.cpp +++ b/ksirc/KSPrefs/page_font.cpp @@ -1,12 +1,12 @@ #include "page_font.h" -#include "qapplication.h" -PageFont::PageFont( QWidget *parent, const char *name ) : - QWidget( parent, name) +#include "tqapplication.h" +PageFont::PageFont( TQWidget *parent, const char *name ) : + TQWidget( parent, name) { - layout = new QHBoxLayout(this); + layout = new TQHBoxLayout(this); fontchooser = new KFontChooser(this); layout->addWidget(fontchooser); - connect(fontchooser,SIGNAL(fontSelected ( const QFont&)), this, SLOT(update())); + connect(fontchooser,TQT_SIGNAL(fontSelected ( const TQFont&)), this, TQT_SLOT(update())); } PageFont::~PageFont( ) @@ -21,7 +21,7 @@ void PageFont::update( void ){ void PageFont::saveConfig( void ) { ksopts->defaultFont = fontchooser->font(); - QApplication::setFont(fontchooser->font(), true, "KSirc::TextView" ); + TQApplication::setFont(fontchooser->font(), true, "KSirc::TextView" ); } void PageFont::readConfig( const KSOColors * opts ) diff --git a/ksirc/KSPrefs/page_font.h b/ksirc/KSPrefs/page_font.h index 0d2fa673..44940170 100644 --- a/ksirc/KSPrefs/page_font.h +++ b/ksirc/KSPrefs/page_font.h @@ -1,7 +1,7 @@ #ifndef _PAGE_FONT #define _PAGE_FONT #include <kfontdialog.h> // For the font selection widget -#include <qlayout.h> // For the layout +#include <tqlayout.h> // For the layout #include "ksopts.h" // For storing the info. /** @@ -17,7 +17,7 @@ class PageFont : public QWidget /** * Create the Widget */ - PageFont( QWidget *parent = 0, const char *name = 0 ); + PageFont( TQWidget *parent = 0, const char *name = 0 ); /* @@ -56,7 +56,7 @@ class PageFont : public QWidget private: KFontChooser* fontchooser; /** The font choosing widget from kdelib */ - QHBoxLayout* layout; + TQHBoxLayout* layout; }; #endif diff --git a/ksirc/KSPrefs/page_general.cpp b/ksirc/KSPrefs/page_general.cpp index d6256e2c..51a78ec3 100644 --- a/ksirc/KSPrefs/page_general.cpp +++ b/ksirc/KSPrefs/page_general.cpp @@ -7,15 +7,15 @@ * * ***************************************************************************/ -#include <qcheckbox.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> #include <klocale.h> #include <kcharsets.h> #include "page_general.h" #include "../servercontroller.h" -PageGeneral::PageGeneral( QWidget *parent, const char *name ) : PageGeneralBase( parent, name) +PageGeneral::PageGeneral( TQWidget *parent, const char *name ) : PageGeneralBase( parent, name) { } @@ -82,10 +82,10 @@ void PageGeneral::readConfig( const KSOGeneral *opts ) encodingsCB->clear(); - QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); + TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); // remove utf16/ucs2 as it just doesn't work for IRC - QStringList::Iterator encodingIt = encodings.begin(); + TQStringList::Iterator encodingIt = encodings.begin(); while ( encodingIt != encodings.end() ) { if ( ( *encodingIt ).find( "utf16" ) != -1 || ( *encodingIt ).find( "iso-10646" ) != -1 ) diff --git a/ksirc/KSPrefs/page_general.h b/ksirc/KSPrefs/page_general.h index ecf515ca..253d6623 100644 --- a/ksirc/KSPrefs/page_general.h +++ b/ksirc/KSPrefs/page_general.h @@ -18,7 +18,7 @@ class PageGeneral : public PageGeneralBase Q_OBJECT public: - PageGeneral( QWidget *parent = 0, const char *name = 0 ); + PageGeneral( TQWidget *parent = 0, const char *name = 0 ); ~PageGeneral(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_irccolors.cpp b/ksirc/KSPrefs/page_irccolors.cpp index aa6ff351..5ed96054 100644 --- a/ksirc/KSPrefs/page_irccolors.cpp +++ b/ksirc/KSPrefs/page_irccolors.cpp @@ -9,12 +9,12 @@ #include "page_irccolors.h" -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <kconfig.h> #include <kcolorbutton.h> -PageIRCColors::PageIRCColors( QWidget *parent, const char *name ) : PageIRCColorsBase( parent, name) +PageIRCColors::PageIRCColors( TQWidget *parent, const char *name ) : PageIRCColorsBase( parent, name) { } diff --git a/ksirc/KSPrefs/page_irccolors.h b/ksirc/KSPrefs/page_irccolors.h index a34045c3..34565b42 100644 --- a/ksirc/KSPrefs/page_irccolors.h +++ b/ksirc/KSPrefs/page_irccolors.h @@ -18,7 +18,7 @@ class PageIRCColors : public PageIRCColorsBase Q_OBJECT public: - PageIRCColors( QWidget *parent = 0, const char *name = 0 ); + PageIRCColors( TQWidget *parent = 0, const char *name = 0 ); ~PageIRCColors(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_looknfeel.cpp b/ksirc/KSPrefs/page_looknfeel.cpp index 931a897c..29608e04 100644 --- a/ksirc/KSPrefs/page_looknfeel.cpp +++ b/ksirc/KSPrefs/page_looknfeel.cpp @@ -7,18 +7,18 @@ * * ***************************************************************************/ -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> #include <kstandarddirs.h> #include <kurlrequester.h> #include <kfiledialog.h> #include "page_looknfeel.h" -PageLooknFeel::PageLooknFeel( QWidget *parent, const char *name ) : PageLooknFeelBase( parent, name) +PageLooknFeel::PageLooknFeel( TQWidget *parent, const char *name ) : PageLooknFeelBase( parent, name) { - modePreview->setPixmap(QPixmap(locate("data","ksirc/pics/sdi.png"))); + modePreview->setPixmap(TQPixmap(locate("data","ksirc/pics/sdi.png"))); wallpaperPathLE->fileDialog()->setFilter( "*.jpg *.png *.gif" ); } @@ -54,14 +54,14 @@ void PageLooknFeel::defaultConfig() void PageLooknFeel::setPreviewPixmap( bool isSDI ) { if (isSDI == true) - modePreview->setPixmap( QPixmap( locate("data", "ksirc/pics/sdi.png" ) ) ); + modePreview->setPixmap( TQPixmap( locate("data", "ksirc/pics/sdi.png" ) ) ); else - modePreview->setPixmap( QPixmap( locate("data", "ksirc/pics/mdi.png" ) ) ); + modePreview->setPixmap( TQPixmap( locate("data", "ksirc/pics/mdi.png" ) ) ); } -void PageLooknFeel::showWallpaperPixmap( const QString &url ) +void PageLooknFeel::showWallpaperPixmap( const TQString &url ) { - wallpaperPreview->setPixmap( QPixmap( url ) ); + wallpaperPreview->setPixmap( TQPixmap( url ) ); } void PageLooknFeel::changed() diff --git a/ksirc/KSPrefs/page_looknfeel.h b/ksirc/KSPrefs/page_looknfeel.h index a5c7f96f..326498cb 100644 --- a/ksirc/KSPrefs/page_looknfeel.h +++ b/ksirc/KSPrefs/page_looknfeel.h @@ -18,7 +18,7 @@ class PageLooknFeel : public PageLooknFeelBase Q_OBJECT public: - PageLooknFeel( QWidget *parent = 0, const char *name = 0 ); + PageLooknFeel( TQWidget *parent = 0, const char *name = 0 ); ~PageLooknFeel(); void saveConfig(); @@ -30,7 +30,7 @@ signals: public slots: virtual void setPreviewPixmap( bool isSDI ); - virtual void showWallpaperPixmap( const QString &url ); + virtual void showWallpaperPixmap( const TQString &url ); virtual void changed(); }; diff --git a/ksirc/KSPrefs/page_rmbmenu.cpp b/ksirc/KSPrefs/page_rmbmenu.cpp index 7baf5da5..de30a829 100644 --- a/ksirc/KSPrefs/page_rmbmenu.cpp +++ b/ksirc/KSPrefs/page_rmbmenu.cpp @@ -8,11 +8,11 @@ #include "page_rmbmenu.h" -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> #include <kdebug.h> @@ -20,7 +20,7 @@ -PageRMBMenu::PageRMBMenu( QWidget *parent, const char *name ) : PageRMBMenuBase( parent, name) +PageRMBMenu::PageRMBMenu( TQWidget *parent, const char *name ) : PageRMBMenuBase( parent, name) { UserControlMenu *ucm; @@ -41,21 +41,21 @@ PageRMBMenu::PageRMBMenu( QWidget *parent, const char *name ) : PageRMBMenuBase( changeItemPB->hide(); - connect(commandLB, SIGNAL(highlighted( int )), - this, SLOT(highlighted( int ))); - connect(moveUpPB, SIGNAL(clicked()), - this, SLOT(moveDown())); - connect(moveDownPB, SIGNAL(clicked()), - this, SLOT(moveUp())); + connect(commandLB, TQT_SIGNAL(highlighted( int )), + this, TQT_SLOT(highlighted( int ))); + connect(moveUpPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(moveDown())); + connect(moveDownPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(moveUp())); - connect(insertSeperatorPB, SIGNAL(clicked()), - this, SLOT(insSeperator())); + connect(insertSeperatorPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(insSeperator())); - connect(insertItemPB, SIGNAL(clicked()), - this, SLOT(insCommand())); + connect(insertItemPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(insCommand())); - connect(deleteItemPB, SIGNAL(clicked()), - this, SLOT(delCommand())); + connect(deleteItemPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(delCommand())); } @@ -122,7 +122,7 @@ void PageRMBMenu::moveUp() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->removeItem(item); commandLB->insertItem(txt, item-1); @@ -139,7 +139,7 @@ void PageRMBMenu::moveDown() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->removeItem(item); commandLB->insertItem(txt, item+1); @@ -156,7 +156,7 @@ void PageRMBMenu::insSeperator() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->insertItem("--------------", item); commandLB->setCurrentItem(item); @@ -171,8 +171,8 @@ void PageRMBMenu::insCommand() { int item = commandLB->currentItem(); - QString te = entryLE->text(); - QString ce = commandLE->text(); + TQString te = entryLE->text(); + TQString ce = commandLE->text(); commandLB->insertItem(te, item); commandLB->setCurrentItem(item); @@ -193,7 +193,7 @@ void PageRMBMenu::delCommand() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->removeItem(item); UserControlMenu::UserMenu.remove(item); diff --git a/ksirc/KSPrefs/page_rmbmenu.h b/ksirc/KSPrefs/page_rmbmenu.h index cb1de421..1d4a8dac 100644 --- a/ksirc/KSPrefs/page_rmbmenu.h +++ b/ksirc/KSPrefs/page_rmbmenu.h @@ -18,7 +18,7 @@ class PageRMBMenu : public PageRMBMenuBase Q_OBJECT public: - PageRMBMenu( QWidget *parent = 0, const char *name = 0 ); + PageRMBMenu( TQWidget *parent = 0, const char *name = 0 ); ~PageRMBMenu(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_servchan.cpp b/ksirc/KSPrefs/page_servchan.cpp index 4689bd2a..f7587947 100644 --- a/ksirc/KSPrefs/page_servchan.cpp +++ b/ksirc/KSPrefs/page_servchan.cpp @@ -9,18 +9,18 @@ #include "page_servchan.h" -#include <qlistbox.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqlistbox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kconfig.h> -PageServChan::PageServChan( QWidget *parent, const char *name ) : PageServChanBase( parent, name) +PageServChan::PageServChan( TQWidget *parent, const char *name ) : PageServChanBase( parent, name) { - connect(serverDeleteItemPB, SIGNAL(pressed()), this, SLOT(deletePressedSL())); - connect(ServerAddItemPB, SIGNAL(pressed()), this, SLOT(addPressedSL())); - connect(chanDeleteItmPB, SIGNAL(pressed()), this, SLOT(deletePressedCL())); - connect(ChanAddItemPB, SIGNAL(pressed()), this, SLOT(addPressedCL())); + connect(serverDeleteItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(deletePressedSL())); + connect(ServerAddItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(addPressedSL())); + connect(chanDeleteItmPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(deletePressedCL())); + connect(ChanAddItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(addPressedCL())); } @@ -30,10 +30,10 @@ PageServChan::~PageServChan() void PageServChan::saveConfig() { - QStringList sLB; + TQStringList sLB; uint i; for(i = 0; i < serverLB->count(); i++){ - QString txt = serverLB->text(i); + TQString txt = serverLB->text(i); if(!txt.isNull()) sLB << txt; } @@ -41,9 +41,9 @@ void PageServChan::saveConfig() conf->setGroup("ServerList"); conf->writeEntry("RecentServers", sLB); - QStringList sCL; + TQStringList sCL; for(i = 0; i < channelLB->count(); i++){ - QString txt = channelLB->text(i); + TQString txt = channelLB->text(i); if(!txt.isNull()) sCL << txt; } @@ -55,7 +55,7 @@ void PageServChan::readConfig( const KSOServChan * ) { KConfig *conf = kapp->config(); conf->setGroup("ServerList"); - QStringList recent = conf->readListEntry("RecentServers"); + TQStringList recent = conf->readListEntry("RecentServers"); recent.sort(); serverLB->insertStringList(recent); conf->setGroup("Recent"); @@ -79,7 +79,7 @@ void PageServChan::deletePressedSL() { void PageServChan::addPressedSL() { uint i; - QString txt = LineEdit6->text(); + TQString txt = LineEdit6->text(); for(i = 0; i < serverLB->count(); i++){ if(txt == serverLB->text(i)){ @@ -111,7 +111,7 @@ void PageServChan::deletePressedCL() { void PageServChan::addPressedCL() { uint i; - QString txt = LineEdit6_2->text(); + TQString txt = LineEdit6_2->text(); for(i = 0; i < channelLB->count(); i++){ if(txt == channelLB->text(i)){ diff --git a/ksirc/KSPrefs/page_servchan.h b/ksirc/KSPrefs/page_servchan.h index 07429f2b..1e20e8d7 100644 --- a/ksirc/KSPrefs/page_servchan.h +++ b/ksirc/KSPrefs/page_servchan.h @@ -18,7 +18,7 @@ class PageServChan : public PageServChanBase Q_OBJECT public: - PageServChan( QWidget *parent = 0, const char *name = 0 ); + PageServChan( TQWidget *parent = 0, const char *name = 0 ); ~PageServChan(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_shortcuts.cpp b/ksirc/KSPrefs/page_shortcuts.cpp index 45a83beb..4d2fda54 100644 --- a/ksirc/KSPrefs/page_shortcuts.cpp +++ b/ksirc/KSPrefs/page_shortcuts.cpp @@ -7,8 +7,8 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qgroupbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> #include <kglobalaccel.h> @@ -16,12 +16,12 @@ #include "page_shortcuts.h" #include "../servercontroller.h" -PageShortcuts::PageShortcuts( QWidget *parent, const char *name ) : PageShortcutsBase( parent, name) +PageShortcuts::PageShortcuts( TQWidget *parent, const char *name ) : PageShortcutsBase( parent, name) { globalGB->setColumnLayout( 0, Qt::Horizontal ); m_key = new KKeyChooser(servercontroller::self()->getGlobalAccel(), globalGB); - connect(m_key, SIGNAL(keyChange()), this, SLOT(changed())); + connect(m_key, TQT_SIGNAL(keyChange()), this, TQT_SLOT(changed())); globalGB->layout()->add(m_key); } diff --git a/ksirc/KSPrefs/page_shortcuts.h b/ksirc/KSPrefs/page_shortcuts.h index 4c16aa35..36048f44 100644 --- a/ksirc/KSPrefs/page_shortcuts.h +++ b/ksirc/KSPrefs/page_shortcuts.h @@ -20,7 +20,7 @@ class PageShortcuts : public PageShortcutsBase Q_OBJECT public: - PageShortcuts( QWidget *parent = 0, const char *name = 0 ); + PageShortcuts( TQWidget *parent = 0, const char *name = 0 ); ~PageShortcuts(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_startup.cpp b/ksirc/KSPrefs/page_startup.cpp index 060da44d..e2ddfdc1 100644 --- a/ksirc/KSPrefs/page_startup.cpp +++ b/ksirc/KSPrefs/page_startup.cpp @@ -7,9 +7,9 @@ * * ***************************************************************************/ -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlistbox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> #include <kapplication.h> #include <kconfig.h> @@ -19,16 +19,16 @@ #include "page_startup.h" -PageStartup::PageStartup( QWidget *parent, const char *name ) : PageStartupBase( parent, name) +PageStartup::PageStartup( TQWidget *parent, const char *name ) : PageStartupBase( parent, name) { notifyLB->upButton()->hide(); notifyLB->downButton()->hide(); serverLB->upButton()->hide(); serverLB->downButton()->hide(); - QListBox *lb = serverLB->listBox(); - connect(lb, SIGNAL(highlighted(int)), - this, SLOT(clickedLB(int))); + TQListBox *lb = serverLB->listBox(); + connect(lb, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(clickedLB(int))); changing = false; @@ -41,11 +41,11 @@ PageStartup::~PageStartup() void PageStartup::saveConfig() { KSOServer glb = ksopts->server["global"]; - QStringList items = serverLB->items(); + TQStringList items = serverLB->items(); ksopts->server.clear(); - QStringList::iterator it = items.begin(); + TQStringList::iterator it = items.begin(); for( ; it != items.end(); ++it){ ksopts->server[*it] = server[*it]; } @@ -65,7 +65,7 @@ void PageStartup::readConfig( const KSOptions *opts ) if(it.data().globalCopy == false) serverLB->insertItem(it.key()); } - QListBoxItem *item = serverLB->listBox()->findItem("global"); + TQListBoxItem *item = serverLB->listBox()->findItem("global"); serverLB->listBox()->setSelected(item, true); changing = false; clickedLB(serverLB->listBox()->index(item)); @@ -82,7 +82,7 @@ void PageStartup::changed() { emit modified(); - QString ser = serverLB->currentText(); + TQString ser = serverLB->currentText(); if(ser.isEmpty()) return; @@ -106,7 +106,7 @@ void PageStartup::changed() void PageStartup::clickedLB(int index) { - QString text = serverLB->text(index); + TQString text = serverLB->text(index); if(!server.contains(text)){ server[text] = server["global"]; server[text].globalCopy = true; diff --git a/ksirc/KSPrefs/page_startup.h b/ksirc/KSPrefs/page_startup.h index ecac8305..c2092e65 100644 --- a/ksirc/KSPrefs/page_startup.h +++ b/ksirc/KSPrefs/page_startup.h @@ -18,7 +18,7 @@ class PageStartup : public PageStartupBase Q_OBJECT public: - PageStartup( QWidget *parent = 0, const char *name = 0 ); + PageStartup( TQWidget *parent = 0, const char *name = 0 ); ~PageStartup(); void saveConfig(); diff --git a/ksirc/KSProgress/ksprogress.cpp b/ksirc/KSProgress/ksprogress.cpp index 369b0742..ccf3b194 100644 --- a/ksirc/KSProgress/ksprogress.cpp +++ b/ksirc/KSProgress/ksprogress.cpp @@ -10,7 +10,7 @@ KSProgress::KSProgress ( - QWidget* parent, + TQWidget* parent, const char* name ) : @@ -22,7 +22,7 @@ KSProgress::KSProgress } -void KSProgress::setID(QString _id) +void KSProgress::setID(TQString _id) { id = _id; } @@ -32,12 +32,12 @@ void KSProgress::setRange(int minValue, int maxValue) progress->setRange(minValue, maxValue); } -void KSProgress::setTopText(QString text) +void KSProgress::setTopText(TQString text) { fileName->setText(text); } -void KSProgress::setBotText(QString text) +void KSProgress::setBotText(TQString text) { transferStatus->setText(text); } diff --git a/ksirc/KSProgress/ksprogress.h b/ksirc/KSProgress/ksprogress.h index c3feb2c6..2613047d 100644 --- a/ksirc/KSProgress/ksprogress.h +++ b/ksirc/KSProgress/ksprogress.h @@ -20,16 +20,16 @@ public: KSProgress ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); virtual ~KSProgress(); - virtual void setID(QString); + virtual void setID(TQString); virtual void setRange(int minValue, int maxValue); - virtual void setTopText(QString text); - virtual void setBotText(QString text); + virtual void setTopText(TQString text); + virtual void setBotText(TQString text); public slots: virtual void setValue(int value); @@ -37,10 +37,10 @@ public slots: signals: void cancel(); - void cancel(QString); + void cancel(TQString); private: - QString id; + TQString id; bool canceled; }; diff --git a/ksirc/KSProgress/ksprogressdata.cpp b/ksirc/KSProgress/ksprogressdata.cpp index 0feb524b..7d146fd9 100644 --- a/ksirc/KSProgress/ksprogressdata.cpp +++ b/ksirc/KSProgress/ksprogressdata.cpp @@ -22,7 +22,7 @@ ksprogressData::ksprogressData ( - QWidget* parent, + TQWidget* parent, const char* name ) : @@ -33,15 +33,15 @@ ksprogressData::ksprogressData progress->setMinimumSize( 10, 10 ); progress->setMaximumSize( 32767, 32767 ); - QPushButton* dlgedit_PushButton_1; + TQPushButton* dlgedit_PushButton_1; dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::cancel(), this, "PushButton_1" ); dlgedit_PushButton_1->setGeometry( 70, 90, 100, 30 ); dlgedit_PushButton_1->setMinimumSize( 10, 10 ); dlgedit_PushButton_1->setMaximumSize( 32767, 32767 ); - connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(cancelPressed()) ); + connect( dlgedit_PushButton_1, TQT_SIGNAL(clicked()), TQT_SLOT(cancelPressed()) ); dlgedit_PushButton_1->setAutoRepeat( FALSE ); - fileName = new QLabel( this, "Label_1" ); + fileName = new TQLabel( this, "Label_1" ); fileName->setGeometry( 10, 10, 230, 20 ); fileName->setMinimumSize( 10, 10 ); fileName->setMaximumSize( 32767, 32767 ); @@ -49,7 +49,7 @@ ksprogressData::ksprogressData fileName->setAlignment( 289 ); fileName->setMargin( -1 ); - transferStatus = new QLabel( this, "Label_2" ); + transferStatus = new TQLabel( this, "Label_2" ); transferStatus->setGeometry( 10, 35, 230, 20 ); transferStatus->setMinimumSize( 10, 10 ); transferStatus->setMaximumSize( 32767, 32767 ); diff --git a/ksirc/KSProgress/ksprogressdata.h b/ksirc/KSProgress/ksprogressdata.h index a2282baf..37e3cf29 100644 --- a/ksirc/KSProgress/ksprogressdata.h +++ b/ksirc/KSProgress/ksprogressdata.h @@ -13,8 +13,8 @@ #ifndef ksprogressData_included #define ksprogressData_included -#include <qframe.h> -#include <qlabel.h> +#include <tqframe.h> +#include <tqlabel.h> #include "kprogress.h" class ksprogressData : public QFrame @@ -25,7 +25,7 @@ public: ksprogressData ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -40,8 +40,8 @@ protected slots: protected: KProgress* progress; - QLabel* fileName; - QLabel* transferStatus; + TQLabel* fileName; + TQLabel* transferStatus; }; diff --git a/ksirc/KSTicker/kspainter.cpp b/ksirc/KSTicker/kspainter.cpp index fe5fbf65..90ffac0d 100644 --- a/ksirc/KSTicker/kspainter.cpp +++ b/ksirc/KSTicker/kspainter.cpp @@ -6,13 +6,13 @@ const int KSPainter::optcolours = 8; const int KSPainter::startspecial = 16; const int KSPainter::maxcolour = 16+optcolours; -const QColor KSPainter::brown ( 165, 42, 42 ); -const QColor KSPainter::orange ( 255, 165, 0 ); -const QColor KSPainter::lightCyan( 224, 255, 255 ); -const QColor KSPainter::lightBlue( 173, 216, 230 ); -const QColor KSPainter::pink ( 255, 192, 203 ); +const TQColor KSPainter::brown ( 165, 42, 42 ); +const TQColor KSPainter::orange ( 255, 165, 0 ); +const TQColor KSPainter::lightCyan( 224, 255, 255 ); +const TQColor KSPainter::lightBlue( 173, 216, 230 ); +const TQColor KSPainter::pink ( 255, 192, 203 ); -QColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white, +TQColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white, Qt::black, Qt::darkBlue, Qt::darkGreen, @@ -41,7 +41,7 @@ void KSPainter::initOptColours() num2colour[startspecial+7] = ksopts->backgroundColor; } -int KSPainter::colour2num(const QColor &colour) +int KSPainter::colour2num(const TQColor &colour) { for(int i = 0; i < maxcolour; i++) if(num2colour[i] == colour) @@ -50,7 +50,7 @@ int KSPainter::colour2num(const QColor &colour) return -1; } -void KSPainter::colourDrawText(QPainter *p, int startx, int starty, +void KSPainter::colourDrawText(TQPainter *p, int startx, int starty, char *str, int length) { int offset = 0; @@ -62,7 +62,7 @@ void KSPainter::colourDrawText(QPainter *p, int startx, int starty, // Default pen (colour) - const QPen qpDefPen = p->pen(); + const TQPen qpDefPen = p->pen(); for(loc = 0; (str[loc] != 0x00) && (loc != length) ; loc++){ if(str[loc] == 0x03 || str[loc] == '~'){ @@ -121,8 +121,8 @@ void KSPainter::colourDrawText(QPainter *p, int startx, int starty, p->setBackgroundMode(Qt::TransparentMode); } else if((str[i] == '~') && ((str[i+1] >= 0x61) || (str[i+1] <= 0x7a))){ - QFont fnt = p->font(); - QColor temppen; + TQFont fnt = p->font(); + TQColor temppen; switch(str[i+1]){ case 'c': p->setPen(qpDefPen); diff --git a/ksirc/KSTicker/kspainter.h b/ksirc/KSTicker/kspainter.h index 21f9495d..b5fa1049 100644 --- a/ksirc/KSTicker/kspainter.h +++ b/ksirc/KSTicker/kspainter.h @@ -1,25 +1,25 @@ #ifndef KSPAINTER_H #define KSPAINTER_H -#include <qpainter.h> -#include <qobject.h> +#include <tqpainter.h> +#include <tqobject.h> class KSPainter { public: static void initOptColours(); - static void colourDrawText(QPainter *p, int startx, int starty, char *str, int length = -1); + static void colourDrawText(TQPainter *p, int startx, int starty, char *str, int length = -1); static const int startspecial; static const int maxcolour; static const int optcolours; - static QColor num2colour[16+8]; - static int colour2num(const QColor &colour); + static TQColor num2colour[16+8]; + static int colour2num(const TQColor &colour); - static const QColor brown; - static const QColor orange; - static const QColor lightCyan; - static const QColor lightBlue; - static const QColor pink; + static const TQColor brown; + static const TQColor orange; + static const TQColor lightCyan; + static const TQColor lightBlue; + static const TQColor pink; }; #endif diff --git a/ksirc/KSTicker/ksticker.cpp b/ksirc/KSTicker/ksticker.cpp index dc65118a..e6199427 100644 --- a/ksirc/KSTicker/ksticker.cpp +++ b/ksirc/KSTicker/ksticker.cpp @@ -1,10 +1,10 @@ #include <stdlib.h> -#include <qpainter.h> -#include <qframe.h> -#include <qpaintdevice.h> -#include <qcursor.h> -#include <qtooltip.h> -#include <qregexp.h> +#include <tqpainter.h> +#include <tqframe.h> +#include <tqpaintdevice.h> +#include <tqcursor.h> +#include <tqtooltip.h> +#include <tqregexp.h> #include <kapplication.h> #include <kfontdialog.h> @@ -21,13 +21,13 @@ #include <kwin.h> #include <kdebug.h> -KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f) -: QFrame(parent, name, f) +KSTicker::KSTicker(TQWidget * parent, const char * name, WFlags f) +: TQFrame(parent, name, f) { pHeight = 1; - pic = new QPixmap(); // create pic map here, resize it later though. + pic = new TQPixmap(); // create pic map here, resize it later though. // pic->setBackgroundMode(TransparentMode); KConfig *conf = kapp->config(); @@ -36,7 +36,7 @@ KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f) bAtEnd = FALSE; setFont(conf->readFontEntry("Font", &ksopts->defaultFont)); - ourFont = font(); //QFont("Courier"); + ourFont = font(); //TQFont("Courier"); setFont(ourFont); setMinimumSize(100, 10); setFixedHeight((fontMetrics().height()+fontMetrics().descent()*2)*pHeight); @@ -54,13 +54,13 @@ KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f) currentChar = 0; chars = this->width() / onechar; - popup = new QPopupMenu(); - popup->insertItem(i18n( "Font..." ), this, SLOT(fontSelector())); - popup->insertItem(i18n( "Scroll Rate..." ), this, SLOT(scrollRate())); - iScrollItem = popup->insertItem(i18n( "Scroll Constantly" ), this, SLOT(scrollConstantly())); + popup = new TQPopupMenu(); + popup->insertItem(i18n( "Font..." ), this, TQT_SLOT(fontSelector())); + popup->insertItem(i18n( "Scroll Rate..." ), this, TQT_SLOT(scrollRate())); + iScrollItem = popup->insertItem(i18n( "Scroll Constantly" ), this, TQT_SLOT(scrollConstantly())); popup->setItemChecked(iScrollItem, bScrollConstantly); popup->insertSeparator(); - popup->insertItem(i18n( "Return to Normal Mode" ), this, SIGNAL(doubleClick())); + popup->insertItem(i18n( "Return to Normal Mode" ), this, TQT_SIGNAL(doubleClick())); currentStr = ""; @@ -101,12 +101,12 @@ void KSTicker::show() */ // ### FIXME: port to kwin //KWM::setDecoration(winId(), KWM::tinyDecoration); - QSize size = this->size(); - size.setHeight(QFontMetrics(font()).height()+10); - setFixedHeight(QFontMetrics(font()).height()+10); + TQSize size = this->size(); + size.setHeight(TQFontMetrics(font()).height()+10); + setFixedHeight(TQFontMetrics(font()).height()+10); resize(size); - QFrame::show(); + TQFrame::show(); if(currentStr.length() != 0) startTicker(); currentChar = 0; @@ -116,16 +116,16 @@ void KSTicker::show() void KSTicker::hide() { killTimers(); - QFrame::hide(); + TQFrame::hide(); } void KSTicker::iconify() { - QFrame::showMinimized(); + TQFrame::showMinimized(); killTimers(); } -void KSTicker::setString(QString str) +void KSTicker::setString(TQString str) { strlist.clear(); strlist.append(str); @@ -133,24 +133,24 @@ void KSTicker::setString(QString str) startTicker(); } -void KSTicker::mergeString(QString str, QColor c) +void KSTicker::mergeString(TQString str, TQColor c) { int num = KSPainter::colour2num(c); if(num != -1){ - str.prepend(QString("~%1").arg(num)); + str.prepend(TQString("~%1").arg(num)); } mergeString(str); } -void KSTicker::mergeString(QString str) +void KSTicker::mergeString(TQString str) { - QRegExp rx("~n(\\S+)~n"); + TQRegExp rx("~n(\\S+)~n"); if(rx.search(str) >= 0){ int value = nickColourMaker::colourMaker()->findIdx(rx.cap(1)); if(value >= 0){ - QString newText = QString("~%1\\1~c").arg(value); + TQString newText = TQString("~%1\\1~c").arg(value); str.replace(rx, newText); } } @@ -160,7 +160,7 @@ void KSTicker::mergeString(QString str) if(strlist.count() > 5){ int found = 0; - QStringList::Iterator it = strlist.begin(); + TQStringList::Iterator it = strlist.begin(); for(; it != strlist.end(); it++){ if(((*it).find(ksopts->server["global"].nick, 0, FALSE) == -1) && ((*it).find(ksopts->server["global"].altNick, 0, FALSE) == -1)){ @@ -179,10 +179,10 @@ void KSTicker::mergeString(QString str) if(bScrollConstantly == FALSE) startTicker(); - QStringList sep = QStringList::split(" ", stripCols(str)); + TQStringList sep = TQStringList::split(" ", stripCols(str)); int len = 0; - QString brok; - QStringList::Iterator it = sep.begin(); + TQString brok; + TQStringList::Iterator it = sep.begin(); for(; it != sep.end(); ++it) { brok += *it + " "; len += (*it).length(); @@ -197,15 +197,15 @@ void KSTicker::mergeString(QString str) tipbuffer.append(brok); while(tipbuffer.count() > 10) tipbuffer.pop_front(); - QString tip = tipbuffer.join("\n"); + TQString tip = tipbuffer.join("\n"); -// QToolTip::remove(this); - QToolTip::add(this, tip); +// TQToolTip::remove(this); + TQToolTip::add(this, tip); } -void KSTicker::timerEvent(QTimerEvent *) +void KSTicker::timerEvent(TQTimerEvent *) { if((uint)currentChar >= currentStr.length()){ if(strlist.isEmpty()){ @@ -234,7 +234,7 @@ void KSTicker::timerEvent(QTimerEvent *) static BGMode bgmode = TransparentMode; bitBlt(pic, -tickStep, 0, pic); - QPainter p(pic); + TQPainter p(pic); cOffset += tickStep; if(cOffset >= onechar){ @@ -243,8 +243,8 @@ void KSTicker::timerEvent(QTimerEvent *) while(((currentStr[currentChar] == '~') || (currentStr[currentChar] == 0x03)) && (step > 0)){ step = 1; // reset in case it's our second, or more loop. - QString text = currentStr.mid(currentChar); - QString buf = ""; + TQString text = currentStr.mid(currentChar); + TQString buf = ""; if((text[step] >= '0') && (text[step] <= '9')) { @@ -344,7 +344,7 @@ void KSTicker::timerEvent(QTimerEvent *) } - QFont fnt = font(); + TQFont fnt = font(); fnt.setBold(bold); fnt.setUnderline(underline); fnt.setItalic(italics); @@ -364,20 +364,20 @@ void KSTicker::timerEvent(QTimerEvent *) bitBlt(this, 0, descent, pic); } -void KSTicker::paintEvent( QPaintEvent *) +void KSTicker::paintEvent( TQPaintEvent *) { if(isVisible() == FALSE) return; bitBlt(this, 0, descent, pic); } -void KSTicker::resizeEvent( QResizeEvent *e) +void KSTicker::resizeEvent( TQResizeEvent *e) { - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); onechar = fontMetrics().width("X"); chars = this->width() / onechar; killTimers(); - QPixmap *new_pic = new QPixmap(width() + onechar, height()); + TQPixmap *new_pic = new TQPixmap(width() + onechar, height()); new_pic->fill(backgroundColor()); bitBlt(new_pic, new_pic->width() - pic->width(), 0, @@ -390,7 +390,7 @@ void KSTicker::resizeEvent( QResizeEvent *e) startTicker(); } -void KSTicker::closeEvent( QCloseEvent *) +void KSTicker::closeEvent( TQCloseEvent *) { emit closing(); killTimers(); @@ -408,18 +408,18 @@ void KSTicker::stopTicker() killTimers(); } -void KSTicker::mouseDoubleClickEvent( QMouseEvent * ) +void KSTicker::mouseDoubleClickEvent( TQMouseEvent * ) { emit doubleClick(); } -void KSTicker::mousePressEvent( QMouseEvent *e) +void KSTicker::mousePressEvent( TQMouseEvent *e) { if(e->button() == RightButton){ popup->popup(this->cursor().pos()); } else{ - QFrame::mousePressEvent(e); + TQFrame::mousePressEvent(e); } } void KSTicker::fontSelector() @@ -434,8 +434,8 @@ void KSTicker::scrollRate() { SpeedDialog *sd = new SpeedDialog(tickRate, tickStep); sd->setLimit(5, 200, 1, onechar); - connect(sd, SIGNAL(stateChange(int, int)), - this, SLOT(setSpeed(int, int))); + connect(sd, TQT_SIGNAL(stateChange(int, int)), + this, TQT_SLOT(setSpeed(int, int))); sd->show(); } @@ -451,7 +451,7 @@ void KSTicker::scrollConstantly() conf->sync(); } -void KSTicker::updateFont(const QFont &font){ +void KSTicker::updateFont(const TQFont &font){ setFont(font); setFixedHeight((fontMetrics().height()+fontMetrics().descent()*2)*pHeight); resize(fontMetrics().width("X")*chars, @@ -474,18 +474,18 @@ void KSTicker::speed(int *_tickRate, int *_tickStep){ *_tickStep = tickStep; } -void KSTicker::setBackgroundColor ( const QColor &c ) +void KSTicker::setBackgroundColor ( const TQColor &c ) { - QFrame::setBackgroundColor(c); + TQFrame::setBackgroundColor(c); pic->fill(c); bitBlt(this, 0,0, pic); defbg = backgroundColor(); bg = backgroundColor(); } -void KSTicker::setPalette ( const QPalette & p ) +void KSTicker::setPalette ( const TQPalette & p ) { - QFrame::setPalette(p); + TQFrame::setPalette(p); pic->fill(backgroundColor()); bitBlt(this, 0,0, pic); @@ -495,10 +495,10 @@ void KSTicker::setPalette ( const QPalette & p ) fg = foregroundColor(); } -QString KSTicker::stripCols( QString str ) +TQString KSTicker::stripCols( TQString str ) { uint i = 0; - QString ret; + TQString ret; for(i = 0; i < str.length(); i++){ if(((str[i] == '~') || (str[i] == 0x03))){ if((str[i+1] >= '0') && diff --git a/ksirc/KSTicker/ksticker.h b/ksirc/KSTicker/ksticker.h index d11d8a0f..47beecac 100644 --- a/ksirc/KSTicker/ksticker.h +++ b/ksirc/KSTicker/ksticker.h @@ -1,11 +1,11 @@ #ifndef KSTICKER_H #define KSTICKER_H -#include <qobject.h> -#include <qframe.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qpopupmenu.h> +#include <tqobject.h> +#include <tqframe.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqpopupmenu.h> class SInfo { public: @@ -17,20 +17,20 @@ class KSTicker : public QFrame Q_OBJECT public: - KSTicker(QWidget * parent=0, const char * name=0, WFlags f=0); + KSTicker(TQWidget * parent=0, const char * name=0, WFlags f=0); virtual ~KSTicker(); - void setString(QString); - void mergeString(QString); - void mergeString(QString, QColor); + void setString(TQString); + void mergeString(TQString); + void mergeString(TQString, TQColor); virtual void show(); virtual void hide(); void speed(int *, int *); - virtual void setBackgroundColor ( const QColor & ); - virtual void setPalette ( const QPalette & p ); + virtual void setBackgroundColor ( const TQColor & ); + virtual void setPalette ( const TQPalette & p ); signals: void doubleClick(); @@ -42,29 +42,29 @@ public slots: protected slots: virtual void fontSelector(); virtual void scrollRate(); - virtual void updateFont(const QFont &font); + virtual void updateFont(const TQFont &font); virtual void scrollConstantly(); protected: - virtual void timerEvent ( QTimerEvent * ); - virtual void paintEvent ( QPaintEvent * ); - virtual void resizeEvent( QResizeEvent * ); - virtual void closeEvent( QCloseEvent * ); - virtual void mouseDoubleClickEvent( QMouseEvent * ); - virtual void mousePressEvent ( QMouseEvent * ); + virtual void timerEvent ( TQTimerEvent * ); + virtual void paintEvent ( TQPaintEvent * ); + virtual void resizeEvent( TQResizeEvent * ); + virtual void closeEvent( TQCloseEvent * ); + virtual void mouseDoubleClickEvent( TQMouseEvent * ); + virtual void mousePressEvent ( TQMouseEvent * ); virtual void iconify(); private: - QString stripCols(QString); + TQString stripCols(TQString); - QStringList strlist; /* everything left to parse */ - QStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */ - QStringList tipbuffer; /* 5 lines for the tooltip */ - QString currentStr; /* the string we are currently parsing */ + TQStringList strlist; /* everything left to parse */ + TQStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */ + TQStringList tipbuffer; /* 5 lines for the tooltip */ + TQString currentStr; /* the string we are currently parsing */ - QFont ourFont; + TQFont ourFont; int onechar; int chars; @@ -86,9 +86,9 @@ private: int iScrollItem; bool bAtEnd; - QPixmap *pic; + TQPixmap *pic; - QPopupMenu *popup; + TQPopupMenu *popup; /* * Drawing settings and variables @@ -96,10 +96,10 @@ private: bool bold; bool underline; bool italics; - QColor defbg; - QColor deffg; - QColor bg; - QColor fg; + TQColor defbg; + TQColor deffg; + TQColor bg; + TQColor fg; }; #endif // KSTICKER_H diff --git a/ksirc/KSTicker/ksttest.cpp b/ksirc/KSTicker/ksttest.cpp index 81373bd8..36ad249a 100644 --- a/ksirc/KSTicker/ksttest.cpp +++ b/ksirc/KSTicker/ksttest.cpp @@ -1,8 +1,8 @@ #include <kapplication.h> #include <kconfig.h> -#include <qapplication.h> -#include <qsocketnotifier.h> -#include <qregexp.h> +#include <tqapplication.h> +#include <tqsocketnotifier.h> +#include <tqregexp.h> #include <kaboutdata.h> #include <kcmdlineargs.h> #include <klocale.h> @@ -19,7 +19,7 @@ StdInTicker::StdInTicker() : KSTicker() { kConfig->setGroup("defaults"); - QFont font; + TQFont font; font = kConfig->readFontEntry("font"); font.setFixedPitch(TRUE); setFont(font); @@ -45,8 +45,8 @@ void StdInTicker::readsocket(int socket) char buf[1024]; int bytes = read(socket, buf, 1024); if(bytes){ - QCString str(buf, bytes); - str.replace(QRegExp("\n"), " // "); + TQCString str(buf, bytes); + str.replace(TQRegExp("\n"), " // "); mergeString(str); } } @@ -56,7 +56,7 @@ void StdInTicker::end() delete this; } -void StdInTicker::closeEvent ( QCloseEvent *e ) +void StdInTicker::closeEvent ( TQCloseEvent *e ) { KSTicker::closeEvent(e); delete this; @@ -79,11 +79,11 @@ int main(int argc, char **argv){ opts.load(); StdInTicker *kst = new StdInTicker(); - QSocketNotifier *sn = new QSocketNotifier(0, QSocketNotifier::Read); - QObject::connect(sn, SIGNAL(activated(int)), - kst, SLOT(readsocket(int))); - QObject::connect(kst, SIGNAL(doubleClick()), kst, SLOT(end())); - QObject::connect(kst, SIGNAL(closing()), kst, SLOT(end())); + TQSocketNotifier *sn = new TQSocketNotifier(0, TQSocketNotifier::Read); + TQObject::connect(sn, TQT_SIGNAL(activated(int)), + kst, TQT_SLOT(readsocket(int))); + TQObject::connect(kst, TQT_SIGNAL(doubleClick()), kst, TQT_SLOT(end())); + TQObject::connect(kst, TQT_SIGNAL(closing()), kst, TQT_SLOT(end())); a.setMainWidget(kst); kst->show(); return a.exec(); diff --git a/ksirc/KSTicker/ksttest.h b/ksirc/KSTicker/ksttest.h index 9d166b66..d3e988ff 100644 --- a/ksirc/KSTicker/ksttest.h +++ b/ksirc/KSTicker/ksttest.h @@ -12,7 +12,7 @@ public: ~StdInTicker(); protected: - void closeEvent ( QCloseEvent * ); + void closeEvent ( TQCloseEvent * ); public slots: void readsocket(int socket); diff --git a/ksirc/KSTicker/speeddialog.cpp b/ksirc/KSTicker/speeddialog.cpp index eb1ff462..50cb8d80 100644 --- a/ksirc/KSTicker/speeddialog.cpp +++ b/ksirc/KSTicker/speeddialog.cpp @@ -15,16 +15,16 @@ SpeedDialog::SpeedDialog ( int tick, int step, - QWidget* parent, + TQWidget* parent, const char* name ) : speeddialogData( parent, name ) { setCaption(i18n( "Speed Setup") ); - connect(sliderTick, SIGNAL(valueChanged(int)), - lcdTick, SLOT(display(int))); - connect(sliderStep, SIGNAL(valueChanged(int)), - lcdStep, SLOT(display(int))); + connect(sliderTick, TQT_SIGNAL(valueChanged(int)), + lcdTick, TQT_SLOT(display(int))); + connect(sliderStep, TQT_SIGNAL(valueChanged(int)), + lcdStep, TQT_SLOT(display(int))); lcdTick->display(tick); sliderTick->setValue(tick); lcdStep->display(step); diff --git a/ksirc/KSTicker/speeddialog.h b/ksirc/KSTicker/speeddialog.h index 4efdb2a8..514c72ee 100644 --- a/ksirc/KSTicker/speeddialog.h +++ b/ksirc/KSTicker/speeddialog.h @@ -22,7 +22,7 @@ public: ( int tick, int step, - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); diff --git a/ksirc/KSTicker/speeddialogData.cpp b/ksirc/KSTicker/speeddialogData.cpp index 0dbb1c0b..822d6f7f 100644 --- a/ksirc/KSTicker/speeddialogData.cpp +++ b/ksirc/KSTicker/speeddialogData.cpp @@ -12,76 +12,76 @@ #include "speeddialogData.h" -#include <qlabel.h> +#include <tqlabel.h> #include <klocale.h> #include <kpushbutton.h> #include <kstdguiitem.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kdialog.h> -speeddialogData::speeddialogData ( QWidget* parent, const char* name ) - :QDialog( parent, name, 0 ) +speeddialogData::speeddialogData ( TQWidget* parent, const char* name ) + :TQDialog( parent, name, 0 ) { - QGridLayout *grid = new QGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint()); - sliderTick = new QSlider( this, "Slider_1" ); + TQGridLayout *grid = new TQGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint()); + sliderTick = new TQSlider( this, "Slider_1" ); grid->addWidget( sliderTick, 0, 1 ); - connect( sliderTick, SIGNAL(valueChanged(int)), SLOT(updateTick(int)) ); - sliderTick->setOrientation( QSlider::Horizontal ); + connect( sliderTick, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateTick(int)) ); + sliderTick->setOrientation( TQSlider::Horizontal ); sliderTick->setRange( 10, 200 ); sliderTick->setSteps( 10, 50 ); sliderTick->setValue( 30 ); sliderTick->setTracking( TRUE ); - sliderTick->setTickmarks( QSlider::NoMarks ); + sliderTick->setTickmarks( TQSlider::NoMarks ); sliderTick->setTickInterval( 0 ); - sliderStep = new QSlider( this, "Slider_2" ); + sliderStep = new TQSlider( this, "Slider_2" ); grid->addWidget( sliderStep, 1, 1 ); - connect( sliderStep, SIGNAL(valueChanged(int)), SLOT(updateStep(int)) ); - sliderStep->setOrientation( QSlider::Horizontal ); + connect( sliderStep, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateStep(int)) ); + sliderStep->setOrientation( TQSlider::Horizontal ); sliderStep->setRange( 1, 10 ); sliderStep->setSteps( 1, 2 ); sliderStep->setValue( 3 ); sliderStep->setTracking( TRUE ); - sliderStep->setTickmarks( QSlider::NoMarks ); + sliderStep->setTickmarks( TQSlider::NoMarks ); sliderStep->setTickInterval( 0 ); - lcdTick = new QLCDNumber( this, "LCDNumber_1" ); + lcdTick = new TQLCDNumber( this, "LCDNumber_1" ); lcdTick->setFrameStyle( 33 ); lcdTick->setSmallDecimalPoint( FALSE ); lcdTick->setNumDigits( 3 ); - lcdTick->setMode( QLCDNumber::DEC ); - lcdTick->setSegmentStyle( QLCDNumber::Outline ); + lcdTick->setMode( TQLCDNumber::DEC ); + lcdTick->setSegmentStyle( TQLCDNumber::Outline ); grid->addWidget( lcdTick, 0, 2 ); - lcdStep = new QLCDNumber( this, "LCDNumber_2" ); + lcdStep = new TQLCDNumber( this, "LCDNumber_2" ); lcdStep->setFrameStyle( 33 ); lcdStep->setSmallDecimalPoint( FALSE ); lcdStep->setNumDigits( 3 ); - lcdStep->setMode( QLCDNumber::DEC ); - lcdStep->setSegmentStyle( QLCDNumber::Outline ); + lcdStep->setMode( TQLCDNumber::DEC ); + lcdStep->setSegmentStyle( TQLCDNumber::Outline ); grid->addWidget( lcdStep, 1, 2 ); - QLabel* dlgedit_Label_1; - dlgedit_Label_1 = new QLabel( this, "Label_1" ); + TQLabel* dlgedit_Label_1; + dlgedit_Label_1 = new TQLabel( this, "Label_1" ); dlgedit_Label_1->setText( i18n("Tick interval:") ); dlgedit_Label_1->setAlignment( 289 ); dlgedit_Label_1->setMargin( -1 ); grid->addWidget( dlgedit_Label_1, 0, 0 ); - QLabel* dlgedit_Label_2; - dlgedit_Label_2 = new QLabel( this, "Label_2" ); + TQLabel* dlgedit_Label_2; + dlgedit_Label_2 = new TQLabel( this, "Label_2" ); dlgedit_Label_2->setText( i18n("Step size:") ); dlgedit_Label_2->setAlignment( 289 ); dlgedit_Label_2->setMargin( -1 ); grid->addWidget( dlgedit_Label_2, 1, 0 ); - QPushButton* dlgedit_PushButton_2; + TQPushButton* dlgedit_PushButton_2; dlgedit_PushButton_2 = new KPushButton( KStdGuiItem::close(), this, "PushButton_2" ); - connect( dlgedit_PushButton_2, SIGNAL(pressed()), SLOT(terminate()) ); + connect( dlgedit_PushButton_2, TQT_SIGNAL(pressed()), TQT_SLOT(terminate()) ); // dlgedit_PushButton_2->setAutoRepeat( FALSE ); // dlgedit_PushButton_2->setAutoResize( FALSE ); grid->addWidget( dlgedit_PushButton_2, 2, 2 ); diff --git a/ksirc/KSTicker/speeddialogData.h b/ksirc/KSTicker/speeddialogData.h index 6e9f06f9..27b6c27a 100644 --- a/ksirc/KSTicker/speeddialogData.h +++ b/ksirc/KSTicker/speeddialogData.h @@ -13,9 +13,9 @@ #ifndef speeddialogData_included #define speeddialogData_included -#include <qdialog.h> -#include <qslider.h> -#include <qlcdnumber.h> +#include <tqdialog.h> +#include <tqslider.h> +#include <tqlcdnumber.h> class speeddialogData : public QDialog { @@ -25,7 +25,7 @@ public: speeddialogData ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -41,10 +41,10 @@ protected slots: virtual void updateStep(int); protected: - QSlider* sliderTick; - QSlider* sliderStep; - QLCDNumber* lcdTick; - QLCDNumber* lcdStep; + TQSlider* sliderTick; + TQSlider* sliderStep; + TQLCDNumber* lcdTick; + TQLCDNumber* lcdStep; }; diff --git a/ksirc/NewWindowDialog.cpp b/ksirc/NewWindowDialog.cpp index c4af16f1..1a0f2dba 100644 --- a/ksirc/NewWindowDialog.cpp +++ b/ksirc/NewWindowDialog.cpp @@ -2,19 +2,19 @@ #include <kconfig.h> #include <klocale.h> #include <kcombobox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> #include <klineedit.h> #include "NewWindowDialog.h" -NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, QWidget * parent, const char * name) +NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, TQWidget * parent, const char * name) : KDialogBase(parent, name, true, i18n("New Window For"), Ok|Cancel, Ok, true), m_channelInfo(channelInfo) { - QHBox * w = makeHBoxMainWidget(); + TQHBox * w = makeHBoxMainWidget(); - QLabel * l = new QLabel(i18n("C&hannel/Nick:"), w); + TQLabel * l = new TQLabel(i18n("C&hannel/Nick:"), w); m_combo = new KHistoryCombo(w); m_combo->setFocus(); @@ -24,16 +24,16 @@ NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, QWidget * pare l->setBuddy(m_combo); - QLabel * l2 = new QLabel(i18n("&Key:"), w); + TQLabel * l2 = new TQLabel(i18n("&Key:"), w); m_le = new KLineEdit(w); m_le->setEnabled(false); l2->setBuddy(m_le); connect( - m_combo, SIGNAL(activated(const QString &)), - m_combo, SLOT(addToHistory(const QString &))); - connect( m_combo->lineEdit(), SIGNAL(textChanged ( const QString & )), - this, SLOT( slotTextChanged( const QString &))); + m_combo, TQT_SIGNAL(activated(const TQString &)), + m_combo, TQT_SLOT(addToHistory(const TQString &))); + connect( m_combo->lineEdit(), TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT( slotTextChanged( const TQString &))); KConfig *kConfig = kapp->config(); KConfigGroupSaver saver(kConfig, "Recent"); @@ -48,7 +48,7 @@ NewWindowDialog::~NewWindowDialog() kConfig->writeEntry("Channels", m_combo->historyItems()); } -void NewWindowDialog::slotTextChanged( const QString &text) +void NewWindowDialog::slotTextChanged( const TQString &text) { enableButtonOK( !text.isEmpty() ); diff --git a/ksirc/NewWindowDialog.h b/ksirc/NewWindowDialog.h index 37449e0e..3590c691 100644 --- a/ksirc/NewWindowDialog.h +++ b/ksirc/NewWindowDialog.h @@ -14,13 +14,13 @@ class NewWindowDialog : public KDialogBase public: - NewWindowDialog(const KSircChannel &, QWidget * parent = 0, const char * name = 0); + NewWindowDialog(const KSircChannel &, TQWidget * parent = 0, const char * name = 0); ~NewWindowDialog(); protected slots: void slotOk(); - void slotTextChanged( const QString &); + void slotTextChanged( const TQString &); signals: void openTopLevel(const KSircChannel &); diff --git a/ksirc/ahistlineedit.cpp b/ksirc/ahistlineedit.cpp index 72e6da35..2455047d 100644 --- a/ksirc/ahistlineedit.cpp +++ b/ksirc/ahistlineedit.cpp @@ -34,7 +34,7 @@ focusOutEvent: ditto Variables: - QStrList: current list of history items. + TQStrList: current list of history items. current: what I think is the current list item. *************************************************************************/ @@ -43,31 +43,31 @@ #include "ahistlineedit.h" #include "colorpicker.h" #include "ksopts.h" -#include <qtextedit.h> -#include <qlayout.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qpen.h> -#include <qpainter.h> +#include <tqtextedit.h> +#include <tqlayout.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqpen.h> +#include <tqpainter.h> #include <kdebug.h> #include <kstdaction.h> #include <kstdaccel.h> #include <kshortcut.h> -aHistLineEdit::aHistLineEdit(QWidget *parent, const char *name) - : QTextEdit(parent, name) +aHistLineEdit::aHistLineEdit(TQWidget *parent, const char *name) + : TQTextEdit(parent, name) { m_drawrect = false; m_height = 0; - current = hist.append(QString::null); // Set the current as blank - setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary); + current = hist.append(TQString::null); // Set the current as blank + setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); setVScrollBarMode( AlwaysOff ); setHScrollBarMode( AlwaysOff ); -// connect( this, SIGNAL( returnPressed () ), this, SLOT( slotReturn() ) ); - connect( this, SIGNAL( textChanged () ), this, SLOT( slotMaybeResize() ) ); +// connect( this, TQT_SIGNAL( returnPressed () ), this, TQT_SLOT( slotReturn() ) ); + connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) ); setTabChangesFocus(true); setTextFormat(PlainText); @@ -80,20 +80,20 @@ aHistLineEdit::aHistLineEdit(QWidget *parent, const char *name) void aHistLineEdit::setCursorPosition ( int index ) { - QTextEdit::setCursorPosition(0, index); + TQTextEdit::setCursorPosition(0, index); } int aHistLineEdit::cursorPosition() const { int par, index; - QTextEdit::getCursorPosition(&par, &index); + TQTextEdit::getCursorPosition(&par, &index); return index; } void aHistLineEdit::slotMaybeResize() { /* - if(QTextEdit::text().contains("\n")){ + if(TQTextEdit::text().contains("\n")){ setText(text()); setCursorPosition(text().length()); } @@ -112,7 +112,7 @@ void aHistLineEdit::slotMaybeResize() } } - QFontMetrics metrics( currentFont() ); + TQFontMetrics metrics( currentFont() ); // int h = metrics.height() * lines(); int h = metrics.lineSpacing() * lines()+8; // only grow if we are less than 1/4 the size of the toplevel @@ -127,11 +127,11 @@ void aHistLineEdit::slotMaybeResize() } if(h != m_height){ m_height = h; - QSize s = size(); + TQSize s = size(); s.setHeight(h); resize(s); setFixedHeight( h ); - QLayout *l = topLevelWidget()->layout(); + TQLayout *l = topLevelWidget()->layout(); if(l){ l->invalidate(); l->activate(); @@ -140,7 +140,7 @@ void aHistLineEdit::slotMaybeResize() } } -void aHistLineEdit::keyPressEvent( QKeyEvent *e ) +void aHistLineEdit::keyPressEvent( TQKeyEvent *e ) { bool accept = true; bool ignore = false; @@ -155,7 +155,7 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e ) // those keycodes correspond to the ones in ksirc.pl in sub hook_fixcolours if ( e->state() == ControlButton ) { - QString s = text(); + TQString s = text(); int curPos = cursorPosition(); switch ( e->key() ) { case Key_K: @@ -221,7 +221,7 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e ) callKeyPressEvent = true; } } - // QLineEdit falsely converts Alt+C to the character 'c', so to work around + // TQLineEdit falsely converts Alt+C to the character 'c', so to work around // this, we just don't pass any Alt+? key on to the keyPressEvent() method. else if (e->state() == AltButton) { switch(e->key()){ @@ -293,13 +293,13 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e ) } else { if ( callKeyPressEvent ) { - QTextEdit::keyPressEvent(e); + TQTextEdit::keyPressEvent(e); } } } } -bool aHistLineEdit::processKeyEvent( QKeyEvent *e ) +bool aHistLineEdit::processKeyEvent( TQKeyEvent *e ) { /* * Only put key sequences in here you @@ -322,13 +322,13 @@ bool aHistLineEdit::processKeyEvent( QKeyEvent *e ) void aHistLineEdit::ColourPickerPopUp() { ColorPicker picker( this ); - if ( picker.exec() == QDialog::Accepted ) + if ( picker.exec() == TQDialog::Accepted ) { - QString s = text(); + TQString s = text(); // int curPos = cursorPosition(); int curPos, p; getCursorPosition(&p, &curPos); - QString colString = picker.colorString(); + TQString colString = picker.colorString(); colString.prepend( 0x03 ); s.insert( curPos, colString ); setText( s ); @@ -336,42 +336,42 @@ void aHistLineEdit::ColourPickerPopUp() } } -void aHistLineEdit::focusInEvent(QFocusEvent *e) +void aHistLineEdit::focusInEvent(TQFocusEvent *e) { - QTextEdit::focusInEvent(e); + TQTextEdit::focusInEvent(e); emit gotFocus(); } -void aHistLineEdit::focusOutEvent(QFocusEvent *e) +void aHistLineEdit::focusOutEvent(TQFocusEvent *e) { - QTextEdit::focusOutEvent(e); + TQTextEdit::focusOutEvent(e); emit lostFocus(); } #if 0 -void aHistLineEdit::mousePressEvent ( QMouseEvent *e ) +void aHistLineEdit::mousePressEvent ( TQMouseEvent *e ) { if(e->button() == MidButton){ /* - * emit pasteText(QApplication::clipboard()->text(QClipboard::Selection)); + * emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection)); */ } else{ - QTextEdit::mousePressEvent(e); + TQTextEdit::mousePressEvent(e); } } #endif -bool aHistLineEdit::eventFilter( QObject *o, QEvent *e ) +bool aHistLineEdit::eventFilter( TQObject *o, TQEvent *e ) { - if ( o == this && e->type() == QEvent::AccelOverride ) - if(processKeyEvent( static_cast<QKeyEvent*>( e ) ) == true) + if ( o == this && e->type() == TQEvent::AccelOverride ) + if(processKeyEvent( static_cast<TQKeyEvent*>( e ) ) == true) return true; - return QTextEdit::eventFilter( o, e ); + return TQTextEdit::eventFilter( o, e ); } -QString aHistLineEdit::text() const +TQString aHistLineEdit::text() const { - QString s = QTextEdit::text(); + TQString s = TQTextEdit::text(); s.remove("\n"); return s; } @@ -381,27 +381,27 @@ void aHistLineEdit::paste() { /* we let the top level take it */ if(ksopts->oneLineEntry) { - emit pasteText(QApplication::clipboard()->text(QClipboard::Selection)); + emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection)); } else { - QString paste = QApplication::clipboard()->text(QClipboard::Selection); + TQString paste = TQApplication::clipboard()->text(QClipboard::Selection); paste.replace("\n", " ~ "); insert(paste); } } -void aHistLineEdit::paintEvent ( QPaintEvent *p ) +void aHistLineEdit::paintEvent ( TQPaintEvent *p ) { - QTextEdit::paintEvent(p); + TQTextEdit::paintEvent(p); if(m_drawrect == true){ - QPainter paint(this); - QPen pen = paint.pen(); + TQPainter paint(this); + TQPen pen = paint.pen(); pen.setWidth(5); pen.setStyle(Qt::SolidLine); pen.setColor(palette().active().highlight()); paint.setPen(pen); - QRect r = frameRect(); + TQRect r = frameRect(); paint.drawRect(r); } @@ -414,7 +414,7 @@ void aHistLineEdit::doEnterKey() if (!text().isEmpty()) { // text() has something -> store it in current and add a new empty one *current = text(); - hist.append(QString::null); // always add empty line at end + hist.append(TQString::null); // always add empty line at end if (hist.count() >= 256) { // if appended check if it will go beyond the max number of entries hist.remove(hist.begin()); // if so then delete the first entry } @@ -424,7 +424,7 @@ void aHistLineEdit::doEnterKey() // both !isEmpty() and != -> append at end current = hist.fromLast(); // goto last entry which is empty *current = text(); // change content to text() - hist.append(QString::null); // always add empty line at end + hist.append(TQString::null); // always add empty line at end if (hist.count() >= 256) { // if appended check if it will go beyond the max number of entries hist.remove(hist.begin()); // if so then delete the first entry } diff --git a/ksirc/ahistlineedit.h b/ksirc/ahistlineedit.h index a273791f..750d79a0 100644 --- a/ksirc/ahistlineedit.h +++ b/ksirc/ahistlineedit.h @@ -1,27 +1,27 @@ #ifndef AHISTLINEEDIT_H #define AHISTLINEEDIT_H -#include <qtextedit.h> -#include <qstringlist.h> -#include <qsize.h> +#include <tqtextedit.h> +#include <tqstringlist.h> +#include <tqsize.h> class aHistLineEdit : public QTextEdit { Q_OBJECT public: - aHistLineEdit(QWidget *parent = 0, const char *name = 0); + aHistLineEdit(TQWidget *parent = 0, const char *name = 0); int cursorPosition () const; void setCursorPosition(int); - QString text() const; + TQString text() const; signals: // Don't use returnPressed from the textEdit void gotReturnPressed(); void gotFocus(); void lostFocus(); - void pasteText(const QString&); + void pasteText(const TQString&); void notTab(); void resized(); @@ -30,22 +30,22 @@ public slots: virtual void slotMaybeResize(); protected: - bool processKeyEvent( QKeyEvent * ); - virtual void keyPressEvent ( QKeyEvent * ); - virtual void focusInEvent ( QFocusEvent * ); - virtual void focusOutEvent ( QFocusEvent * ); -// virtual void mousePressEvent ( QMouseEvent * ); + bool processKeyEvent( TQKeyEvent * ); + virtual void keyPressEvent ( TQKeyEvent * ); + virtual void focusInEvent ( TQFocusEvent * ); + virtual void focusOutEvent ( TQFocusEvent * ); +// virtual void mousePressEvent ( TQMouseEvent * ); - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); private: void doEnterKey(); - QStringList hist; - QStringList::Iterator current; + TQStringList hist; + TQStringList::Iterator current; void ColourPickerPopUp(); int m_height; diff --git a/ksirc/alistbox.cpp b/ksirc/alistbox.cpp index 9b632676..779bd730 100644 --- a/ksirc/alistbox.cpp +++ b/ksirc/alistbox.cpp @@ -16,42 +16,42 @@ #include "alistbox.h" #include "nickColourMaker.h" -#include <qdragobject.h> -#include <qpainter.h> +#include <tqdragobject.h> +#include <tqpainter.h> #include <kdebug.h> #include <kglobal.h> #include <kurldrag.h> -aListBox::aListBox(QWidget *parent, const char *name ) - : QListBox(parent,name) +aListBox::aListBox(TQWidget *parent, const char *name ) + : TQListBox(parent,name) { clear(); p_scroll = palette().copy(); setAcceptDrops( true ); - connect(this, SIGNAL(selected (const QString&)), - this, SIGNAL(selectedNick(const QString&))); + connect(this, TQT_SIGNAL(selected (const TQString&)), + this, TQT_SIGNAL(selectedNick(const TQString&))); m_nickListDirty = true; updateNickPrefixWidth(); - connect( this, SIGNAL( contextMenuRequested( QListBoxItem *, const QPoint & ) ), - this, SLOT( reEmitContextMenuRequest( QListBoxItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *, const TQPoint & ) ), + this, TQT_SLOT( reEmitContextMenuRequest( TQListBoxItem * ) ) ); } aListBox::~aListBox() { } -void aListBox::reEmitContextMenuRequest( QListBoxItem *item ) +void aListBox::reEmitContextMenuRequest( TQListBoxItem *item ) { emit contextMenuRequested( index( item ) ); } void aListBox::clear() { - QListBox::clear(); + TQListBox::clear(); } @@ -72,7 +72,7 @@ void aListBox::inSort ( nickListItem *lbi) m_nickListDirty = true; } -void aListBox::inSort ( QString text, bool top) +void aListBox::inSort ( TQString text, bool top) { nickListItem *nli = new nickListItem(); nli->setText(text); @@ -91,7 +91,7 @@ int aListBox::findSep() return i; } -int aListBox::searchFor(const QString &nick, bool &found, bool top) +int aListBox::searchFor(const TQString &nick, bool &found, bool top) { int min = 0, max = 0; int current = 0, compare = 0; @@ -198,7 +198,7 @@ bool aListBox::isTop(int index) return TRUE; } -int aListBox::findNick(const QString &str) +int aListBox::findNick(const TQString &str) { bool found; int index; @@ -213,15 +213,15 @@ int aListBox::findNick(const QString &str) } nickListItem *aListBox::item(int index){ - return (nickListItem *) QListBox::item(index); + return (nickListItem *) TQListBox::item(index); } -void aListBox::dragMoveEvent( QDragMoveEvent *e ) +void aListBox::dragMoveEvent( TQDragMoveEvent *e ) { bool ok = (count() > 0 && KURLDrag::canDecode( e )); if(!ok) - ok = QTextDrag::canDecode(e); + ok = TQTextDrag::canDecode(e); e->accept( ok ); if ( ok ) @@ -229,22 +229,22 @@ void aListBox::dragMoveEvent( QDragMoveEvent *e ) } -void aListBox::dropEvent( QDropEvent *e ) +void aListBox::dropEvent( TQDropEvent *e ) { - QListBoxItem *item = itemAt( e->pos() ); + TQListBoxItem *item = itemAt( e->pos() ); if ( !item ) return; setCurrentItem( item ); - QStringList urls; + TQStringList urls; KURLDrag::decodeLocalFiles( e, urls ); - QString text; + TQString text; if ( !urls.isEmpty() ) emit urlsDropped( urls, item->text() ); - else if(QTextDrag::decode(e, text)){ + else if(TQTextDrag::decode(e, text)){ emit textDropped( item, text); } } @@ -264,7 +264,7 @@ void aListBox::updateNeedNickPrefixFlag() const m_needNickPrefix = false; if(ksopts->useColourNickList == false){ - QListBoxItem *item = firstItem(); + TQListBoxItem *item = firstItem(); for (; item; item = item->next() ) { nickListItem *nickItem = static_cast<nickListItem *>( item ); @@ -282,15 +282,15 @@ void aListBox::updateNeedNickPrefixFlag() const m_nickListDirty = false; } -void aListBox::fontChange( const QFont &f ) +void aListBox::fontChange( const TQFont &f ) { - QListBox::fontChange( f ); + TQListBox::fontChange( f ); updateNickPrefixWidth(); } void aListBox::updateNickPrefixWidth() { - QFontMetrics metrics( font() ); + TQFontMetrics metrics( font() ); m_nickPrefixWidth = 0; @@ -320,7 +320,7 @@ void aListBox::clearAdvOps() } nickListItem::nickListItem() - : QListBoxItem() + : TQListBoxItem() { is_op = FALSE; is_voice = FALSE; @@ -330,7 +330,7 @@ nickListItem::nickListItem() } nickListItem::nickListItem(const nickListItem &old) - : QListBoxItem() + : TQListBoxItem() { is_op = old.is_op; is_voice = old.is_voice; @@ -372,20 +372,20 @@ void nickListItem::setIrcOp(bool _ircop) static_cast<aListBox *>( listBox() )->setNickListDirty(); } -void nickListItem::forceColour(const QColor *col) +void nickListItem::forceColour(const TQColor *col) { forcedCol = col; } -void nickListItem::paint(QPainter *p) +void nickListItem::paint(TQPainter *p) { - QFontMetrics fm = p->fontMetrics(); + TQFontMetrics fm = p->fontMetrics(); int yPos; // vertical text position int nickPosX = 3; yPos = fm.ascent() + fm.leading()/2; - QPen pen = p->pen(); - QFont font = p->font(); + TQPen pen = p->pen(); + TQFont font = p->font(); if(ksopts->useColourNickList == true) { if(ksopts->nickColourization){ @@ -400,25 +400,25 @@ void nickListItem::paint(QPainter *p) } if(is_voice == TRUE){ - QPen open = p->pen(); + TQPen open = p->pen(); p->setPen(ksopts->channelColor); p->drawText( nickPosX, yPos, "+" ); nickPosX += fm.width( "+" ); p->setPen(open); -// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->channelColor, Qt::Dense7Pattern)); +// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->channelColor, Qt::Dense7Pattern)); } if(is_op == TRUE) { - QPen open = p->pen(); + TQPen open = p->pen(); p->setPen(ksopts->errorColor); p->drawText( nickPosX, yPos, "@" ); nickPosX += fm.width( "@" ); p->setPen(open); -// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->errorColor, Qt::Dense7Pattern)); +// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->errorColor, Qt::Dense7Pattern)); } if(is_away == TRUE) p->setPen(p->pen().color().dark(150)); if(is_ircop == TRUE){ - QPen open = p->pen(); + TQPen open = p->pen(); p->setPen(ksopts->errorColor); p->drawText( nickPosX, yPos, "*" ); nickPosX += fm.width( "*" ); @@ -435,7 +435,7 @@ void nickListItem::paint(QPainter *p) if(is_away == TRUE) p->setPen(p->pen().color().dark(150)); if(is_ircop == TRUE){ - QFont bfont = font; + TQFont bfont = font; bfont.setBold(TRUE); p->setFont(bfont); } @@ -460,9 +460,9 @@ void nickListItem::paint(QPainter *p) p->setFont(font); } -QString nickListItem::nickPrefix() const +TQString nickListItem::nickPrefix() const { - QString prefix; + TQString prefix; if ( voice() ) prefix += aListBox::nickPrefixVoice(); @@ -479,19 +479,19 @@ QString nickListItem::nickPrefix() const return prefix; } -int nickListItem::height(const QListBox *lb ) const +int nickListItem::height(const TQListBox *lb ) const { return lb->fontMetrics().lineSpacing() + 1; } -int nickListItem::width(const QListBox *lb ) const +int nickListItem::width(const TQListBox *lb ) const { return static_cast<const aListBox *>( lb )->nickPrefixWidth() + lb->fontMetrics().width( text() ) + 6; } -const QPixmap* nickListItem::pixmap() const +const TQPixmap* nickListItem::pixmap() const { return 0l; } diff --git a/ksirc/alistbox.h b/ksirc/alistbox.h index 0f818bba..e1e4c2c9 100644 --- a/ksirc/alistbox.h +++ b/ksirc/alistbox.h @@ -1,7 +1,7 @@ #ifndef ALISTBOX_H #define ALISTBOX_H -#include <qlistbox.h> +#include <tqlistbox.h> #include "ksopts.h" class nickListItem : public QListBoxItem @@ -11,10 +11,10 @@ class nickListItem : public QListBoxItem nickListItem(const nickListItem &old); virtual ~nickListItem(); - virtual int height ( const QListBox * ) const; - virtual int width ( const QListBox * ) const; - QString text () const { return string; } - const QPixmap* pixmap () const; + virtual int height ( const TQListBox * ) const; + virtual int width ( const TQListBox * ) const; + TQString text () const { return string; } + const TQPixmap* pixmap () const; bool op() const { return is_op; } bool voice() const { return is_voice; } @@ -26,16 +26,16 @@ class nickListItem : public QListBoxItem void setAway(bool _away = FALSE); void setIrcOp(bool _ircop = FALSE); - void setText(const QString &str) { string = str; } + void setText(const TQString &str) { string = str; } - QString nickPrefix() const; + TQString nickPrefix() const; - void forceColour(const QColor *col); + void forceColour(const TQColor *col); nickListItem &operator= ( const nickListItem & nli ); protected: - virtual void paint ( QPainter * ); + virtual void paint ( TQPainter * ); private: bool is_op:1; @@ -43,8 +43,8 @@ protected: bool is_away:1; bool is_ircop:1; - QString string; - const QColor *forcedCol; + TQString string; + const TQColor *forcedCol; }; class aListBox : public QListBox @@ -52,20 +52,20 @@ class aListBox : public QListBox Q_OBJECT public: - aListBox(QWidget *parent = 0, const char *name = 0); + aListBox(TQWidget *parent = 0, const char *name = 0); virtual ~aListBox(); void clear(); void inSort ( nickListItem *); - void inSort ( QString text, bool top=FALSE); + void inSort ( TQString text, bool top=FALSE); nickListItem *item(int index); bool isTop(int index); - int findNick(const QString &str); + int findNick(const TQString &str); void clearAdvOps(); @@ -77,33 +77,33 @@ public: unsigned short int nickPrefixWidth() const { return m_nickPrefixWidth; } - virtual void fontChange( const QFont &f ); + virtual void fontChange( const TQFont &f ); - static QString nickPrefixOp() { return QString::fromLatin1( "o" ); } - static QString nickPrefixVoice() { return QString::fromLatin1( "v" ); } - static QString nickPrefixAway() { return QString::fromLatin1( "a" ); } - static QString nickPrefixIrcOp() { return QString::fromLatin1( "O" ); } + static TQString nickPrefixOp() { return TQString::fromLatin1( "o" ); } + static TQString nickPrefixVoice() { return TQString::fromLatin1( "v" ); } + static TQString nickPrefixAway() { return TQString::fromLatin1( "a" ); } + static TQString nickPrefixIrcOp() { return TQString::fromLatin1( "O" ); } signals: void contextMenuRequested(int index); - void selectedNick(const QString&); - void urlsDropped( const QStringList& urls, const QString& nick ); - void textDropped( const QListBoxItem *item, const QString& text ); + void selectedNick(const TQString&); + void urlsDropped( const TQStringList& urls, const TQString& nick ); + void textDropped( const TQListBoxItem *item, const TQString& text ); protected: virtual int findSep(); - virtual int searchFor(const QString &nick, bool &found, bool top); - virtual void dragMoveEvent( QDragMoveEvent * ); - virtual void dropEvent( QDropEvent * ); + virtual int searchFor(const TQString &nick, bool &found, bool top); + virtual void dragMoveEvent( TQDragMoveEvent * ); + virtual void dropEvent( TQDropEvent * ); private slots: - void reEmitContextMenuRequest( QListBoxItem *item ); + void reEmitContextMenuRequest( TQListBoxItem *item ); private: void updateNeedNickPrefixFlag() const; void updateNickPrefixWidth(); - QPalette p_scroll; + TQPalette p_scroll; mutable bool m_nickListDirty; mutable bool m_needNickPrefix; int m_nickPrefixWidth; diff --git a/ksirc/baserules.cpp b/ksirc/baserules.cpp index 11e5850c..df4a40cc 100644 --- a/ksirc/baserules.cpp +++ b/ksirc/baserules.cpp @@ -3,15 +3,15 @@ #include "ksopts.h" #include "ksircprocess.h" -#include <qregexp.h> +#include <tqregexp.h> #include <stdio.h> -void KSMBaseRules::sirc_receive(QCString, bool) +void KSMBaseRules::sirc_receive(TQCString, bool) { } -void KSMBaseRules::control_message(int, QString) +void KSMBaseRules::control_message(int, TQString) { } @@ -81,8 +81,8 @@ filterRuleList *KSMBaseRules::defaultRules() frl->append(fr); } if( ksopts->msgContainNick.isValid() ){ - //QString nick = ksopts->nick; - QString nick = ksircProcess()->getNick(); + //TQString nick = ksopts->nick; + TQString nick = ksircProcess()->getNick(); if ( !nick.isEmpty() ) { if(nick.length() > 83){ qDebug("Nick too long"); @@ -92,7 +92,7 @@ filterRuleList *KSMBaseRules::defaultRules() * Since the nick is used in the regex we must * escape all regex words */ - nick = QRegExp::escape(nick); + nick = TQRegExp::escape(nick); sprintf(match_us, "(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", nick.latin1()); @@ -107,16 +107,16 @@ filterRuleList *KSMBaseRules::defaultRules() } } if( ksopts->msg1Contain.isValid() ){ - //QString nick = ksopts->nick; + //TQString nick = ksopts->nick; /* * Since the nick is used in the regex we must * escape all regex words */ - QString msg = ksopts->msg1String; + TQString msg = ksopts->msg1String; if(msg.length() > 0){ if(ksopts->msg1Regex == false) - msg = QRegExp::escape(msg); + msg = TQRegExp::escape(msg); snprintf(msg1_match, 100, "(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", msg.latin1()); @@ -131,16 +131,16 @@ filterRuleList *KSMBaseRules::defaultRules() } } if( ksopts->msg2Contain.isValid() ){ - //QString nick = ksopts->nick; + //TQString nick = ksopts->nick; /* * Since the nick is used in the regex we must * escape all regex words */ - QString msg = ksopts->msg2String; + TQString msg = ksopts->msg2String; if(msg.length() > 0){ if(ksopts->msg2Regex == false) - msg = QRegExp::escape(msg); + msg = TQRegExp::escape(msg); snprintf(msg2_match, 100, "(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", msg.latin1()); diff --git a/ksirc/baserules.h b/ksirc/baserules.h index 690ed28e..1ba79bf7 100644 --- a/ksirc/baserules.h +++ b/ksirc/baserules.h @@ -15,9 +15,9 @@ public: { } - virtual void sirc_receive(QCString str, bool broadcast); + virtual void sirc_receive(TQCString str, bool broadcast); - virtual void control_message(int, QString); + virtual void control_message(int, TQString); filterRuleList *defaultRules(); diff --git a/ksirc/boundscheckingarray.h b/ksirc/boundscheckingarray.h index a8a29ca1..92b528b7 100644 --- a/ksirc/boundscheckingarray.h +++ b/ksirc/boundscheckingarray.h @@ -20,9 +20,9 @@ #define __boundscheckingarray__ #include <assert.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> -/* I wish QValueVector would check bounds upon extraction.. */ +/* I wish TQValueVector would check bounds upon extraction.. */ template <typename T, const unsigned int size> class BoundsCheckingArray @@ -51,9 +51,9 @@ public: return m_data[ index ]; } - QValueVector<T> toValueVector() const + TQValueVector<T> toValueVector() const { - QValueVector<T> vector( size ); + TQValueVector<T> vector( size ); for ( unsigned int i = 0; i < size; ++i ) vector[ i ] = m_data[ i ]; return vector; diff --git a/ksirc/chanButtons.cpp b/ksirc/chanButtons.cpp index f40c7176..b6974fd5 100644 --- a/ksirc/chanButtons.cpp +++ b/ksirc/chanButtons.cpp @@ -9,65 +9,65 @@ #include <kstdguiitem.h> #include <kpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqlineedit.h> #include "ksircprocess.h" -static void makeSquare(QWidget *w) +static void makeSquare(TQWidget *w) { - QSize sh = w->sizeHint(); + TQSize sh = w->sizeHint(); int s = sh.height(); w->setFixedSize(s,s); } -chanButtons::chanButtons(KSircProcess *proc, QWidget *parent, const char *name) -: QWidget(parent, name), +chanButtons::chanButtons(KSircProcess *proc, TQWidget *parent, const char *name) +: TQWidget(parent, name), m_proc(proc) { Popupmenu = new KPopupMenu( this ); Popupmenu->insertTitle(i18n("Channel Modes")); - toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, SLOT(invite())); - toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, SLOT(limited())); - toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, SLOT(key())); - toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, SLOT(secret())); + toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, TQT_SLOT(invite())); + toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, TQT_SLOT(limited())); + toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, TQT_SLOT(key())); + toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, TQT_SLOT(secret())); Popupmenu->insertSeparator(); Popupmenu->insertTitle(i18n("User Modes")); - toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, SLOT(invisible())); - toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, SLOT(wallops())); - toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, SLOT(serverNotices())); + toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, TQT_SLOT(invisible())); + toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, TQT_SLOT(wallops())); + toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, TQT_SLOT(serverNotices())); - layout = new QHBoxLayout(this); + layout = new TQHBoxLayout(this); layout->setSpacing(0); layout->setMargin(0); - protectButton = new QPushButton(i18n("T"), this); + protectButton = new TQPushButton(i18n("T"), this); protectButton->setToggleButton(true); makeSquare(protectButton); - QToolTip::add(protectButton, i18n("Only op'ed users can change the topic")); - connect(protectButton, SIGNAL(clicked()), this, SLOT(protectMode())); + TQToolTip::add(protectButton, i18n("Only op'ed users can change the topic")); + connect(protectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(protectMode())); layout->addWidget(protectButton); - outsideButton = new QPushButton(i18n("N"), this); + outsideButton = new TQPushButton(i18n("N"), this); outsideButton->setToggleButton(true); makeSquare(outsideButton); - QToolTip::add(outsideButton, i18n("No outside messages")); - connect(outsideButton, SIGNAL(clicked()), this, SLOT(outsideMode())); + TQToolTip::add(outsideButton, i18n("No outside messages")); + connect(outsideButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(outsideMode())); layout->addWidget(outsideButton); - moderateButton = new QPushButton(i18n("M"), this); + moderateButton = new TQPushButton(i18n("M"), this); moderateButton->setToggleButton(true); makeSquare(moderateButton); - QToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak")); - connect(moderateButton, SIGNAL(clicked()), this, SLOT(moderateMode())); + TQToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak")); + connect(moderateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(moderateMode())); layout->addWidget(moderateButton); - menuButton = new QPushButton(i18n("..."), this); + menuButton = new TQPushButton(i18n("..."), this); makeSquare(menuButton); menuButton->setFixedWidth(menuButton->width()*2); menuButton->setPopup(Popupmenu); - QToolTip::add(menuButton, i18n("More mode commands")); + TQToolTip::add(menuButton, i18n("More mode commands")); layout->addWidget(menuButton); } @@ -75,11 +75,11 @@ void chanButtons::invite() { if (Popupmenu->isItemChecked(toggleMenu[0])) { Popupmenu->setItemChecked(toggleMenu[0], false); - emit mode(QString("-i"), 0); + emit mode(TQString("-i"), 0); } else { Popupmenu->setItemChecked(toggleMenu[0], true); - emit mode(QString("+i"), 0); + emit mode(TQString("+i"), 0); } } @@ -89,11 +89,11 @@ void chanButtons::limited() chanDialog->exec(); if (chanDialog->sendLimitedUsers() == 0) { Popupmenu->setItemChecked(toggleMenu[1], false); - emit mode(QString("-l"), 0); + emit mode(TQString("-l"), 0); } else { Popupmenu->setItemChecked(toggleMenu[1], true); - emit mode(QString("+l %1").arg(chanDialog->sendLimitedUsers()), 0); + emit mode(TQString("+l %1").arg(chanDialog->sendLimitedUsers()), 0); } delete chanDialog; } @@ -104,12 +104,12 @@ void chanButtons::key() if (Popupmenu->isItemChecked(toggleMenu[2])) { chanDialog->exec(); Popupmenu->setItemChecked(toggleMenu[2], false); - emit mode(QString("-k %1").arg(chanDialog->sendKey()), 0); + emit mode(TQString("-k %1").arg(chanDialog->sendKey()), 0); } else { chanDialog->exec(); Popupmenu->setItemChecked(toggleMenu[2], true); - emit mode(QString("+k %1").arg(chanDialog->sendKey()), 0); + emit mode(TQString("+k %1").arg(chanDialog->sendKey()), 0); } delete chanDialog; } @@ -118,11 +118,11 @@ void chanButtons::secret() { if (Popupmenu->isItemChecked(toggleMenu[3])) { Popupmenu->setItemChecked(toggleMenu[3], false); - emit mode(QString("-s"), 0); + emit mode(TQString("-s"), 0); } else { Popupmenu->setItemChecked(toggleMenu[3], true); - emit mode(QString("+s"), 0); + emit mode(TQString("+s"), 0); } } @@ -130,11 +130,11 @@ void chanButtons::invisible() { if (Popupmenu->isItemChecked(toggleMenu[4])) { Popupmenu->setItemChecked(toggleMenu[4], false); - emit mode(QString("-i"), 1, m_proc->getNick()); + emit mode(TQString("-i"), 1, m_proc->getNick()); } else { Popupmenu->setItemChecked(toggleMenu[4], true); - emit mode(QString("+i"), 1, m_proc->getNick()); + emit mode(TQString("+i"), 1, m_proc->getNick()); } } @@ -142,11 +142,11 @@ void chanButtons::wallops() { if (Popupmenu->isItemChecked(toggleMenu[5])) { Popupmenu->setItemChecked(toggleMenu[5], false); - emit mode(QString("-w"), 1, m_proc->getNick()); + emit mode(TQString("-w"), 1, m_proc->getNick()); } else { Popupmenu->setItemChecked(toggleMenu[5], true); - emit mode(QString("+w"), 1, m_proc->getNick()); + emit mode(TQString("+w"), 1, m_proc->getNick()); } } @@ -154,36 +154,36 @@ void chanButtons::serverNotices() { if (Popupmenu->isItemChecked(toggleMenu[6])) { Popupmenu->setItemChecked(toggleMenu[6], false); - emit mode(QString("-s"), 1, m_proc->getNick()); + emit mode(TQString("-s"), 1, m_proc->getNick()); } else { Popupmenu->setItemChecked(toggleMenu[6], true); - emit mode(QString("+s"), 1, m_proc->getNick()); + emit mode(TQString("+s"), 1, m_proc->getNick()); } } void chanButtons::protectMode() { if (protectButton->isOn()) - emit mode(QString("+t"), 0); + emit mode(TQString("+t"), 0); else - emit mode(QString("-t"), 0); + emit mode(TQString("-t"), 0); } void chanButtons::outsideMode() { if (outsideButton->isOn()) - emit mode(QString("+n"), 0); + emit mode(TQString("+n"), 0); else - emit mode(QString("-n"), 0); + emit mode(TQString("-n"), 0); } void chanButtons::moderateMode() { if (moderateButton->isOn()) - emit mode(QString("+m"), 0); + emit mode(TQString("+m"), 0); else - emit mode(QString("-m"), 0); + emit mode(TQString("-m"), 0); } void chanButtons::setButtonsEnabled(bool enabled) @@ -203,14 +203,14 @@ void chanButtons::setMenuItemMode(int id, bool value) Popupmenu->setItemChecked(toggleMenu[id], value); } -chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent, +chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent, const char *name, bool modal) : KDialog(parent, name, modal) { m_sendKey = ""; m_sendLimitedUsers = 0; resize(190, 82); setCaption(i18n("Limit Number of Users")); - LimitedLayout = new QVBoxLayout(this); + LimitedLayout = new TQVBoxLayout(this); LimitedLayout->setSpacing(9); LimitedLayout->setMargin(11); @@ -220,7 +220,7 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent, LimitedLayout->addWidget(SpinBox); break; case key: - EditBox = new QLineEdit(this); + EditBox = new TQLineEdit(this); LimitedLayout->addWidget(EditBox); break; } @@ -230,28 +230,28 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent, Layout->setMargin(0); okButton = new KPushButton(KStdGuiItem::ok(), this); - okButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, + okButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, okButton->sizePolicy().hasHeightForWidth())); Layout->addWidget(okButton); switch (modeType) { case limited: - connect(okButton, SIGNAL(clicked()), SLOT(limitedUsers())); + connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(limitedUsers())); break; case key: - connect(okButton, SIGNAL(clicked()), SLOT(keyString())); + connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(keyString())); break; } Layout->addWidget(okButton); cancelButton = new KPushButton(KStdGuiItem::cancel(), this); - cancelButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, + cancelButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, cancelButton->sizePolicy().hasHeightForWidth())); Layout->addWidget(cancelButton); - connect(cancelButton, SIGNAL(clicked()), SLOT(reject())); + connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); LimitedLayout->addLayout(Layout); - QSpacerItem *spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding); LimitedLayout->addItem(spacer); } diff --git a/ksirc/chanButtons.h b/ksirc/chanButtons.h index 2b7edc3a..a7000361 100644 --- a/ksirc/chanButtons.h +++ b/ksirc/chanButtons.h @@ -3,8 +3,8 @@ #ifndef CHANBUTTONS_H #define CHANBUTTONS_H -#include <qwidget.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqpushbutton.h> #include <kdialog.h> class QHBoxLayout; @@ -21,7 +21,7 @@ class chanButtons : public QWidget Q_OBJECT friend class KSircTopLevel; public: - chanButtons(KSircProcess *proc, QWidget* parent=0, const char* name=0); + chanButtons(KSircProcess *proc, TQWidget* parent=0, const char* name=0); ~chanButtons() {}; void setProtectMode(bool value) { protectButton->setOn(value); } @@ -31,7 +31,7 @@ class chanButtons : public QWidget void setMenuItemMode(int, bool); signals: - void mode(QString, int, QString nick = QString::null); /// int == 0 channel mode, int == 1 user nick mode + void mode(TQString, int, TQString nick = TQString::null); /// int == 0 channel mode, int == 1 user nick mode private slots: void protectMode(); @@ -47,11 +47,11 @@ class chanButtons : public QWidget private: int toggleMenu[7]; - QHBoxLayout *layout; - QPushButton *protectButton; - QPushButton *moderateButton; - QPushButton *outsideButton; - QPushButton *menuButton; + TQHBoxLayout *layout; + TQPushButton *protectButton; + TQPushButton *moderateButton; + TQPushButton *outsideButton; + TQPushButton *menuButton; KPopupMenu *Popupmenu; chanbuttonsDialog *chanDialog; KSircProcess *m_proc; @@ -63,22 +63,22 @@ class chanbuttonsDialog : public KDialog friend class chanButtons; public: enum type { limited, key }; - chanbuttonsDialog(const type &modeType, QWidget *parent=0, const char *name=0, bool modal=true); + chanbuttonsDialog(const type &modeType, TQWidget *parent=0, const char *name=0, bool modal=true); ~chanbuttonsDialog() {}; private slots: void keyString(); void limitedUsers(); - QString sendKey() { return m_sendKey; } + TQString sendKey() { return m_sendKey; } int sendLimitedUsers() { return m_sendLimitedUsers; }; private: - QString m_sendKey; + TQString m_sendKey; int m_sendLimitedUsers; - QVBoxLayout *LimitedLayout; - QHBoxLayout *Layout; + TQVBoxLayout *LimitedLayout; + TQHBoxLayout *Layout; KIntSpinBox *SpinBox; - QLineEdit *EditBox; + TQLineEdit *EditBox; KPushButton *okButton; KPushButton *cancelButton; }; diff --git a/ksirc/chanparser.cpp b/ksirc/chanparser.cpp index 8429a6f5..f3015019 100644 --- a/ksirc/chanparser.cpp +++ b/ksirc/chanparser.cpp @@ -13,15 +13,15 @@ #include <stdio.h> -#include <qregexp.h> -#include <qapplication.h> +#include <tqregexp.h> +#include <tqapplication.h> #include <klocale.h> #include <kmessagebox.h> #include <kdebug.h> -#include <qptrlist.h> +#include <tqptrlist.h> // Static parser table is "initialized" -QDict<parseFunc> ChannelParser::parserTable; +TQDict<parseFunc> ChannelParser::parserTable; ChannelParser::ChannelParser(KSircTopLevel *_top) @@ -64,13 +64,13 @@ ChannelParser::ChannelParser(KSircTopLevel *_top) } -parseResult *ChannelParser::parse(QString string) +parseResult *ChannelParser::parse(TQString string) { // for older Qts parseFunc *pf; if(string.length() < 3){ - return new parseError(string, QString("Dumb string, too short")); + return new parseError(string, TQString("Dumb string, too short")); } /** @@ -85,8 +85,8 @@ parseResult *ChannelParser::parse(QString string) if ((string[0] == '`') & (string.length() > 7)) { - QString prefix = "`"+string[7]+"`"; - string = prefix + QString(" ") + string.mid(8).stripWhiteSpace(); + TQString prefix = "`"+string[7]+"`"; + string = prefix + TQString(" ") + string.mid(8).stripWhiteSpace(); } else if((string[0] == '*') && (string[1] == ' ')) { string.insert(1, ' '); @@ -114,31 +114,31 @@ parseResult *ChannelParser::parse(QString string) return 0; } -parseResult * ChannelParser::parseSSFEClear(QString string) +parseResult * ChannelParser::parseSSFEClear(TQString string) { // top->mainw->clear(); top->clearWindow(); // top->mainw->repaint(TRUE); string.truncate(0); - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEStatus(QString string) +parseResult * ChannelParser::parseSSFEStatus(TQString string) { string.remove(0, 12); // strip off the first 12 characters "<junk> [sirc] " if(string.length() == 0) return new parseError("", i18n("Unable to parse status string")); //kdDebug(5008) << "String: " << string << endl; - QRegExp rx("(\\S+).*\\(*([+-]*[+-\\w\\d]*)\\)*.*on (\\S+) \\((\\S+)\\)"); + TQRegExp rx("(\\S+).*\\(*([+-]*[+-\\w\\d]*)\\)*.*on (\\S+) \\((\\S+)\\)"); if(rx.search(string) == -1){ return new parseError("", i18n("Unable to parse status (no known format) string")); } - QString nick = rx.cap(1); - QString modes = rx.cap(2); - QString chan = rx.cap(3); - QString chanmode = rx.cap(4); + TQString nick = rx.cap(1); + TQString modes = rx.cap(2); + TQString chan = rx.cap(3); + TQString chanmode = rx.cap(4); /* * fix up modes which may have gotten the (away) part @@ -191,24 +191,24 @@ parseResult * ChannelParser::parseSSFEStatus(QString string) top->channelButtons->setMenuItemMode(6, true); else top->channelButtons->setMenuItemMode(6, false); - QString status_line = QString("%1 (%2) %3 (%4) ").arg(chan).arg(chanmode).arg(nick).arg(modes); + TQString status_line = TQString("%1 (%2) %3 (%4) ").arg(chan).arg(chanmode).arg(nick).arg(modes); /* * Go srearching for key and limit messages */ - QRegExp rxKey("<key: (\\S+)>"); + TQRegExp rxKey("<key: (\\S+)>"); if(rxKey.search(string) >= 0){ top->channelButtons->setMenuItemMode(2, true); - status_line += QString("<key: %1>").arg(rxKey.cap(1)); + status_line += TQString("<key: %1>").arg(rxKey.cap(1)); } else { top->channelButtons->setMenuItemMode(2, false); } - QRegExp rxLimit("<limit: (\\S+)>"); + TQRegExp rxLimit("<limit: (\\S+)>"); if(rxLimit.search(string) >= 0){ top->channelButtons->setMenuItemMode(1, true); - status_line += QString("<limit: %1>").arg(rxLimit.cap(1)); + status_line += TQString("<limit: %1>").arg(rxLimit.cap(1)); } else { top->channelButtons->setMenuItemMode(1, false); @@ -241,38 +241,38 @@ parseResult * ChannelParser::parseSSFEStatus(QString string) top->caption = status_line; // Make copy so we're not // constantly changing the title bar } - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEInit(QString) +parseResult * ChannelParser::parseSSFEInit(TQString) { - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEOut(QString) +parseResult * ChannelParser::parseSSFEOut(TQString) { - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEMsg(QString string) +parseResult * ChannelParser::parseSSFEMsg(TQString string) { if(string.length() > 100) - return new parseError(QString::null, i18n("String length for nick is greater than 100 characters. This is unacceptably long.")); + return new parseError(TQString::null, i18n("String length for nick is greater than 100 characters. This is unacceptably long.")); int l = string.length(); if (l <= 0) return new parseError(string, i18n("String not long enough")); - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEPrompt(QString string) +parseResult * ChannelParser::parseSSFEPrompt(TQString string) { if(prompt_active == FALSE){ - QString prompt, caption; + TQString prompt, caption; ssfePrompt *sp; // Flush the screen. @@ -280,7 +280,7 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string) // (it's garunteed to be the first one) top->LineBuffer.remove( *top->LineBuffer.begin() ); top->Buffer = FALSE; - top->sirc_receive(QString("")); + top->sirc_receive(TQString("")); // "'[pP]' " gives 4 spaces if(string.length() < 5) @@ -293,7 +293,7 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string) // if we haven't popped up on the remote display yet. KSirc::TextParagIterator it = top->mainw->firstParag(); - QString last; + TQString last; while(it.atEnd() == FALSE) { last = it.plainText(); ++it; @@ -319,39 +319,39 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string) prompt_active = FALSE; } - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEReconnect(QString) +parseResult * ChannelParser::parseSSFEReconnect(TQString) { if(top->channelInfo().channel()[0] == '#' || top->channelInfo().channel()[0] == '&'){ - QString str = "/join " + QString(top->channelInfo().channel()) + "\n"; + TQString str = "/join " + TQString(top->channelInfo().channel()) + "\n"; emit top->outputUnicodeLine(str); } - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseINFOInfo(QString string) +parseResult * ChannelParser::parseINFOInfo(TQString string) { string.remove(0, 3); // takes off the junk return new parseSucc(string, ksopts->infoColor, "user|servinfo"); // Null string, don't display anything } -parseResult * ChannelParser::parseINFOError(QString string) +parseResult * ChannelParser::parseINFOError(TQString string) { string.remove(0, 3); // strip the junk return new parseSucc(string,ksopts->errorColor, "user|error"); // Null string, don't display anything } -parseResult * ChannelParser::parseINFONicks(QString in_string) +parseResult * ChannelParser::parseINFONicks(TQString in_string) { - QString string = in_string; - QString channel_name; + TQString string = in_string; + TQString channel_name; bool clear_box = FALSE; // Check to see if it's a continued line @@ -368,12 +368,12 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) top->nicks->setCurrentItem(current_item); top->nicks->setTopItem(top_item); top->nicks->repaint(TRUE); - return new parseSucc(QString::null); // Parsing ok, don't print anything though + return new parseSucc(TQString::null); // Parsing ok, don't print anything though } else if(string[1] == '$'){ top->nicks->clearAdvOps(); //kdDebug(5008) << "Turning off advanced ops" << endl; - return new parseSucc(QString::null); // Parsing ok, don't print anything though + return new parseSucc(TQString::null); // Parsing ok, don't print anything though } @@ -381,7 +381,7 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) // Search for the first space, since : can be embeded into channel names. //count = sscanf(string, "*!* Users on %100[^ ]", channelInfo().channel()); // *!* Users on #TEST: boren asj asj_ - QRegExp rx("\\*\\S\\* Users on (\\S+): (.+)"); + TQRegExp rx("\\*\\S\\* Users on (\\S+): (.+)"); if(rx.search(string) == -1){ return new parseError(string, i18n("Could not find channel name")); } @@ -407,10 +407,10 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) //strcpy(place_holder, string.ascii()+start+2); //nick = strtok(place_holder, " "); // while(nick != 0x0){ // While there's nick to go... - QStringList nicks = QStringList::split(QRegExp("\\s+"), rx.cap(2)); + TQStringList nicks = TQStringList::split(TQRegExp("\\s+"), rx.cap(2)); - for ( QStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it ) { - QString nick = *it; + for ( TQStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it ) { + TQString nick = *it; nickListItem *irc = new nickListItem(); bool done = FALSE; @@ -448,17 +448,17 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) top->nicks->inSort(irc); } - return new parseSucc(QString::null); // Parsing ok, don't print anything though + return new parseSucc(TQString::null); // Parsing ok, don't print anything though } -parseResult * ChannelParser::parseINFOJoin(QString string) +parseResult * ChannelParser::parseINFOJoin(TQString string) { string.remove(0, 4); // strip *>* to save a few compares // You have joined channel #Linux - QRegExp rx("You have joined channel (\\S+)"); + TQRegExp rx("You have joined channel (\\S+)"); if(rx.search(string) != -1){ - //QString channel = rx.cap(1).lower(); - QString channel = rx.cap(1); + //TQString channel = rx.cap(1).lower(); + TQString channel = rx.cap(1); //kdDebug(5008) << "Channel: " << channel << endl; if(top->channelInfo().channel() != channel) { @@ -474,8 +474,8 @@ parseResult * ChannelParser::parseINFOJoin(QString string) // reef-diddy (nenernener@xnet-3B34A9E2.snet.net) has joined channel #aquaria rx.setPattern("(\\S+) .+ has joined channel (\\S+)"); if(rx.search(string) != -1){ - QString nick = rx.cap(1); - QString channel = rx.cap(2).lower(); + TQString nick = rx.cap(1); + TQString channel = rx.cap(2).lower(); //kdDebug(5008) << "Channel: " << channel << " nick: " << nick << endl; if(top->channelInfo().channel().lower() != channel){ return new parseWrongChannel(" " + string, ksopts->errorColor, "user|join"); @@ -490,12 +490,12 @@ parseResult * ChannelParser::parseINFOJoin(QString string) return 0; // ?? } -parseResult * ChannelParser::parseINFOPart(QString string) +parseResult * ChannelParser::parseINFOPart(TQString string) { bool foundNick = false; - QString pixname = "user|kick"; - QString nick(""); + TQString pixname = "user|kick"; + TQString nick(""); string.remove(0, 4); // clear junk @@ -507,7 +507,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) // 3. /kick, kicked off the channel, nick after "kicked off \w+$" // // Signoff: looser - QRegExp rx("Signoff: (\\S+)"); + TQRegExp rx("Signoff: (\\S+)"); if(rx.search(string) != -1) { nick = rx.cap(1); foundNick = true; @@ -521,11 +521,11 @@ parseResult * ChannelParser::parseINFOPart(QString string) */ rx.setPattern("You have left channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { - QString channel = rx.cap(1); + TQString channel = rx.cap(1); if(top->channelInfo().channel().lower() == channel.lower()) { - QApplication::postEvent(top, new QCloseEvent()); + TQApplication::postEvent(top, new TQCloseEvent()); // WE'RE DEAD - return new parseSucc(QString::null); + return new parseSucc(TQString::null); } pixname = "user|part"; } @@ -535,12 +535,12 @@ parseResult * ChannelParser::parseINFOPart(QString string) */ rx.setPattern("You have been kicked off channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { - QString channel = rx.cap(1); + TQString channel = rx.cap(1); if(top->channelInfo().channel().lower() != channel.lower()) return new parseWrongChannel(string, ksopts->errorColor, "user|kick"); if (ksopts->autoRejoin == TRUE) { - QString str = QString("/join %1\n").arg(top->channelInfo().channel()); + TQString str = TQString("/join %1\n").arg(top->channelInfo().channel()); emit top->outputUnicodeLine(str); /* if(top->ticker) top->ticker->show(); @@ -555,7 +555,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) int result = KMessageBox::questionYesNo(top, string, i18n("You Have Been Kicked"), i18n("Rejoin"), i18n("Leave")); if (result == KMessageBox::Yes) { - QString str = QString("/join %1\n").arg(top->channelInfo().channel()); + TQString str = TQString("/join %1\n").arg(top->channelInfo().channel()); emit top->outputUnicodeLine(str); /* if(top->ticker) * top->ticker->show(); @@ -566,7 +566,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) else { // WE'RE DEAD - QApplication::postEvent(top, new QCloseEvent()); + TQApplication::postEvent(top, new TQCloseEvent()); top->KickWinOpen = false; } } @@ -578,13 +578,13 @@ parseResult * ChannelParser::parseINFOPart(QString string) rx.setPattern("(\\S+) has left channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { nick = rx.cap(1); - QString channel = rx.cap(2); + TQString channel = rx.cap(2); // kdDebug(5008) << "Nick: " << nick << " Channel: " << channel << " top: " << top->channelInfo().channel() << endl; if(top->channelInfo().channel().lower() == channel.lower()) { foundNick = true; } else{ - return new parseWrongChannel(QString::null); + return new parseWrongChannel(TQString::null); } pixname = "user|part"; highlightNick(string, nick); @@ -595,11 +595,11 @@ parseResult * ChannelParser::parseINFOPart(QString string) rx.setPattern("(\\S+) has been kicked off channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { nick = rx.cap(1); - QString channel = rx.cap(2); + TQString channel = rx.cap(2); if(top->channelInfo().channel().lower() == channel.lower()) { foundNick = true; } else { - return new parseWrongChannel(QString::null); + return new parseWrongChannel(TQString::null); } highlightNick(string, nick); pixname = "user|kick"; @@ -615,7 +615,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) return new parseJoinPart(" " + string, ksopts->channelColor, pixname); } else { - return new parseJoinPart(QString::null); + return new parseJoinPart(TQString::null); } } else { @@ -625,10 +625,10 @@ parseResult * ChannelParser::parseINFOPart(QString string) return 0; } -parseResult * ChannelParser::parseINFOChangeNick(QString string) +parseResult * ChannelParser::parseINFOChangeNick(TQString string) { //char old_nick[101], new_nick[101]; - QString old_nick, new_nick; + TQString old_nick, new_nick; string.remove(0, 4); // Remove the leading *N* and space @@ -636,7 +636,7 @@ parseResult * ChannelParser::parseINFOChangeNick(QString string) * *N* asj_ is now known as bleh */ //kdDebug(5008) << "Nick change: " << string << endl; - QRegExp rx("(\\S+) is now known as (\\S+)"); + TQRegExp rx("(\\S+) is now known as (\\S+)"); if(rx.search(string) == -1){ if(string.contains("already taken")){ return new parseSucc(" " + string, ksopts->errorColor, "user|error"); @@ -687,29 +687,29 @@ parseResult * ChannelParser::parseINFOChangeNick(QString string) top->channelInfo().channel() == old_nick) return new parseSucc(" " + string, ksopts->channelColor, "user|elipsis"); else - return new parseSucc(QString::null); + return new parseSucc(TQString::null); } // warning("Toplevel-N: nick change search failed on %s", s3.data()); - // return new parseSucc(QString::null); + // return new parseSucc(TQString::null); } class mode_info { public: - mode_info(bool op, QChar mode, QString arg); + mode_info(bool op, TQChar mode, TQString arg); bool op() const; - QChar mode() const; - QString arg() const; + TQChar mode() const; + TQString arg() const; private: const bool m_op; - const QChar m_mode; - const QString m_arg; + const TQChar m_mode; + const TQString m_arg; }; -mode_info::mode_info(bool op, QChar mode, QString arg) : +mode_info::mode_info(bool op, TQChar mode, TQString arg) : m_op(op), m_mode(mode), m_arg(arg) @@ -720,16 +720,16 @@ bool mode_info::op() const { return m_op; } -QChar mode_info::mode() const { +TQChar mode_info::mode() const { return m_mode; } -QString mode_info::arg() const { +TQString mode_info::arg() const { return m_arg; } -parseResult * ChannelParser::parseINFOMode(QString string) +parseResult * ChannelParser::parseINFOMode(TQString string) { // Basic idea here is simple, go through the mode change and // assign each mode a + or a - and an argument or "" if there is @@ -744,7 +744,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * 1k is pretty safe since KProcess returns 1 k blocks, and lines don't get split between reads. This is emprical */ - QString modes, args, channel; + TQString modes, args, channel; int found = 0; if(string.find("for user") >= 0) @@ -753,7 +753,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * We need to 2 scanf's, one for the case of arguments, and one for no args. */ - QRegExp rx("Mode change \"(\\S+) *([^\"]*)\" on channel (\\S+)"); + TQRegExp rx("Mode change \"(\\S+) *([^\"]*)\" on channel (\\S+)"); if(rx.search(string) >= 0){ modes = rx.cap(1); args = rx.cap(2); @@ -780,7 +780,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) if(found == 0) - return new parseError(" Failed to parse mode change: " + string, QString::null); + return new parseError(" Failed to parse mode change: " + string, TQString::null); /* * op specifie if it's a + or -. tru is + false is - @@ -791,13 +791,13 @@ parseResult * ChannelParser::parseINFOMode(QString string) * we use the itirator to tstep through the list * as need be */ - QStringList arglist = QStringList::split(" ", args); - QStringList::Iterator ai = arglist.begin(); + TQStringList arglist = TQStringList::split(" ", args); + TQStringList::Iterator ai = arglist.begin(); /* * the ptr list structure contains the parsed contents */ - QPtrList<const mode_info> pmList; + TQPtrList<const mode_info> pmList; pmList.setAutoDelete(true); for(uint pos = 0; pos < modes.length(); pos++){ @@ -814,7 +814,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) * +l otoh does, so read the argument */ if(op == false){ - pmList.append(new mode_info(op, 'l', QString::null)); + pmList.append(new mode_info(op, 'l', TQString::null)); break; } case 'o': // Op, arg is the nick @@ -822,7 +822,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) case 'b': // Ban, arg is mask banned case 'k': // kcik, arg is nick if(ai == NULL) - return new parseError(i18n("Unable to parse mode change: %1").arg(string), QString::null); + return new parseError(i18n("Unable to parse mode change: %1").arg(string), TQString::null); pmList.append(new mode_info(op, modes.at(pos), *ai)); ai++; break; @@ -837,11 +837,11 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * Mode changes which don't take args */ - pmList.append(new mode_info(op, modes.at(pos), QString::null)); + pmList.append(new mode_info(op, modes.at(pos), TQString::null)); break; default: kdDebug(5008) << "Unknown mode change: " << modes.mid(pos, 1) << " Assume no args" << endl; - pmList.append(new mode_info(op, modes.at(pos), QString::null)); + pmList.append(new mode_info(op, modes.at(pos), TQString::null)); } } // We have the modes set in mode and arg, now we go though @@ -851,7 +851,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) bool mode_b_plus = false; bool mode_b_minus = false; - QPtrListIterator<const mode_info> it(pmList); + TQPtrListIterator<const mode_info> it(pmList); const mode_info *mi; while ( (mi = it.current()) != 0 ) { ++it; @@ -944,9 +944,9 @@ parseResult * ChannelParser::parseINFOMode(QString string) } } else{ - QChar c(mi->mode()); - QString m(&c, 1); - QString o; + TQChar c(mi->mode()); + TQString m(&c, 1); + TQString o; if(mi->op()) o = "+"; else @@ -957,7 +957,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * We're all done, so output the message and be done with it */ - QString pixname = "user|mode"; + TQString pixname = "user|mode"; if(mode_o_plus) pixname = "user|oplus"; @@ -971,7 +971,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) return new parseSucc(" " + string, ksopts->infoColor, pixname); } -parseResult * ChannelParser::parseCTCPAction(QString string) +parseResult * ChannelParser::parseCTCPAction(TQString string) { string.remove(0, 2); // * <something> use fancy * pixmap. Remove 2, leave one for space after te * @@ -979,7 +979,7 @@ parseResult * ChannelParser::parseCTCPAction(QString string) return new parseSucc(string, ksopts->textColor, "user|action"); } -parseResult * ChannelParser::parseINFOTopic(QString string) +parseResult * ChannelParser::parseINFOTopic(TQString string) { int found = 0; @@ -989,11 +989,11 @@ parseResult * ChannelParser::parseINFOTopic(QString string) //kdDebug(5008) << "Topic parser: " << string << endl; // Topic for #boo: this is a nice test - QRegExp rx( "Topic for (\\S+): (.*)" ); + TQRegExp rx( "Topic for (\\S+): (.*)" ); if(rx.search( string ) != -1){ - QString channel = rx.cap(1); - QString topic = rx.cap(2); - topic.replace( QRegExp( "~~" ), "~" ); + TQString channel = rx.cap(1); + TQString topic = rx.cap(2); + topic.replace( TQRegExp( "~~" ), "~" ); /* * check where it's going. @@ -1019,18 +1019,18 @@ parseResult * ChannelParser::parseINFOTopic(QString string) rx.setPattern("(\\S+) has changed the topic on channel (\\S+) to (.+)"); if(found == 0 && rx.search(string) != -1){ - QString nick = rx.cap(1); - QString channel = rx.cap(2); + TQString nick = rx.cap(1); + TQString channel = rx.cap(2); //kdDebug(5008) << "Channel: " << channel << endl; if(top->channelInfo().channel().lower() == channel.lower()){ - QString topic = rx.cap(3); + TQString topic = rx.cap(3); //kdDebug(5008) << "Topic: " << topic << endl; - topic.replace(QRegExp("~~"), "~"); + topic.replace(TQRegExp("~~"), "~"); /* * topic is in double quotes, so remove them */ top->setTopic( topic.mid(1, topic.length()-2) ); - QString cmd = "/eval &dostatus();\n"; + TQString cmd = "/eval &dostatus();\n"; top->sirc_write(cmd); } highlightNick(string, nick); @@ -1039,9 +1039,9 @@ parseResult * ChannelParser::parseINFOTopic(QString string) } -void ChannelParser::highlightNick(QString &string, QString &nick) +void ChannelParser::highlightNick(TQString &string, TQString &nick) { - QRegExp rx(QString("(^|\\s+)%1(\\s+|$)").arg(QRegExp::escape(nick))); + TQRegExp rx(TQString("(^|\\s+)%1(\\s+|$)").arg(TQRegExp::escape(nick))); string.replace(rx, "\\1~n" + nick + "~n\\2"); } diff --git a/ksirc/chanparser.h b/ksirc/chanparser.h index ef130680..a79e7372 100644 --- a/ksirc/chanparser.h +++ b/ksirc/chanparser.h @@ -1,8 +1,8 @@ #ifndef CHAN_PARSER_H #define CHAN_PARSER_H -#include <qcolor.h> -#include <qdict.h> +#include <tqcolor.h> +#include <tqdict.h> /* * This file defines the parser, and all exceptions generated @@ -27,11 +27,11 @@ public: class parseSucc : public parseResult { public: - QString string; // String to display - QColor colour; - QString pm; + TQString string; // String to display + TQColor colour; + TQString pm; - parseSucc(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null){ + parseSucc(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null){ string = _s; colour = _c; pm = _pm; @@ -46,10 +46,10 @@ public: class parseError : public parseResult { public: - QString str; - QString err; + TQString str; + TQString err; - parseError(const QString &_s, const QString &_e) + parseError(const TQString &_s, const TQString &_e) { str = _s; err = _e; @@ -59,7 +59,7 @@ public: class parseWrongChannel : public parseSucc { public: - parseWrongChannel(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null) + parseWrongChannel(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null) : parseSucc(_s, _c, _pm) { } @@ -69,7 +69,7 @@ public: class parseJoinPart : public parseSucc { public: - parseJoinPart(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null) + parseJoinPart(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null) : parseSucc(_s, _c, _pm) { } @@ -88,10 +88,10 @@ public: class badModeChangeError // Mode change barfed up, exit out { public: - QString str; + TQString str; char *msg; - badModeChangeError(QString _str, char *_msg) + badModeChangeError(TQString _str, char *_msg) { str = _str; msg = _msg; @@ -122,8 +122,8 @@ public: class parseFunc { public: - parseResult *(ChannelParser::*parser)(QString); - parseFunc(parseResult *(ChannelParser::*_parser)(QString)){ + parseResult *(ChannelParser::*parser)(TQString); + parseFunc(parseResult *(ChannelParser::*_parser)(TQString)){ parser = _parser; } @@ -149,7 +149,7 @@ public: * parse() thanks the string to be parsed and parses it. * It returns a class of type 'parseResult' or 0. */ - parseResult *parse(QString string); + parseResult *parse(TQString string); private: KSircTopLevel *top; @@ -175,7 +175,7 @@ private: * - On failure generate: parseFailed, etc */ - static QDict<parseFunc> parserTable; + static TQDict<parseFunc> parserTable; /* * Note regarding ssfe control messages: @@ -195,38 +195,38 @@ private: /** * SSFE clear 'l' function, clears main window */ - parseResult * parseSSFEClear(QString string); + parseResult * parseSSFEClear(TQString string); /** * SSFE Status is used to update caption, and op status * */ - parseResult * parseSSFEStatus(QString string); + parseResult * parseSSFEStatus(TQString string); /** * SSFE Init is called by ssfe when it's time to init and setup */ - parseResult * parseSSFEInit(QString string); + parseResult * parseSSFEInit(TQString string); /** * SSFE msg is called for each /msg sent to a diffrent user */ - parseResult * parseSSFEMsg(QString string); + parseResult * parseSSFEMsg(TQString string); /** * SSFE Out, not used */ - parseResult * parseSSFEOut(QString string); + parseResult * parseSSFEOut(TQString string); /** * SSFE Prompt, same function used for p and P, gives a password prompt */ - parseResult * parseSSFEPrompt(QString string); + parseResult * parseSSFEPrompt(TQString string); /** * SSFE Reconnect called when (re)connected to a server */ - parseResult * parseSSFEReconnect(QString string); + parseResult * parseSSFEReconnect(TQString string); /** * That's all the SSFE control messages, the rest are info *\S* message @@ -235,55 +235,55 @@ private: /** * *** is a generic infomation messge */ - parseResult * parseINFOInfo(QString string); + parseResult * parseINFOInfo(TQString string); /** * *E* is a error message */ - parseResult * parseINFOError(QString string); + parseResult * parseINFOError(TQString string); /** * *#* is a list of nicks, used to update the nick list if it's for * the current channel. */ - parseResult * parseINFONicks(QString in_string); + parseResult * parseINFONicks(TQString in_string); /** * *>* is a join message. If it's for the current channel */ - parseResult * parseINFOJoin(QString string); + parseResult * parseINFOJoin(TQString string); /** * *<* is a part message, if it's for the current channel remove it. * There's multiple part types, so parsing it more complicated. */ - parseResult * parseINFOPart(QString string); + parseResult * parseINFOPart(TQString string); /** * *N* Is a nick change, update the nick list if needed * Nick changes go outto all windows, so the nick may not be on * out current channel. */ - parseResult * parseINFOChangeNick(QString string); + parseResult * parseINFOChangeNick(TQString string); /* * *M* is a mode change. Parsing is mode changes is probably the most * complicated of all the parsings */ - parseResult * parseINFOMode(QString string); + parseResult * parseINFOMode(TQString string); /* * * is a ctcp actiion. Simply print a pretty * for the user */ - parseResult * parseCTCPAction(QString string); + parseResult * parseCTCPAction(TQString string); /* * *T* is a topic message, catch it and update the status is required */ - parseResult * parseINFOTopic(QString string); + parseResult * parseINFOTopic(TQString string); private: - void highlightNick(QString &string, QString &nick); + void highlightNick(TQString &string, TQString &nick); }; #endif diff --git a/ksirc/charSelector.cpp b/ksirc/charSelector.cpp index 6cfe09a4..8ad8526f 100644 --- a/ksirc/charSelector.cpp +++ b/ksirc/charSelector.cpp @@ -3,32 +3,32 @@ #include "charSelector.h" #include "charSelector.moc" -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <klocale.h> -charSelector::charSelector(QWidget *parent, const char* name) +charSelector::charSelector(TQWidget *parent, const char* name) : KDialog(parent, name, false) { - testLayout = new QVBoxLayout(this); + testLayout = new TQVBoxLayout(this); testLayout->setSpacing( spacingHint() ); testLayout->setMargin( marginHint() ); - charSelect = new KCharSelect(this, QCString(name) + "_kcharselector", "", 0); + charSelect = new KCharSelect(this, TQCString(name) + "_kcharselector", "", 0); testLayout->addWidget(charSelect); charSelect->installEventFilter(this); - connect(charSelect, SIGNAL(doubleClicked()), SLOT(insertText())); + connect(charSelect, TQT_SIGNAL(doubleClicked()), TQT_SLOT(insertText())); - QHBoxLayout *buttonLayout = new QHBoxLayout; + TQHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->setSpacing( spacingHint() ); - insertButton = new QPushButton(i18n("&Insert Char"), this); - connect(insertButton, SIGNAL(clicked()), SLOT(insertText())); + insertButton = new TQPushButton(i18n("&Insert Char"), this); + connect(insertButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertText())); buttonLayout->addWidget(insertButton); - QSpacerItem *spacer = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Expanding); + TQSpacerItem *spacer = new TQSpacerItem(50, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding); buttonLayout->addItem(spacer); testLayout->addLayout(buttonLayout); @@ -45,7 +45,7 @@ void charSelector::insertText() emit clicked(); } -void charSelector::setFont( const QString &font ) +void charSelector::setFont( const TQString &font ) { charSelect->setFont(font); } @@ -56,16 +56,16 @@ void charSelector::reject() close(); } -void charSelector::keyPressEvent(QKeyEvent *e) +void charSelector::keyPressEvent(TQKeyEvent *e) { KDialog::keyPressEvent(e); } -bool charSelector::eventFilter ( QObject *, QEvent * e ) +bool charSelector::eventFilter ( TQObject *, TQEvent * e ) { - if ( e->type() == QEvent::AccelOverride ) { + if ( e->type() == TQEvent::AccelOverride ) { // special processing for key press - QKeyEvent *k = (QKeyEvent *)e; + TQKeyEvent *k = (TQKeyEvent *)e; if(k->key() == Key_Escape){ keyPressEvent(k); return TRUE; // eat event diff --git a/ksirc/charSelector.h b/ksirc/charSelector.h index 927cb5e5..9ea4b400 100644 --- a/ksirc/charSelector.h +++ b/ksirc/charSelector.h @@ -14,16 +14,16 @@ class charSelector : public KDialog { Q_OBJECT public: - charSelector(QWidget *parent=0, const char *name=0); + charSelector(TQWidget *parent=0, const char *name=0); ~charSelector(); - virtual bool eventFilter ( QObject * watched, QEvent * e ); + virtual bool eventFilter ( TQObject * watched, TQEvent * e ); public slots: void insertText(); - QString currentText() { return charSelect->chr(); } + TQString currentText() { return charSelect->chr(); } - void setFont( const QString &font ); + void setFont( const TQString &font ); protected slots: virtual void reject(); @@ -32,11 +32,11 @@ class charSelector : public KDialog void clicked(); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private: KCharSelect *charSelect; - QVBoxLayout* testLayout; - QPushButton *insertButton; + TQVBoxLayout* testLayout; + TQPushButton *insertButton; }; #endif diff --git a/ksirc/colorpicker.cpp b/ksirc/colorpicker.cpp index 13b2805c..9bb5f03f 100644 --- a/ksirc/colorpicker.cpp +++ b/ksirc/colorpicker.cpp @@ -20,49 +20,49 @@ #include "colorpicker.h" #include "ksopts.h" -#include <qlayout.h> -#include <qpainter.h> -#include <qvbox.h> -#include <qstyle.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqvbox.h> +#include <tqstyle.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klocale.h> -ColorPicker::ColorPicker( QWidget *parent, const char *name ) +ColorPicker::ColorPicker( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true /*modal*/, i18n( "Pick Color" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Cancel ), m_foregroundColor( -1 ), m_backgroundColor( -1 ) { - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); - QWidget *sampleBox = new QWidget( mainWidget ); - QHBoxLayout *sampleLayout = new QHBoxLayout( sampleBox ); + TQWidget *sampleBox = new TQWidget( mainWidget ); + TQHBoxLayout *sampleLayout = new TQHBoxLayout( sampleBox ); - QLabel *preview = new QLabel( i18n( "Preview:" ), sampleBox ); + TQLabel *preview = new TQLabel( i18n( "Preview:" ), sampleBox ); sampleLayout->addWidget( preview ); - m_sample = new QLineEdit( i18n( "Sample Text" ), sampleBox ); + m_sample = new TQLineEdit( i18n( "Sample Text" ), sampleBox ); m_sample->setFocusPolicy( NoFocus ); - m_sample->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, + m_sample->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, m_sample->sizePolicy().verData() ) ); sampleLayout->addWidget( m_sample ); sampleLayout->addStretch(); - QHBox *box = new QHBox( mainWidget ); - QLabel *description = new QLabel( i18n( "&Foreground:" ), box ); + TQHBox *box = new TQHBox( mainWidget ); + TQLabel *description = new TQLabel( i18n( "&Foreground:" ), box ); ColorBar *foregroundColor = new ColorBar( ksopts->ircColors.toValueVector(), box ); description->setBuddy( foregroundColor ); - box = new QHBox( mainWidget ); - description = new QLabel( i18n( "&Background:" ), box ); + box = new TQHBox( mainWidget ); + description = new TQLabel( i18n( "&Background:" ), box ); ColorBar *backgroundColor = new ColorBar( ksopts->ircColors.toValueVector(), box ); description->setBuddy( backgroundColor ); - QPushButton *ok = actionButton( KDialogBase::Ok ); - QPushButton *cancel = actionButton( KDialogBase::Cancel ); + TQPushButton *ok = actionButton( KDialogBase::Ok ); + TQPushButton *cancel = actionButton( KDialogBase::Cancel ); setTabOrder( foregroundColor, backgroundColor ); setTabOrder( backgroundColor, ok ); @@ -71,31 +71,31 @@ ColorPicker::ColorPicker( QWidget *parent, const char *name ) ok->setAutoDefault( false ); cancel->setAutoDefault( false ); - connect( foregroundColor, SIGNAL( colorPicked( int ) ), - this, SLOT( setForegroundColor( int ) ) ); - connect( backgroundColor, SIGNAL( colorPicked( int ) ), - this, SLOT( setBackgroundColor( int ) ) ); + connect( foregroundColor, TQT_SIGNAL( colorPicked( int ) ), + this, TQT_SLOT( setForegroundColor( int ) ) ); + connect( backgroundColor, TQT_SIGNAL( colorPicked( int ) ), + this, TQT_SLOT( setBackgroundColor( int ) ) ); ok->setEnabled( false ); updateSample(); } -QString ColorPicker::colorString() const +TQString ColorPicker::colorString() const { assert( m_foregroundColor != -1 ); - QString res( QString::number( m_foregroundColor ) ); + TQString res( TQString::number( m_foregroundColor ) ); if ( m_backgroundColor != -1 ) { res += ','; - res += QString::number( m_backgroundColor ); + res += TQString::number( m_backgroundColor ); } return res; } void ColorPicker::setForegroundColor( int col ) { - QPushButton * ok =actionButton( KDialogBase::Ok ); + TQPushButton * ok =actionButton( KDialogBase::Ok ); assert( ok ); ok->setEnabled( true ); @@ -111,28 +111,28 @@ void ColorPicker::setBackgroundColor( int col ) void ColorPicker::updateSample() { - QColorGroup cg( colorGroup() ); + TQColorGroup cg( colorGroup() ); - QColor col = ksopts->textColor; + TQColor col = ksopts->textColor; if ( m_foregroundColor != -1 ) col = ksopts->ircColors[ m_foregroundColor ]; - cg.setColor( QColorGroup::Foreground, col ); - cg.setColor( QColorGroup::Text, col ); + cg.setColor( TQColorGroup::Foreground, col ); + cg.setColor( TQColorGroup::Text, col ); if ( m_backgroundColor != -1 ) { col = ksopts->ircColors[ m_backgroundColor ]; - cg.setColor( QColorGroup::Background, col ); - cg.setColor( QColorGroup::Base, col ); + cg.setColor( TQColorGroup::Background, col ); + cg.setColor( TQColorGroup::Base, col ); } - m_sample->setPalette( QPalette( cg, cg, cg ) ); + m_sample->setPalette( TQPalette( cg, cg, cg ) ); } -ColorBar::ColorBar( const QValueVector<QColor> &colors, QWidget *parent, +ColorBar::ColorBar( const TQValueVector<TQColor> &colors, TQWidget *parent, const char *name ) - : QFrame( parent, name, WStaticContents | WRepaintNoErase ), + : TQFrame( parent, name, WStaticContents | WRepaintNoErase ), m_currentCell( -1 ), m_focusedCell( - 1 ), m_colors( colors ), m_cellSize( 0 ) { @@ -143,7 +143,7 @@ ColorBar::ColorBar( const QValueVector<QColor> &colors, QWidget *parent, setFocusPolicy( StrongFocus ); } -void ColorBar::drawContents( QPainter *p ) +void ColorBar::drawContents( TQPainter *p ) { int x = contentsRect().x(); int y = contentsRect().y(); @@ -153,15 +153,15 @@ void ColorBar::drawContents( QPainter *p ) i == static_cast<uint>( m_currentCell ) ); bool isFocusedCell = ( m_focusedCell != -1 && i == static_cast<uint>( m_focusedCell ) ); - drawCell( p, x, y, m_colors[ i ], QString::number( i ), + drawCell( p, x, y, m_colors[ i ], TQString::number( i ), isFocusedCell, isCurrentCell ); } } -void ColorBar::keyPressEvent( QKeyEvent *ev ) +void ColorBar::keyPressEvent( TQKeyEvent *ev ) { if ( m_focusedCell == -1 ) { - QFrame::keyPressEvent( ev ); + TQFrame::keyPressEvent( ev ); return; } @@ -189,36 +189,36 @@ void ColorBar::keyPressEvent( QKeyEvent *ev ) default: break; } - QFrame::keyPressEvent( ev ); + TQFrame::keyPressEvent( ev ); } -void ColorBar::focusInEvent( QFocusEvent *ev ) +void ColorBar::focusInEvent( TQFocusEvent *ev ) { - if ( ev->reason() == QFocusEvent::Tab || - ev->reason() == QFocusEvent::Backtab ) + if ( ev->reason() == TQFocusEvent::Tab || + ev->reason() == TQFocusEvent::Backtab ) m_focusedCell = 0; - QFrame::focusInEvent( ev ); + TQFrame::focusInEvent( ev ); } -void ColorBar::focusOutEvent( QFocusEvent *ev ) +void ColorBar::focusOutEvent( TQFocusEvent *ev ) { - if ( ev->reason() == QFocusEvent::Tab || - ev->reason() == QFocusEvent::Backtab || - ev->reason() == QFocusEvent::Mouse ) + if ( ev->reason() == TQFocusEvent::Tab || + ev->reason() == TQFocusEvent::Backtab || + ev->reason() == TQFocusEvent::Mouse ) m_focusedCell = -1; - QFrame::focusOutEvent( ev ); + TQFrame::focusOutEvent( ev ); } -void ColorBar::fontChange( const QFont &oldFont ) +void ColorBar::fontChange( const TQFont &oldFont ) { updateCellSize(); - QFrame::fontChange( oldFont ); + TQFrame::fontChange( oldFont ); } -void ColorBar::styleChange( QStyle &oldStyle ) +void ColorBar::styleChange( TQStyle &oldStyle ) { updateCellSize(); - QFrame::styleChange( oldStyle ); + TQFrame::styleChange( oldStyle ); } bool ColorBar::focusNextPrevChild( bool next ) @@ -233,7 +233,7 @@ bool ColorBar::focusNextPrevChild( bool next ) update(); return true; } - return QFrame::focusNextPrevChild( next ); + return TQFrame::focusNextPrevChild( next ); } if ( m_focusedCell > 1 ) @@ -243,43 +243,43 @@ bool ColorBar::focusNextPrevChild( bool next ) return true; } - return QFrame::focusNextPrevChild( next ); + return TQFrame::focusNextPrevChild( next ); } -void ColorBar::mousePressEvent( QMouseEvent *ev ) +void ColorBar::mousePressEvent( TQMouseEvent *ev ) { - const QPoint &p = ev->pos(); + const TQPoint &p = ev->pos(); if ( contentsRect().contains( p ) ) { m_focusedCell = p.x() / m_cellSize; update(); } - QFrame::mousePressEvent( ev ); + TQFrame::mousePressEvent( ev ); } -void ColorBar::mouseReleaseEvent( QMouseEvent *ev ) +void ColorBar::mouseReleaseEvent( TQMouseEvent *ev ) { if ( m_focusedCell != -1 ) { setCurrentCell( m_focusedCell ); update(); } - QFrame::mouseReleaseEvent( ev ); + TQFrame::mouseReleaseEvent( ev ); } void ColorBar::updateCellSize() { - setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth, this ) ); + setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) ); - QFontMetrics metrics( font() ); + TQFontMetrics metrics( font() ); - m_cellSize = metrics.width( QString::number( m_colors.size() ) ) + + m_cellSize = metrics.width( TQString::number( m_colors.size() ) ) + ( s_indicatorSize * 2 ) + ( s_focusSize * 2 ) + ( s_innerMargin * 2 ); - setFixedSize( QSize( ( m_colors.size() * m_cellSize ) + ( frameWidth() * 2 ), + setFixedSize( TQSize( ( m_colors.size() * m_cellSize ) + ( frameWidth() * 2 ), m_cellSize + ( frameWidth() * 2 ) ) ); } @@ -289,13 +289,13 @@ void ColorBar::setCurrentCell( int cell ) emit colorPicked( cell ); } -void ColorBar::drawCell( QPainter *p, int x, int y, const QColor &color, - const QString &text, bool isFocusedCell, +void ColorBar::drawCell( TQPainter *p, int x, int y, const TQColor &color, + const TQString &text, bool isFocusedCell, bool isCurrentCell ) { p->fillRect( x, y, m_cellSize, m_cellSize, color ); - QColor penColor = black; + TQColor penColor = black; // ### hack if ( color.red() < 127 && color.green() < 127 && color.blue() < 127 ) penColor = white; @@ -329,7 +329,7 @@ void ColorBar::drawCell( QPainter *p, int x, int y, const QColor &color, s_focusSize, focusRectSize - ( 2 * s_focusSize ), penColor ); } - QFontMetrics metrics( p->font() ); + TQFontMetrics metrics( p->font() ); int offset = ( m_cellSize / 2 ) - ( metrics.width( text ) / 2 ); p->drawText( x + offset, y + s_focusSize + s_indicatorSize + diff --git a/ksirc/colorpicker.h b/ksirc/colorpicker.h index 18222bfa..2118fc88 100644 --- a/ksirc/colorpicker.h +++ b/ksirc/colorpicker.h @@ -19,8 +19,8 @@ #ifndef __colorpicker_h__ #define __colorpicker_h__ -#include <qvaluevector.h> -#include <qcolor.h> +#include <tqvaluevector.h> +#include <tqcolor.h> #include <kdialogbase.h> @@ -30,9 +30,9 @@ class ColorPicker : public KDialogBase { Q_OBJECT public: - ColorPicker( QWidget *parent, const char *name = 0 ); + ColorPicker( TQWidget *parent, const char *name = 0 ); - QString colorString() const; + TQString colorString() const; private slots: void setForegroundColor( int col ); @@ -41,7 +41,7 @@ private slots: private: void updateSample(); - QLineEdit *m_sample; + TQLineEdit *m_sample; int m_foregroundColor; int m_backgroundColor; }; @@ -50,33 +50,33 @@ class ColorBar : public QFrame { Q_OBJECT public: - ColorBar( const QValueVector<QColor> &colors, QWidget *parent, const char *name = 0 ); + ColorBar( const TQValueVector<TQColor> &colors, TQWidget *parent, const char *name = 0 ); signals: void colorPicked( int col ); protected: - virtual void drawContents( QPainter *p ); - virtual void keyPressEvent( QKeyEvent *ev ); - virtual void focusInEvent( QFocusEvent *ev ); - virtual void focusOutEvent( QFocusEvent *ev ); - virtual void fontChange( const QFont &oldFont ); - virtual void styleChange( QStyle &oldStyle ); + virtual void drawContents( TQPainter *p ); + virtual void keyPressEvent( TQKeyEvent *ev ); + virtual void focusInEvent( TQFocusEvent *ev ); + virtual void focusOutEvent( TQFocusEvent *ev ); + virtual void fontChange( const TQFont &oldFont ); + virtual void styleChange( TQStyle &oldStyle ); virtual bool focusNextPrevChild( bool next ); - virtual void mousePressEvent( QMouseEvent *ev ); - virtual void mouseReleaseEvent( QMouseEvent *ev ); + virtual void mousePressEvent( TQMouseEvent *ev ); + virtual void mouseReleaseEvent( TQMouseEvent *ev ); private: void updateCellSize(); void setCurrentCell( int cell ); - void drawCell( QPainter *p, int x, int y, const QColor &color, - const QString &text, bool isFocusedCell, + void drawCell( TQPainter *p, int x, int y, const TQColor &color, + const TQString &text, bool isFocusedCell, bool isCurrentCell ); int m_currentCell; int m_focusedCell; - const QValueVector<QColor> m_colors; + const TQValueVector<TQColor> m_colors; int m_cellSize; // ### style me diff --git a/ksirc/dccManager.cpp b/ksirc/dccManager.cpp index 44d85dee..386644b9 100644 --- a/ksirc/dccManager.cpp +++ b/ksirc/dccManager.cpp @@ -8,8 +8,8 @@ #include "dccManager.h" #include "dccNew.h" -#include <qobject.h> -#include <qsignal.h> +#include <tqobject.h> +#include <tqsignal.h> #include <kdebug.h> #include <klocale.h> @@ -22,8 +22,8 @@ #define COL_CPS 4 #define COL_PER 5 -dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size ) - : QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) +dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size ) + : TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) { m_percent = 0; m_status = status; @@ -38,13 +38,13 @@ dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, con if(m_type == dccChat) setText(COL_SIZE, ""); else - setText(COL_SIZE, QString("%1").arg(size)); + setText(COL_SIZE, TQString("%1").arg(size)); setText(COL_PER, ""); } -dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size ) -: QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) +dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size ) +: TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) { m_percent = 0; m_status = status; @@ -56,7 +56,7 @@ dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, setText(COL_WHO, who); setText(COL_STAT, enumToStatus(status)); if(type != dccChat) - setText(COL_SIZE, QString("%1").arg(size)); + setText(COL_SIZE, TQString("%1").arg(size)); setText(COL_PER, ""); } @@ -65,9 +65,9 @@ dccItem::~dccItem() { } -QString dccItem::enumToStatus(enum dccStatus status) +TQString dccItem::enumToStatus(enum dccStatus status) { - QString str; + TQString str; switch(status){ case dccRecving: str = i18n("Receiving"); @@ -106,17 +106,17 @@ QString dccItem::enumToStatus(enum dccStatus status) return str; } -void dccItem::setWhoPostfix(const QString &post) { +void dccItem::setWhoPostfix(const TQString &post) { m_post = post; - setText(COL_WHO, QString("%1 %2").arg(m_who).arg(post)); + setText(COL_WHO, TQString("%1 %2").arg(m_who).arg(post)); } -void dccItem::changeFilename(const QString &file) { +void dccItem::changeFilename(const TQString &file) { setText(COL_FILE, file); m_file = file; } -void dccItem::changeWho(const QString &who) { +void dccItem::changeWho(const TQString &who) { setText(COL_WHO, who); m_who = who; } @@ -146,13 +146,13 @@ void dccItem::setReceivedBytes(int bytes) (ctime >= (m_lasttime + 2)) ){ m_lasttime = ctime; - setText(COL_SIZE, QString("%1/%2").arg(bytes).arg(m_size)); - setText(COL_PER, QString("%1%").arg(per)); + setText(COL_SIZE, TQString("%1/%2").arg(bytes).arg(m_size)); + setText(COL_PER, TQString("%1%").arg(per)); m_percent = per; if(m_status == dccResumed) m_stime = 0; /* if we are got a resume request don't update CPS, reset it */ else - setText(COL_CPS, QString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2)); + setText(COL_CPS, TQString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2)); } @@ -177,13 +177,13 @@ void dccItem::okRename(int col) { KListViewItem::okRename(col); if(type() == dccGet){ - QString oldfile = m_file; + TQString oldfile = m_file; changeFilename(text(COL_FILE)); emit itemRenamed(this, m_who, oldfile); setRenameEnabled(COL_FILE, false); } else if(type() == dccChat){ - QString oldwho = m_who; + TQString oldwho = m_who; changeWho(text(COL_WHO)); emit itemRenamed(this, oldwho, m_file); setRenameEnabled(COL_WHO, false); @@ -199,7 +199,7 @@ void dccItem::cancelRename(int col) } } -dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( parent, name) +dccManager::dccManager( TQWidget *parent, const char *name ) : dccManagerbase( parent, name) { dccNewDialog = 0x0; @@ -215,10 +215,10 @@ dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( pa m_sendit->setSelectable(false); m_chatit->setSelectable(false); -// connect(klvBox, SIGNAL(clicked(QListViewItem *)), -// this, SLOT(getSelChange(QListViewItem *))); - connect(klvBox, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); +// connect(klvBox, TQT_SIGNAL(clicked(TQListViewItem *)), +// this, TQT_SLOT(getSelChange(TQListViewItem *))); + connect(klvBox, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); klvBox->setCurrentItem(m_chatit); getSelChange(klvBox->currentItem()); @@ -228,31 +228,31 @@ dccManager::~dccManager() { } -dccItem *dccManager::newSendItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size) +dccItem *dccManager::newSendItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size) { emit changed(false, i18n("dcc activity")); dccItem *it = new dccItem(m_sendit, this, dccItem::dccSend, file, who, status, size); - connect(it, SIGNAL(statusChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); + connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); return it; } -dccItem *dccManager::newGetItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size) +dccItem *dccManager::newGetItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size) { emit changed(false, i18n("dcc activity")); dccItem *it = new dccItem(m_getit, this, dccItem::dccGet, file, who, status, size); - connect(it, SIGNAL(statusChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); + connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); return it; } -dccItem *dccManager::newChatItem(QString who, enum dccItem::dccStatus status) +dccItem *dccManager::newChatItem(TQString who, enum dccItem::dccStatus status) { emit changed(false, i18n("dcc activity")); dccItem *it = new dccItem(m_chatit, this, dccItem::dccChat, "", who, status, 0); - connect(it, SIGNAL(statusChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); + connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); return it; } @@ -268,20 +268,20 @@ void dccManager::kpbNew_clicked() dccNewDialog = new dccNew(); dccNewDialog->show(); - connect(dccNewDialog, SIGNAL(accepted(int, QString, QString)), - this, SLOT(dccNewAccepted(int, QString, QString))); + connect(dccNewDialog, TQT_SIGNAL(accepted(int, TQString, TQString)), + this, TQT_SLOT(dccNewAccepted(int, TQString, TQString))); } -void dccManager::dccNewAccepted(int type, QString nick, QString file){ +void dccManager::dccNewAccepted(int type, TQString nick, TQString file){ kdDebug(5008) << "Type: " << type << " nick: " << nick << " file: " << file << endl; if(type == dccNew::Chat){ - QCString cstr = QCString("/dcc chat ") + nick.latin1() + "\n"; + TQCString cstr = TQCString("/dcc chat ") + nick.latin1() + "\n"; kdDebug(5008) << "Output: " << cstr << endl; emit outputLine(cstr); } else if(type == dccNew::Send){ - QCString cstr = QCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n"; + TQCString cstr = TQCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n"; emit outputLine(cstr); } delete dccNewDialog; @@ -318,7 +318,7 @@ void dccManager::kpbAbort_clicked() } } -void dccManager::getSelChange(QListViewItem *_i) { +void dccManager::getSelChange(TQListViewItem *_i) { kpbAbort->setEnabled(false); kpbResume->setEnabled(false); kpbRename->setEnabled(false); @@ -374,7 +374,7 @@ void dccManager::getSelChange(QListViewItem *_i) { } -void dccManager::sendSelChange(QListViewItem *) { +void dccManager::sendSelChange(TQListViewItem *) { /* if(_i == 0) return; diff --git a/ksirc/dccManager.h b/ksirc/dccManager.h index 41412479..6e8c464c 100644 --- a/ksirc/dccManager.h +++ b/ksirc/dccManager.h @@ -12,7 +12,7 @@ #include <time.h> -#include <qobject.h> +#include <tqobject.h> #include "dccManagerbase.h" #include "klistview.h" @@ -22,7 +22,7 @@ class dccManager; class QSignal; class QObject; -class dccItem : public QObject, +class dccItem : public TQObject, public KListViewItem { Q_OBJECT @@ -46,19 +46,19 @@ public: dccSend }; - dccItem( KListView *, dccManager *, enum dccType, const QString &file, const QString &who, enum dccStatus, unsigned int size ); - dccItem( KListViewItem *, dccManager *, enum dccType, const QString &file, const QString &who, enum dccStatus, unsigned int size ); + dccItem( KListView *, dccManager *, enum dccType, const TQString &file, const TQString &who, enum dccStatus, unsigned int size ); + dccItem( KListViewItem *, dccManager *, enum dccType, const TQString &file, const TQString &who, enum dccStatus, unsigned int size ); virtual ~dccItem(); void changeStatus(enum dccStatus); void setReceivedBytes(int bytes); - void setWhoPostfix(const QString &post); - void changeFilename(const QString &file); - void changeWho(const QString &who); + void setWhoPostfix(const TQString &post); + void changeFilename(const TQString &file); + void changeWho(const TQString &who); - const QString who() { return m_who; } - const QString file() { return m_file; } + const TQString who() { return m_who; } + const TQString file() { return m_file; } enum dccStatus status() { return m_status; } enum dccType type() { return m_type; } double getPercent() { return m_percent; } @@ -66,11 +66,11 @@ public: void doRename(); signals: - void statusChanged(QListViewItem *); - void itemRenamed(dccItem *, QString oldNick, QString oldFile); + void statusChanged(TQListViewItem *); + void itemRenamed(dccItem *, TQString oldNick, TQString oldFile); protected: - QString enumToStatus(enum dccStatus); + TQString enumToStatus(enum dccStatus); virtual void okRename ( int col ); virtual void cancelRename ( int col ); @@ -78,9 +78,9 @@ protected: private: dccManager *m_manager; - QString m_who; - QString m_file; - QString m_post; + TQString m_who; + TQString m_file; + TQString m_post; int m_percent; unsigned int m_size; enum dccStatus m_status; @@ -97,14 +97,14 @@ class dccManager : public dccManagerbase Q_OBJECT public: - dccManager( QWidget *parent = 0, const char *name = 0 ); + dccManager( TQWidget *parent = 0, const char *name = 0 ); ~dccManager(); - dccItem *newSendItem(QString file, QString who, enum dccItem::dccStatus, unsigned int size); - dccItem *newGetItem(QString file, QString who, enum dccItem::dccStatus, unsigned int size); - dccItem *newChatItem(QString who, enum dccItem::dccStatus); + dccItem *newSendItem(TQString file, TQString who, enum dccItem::dccStatus, unsigned int size); + dccItem *newGetItem(TQString file, TQString who, enum dccItem::dccStatus, unsigned int size); + dccItem *newChatItem(TQString who, enum dccItem::dccStatus); - void doChanged() { emit changed(false, QString("dcc activity")); }; + void doChanged() { emit changed(false, TQString("dcc activity")); }; public slots: virtual void kpbNew_clicked(); @@ -114,17 +114,17 @@ public slots: virtual void kpbAbort_clicked(); signals: - void outputLine(QCString); - void changed(bool, QString); + void outputLine(TQCString); + void changed(bool, TQString); virtual void dccConnectClicked(dccItem *); virtual void dccResumeClicked(dccItem *); virtual void dccRenameClicked(dccItem *); virtual void dccAbortClicked(dccItem *); protected slots: - virtual void getSelChange(QListViewItem *); - virtual void sendSelChange(QListViewItem *); - virtual void dccNewAccepted(int type, QString nick, QString file); + virtual void getSelChange(TQListViewItem *); + virtual void sendSelChange(TQListViewItem *); + virtual void dccNewAccepted(int type, TQString nick, TQString file); private: diff --git a/ksirc/dccMgrTest.cpp b/ksirc/dccMgrTest.cpp index 77d5fdac..6d83938e 100644 --- a/ksirc/dccMgrTest.cpp +++ b/ksirc/dccMgrTest.cpp @@ -17,7 +17,7 @@ public: bytes = 0; startTimer( 100 ); } - void timerEvent( QTimerEvent * ) + void timerEvent( TQTimerEvent * ) { m_it->changeStatus(dccItem::dccSending); bytes += 1000; diff --git a/ksirc/dccNew.cpp b/ksirc/dccNew.cpp index fe44fae6..0ace8c56 100644 --- a/ksirc/dccNew.cpp +++ b/ksirc/dccNew.cpp @@ -6,12 +6,12 @@ * * ***************************************************************************/ -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qstringlist.h> -#include <qlistbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqstringlist.h> +#include <tqlistbox.h> #include <kapplication.h> #include <kstandarddirs.h> @@ -27,29 +27,29 @@ #include "dccNew.h" #include "objFinder.h" -dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick ) +dccNew::dccNew( TQWidget *parent, const char *name, int type, TQString nick ) : dccNewBase( parent, name) { - QColorGroup cg_mainw = kapp->palette().active(); - cg_mainw.setColor(QColorGroup::Base, ksopts->backgroundColor); - cg_mainw.setColor(QColorGroup::Text, ksopts->textColor); - cg_mainw.setColor(QColorGroup::Link, ksopts->linkColor); - cg_mainw.setColor(QColorGroup::Highlight, ksopts->selBackgroundColor); - cg_mainw.setColor(QColorGroup::HighlightedText, ksopts->selForegroundColor); - nickList->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); + TQColorGroup cg_mainw = kapp->palette().active(); + cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor); + cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor); + cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor); + cg_mainw.setColor(TQColorGroup::Highlight, ksopts->selBackgroundColor); + cg_mainw.setColor(TQColorGroup::HighlightedText, ksopts->selForegroundColor); + nickList->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); - QStringList allalist = objFinder::allObjects().grep(I18N_NOOP("aListBox::")); + TQStringList allalist = objFinder::allObjects().grep(I18N_NOOP("aListBox::")); - for ( QStringList::Iterator it = allalist.begin(); + for ( TQStringList::Iterator it = allalist.begin(); it != allalist.end(); ++it ) { - QString name = (*it).section("::", 1); + TQString name = (*it).section("::", 1); kdDebug(5008) << "Looking at: " << *it << "/" << name << endl; aListBox *a = static_cast<aListBox *>(objFinder::find(name.latin1(), "aListBox")); if(a){ - QListBoxItem *i; + TQListBoxItem *i; for(i = a->firstItem(); i != 0x0; i = i->next()){ nickListItem *it = new nickListItem(*a->item(a->index(i))); nickList->inSort(it); @@ -62,7 +62,7 @@ dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick ) KCompletion *comp = cbNicks->completionObject(); - QListBoxItem *i; + TQListBoxItem *i; for(i = nickList->firstItem(); i != 0x0; i = i->next()){ comp->addItem(i->text()); cbNicks->insertItem(i->text()); @@ -94,14 +94,14 @@ dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick ) fileSendClicked(); } - connect(nickList, SIGNAL(highlighted(const QString &)), - cbNicks, SLOT(setEditText(const QString &))); + connect(nickList, TQT_SIGNAL(highlighted(const TQString &)), + cbNicks, TQT_SLOT(setEditText(const TQString &))); - connect(pbCancel, SIGNAL(clicked()), - this, SLOT(reject())); + connect(pbCancel, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); - connect(pbSend, SIGNAL(clicked()), - this, SLOT(accept())); + connect(pbSend, TQT_SIGNAL(clicked()), + this, TQT_SLOT(accept())); } @@ -134,17 +134,17 @@ void dccNew::sendClicked() void dccNew::fileClicked() { - QString file = + TQString file = KFileDialog::getOpenFileName(); leFile->setText(file); } -QString dccNew::getFile() { +TQString dccNew::getFile() { return leFile->text() ; } -QString dccNew::getNick() { +TQString dccNew::getNick() { return cbNicks->currentText(); } @@ -155,7 +155,7 @@ int dccNew::getType() { void dccNew::reject() { - emit accepted(-1, QString::null, QString::null); + emit accepted(-1, TQString::null, TQString::null); } diff --git a/ksirc/dccNew.h b/ksirc/dccNew.h index e0adcf80..35638b59 100644 --- a/ksirc/dccNew.h +++ b/ksirc/dccNew.h @@ -16,22 +16,22 @@ class dccNew : public dccNewBase Q_OBJECT public: - dccNew( QWidget *parent = 0, + dccNew( TQWidget *parent = 0, const char *name = 0, int type = -1, - QString nick = QString::null ); + TQString nick = TQString::null ); ~dccNew(); enum { Chat, Send }; - QString getFile(); - QString getNick(); + TQString getFile(); + TQString getNick(); int getType(); signals: void modified(); - void accepted(int type, QString nick, QString file); + void accepted(int type, TQString nick, TQString file); protected slots: virtual void chatClicked(); diff --git a/ksirc/dccToplevel.cpp b/ksirc/dccToplevel.cpp index 5e5437d2..bd66b944 100644 --- a/ksirc/dccToplevel.cpp +++ b/ksirc/dccToplevel.cpp @@ -1,6 +1,6 @@ -#include <qvbox.h> -#include <qpopupmenu.h> +#include <tqvbox.h> +#include <tqpopupmenu.h> #include <kaction.h> #include <kstdaction.h> @@ -15,17 +15,17 @@ extern DisplayMgr *displayMgr; #define DTL_WINDOW_ID 10 -dccTopLevel::dccTopLevel(QWidget *parent, const char *name) +dccTopLevel::dccTopLevel(TQWidget *parent, const char *name) : KMainWindow(parent, name, Qt::WDestructiveClose) { - m_mgr = new dccManager(this, QCString(QObject::name()) + "_dccManager"); + m_mgr = new dccManager(this, TQCString(TQObject::name()) + "_dccManager"); // m_mgr->show(); setCentralWidget(m_mgr); - connect(m_mgr, SIGNAL(changed(bool, QString)), this, SIGNAL(changed(bool, QString))); + connect(m_mgr, TQT_SIGNAL(changed(bool, TQString)), this, TQT_SIGNAL(changed(bool, TQString))); - QPopupMenu *win = new QPopupMenu(this, QCString(QObject::name()) + "_popup_window"); - KAction *act = KStdAction::close(this, SLOT( close() ), actionCollection() ); + TQPopupMenu *win = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_window"); + KAction *act = KStdAction::close(this, TQT_SLOT( close() ), actionCollection() ); act->plug(win); menuBar()->insertItem(i18n("&File"), win, DTL_WINDOW_ID, -1); diff --git a/ksirc/dccToplevel.h b/ksirc/dccToplevel.h index db9f3f67..204c1d4f 100644 --- a/ksirc/dccToplevel.h +++ b/ksirc/dccToplevel.h @@ -12,14 +12,14 @@ class dccTopLevel : public KMainWindow Q_OBJECT public: - dccTopLevel(QWidget *parent = 0, const char *name = 0); + dccTopLevel(TQWidget *parent = 0, const char *name = 0); virtual ~dccTopLevel(); dccManager *mgr() { return m_mgr; } signals: - void changeChannel(const QString&,const QString&); - void changed(bool, QString); + void changeChannel(const TQString&,const TQString&); + void changed(bool, TQString); public slots: diff --git a/ksirc/displayMgr.h b/ksirc/displayMgr.h index e0838ba0..62af2b18 100644 --- a/ksirc/displayMgr.h +++ b/ksirc/displayMgr.h @@ -1,7 +1,7 @@ #ifndef DISPLAYMGR_H #define DISPLAYMGR_H -#include <qstring.h> +#include <tqstring.h> class QWidget; @@ -9,17 +9,17 @@ class DisplayMgr { public: virtual ~DisplayMgr() {}; - virtual void newTopLevel(QWidget *, bool show = false) = 0; + virtual void newTopLevel(TQWidget *, bool show = false) = 0; - virtual void removeTopLevel(QWidget *) = 0; + virtual void removeTopLevel(TQWidget *) = 0; - virtual void show(QWidget *) = 0; + virtual void show(TQWidget *) = 0; - virtual void hide(QWidget *) = 0; + virtual void hide(TQWidget *) = 0; - virtual void raise(QWidget *, bool takefocus = false) = 0; + virtual void raise(TQWidget *, bool takefocus = false) = 0; - virtual void setCaption(QWidget *, const QString&) = 0; + virtual void setCaption(TQWidget *, const TQString&) = 0; }; diff --git a/ksirc/displayMgrMDI.cpp b/ksirc/displayMgrMDI.cpp index ae1e5b39..f8286ed6 100644 --- a/ksirc/displayMgrMDI.cpp +++ b/ksirc/displayMgrMDI.cpp @@ -4,7 +4,7 @@ #include <unistd.h> #include <assert.h> -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <kwin.h> #include <kaccel.h> #include <kaction.h> @@ -31,24 +31,24 @@ DisplayMgrMDI::~DisplayMgrMDI() #define DMM_MOVEL_ID 51 #define DMM_MOVER_ID 52 -void DisplayMgrMDI::newTopLevel( QWidget *w, bool show ) +void DisplayMgrMDI::newTopLevel( TQWidget *w, bool show ) { topLevel()->addWidget( w, show ); if(w->inherits("KSircTopLevel")){ KSircTopLevel *t = static_cast<KSircTopLevel *>(w); - connect(m_topLevel->tabWidget(), SIGNAL(currentChanged(QWidget *)), t, SLOT(focusChange(QWidget *))); + connect(m_topLevel->tabWidget(), TQT_SIGNAL(currentChanged(TQWidget *)), t, TQT_SLOT(focusChange(TQWidget *))); } if(w->inherits("KMainWindow")){ KMainWindow *t = static_cast<KMainWindow *>(w); - QMenuBar *cmenu = t->menuBar(); + TQMenuBar *cmenu = t->menuBar(); if(cmenu){ - QPopupMenu *m = new QPopupMenu(t, QCString(t->name()) + "_popup_MDI"); + TQPopupMenu *m = new TQPopupMenu(t, TQCString(t->name()) + "_popup_MDI"); m->setCheckable(true); - m->insertItem(i18n("Detach Window"), this, SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0); + m->insertItem(i18n("Detach Window"), this, TQT_SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0); m->insertSeparator(0); - m->insertItem(i18n("Move Tab Left"), this, SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0); - m->insertItem(i18n("Move Tab Right"), this, SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0); + m->insertItem(i18n("Move Tab Left"), this, TQT_SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0); + m->insertItem(i18n("Move Tab Right"), this, TQT_SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0); /* * By using an posisiton of 4 this works for KSircTopLevel * and DCCTopLevel but will cause problems when we have @@ -58,23 +58,23 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show ) cmenu->insertItem(i18n("&Window"), m, DMM_MDI_ID, 4); cmenu->setAccel(Key_M, DMM_MDI_ID); - QPopupMenu *sm = new QPopupMenu(t, "settings" ); + TQPopupMenu *sm = new TQPopupMenu(t, "settings" ); KToggleAction *showmenu = KStdAction::showMenubar( 0, 0, t->actionCollection() ); showmenu->plug( sm ); - connect( showmenu, SIGNAL(toggled(bool)), cmenu, SLOT(setShown(bool)) ); + connect( showmenu, TQT_SIGNAL(toggled(bool)), cmenu, TQT_SLOT(setShown(bool)) ); KSelectAction *selectTabbar = new KSelectAction(i18n("&Tab Bar"), 0, this, "tabbar" ); - QStringList tabbaritems; + TQStringList tabbaritems; tabbaritems << i18n("&Top") << i18n("&Bottom"); selectTabbar->setItems(tabbaritems); selectTabbar->setCurrentItem(1); selectTabbar->plug( sm ); - connect( selectTabbar, SIGNAL(activated(int)), this, SLOT(setTabPosition(int)) ); + connect( selectTabbar, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setTabPosition(int)) ); KToggleAction *showfull = KStdAction::fullScreen( 0, 0, t->actionCollection(), t ); showfull->plug( sm ); - connect( showfull, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)) ); + connect( showfull, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFullScreen(bool)) ); cmenu->insertItem( i18n("&Settings"), sm, -1, 5 ); } @@ -82,7 +82,7 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show ) topLevel()->show(); } -void DisplayMgrMDI::removeTopLevel(QWidget *w ) +void DisplayMgrMDI::removeTopLevel(TQWidget *w ) { if ( !m_topLevel ) return; @@ -106,7 +106,7 @@ void DisplayMgrMDI::removeTopLevel(QWidget *w ) } } -void DisplayMgrMDI::show(QWidget *w) +void DisplayMgrMDI::show(TQWidget *w) { if ( !m_topLevel ) return; @@ -115,7 +115,7 @@ void DisplayMgrMDI::show(QWidget *w) m_topLevel->show(); } -void DisplayMgrMDI::hide(QWidget *w) +void DisplayMgrMDI::hide(TQWidget *w) { if ( !m_topLevel ) return; @@ -126,7 +126,7 @@ void DisplayMgrMDI::hide(QWidget *w) } } -void DisplayMgrMDI::raise(QWidget *w, bool takefocus) +void DisplayMgrMDI::raise(TQWidget *w, bool takefocus) { assert( m_topLevel ); if(takefocus){ @@ -145,13 +145,13 @@ void DisplayMgrMDI::raise(QWidget *w, bool takefocus) } -void DisplayMgrMDI::setCaption(QWidget *w, const QString& cap) +void DisplayMgrMDI::setCaption(TQWidget *w, const TQString& cap) { assert( m_topLevel ); w->setCaption(cap); - QString esc = cap; + TQString esc = cap; esc.replace("&", "&&"); kdDebug(5008) << "Set caption: " << esc << endl; @@ -178,8 +178,8 @@ void DisplayMgrMDI::reparentReq() { kdDebug(5008) << "got reparent" << endl; - QWidget *o = kapp->focusWidget(); - QWidget *s; + TQWidget *o = kapp->focusWidget(); + TQWidget *s; if(o == NULL){ kdDebug(5008) << "Kapp says no widget has focus!" << endl; @@ -192,7 +192,7 @@ void DisplayMgrMDI::reparentReq() } else { - kdDebug(5008) << "QWidget is: " << o->className() << " name: " << o->name("none give") << endl; + kdDebug(5008) << "TQWidget is: " << o->className() << " name: " << o->name("none give") << endl; s = o; @@ -206,24 +206,24 @@ void DisplayMgrMDI::reparentReq() } -// QWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach +// TQWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach if(s){ KMainWindow *kst = static_cast<KMainWindow *>(s); kdDebug(5008) << "Top is: " << kst->name("none give") <<endl; - QMenuData *tmenu = kst->menuBar(); + TQMenuData *tmenu = kst->menuBar(); if(tmenu){ - QMenuItem *menui = tmenu->findItem(DMM_MDI_ID); + TQMenuItem *menui = tmenu->findItem(DMM_MDI_ID); if(menui){ - QMenuData *cmenu = menui->popup(); + TQMenuData *cmenu = menui->popup(); if(cmenu->findItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){ - kst->reparent( topLevel()->tabWidget(), 0, QPoint( 0, 0 ), true ); + kst->reparent( topLevel()->tabWidget(), 0, TQPoint( 0, 0 ), true ); show(kst); cmenu->setItemChecked(DMM_DEATCH_ID, false); } else { hide(kst); - kst->reparent( 0, QPoint(0,0), true ); + kst->reparent( 0, TQPoint(0,0), true ); cmenu->setItemChecked(DMM_DEATCH_ID, true); } } @@ -239,8 +239,8 @@ MDITopLevel *DisplayMgrMDI::topLevel() m_topLevel->show(); KAccel *a = new KAccel( m_topLevel ); - a->insert( "cycle left", i18n("Cycle left"), QString::null, ALT+Key_Left, ALT+Key_Left, this, SLOT(slotCycleTabsLeft()) ); - a->insert( "cycle right", i18n("Cycle right"), QString::null, ALT+Key_Right, ALT+Key_Right, this, SLOT(slotCycleTabsRight()) ); + a->insert( "cycle left", i18n("Cycle left"), TQString::null, ALT+Key_Left, ALT+Key_Left, this, TQT_SLOT(slotCycleTabsLeft()) ); + a->insert( "cycle right", i18n("Cycle right"), TQString::null, ALT+Key_Right, ALT+Key_Right, this, TQT_SLOT(slotCycleTabsRight()) ); } return m_topLevel; @@ -250,10 +250,10 @@ void DisplayMgrMDI::setTabPosition( int idx ) { switch ( idx ) { case 0: - m_topLevel->tabWidget()->setTabPosition(QTabWidget::Top); + m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Top); break; case 1: - m_topLevel->tabWidget()->setTabPosition(QTabWidget::Bottom); + m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Bottom); break; } } @@ -282,7 +282,7 @@ void DisplayMgrMDI::moveWindow(int step) return; } - QWidget *w = m_topLevel->tabWidget()->currentPage(); + TQWidget *w = m_topLevel->tabWidget()->currentPage(); if(w != 0x0){ int index = m_topLevel->tabWidget()->currentPageIndex(); index += step; @@ -294,7 +294,7 @@ void DisplayMgrMDI::moveWindow(int step) m_topLevel->setUpdatesEnabled(false); m_topLevel->hideWidget(w); int space = w->caption().find(" "); - QString esc = space < 1 ? w->caption():w->caption().left(space); + TQString esc = space < 1 ? w->caption():w->caption().left(space); esc.replace("&", "&&"); kdDebug(5008) << "Insert tab: " << esc << endl; m_topLevel->tabWidget()->insertTab( w, esc, index ); diff --git a/ksirc/displayMgrMDI.h b/ksirc/displayMgrMDI.h index 81528421..84e17631 100644 --- a/ksirc/displayMgrMDI.h +++ b/ksirc/displayMgrMDI.h @@ -4,21 +4,21 @@ #include "displayMgr.h" #include "mditoplevel.h" -class DisplayMgrMDI : public QObject, public DisplayMgr +class DisplayMgrMDI : public TQObject, public DisplayMgr { Q_OBJECT public: DisplayMgrMDI(); virtual ~DisplayMgrMDI(); - virtual void newTopLevel(QWidget *, bool show = FALSE); - virtual void removeTopLevel(QWidget *); + virtual void newTopLevel(TQWidget *, bool show = FALSE); + virtual void removeTopLevel(TQWidget *); - virtual void show(QWidget *); - virtual void hide(QWidget *); - virtual void raise(QWidget *, bool takefocus = false); + virtual void show(TQWidget *); + virtual void hide(TQWidget *); + virtual void raise(TQWidget *, bool takefocus = false); - virtual void setCaption(QWidget *, const QString&); + virtual void setCaption(TQWidget *, const TQString&); public slots: virtual void slotCycleTabsLeft(); @@ -38,9 +38,9 @@ protected: private: MDITopLevel *topLevel(); - QGuardedPtr<MDITopLevel> m_topLevel; + TQGuardedPtr<MDITopLevel> m_topLevel; int m_moveRightTab, m_moveLeftTab; - QPopupMenu *m_popupWindows; + TQPopupMenu *m_popupWindows; }; diff --git a/ksirc/displayMgrSDI.cpp b/ksirc/displayMgrSDI.cpp index ee5de75b..5b59f815 100644 --- a/ksirc/displayMgrSDI.cpp +++ b/ksirc/displayMgrSDI.cpp @@ -1,6 +1,6 @@ #include "displayMgrSDI.h" -#include <qwidget.h> +#include <tqwidget.h> DisplayMgrSDI::DisplayMgrSDI() { @@ -9,23 +9,23 @@ DisplayMgrSDI::DisplayMgrSDI() DisplayMgrSDI::~DisplayMgrSDI(){ } -void DisplayMgrSDI::newTopLevel(QWidget *w, bool show){ +void DisplayMgrSDI::newTopLevel(TQWidget *w, bool show){ if(show == TRUE) w->show(); } -void DisplayMgrSDI::removeTopLevel(QWidget *){ +void DisplayMgrSDI::removeTopLevel(TQWidget *){ } -void DisplayMgrSDI::show(QWidget *w){ +void DisplayMgrSDI::show(TQWidget *w){ w->show(); } -void DisplayMgrSDI::hide(QWidget *w){ +void DisplayMgrSDI::hide(TQWidget *w){ w->hide(); } -void DisplayMgrSDI::raise(QWidget *w, bool takefocus){ +void DisplayMgrSDI::raise(TQWidget *w, bool takefocus){ w->show(); w->raise(); if(takefocus) @@ -34,7 +34,7 @@ void DisplayMgrSDI::raise(QWidget *w, bool takefocus){ } -void DisplayMgrSDI::setCaption(QWidget *w, const QString& cap){ +void DisplayMgrSDI::setCaption(TQWidget *w, const TQString& cap){ w->setCaption(cap); } diff --git a/ksirc/displayMgrSDI.h b/ksirc/displayMgrSDI.h index 04bf21fe..02ac88aa 100644 --- a/ksirc/displayMgrSDI.h +++ b/ksirc/displayMgrSDI.h @@ -8,14 +8,14 @@ public: DisplayMgrSDI(); virtual ~DisplayMgrSDI(); - virtual void newTopLevel(QWidget *, bool show = FALSE); - virtual void removeTopLevel(QWidget *); + virtual void newTopLevel(TQWidget *, bool show = FALSE); + virtual void removeTopLevel(TQWidget *); - virtual void show(QWidget *); - virtual void hide(QWidget *); - virtual void raise(QWidget *, bool takefocus = false); + virtual void show(TQWidget *); + virtual void hide(TQWidget *); + virtual void raise(TQWidget *, bool takefocus = false); - virtual void setCaption(QWidget *, const QString&); + virtual void setCaption(TQWidget *, const TQString&); private: }; diff --git a/ksirc/dockservercontroller.cpp b/ksirc/dockservercontroller.cpp index f83f5ada..6053e5ab 100644 --- a/ksirc/dockservercontroller.cpp +++ b/ksirc/dockservercontroller.cpp @@ -9,12 +9,12 @@ #include "dockservercontroller.h" -#include <qpopupmenu.h> -#include <qwidget.h> -#include <qapplication.h> -#include <qregexp.h> -#include <qtimer.h> -#include <qcursor.h> +#include <tqpopupmenu.h> +#include <tqwidget.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqtimer.h> +#include <tqcursor.h> #include <kpassivepopup.h> #include <kpopupmenu.h> #include <klocale.h> @@ -42,7 +42,7 @@ extern DisplayMgr *displayMgr; -dscNickInfo::dscNickInfo(QString nick, QString server) : +dscNickInfo::dscNickInfo(TQString nick, TQString server) : m_nick(nick), m_server(server) { @@ -53,7 +53,7 @@ dscNickInfo::~dscNickInfo() } -dockServerController::dockServerController(servercontroller *sc, QWidget *parent, const char *_name) +dockServerController::dockServerController(servercontroller *sc, TQWidget *parent, const char *_name) : KSystemTray(parent, _name), m_sc(sc) { @@ -63,24 +63,24 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent pop->setName("dockServerController_menu_pop"); #ifndef NDEBUG - pop->insertItem(i18n("Dump Object Tree"), sc, SLOT(dump_obj())); - pop->insertItem(i18n("Server Debug Window"), sc, SLOT(server_debug())); + pop->insertItem(i18n("Dump Object Tree"), sc, TQT_SLOT(dump_obj())); + pop->insertItem(i18n("Server Debug Window"), sc, TQT_SLOT(server_debug())); pop->insertSeparator(); #endif pop->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."), - m_sc, SLOT(filter_rule_editor())); + m_sc, TQT_SLOT(filter_rule_editor())); - KStdAction::preferences(m_sc, SLOT(general_prefs()), + KStdAction::preferences(m_sc, TQT_SLOT(general_prefs()), m_sc->actionCollection())->plug(pop); - KStdAction::configureNotifications(m_sc, SLOT(notification_prefs()), actionCollection())->plug(pop); + KStdAction::configureNotifications(m_sc, TQT_SLOT(notification_prefs()), actionCollection())->plug(pop); pop->insertSeparator(); pop->insertItem(i18n("New &Server..."), - m_sc, SLOT(new_connection())); - pop->insertItem(i18n("&Do Autoconnect..."), m_sc, SLOT(start_autoconnect_check())); - connect(this, SIGNAL(quitSelected()), m_sc, SLOT(endksirc())); + m_sc, TQT_SLOT(new_connection())); + pop->insertItem(i18n("&Do Autoconnect..."), m_sc, TQT_SLOT(start_autoconnect_check())); + connect(this, TQT_SIGNAL(quitSelected()), m_sc, TQT_SLOT(endksirc())); #if KDE_IS_VERSION(3,1,92) m_pic_dock = KSystemTray::loadIcon( "ksirc" ); @@ -96,8 +96,8 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent m_mainPopVisible = false; createMainPopup(); - m_blinkTimer = new QTimer( this ); - connect( m_blinkTimer, SIGNAL(timeout()), this, SLOT( blinkDockedIcon() ) ); + m_blinkTimer = new TQTimer( this ); + connect( m_blinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( blinkDockedIcon() ) ); m_blinkStatus = false; m_blinkActive = false; @@ -107,14 +107,14 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent i18n("If someone said your nick in a window, this action " "will make that window active for you."), ALT+CTRL+Key_A, KKey::QtWIN+CTRL+Key_A, this, - SLOT(raiseLastActiveWindow())); + TQT_SLOT(raiseLastActiveWindow())); servercontroller::self() ->getGlobalAccel() ->insert("Clear Blink", i18n("Clear Blinking Dock Icon"), i18n("If the dock icon is blinking, but you don't want " "to go to the window this will clear the blinking."), ALT+CTRL+Key_Down, KKey::QtWIN+CTRL+Key_Down, this, - SLOT(blinkClear())); + TQT_SLOT(blinkClear())); // mainPop = new KPopupMenu(this, "dockServerController_main_pop"); // mainPop->setTitle(i18n("KSirc Dock Menu")); @@ -130,7 +130,7 @@ kdDebug(5008) << "~dockServerController in" << endl; kdDebug(5008) << "~dockServerController out" << endl; } -int dockServerController::intoPopupSorted(QString str, QPopupMenu *what) +int dockServerController::intoPopupSorted(TQString str, TQPopupMenu *what) { uint i = 0; @@ -161,15 +161,15 @@ void dockServerController::createMainPopup() if(mainPop) delete mainPop; mainPop = new KPopupMenu(this, "dockservercontrller_main_pop"); - connect(mainPop, SIGNAL(activated(int)), - this, SLOT(mainActivated(int))); - connect(mainPop, SIGNAL(aboutToShow()), - this, SLOT(mainPopShow())); - connect(mainPop, SIGNAL(aboutToHide()), - this, SLOT(mainPopHide())); + connect(mainPop, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(mainActivated(int))); + connect(mainPop, TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(mainPopShow())); + connect(mainPop, TQT_SIGNAL(aboutToHide()), + this, TQT_SLOT(mainPopHide())); - QDictIterator<dscNickInfo> it( m_nicks ); + TQDictIterator<dscNickInfo> it( m_nicks ); for( ; it.current(); ++it){ KPopupMenu *sub = new KPopupMenu(mainPop); if(it.current()->status() == dscNickInfo::isOnline){ @@ -187,8 +187,8 @@ void dockServerController::createMainPopup() sub->setItemParameter(cid, id); sub->setItemParameter(wid, id); sub->setItemParameter(dcid, id); - connect(sub, SIGNAL(activated(int)), - this, SLOT(subItemActivated(int))); + connect(sub, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(subItemActivated(int))); } else { sub->insertItem(i18n("Went Offline: ") + it.current()->offline().toString("hh:mm")); @@ -201,40 +201,40 @@ void dockServerController::createMainPopup() } if(m_blink_reason.count() > 0){ mainPop->insertSeparator(); - for ( QStringList::Iterator it = m_blink_reason.begin(); it != m_blink_reason.end(); ++it ) { + for ( TQStringList::Iterator it = m_blink_reason.begin(); it != m_blink_reason.end(); ++it ) { mainPop->insertItem(*it); } } if(mainPop->count() == 0){ - mainPop->insertItem(i18n("Help on Notify Popup..."), this, SLOT(helpNotice())); - mainPop->insertItem(i18n("Configure Notify..."), this, SLOT(configNotify())); + mainPop->insertItem(i18n("Help on Notify Popup..."), this, TQT_SLOT(helpNotice())); + mainPop->insertItem(i18n("Configure Notify..."), this, TQT_SLOT(configNotify())); } } void dockServerController::subItemActivated(int sub_id) { - const QPopupMenu *sub = dynamic_cast<const QPopupMenu *>(sender()); + const TQPopupMenu *sub = dynamic_cast<const TQPopupMenu *>(sender()); if(!sub){ - kdDebug(5008) << "subItemActivated by non QPopupMenu" << endl; + kdDebug(5008) << "subItemActivated by non TQPopupMenu" << endl; return; } int main_id = sub->itemParameter(sub_id); - QString mainText = mainPop->text(main_id); + TQString mainText = mainPop->text(main_id); if(mainText.isNull()){ kdDebug(5008) << "failed to get mainPop text" << endl; } - QRegExp rx("(\\S+) -> (\\S+) "); + TQRegExp rx("(\\S+) -> (\\S+) "); if(rx.search(mainText) >= 0){ - QString mserver = rx.cap(1); - QString mnick = rx.cap(2); + TQString mserver = rx.cap(1); + TQString mnick = rx.cap(2); - QString ns = mserver + "/" + mnick; + TQString ns = mserver + "/" + mnick; if(m_nicks[ns]){ kdDebug(5008) << "Got " << sub->text(sub_id) << " request for " << ns << endl; - QString cmd = sub->text(sub_id); - QString server = m_nicks[ns]->server(); - QString nick = m_nicks[ns]->nick(); + TQString cmd = sub->text(sub_id); + TQString server = m_nicks[ns]->server(); + TQString nick = m_nicks[ns]->nick(); if(cmd == i18n("Chat")){ servercontroller::self()->new_toplevel(KSircChannel(server, nick)); @@ -259,7 +259,7 @@ void dockServerController::subItemActivated(int sub_id) } -void dockServerController::mousePressEvent( QMouseEvent *e ) +void dockServerController::mousePressEvent( TQMouseEvent *e ) { if(e->button() == LeftButton){ showPopupMenu(mainPop); @@ -269,39 +269,39 @@ void dockServerController::mousePressEvent( QMouseEvent *e ) } } -void dockServerController::showPopupMenu( QPopupMenu *menu ) +void dockServerController::showPopupMenu( TQPopupMenu *menu ) { Q_ASSERT( menu != 0L ); - menu->popup(QCursor::pos()); + menu->popup(TQCursor::pos()); } -void dockServerController::nickOnline(QString server, QString nick) +void dockServerController::nickOnline(TQString server, TQString nick) { - QString sn = server + "/" + nick; + TQString sn = server + "/" + nick; if(!m_nicks[sn]) m_nicks.insert(sn, new dscNickInfo(nick, server)); m_nicks[sn]->setOnline(); createMainPopup(); } -void dockServerController::nickOffline(QString server, QString nick) +void dockServerController::nickOffline(TQString server, TQString nick) { - QString sn = server + "/" + nick; + TQString sn = server + "/" + nick; if(!m_nicks[sn]) m_nicks.insert(sn, new dscNickInfo(nick, server)); m_nicks[sn]->setOffline(); createMainPopup(); } -void dockServerController::serverOpen(QString) +void dockServerController::serverOpen(TQString) { } -void dockServerController::serverClose(QString server) +void dockServerController::serverClose(TQString server) { - QDictIterator<dscNickInfo> it( m_nicks ); + TQDictIterator<dscNickInfo> it( m_nicks ); while(it.current()){ if(it.current()->server() == server) m_nicks.remove(it.currentKey()); @@ -311,7 +311,7 @@ void dockServerController::serverClose(QString server) createMainPopup(); } -void dockServerController::startBlink(const QString& reason, const QString& text) +void dockServerController::startBlink(const TQString& reason, const TQString& text) { if(m_blinkActive == false){ // change icon (to "someone's talking to you" icon) @@ -321,12 +321,12 @@ void dockServerController::startBlink(const QString& reason, const QString& text m_blinkTimer->start( 500 ); // half a second } if(!reason.isNull()){ - QString br(reason); + TQString br(reason); if(text.isNull() && ksopts->runDocked && ksopts->dockPopups) - KPassivePopup::message(QString("Notify: %1").arg(reason), this); + KPassivePopup::message(TQString("Notify: %1").arg(reason), this); else { - QStringList sl; - QString cutup = text; + TQStringList sl; + TQString cutup = text; int i = 0; br = reason + " " + text.left(50); if(text.length() > 50) @@ -338,16 +338,16 @@ void dockServerController::startBlink(const QString& reason, const QString& text cutup = sl.join("\n"); cutup.truncate(cutup.length()-1); if(ksopts->runDocked && ksopts->dockPopups) - KPassivePopup::message(QString("%1").arg(reason), cutup, this); + KPassivePopup::message(TQString("%1").arg(reason), cutup, this); } m_blink_reason.append(br); createMainPopup(); kdDebug(5008) << "Blink reason: " << br << endl; - QRegExp rx("(\\S+) -> (\\S+)"); + TQRegExp rx("(\\S+) -> (\\S+)"); if(rx.search(reason) >= 0){ - QString server = rx.cap(1); - QString nick = rx.cap(2); + TQString server = rx.cap(1); + TQString nick = rx.cap(2); m_last_server = server; m_last_nick = nick; @@ -355,7 +355,7 @@ void dockServerController::startBlink(const QString& reason, const QString& text } } -void dockServerController::stopBlink(const QString& reason, bool clear) +void dockServerController::stopBlink(const TQString& reason, bool clear) { if(clear == true){ m_blinkActive = false; @@ -377,10 +377,10 @@ void dockServerController::blinkClear() void dockServerController::mainActivated(int id) { - QRegExp rx("(\\S+) -> (\\S+) "); + TQRegExp rx("(\\S+) -> (\\S+) "); if(rx.search(mainPop->text(id)) >= 0){ - QString server = rx.cap(1); - QString nick = rx.cap(2); + TQString server = rx.cap(1); + TQString nick = rx.cap(2); raiseWindow(server, nick); @@ -421,8 +421,8 @@ void dockServerController::helpNotice() void dockServerController::configNotify() { KSPrefs *kp = new KSPrefs(); - connect(kp, SIGNAL(update(int)), - m_sc, SLOT(configChange())); + connect(kp, TQT_SIGNAL(update(int)), + m_sc, TQT_SLOT(configChange())); kp->resize(550, 450); kp->showPage(2); /* Show auto connect page */ kp->show(); @@ -430,13 +430,13 @@ void dockServerController::configNotify() } -void dockServerController::raiseWindow(QString server, QString name) +void dockServerController::raiseWindow(TQString server, TQString name) { - QCString txt = server.utf8() + "_" + name.utf8() + "_toplevel"; - QWidget *obj = dynamic_cast<QWidget *>( objFinder::find(txt, "KSircTopLevel")); + TQCString txt = server.utf8() + "_" + name.utf8() + "_toplevel"; + TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt, "KSircTopLevel")); if(obj == 0x0){ txt = server.utf8() + "_!" + name.utf8() + "_toplevel"; - obj = dynamic_cast<QWidget *>( objFinder::find(txt, "KSircTopLevel")); + obj = dynamic_cast<TQWidget *>( objFinder::find(txt, "KSircTopLevel")); } if(obj != 0x0){ diff --git a/ksirc/dockservercontroller.h b/ksirc/dockservercontroller.h index 5c5bdb59..605c9ad5 100644 --- a/ksirc/dockservercontroller.h +++ b/ksirc/dockservercontroller.h @@ -3,11 +3,11 @@ #define dockservercontroller_included #include <ksystemtray.h> -#include <qdict.h> -#include <qstring.h> -#include <qdatetime.h> -#include <qpixmap.h> -#include <qstringlist.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqpixmap.h> +#include <tqstringlist.h> class QPopupMenu; class QWidget; @@ -19,7 +19,7 @@ class QTimer; class dscNickInfo { public: - dscNickInfo(QString nick, QString server); + dscNickInfo(TQString nick, TQString server); ~dscNickInfo(); enum status { @@ -27,24 +27,24 @@ public: isOffline }; - QString nick() { return m_nick; } - QString server() { return m_server; } + TQString nick() { return m_nick; } + TQString server() { return m_server; } - void setOnline() { m_status = isOnline; m_online = QTime::currentTime(); } - const QTime &online() { return m_online; } + void setOnline() { m_status = isOnline; m_online = TQTime::currentTime(); } + const TQTime &online() { return m_online; } - void setOffline() { m_status = isOffline; m_offline = QTime::currentTime(); } - const QTime offline() { return m_offline; } + void setOffline() { m_status = isOffline; m_offline = TQTime::currentTime(); } + const TQTime offline() { return m_offline; } void setStatus(enum status stat) { m_status = stat; } enum status status() { return m_status; } private: - QString m_nick; - QString m_server; + TQString m_nick; + TQString m_server; enum status m_status; - QTime m_online; - QTime m_offline; + TQTime m_online; + TQTime m_offline; }; @@ -52,21 +52,21 @@ class dockServerController : public KSystemTray { Q_OBJECT public: - dockServerController(servercontroller *_sc, QWidget *parent = 0x0, const char *_name = 0x0); + dockServerController(servercontroller *_sc, TQWidget *parent = 0x0, const char *_name = 0x0); ~dockServerController(); - void startBlink(const QString& reason = QString::null, const QString& text = QString::null); - void stopBlink(const QString& reason = QString::null, bool clear = false); + void startBlink(const TQString& reason = TQString::null, const TQString& text = TQString::null); + void stopBlink(const TQString& reason = TQString::null, bool clear = false); - void nickOnline(QString server, QString nick); - void nickOffline(QString server, QString nick); + void nickOnline(TQString server, TQString nick); + void nickOffline(TQString server, TQString nick); - void serverOpen(QString server); - void serverClose(QString server); + void serverOpen(TQString server); + void serverClose(TQString server); protected: - void mousePressEvent( QMouseEvent *); - virtual void showPopupMenu( QPopupMenu *); + void mousePressEvent( TQMouseEvent *); + virtual void showPopupMenu( TQPopupMenu *); public slots: void raiseLastActiveWindow(); @@ -83,26 +83,26 @@ protected slots: void mainPopHide(); private: - int intoPopupSorted(QString, QPopupMenu *); + int intoPopupSorted(TQString, TQPopupMenu *); void createMainPopup(); - void raiseWindow(QString server, QString name); - QDict<dscNickInfo> m_nicks; + void raiseWindow(TQString server, TQString name); + TQDict<dscNickInfo> m_nicks; servercontroller *m_sc; KPopupMenu *mainPop; - QString m_last_nick; - QString m_last_server; + TQString m_last_nick; + TQString m_last_server; - QPixmap m_pic_dock; - QPixmap m_pic_info; + TQPixmap m_pic_dock; + TQPixmap m_pic_info; bool m_mainPopVisible; bool m_blinkActive; bool m_blinkStatus; // true: blue icon, false: normal icon - QTimer* m_blinkTimer; + TQTimer* m_blinkTimer; - QStringList m_blink_reason; + TQStringList m_blink_reason; }; diff --git a/ksirc/ioBroadcast.cpp b/ksirc/ioBroadcast.cpp index 9bac4e30..b36e4420 100644 --- a/ksirc/ioBroadcast.cpp +++ b/ksirc/ioBroadcast.cpp @@ -12,7 +12,7 @@ Implementation: - Make a QDictIterator, iterate over the windows sedning to each + Make a TQDictIterator, iterate over the windows sedning to each broadcaster that's not itself. *** NOTE! don't have 2 broadcasters or else they'll broadcast forever! @@ -27,10 +27,10 @@ KSircIOBroadcast::~KSircIOBroadcast() { } -void KSircIOBroadcast::sirc_receive(QCString str, bool) +void KSircIOBroadcast::sirc_receive(TQCString str, bool) { - QDictIterator<KSircMessageReceiver> it(proc->getWindowList()); + TQDictIterator<KSircMessageReceiver> it(proc->getWindowList()); KSircMessageReceiver *dflt = (proc->getWindowList())["!default"]; if(dflt->getBroadcast() == TRUE) @@ -46,10 +46,10 @@ void KSircIOBroadcast::sirc_receive(QCString str, bool) } -void KSircIOBroadcast::control_message(int command, QString str) +void KSircIOBroadcast::control_message(int command, TQString str) { - QDictIterator<KSircMessageReceiver> it(proc->getWindowList()); + TQDictIterator<KSircMessageReceiver> it(proc->getWindowList()); it.toFirst(); diff --git a/ksirc/ioBroadcast.h b/ksirc/ioBroadcast.h index 5be56390..9bb33ff9 100644 --- a/ksirc/ioBroadcast.h +++ b/ksirc/ioBroadcast.h @@ -13,8 +13,8 @@ public: } virtual ~KSircIOBroadcast(); - virtual void sirc_receive(QCString str, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString str, bool broadcast); + virtual void control_message(int, TQString); virtual filterRuleList *defaultRules(); diff --git a/ksirc/ioDCC.cpp b/ksirc/ioDCC.cpp index 7c576904..ff2d5022 100644 --- a/ksirc/ioDCC.cpp +++ b/ksirc/ioDCC.cpp @@ -17,12 +17,12 @@ #include <klocale.h> #include <kpassivepopup.h> -#include <qregexp.h> +#include <tqregexp.h> extern DisplayMgr *displayMgr; KSircIODCC::KSircIODCC(KSircProcess *_proc) : - QObject(), + TQObject(), KSircMessageReceiver(_proc) { proc = _proc; @@ -31,11 +31,11 @@ KSircIODCC::KSircIODCC(KSircProcess *_proc) : displayMgr->newTopLevel(mgr, FALSE); displayMgr->setCaption(mgr, proc->serverName() + i18n(" DCC Controller")); - connect(mgr->mgr(), SIGNAL(dccConnectClicked(dccItem *)), this, SLOT(dccConnectClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(dccResumeClicked(dccItem *)), this, SLOT(dccResumeClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(dccRenameClicked(dccItem *)), this, SLOT(dccRenameClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(dccAbortClicked(dccItem *)), this, SLOT(dccAbortClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(outputLine(QCString)), this, SIGNAL(outputLine(QCString))); + connect(mgr->mgr(), TQT_SIGNAL(dccConnectClicked(dccItem *)), this, TQT_SLOT(dccConnectClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(dccResumeClicked(dccItem *)), this, TQT_SLOT(dccResumeClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(dccRenameClicked(dccItem *)), this, TQT_SLOT(dccRenameClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(dccAbortClicked(dccItem *)), this, TQT_SLOT(dccAbortClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(outputLine(TQCString)), this, TQT_SIGNAL(outputLine(TQCString))); } @@ -46,7 +46,7 @@ KSircIODCC::~KSircIODCC() delete (dccTopLevel *) mgr; } -void KSircIODCC::sirc_receive(QCString str, bool ) +void KSircIODCC::sirc_receive(TQCString str, bool ) { if(!mgr) return; @@ -59,9 +59,9 @@ void KSircIODCC::sirc_receive(QCString str, bool ) // once in a long long time (compared to the byte messages) so if it takes // a few extra clock cycles to find them, who cares? if(str.find("DCC GET read:", 0) != -1){ /*fold01*/ - QRegExp rx("read: (.+) who: (.+) bytes: (.*)"); + TQRegExp rx("read: (.+) who: (.+) bytes: (.*)"); if(rx.search(str)){ - QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); + TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); uint bytesXfer = rx.cap(3).toUInt(); // @@ -74,9 +74,9 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC SEND write:", 0) != -1){ /*fold01*/ - QRegExp rx("write: (.+) who: (.+) bytes: (.*)"); + TQRegExp rx("write: (.+) who: (.+) bytes: (.*)"); if(rx.search(str)){ - QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); + TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); uint bytesXfer = rx.cap(3).toUInt(); if(DCCSendItems[key]){ @@ -85,12 +85,12 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("INBOUND DCC SEND", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)"); + TQRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString size = rx.cap(3); - QString ip = rx.cap(4); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString size = rx.cap(3); + TQString ip = rx.cap(4); //QSTring port = rx.cap(5); int fileSize = size.toInt(); // Bytes per step @@ -99,25 +99,25 @@ void KSircIODCC::sirc_receive(QCString str, bool ) // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newGetItem(filename, who, dccItem::dccGotOffer, fileSize); - connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)), - this, SLOT(dccRenameDone(dccItem *, QString, QString))); + connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)), + this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString))); it->setWhoPostfix("(" + ip + ")"); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ /* * don't add duplicates, this cuases real headaches * for both us and the user. */ - QString renamed; + TQString renamed; dccItem *old = DCCGetItems.take(key); int i; for(i = 0; i <= (int) DCCGetItems.count()+1; i++){ - renamed = QString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who()); + renamed = TQString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who()); if( DCCGetItems[renamed] == 0x0) break; } - old->changeFilename(QString("%1 (finished %2)").arg(filename).arg(i+1)); + old->changeFilename(TQString("%1 (finished %2)").arg(filename).arg(i+1)); DCCGetItems.insert(renamed, it); } @@ -128,18 +128,18 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("Sent DCC SEND", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) file: (.+) size: (.*)"); + TQRegExp rx("who: (.+) file: (.+) size: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString size = rx.cap(3); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString size = rx.cap(3); int fileSize = size.toInt(); // Bytes per step fileSize /= 1024; // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newSendItem(filename, who, dccItem::dccSentOffer, fileSize); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ /* * don't add duplicates, this cuases real headaches @@ -147,15 +147,15 @@ void KSircIODCC::sirc_receive(QCString str, bool ) * We can get these on repeated sends or old files, * just renamed them, their finished anyways */ - QString renamed; + TQString renamed; dccItem *old = DCCSendItems.take(key); int i; for(i = 0; i <= (int) DCCSendItems.count()+1; i++){ - renamed = QString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who()); + renamed = TQString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who()); if( DCCSendItems[renamed] == 0x0) break; } - old->changeFilename(QString("%1 (sent %2)").arg(filename).arg(i+1)); + old->changeFilename(TQString("%1 (sent %2)").arg(filename).arg(i+1)); DCCSendItems.insert(renamed, it); } DCCSendItems.insert(key, it); @@ -165,16 +165,16 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT OFFERED", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) ip: (.+) port: (.+)"); + TQRegExp rx("who: (.+) ip: (.+) port: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString ip = rx.cap(2); - QString port = rx.cap(3); + TQString who = rx.cap(1); + TQString ip = rx.cap(2); + TQString port = rx.cap(3); // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccGotOffer); - connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)), - this, SLOT(dccRenameDone(dccItem *, QString, QString))); + connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)), + this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString))); it->setWhoPostfix("(" + ip + ")"); DCCChatItems.insert(who, it); } @@ -183,15 +183,15 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT SEND", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccSentOffer); - connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)), - this, SLOT(dccRenameDone(dccItem *, QString, QString))); + connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)), + this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString))); DCCChatItems.insert(who, it); } else { @@ -199,11 +199,11 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC SEND terminated") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) file: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) file: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString error = rx.cap(3); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString error = rx.cap(3); enum dccItem::dccStatus status = dccItem::dccDone; if(error == "CLOSE"){ @@ -213,7 +213,7 @@ void KSircIODCC::sirc_receive(QCString str, bool ) status = dccItem::dccError; KPassivePopup::message(i18n("DCC SEND with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr()); } - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ kdDebug(5008) << "SendPercent: " << DCCSendItems[key]->getPercent() << endl; if((status == dccItem::dccDone) && (DCCSendItems[key]->getPercent() < 100)) @@ -224,18 +224,18 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } else if(str.find ("DCC GET terminated") != -1){ /*fold01*/ kdDebug(5008) << "Term: " << str << endl; - QRegExp rx("who: (.+) file: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) file: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString error = rx.cap(3); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString error = rx.cap(3); enum dccItem::dccStatus status = dccItem::dccDone; if(error != "OK"){ status = dccItem::dccError; KPassivePopup::message(i18n("DCC GET with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr()); } - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ kdDebug(5008) << "GetPercent: " << DCCGetItems[key]->getPercent() << endl; if((status == dccItem::dccDone) && (DCCGetItems[key]->getPercent() < 100)) @@ -248,11 +248,11 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC GET resumed") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ dccItem *it = DCCGetItems[key]; kdDebug(5008) << "Got DCC GET resumed message..." << it->file() << endl; @@ -263,34 +263,34 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC SEND resumed") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ DCCSendItems[key]->changeStatus(dccItem::dccResumed); } } } else if(str.find("DCC GET established") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ DCCGetItems[key]->changeStatus(dccItem::dccRecving); } } } else if(str.find("DCC SEND established") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+) ip: (\\S+)"); + TQRegExp rx("who: (.+) file: (.+) ip: (\\S+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString ip = rx.cap(3); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString ip = rx.cap(3); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ DCCSendItems[key]->setWhoPostfix("(" + ip + ")"); DCCSendItems[key]->changeStatus(dccItem::dccSending); @@ -298,34 +298,34 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT established") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); if(DCCChatItems[who]){ DCCChatItems[who]->changeStatus(dccItem::dccOpen); - proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower())); + proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower())); } } } else if(str.find("DCC CHAT inbound established") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) ip: (.+)"); + TQRegExp rx("who: (.+) ip: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString ip = rx.cap(2); + TQString who = rx.cap(1); + TQString ip = rx.cap(2); if(DCCChatItems[who]){ DCCChatItems[who]->setWhoPostfix("(" + ip + ")"); DCCChatItems[who]->changeStatus(dccItem::dccOpen); - proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower())); + proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower())); } } } else if(str.find("DCC GET failed") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) file: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString error = rx.cap(3); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString error = rx.cap(3); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ DCCGetItems[key]->changeStatus(dccItem::dccError); } @@ -333,10 +333,10 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT failed") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString error = rx.cap(2); + TQString who = rx.cap(1); + TQString error = rx.cap(2); if(DCCChatItems[who]){ DCCChatItems[who]->changeStatus(dccItem::dccError); } @@ -344,59 +344,59 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT renamed") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) to: (.+)"); + TQRegExp rx("who: (.+) to: (.+)"); if(rx.search(str)){ - QString oldwho = rx.cap(1); - QString newwho = rx.cap(2); + TQString oldwho = rx.cap(1); + TQString newwho = rx.cap(2); - QString oldwin = "=" + oldwho; + TQString oldwin = "=" + oldwho; if(proc->getWindowList().find(oldwin)){ - proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,QString("=" +newwho).lower()); + proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,TQString("=" +newwho).lower()); } } } else if(str.find("Closing DCC GET") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ DCCGetItems[key]->changeStatus(dccItem::dccCancel); } } } // else if(str.find("Closing DCC SEND") != -1){ /*FOLD01*/ -// QRegExp rx("who: (.+) file: (.+)"); +// TQRegExp rx("who: (.+) file: (.+)"); // if(rx.search(str)){ -// QString who = rx.cap(1); -// QString filename = rx.cap(2); -// QString key = QString("%1/%2").arg(filename).arg(who); +// TQString who = rx.cap(1); +// TQString filename = rx.cap(2); +// TQString key = TQString("%1/%2").arg(filename).arg(who); // if(DCCSendItems[key]){ // DCCSendItems[key]->changeStatus(dccItem::dccCancel); // } // } // } else if(str.find("Closing DCC CHAT") != -1){ /*fold01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); if(DCCChatItems[who]){ DCCChatItems[who]->changeStatus(dccItem::dccDone); } } } else if(str.find("No DCC SEND") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); - //QString key = QString("%1/%2").arg(filename).arg(who); + //TQString key = TQString("%1/%2").arg(filename).arg(who); - QPtrList<dccItem> toDel; - QDict<dccItem> new_list; - QDictIterator<dccItem> it( DCCSendItems ); + TQPtrList<dccItem> toDel; + TQDict<dccItem> new_list; + TQDictIterator<dccItem> it( DCCSendItems ); for(;it.current(); ++it){ if((it.current()->who() == who) && (it.current()->file() == filename) @@ -413,14 +413,14 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("No DCC GET") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); - QPtrList<dccItem> toDel; - QDict<dccItem> new_list; - QDictIterator<dccItem> it( DCCGetItems ); + TQPtrList<dccItem> toDel; + TQDict<dccItem> new_list; + TQDictIterator<dccItem> it( DCCGetItems ); for(;it.current(); ++it){ if((it.current()->who() == who) && (it.current()->file() == filename) @@ -437,13 +437,13 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("No DCC CHAT") != -1){ /*fold01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); - QPtrList<dccItem> toDel; - QDict<dccItem> new_list; - QDictIterator<dccItem> it( DCCChatItems ); + TQPtrList<dccItem> toDel; + TQDict<dccItem> new_list; + TQDictIterator<dccItem> it( DCCChatItems ); for(;it.current(); ++it){ if(it.current()->who() == who){ toDel.append(it.current()); @@ -463,11 +463,11 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } -void KSircIODCC::control_message(int, QString) +void KSircIODCC::control_message(int, TQString) { } -void KSircIODCC::cancelTransfer(QString filename) +void KSircIODCC::cancelTransfer(TQString filename) { //if(DlgList[filename]){ //emit outputLine(DCCStatus[filename]->cancelMessage.ascii()); @@ -481,17 +481,17 @@ void KSircIODCC::cancelTransfer(QString filename) void KSircIODCC::getFile() { /* - QString text = pending->fileListing()->text(pending->fileListing()->currentItem()); + TQString text = pending->fileListing()->text(pending->fileListing()->currentItem()); int pos = text.find(" ", 0); - QString nick = text.mid(0, pos); + TQString nick = text.mid(0, pos); pos = text.find(" ", pos+1) + 1; - QString filename = text.mid(pos, text.length() - pos); + TQString filename = text.mid(pos, text.length() - pos); //if(DlgList[filename]->isVisible() == FALSE) // DlgList[filename]->show(); - QString command = "/dcc get " + nick + " " + filename + "\n"; + TQString command = "/dcc get " + nick + " " + filename + "\n"; emit outputLine(command.ascii()); for(uint i = 0; i < pending->fileListing()->count(); i++) - if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) + if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) pending->fileListing()->removeItem(i); if(pending->fileListing()->count() == 0) @@ -502,15 +502,15 @@ void KSircIODCC::getFile() void KSircIODCC::forgetFile() { /* - QString text = pending->fileListing()->text(pending->fileListing()->currentItem()); + TQString text = pending->fileListing()->text(pending->fileListing()->currentItem()); int pos = text.find(" ", 0); - QString nick = text.mid(0, pos); + TQString nick = text.mid(0, pos); pos = text.find(" ", pos+1) + 1; - QString filename = text.mid(pos, text.length() - pos); - QString command = "/dcc close get " + nick + " " + filename + "\n"; + TQString filename = text.mid(pos, text.length() - pos); + TQString command = "/dcc close get " + nick + " " + filename + "\n"; emit outputLine(command.ascii()); for(uint i = 0; i < pending->fileListing()->count(); i++) - if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) + if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) pending->fileListing()->removeItem(i); if(pending->fileListing()->count() == 0) @@ -539,7 +539,7 @@ filterRuleList *KSircIODCC::defaultRules() void KSircIODCC::dccConnectClicked(dccItem *it) { - QString str; + TQString str; kdDebug(5008) << "Got connect click on " << it->who() << " " << it->type() << endl; switch(it->type()){ case dccItem::dccGet: @@ -557,7 +557,7 @@ void KSircIODCC::dccConnectClicked(dccItem *it) } void KSircIODCC::dccResumeClicked(dccItem *it) { - QString str; + TQString str; kdDebug(5008) << "Got resume click on " << it->who() << " " << it->type() << endl; switch(it->type()){ case dccItem::dccGet: @@ -576,17 +576,17 @@ void KSircIODCC::dccRenameClicked(dccItem *it) } void KSircIODCC::dccAbortClicked(dccItem *it) { - QString str; + TQString str; switch(it->status()){ case dccItem::dccDone: case dccItem::dccCancel: case dccItem::dccError: switch(it->type()) { case dccItem::dccGet: - DCCGetItems.remove(QString("%1/%2").arg(it->file()).arg(it->who())); + DCCGetItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who())); break; case dccItem::dccSend: - DCCSendItems.remove(QString("%1/%2").arg(it->file()).arg(it->who())); + DCCSendItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who())); break; case dccItem::dccChat: DCCChatItems.remove(it->who()); @@ -612,14 +612,14 @@ void KSircIODCC::dccAbortClicked(dccItem *it) } } -void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile) +void KSircIODCC::dccRenameDone(dccItem *it, TQString oldWho, TQString oldFile) { if(it->type() == dccItem::dccGet){ - QString str = QString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file()); - QString key = QString("%1/%2").arg(oldFile).arg(oldWho); + TQString str = TQString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file()); + TQString key = TQString("%1/%2").arg(oldFile).arg(oldWho); if(DCCGetItems[key]){ DCCGetItems.take(key); - QString newkey = QString("%1/%2").arg(it->file()).arg(it->who()); + TQString newkey = TQString("%1/%2").arg(it->file()).arg(it->who()); DCCGetItems.insert(newkey, it); } emit outputLine(str.ascii()); @@ -629,7 +629,7 @@ void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile) DCCChatItems.take(oldWho); DCCChatItems.insert(it->who(), it); } - QString str = QString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who()); + TQString str = TQString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who()); emit outputLine(str.ascii()); } diff --git a/ksirc/ioDCC.h b/ksirc/ioDCC.h index 76a93941..a9768f29 100644 --- a/ksirc/ioDCC.h +++ b/ksirc/ioDCC.h @@ -1,9 +1,9 @@ #ifndef KIODCCC_H #define KIODCCC_H -#include <qdict.h> -#include <qobject.h> -#include <qguardedptr.h> +#include <tqdict.h> +#include <tqobject.h> +#include <tqguardedptr.h> #include "dccManager.h" #include "dccToplevel.h" @@ -12,14 +12,14 @@ class KSProgress; struct DCCInfo { - QString nick; - QString cancelMessage; + TQString nick; + TQString cancelMessage; int LastSize; int PercentSize; bool inProgress; }; -class KSircIODCC : public QObject, +class KSircIODCC : public TQObject, public KSircMessageReceiver { Q_OBJECT @@ -27,14 +27,14 @@ public: KSircIODCC(KSircProcess *_proc); virtual ~KSircIODCC(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); virtual filterRuleList *defaultRules(); virtual void showMgr(); protected slots: - void cancelTransfer(QString); + void cancelTransfer(TQString); void getFile(); void forgetFile(); @@ -43,21 +43,21 @@ protected slots: void dccRenameClicked(dccItem *); void dccAbortClicked(dccItem *); - void dccRenameDone(dccItem *, QString, QString); + void dccRenameDone(dccItem *, TQString, TQString); signals: - void outputLine(QCString); + void outputLine(TQCString); private: -// QDict<QProgressDialog> DlgList; - //QDict<KSProgress> DlgList; - //QDict<DCCInfo> DCCStatus; - QDict<dccItem> DCCGetItems; - QDict<dccItem> DCCSendItems; - QDict<dccItem> DCCChatItems; +// TQDict<TQProgressDialog> DlgList; + //TQDict<KSProgress> DlgList; + //TQDict<DCCInfo> DCCStatus; + TQDict<dccItem> DCCGetItems; + TQDict<dccItem> DCCSendItems; + TQDict<dccItem> DCCChatItems; //dccDialog *pending; - QGuardedPtr<dccTopLevel> mgr; + TQGuardedPtr<dccTopLevel> mgr; KSircProcess *proc; }; diff --git a/ksirc/ioDiscard.cpp b/ksirc/ioDiscard.cpp index 7ce4173e..6210d615 100644 --- a/ksirc/ioDiscard.cpp +++ b/ksirc/ioDiscard.cpp @@ -14,10 +14,10 @@ KSircIODiscard::~KSircIODiscard() { } -void KSircIODiscard::sirc_receive(QCString, bool) +void KSircIODiscard::sirc_receive(TQCString, bool) { } -void KSircIODiscard::control_message(int, QString) +void KSircIODiscard::control_message(int, TQString) { } diff --git a/ksirc/ioDiscard.h b/ksirc/ioDiscard.h index e15c62da..4c4df665 100644 --- a/ksirc/ioDiscard.h +++ b/ksirc/ioDiscard.h @@ -11,8 +11,8 @@ public: } virtual ~KSircIODiscard(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); private: }; diff --git a/ksirc/ioLAG.cpp b/ksirc/ioLAG.cpp index 50f3f082..0a1a2ec7 100644 --- a/ksirc/ioLAG.cpp +++ b/ksirc/ioLAG.cpp @@ -13,7 +13,7 @@ #include <kdebug.h> KSircIOLAG::KSircIOLAG(KSircProcess *_proc) - : QObject(), + : TQObject(), KSircMessageReceiver(_proc) { proc = _proc; @@ -29,7 +29,7 @@ KSircIOLAG::~KSircIOLAG() killTimers(); } -void KSircIOLAG::sirc_receive(QCString str, bool) +void KSircIOLAG::sirc_receive(TQCString str, bool) { if(str.contains("*L*")){ @@ -40,7 +40,7 @@ void KSircIOLAG::sirc_receive(QCString str, bool) kdDebug(5008) << "Lag mesage broken: " << str << endl; return; } - QString lag = str.mid(s1, s2 - s1); + TQString lag = str.mid(s1, s2 - s1); // cerr << "Lag: " << str << endl; // cerr << "Setting lag to: " << lag << endl; (proc->getWindowList())["!all"]->control_message(SET_LAG, lag); @@ -48,13 +48,13 @@ void KSircIOLAG::sirc_receive(QCString str, bool) } -void KSircIOLAG::control_message(int, QString) +void KSircIOLAG::control_message(int, TQString) { } -void KSircIOLAG::timerEvent ( QTimerEvent * ) +void KSircIOLAG::timerEvent ( TQTimerEvent * ) { - QCString cmd = "/lag\n"; + TQCString cmd = "/lag\n"; emit outputLine(cmd); } diff --git a/ksirc/ioLAG.h b/ksirc/ioLAG.h index 1c3bc00d..6fc99901 100644 --- a/ksirc/ioLAG.h +++ b/ksirc/ioLAG.h @@ -1,11 +1,11 @@ #ifndef KIOLAG_H #define KIOLAG_H -#include <qobject.h> +#include <tqobject.h> #include "messageReceiver.h" -class KSircIOLAG : public QObject, +class KSircIOLAG : public TQObject, public KSircMessageReceiver { Q_OBJECT @@ -13,16 +13,16 @@ public: KSircIOLAG(KSircProcess *_proc); virtual ~KSircIOLAG(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); protected slots: protected: - virtual void timerEvent ( QTimerEvent * ); + virtual void timerEvent ( TQTimerEvent * ); signals: - void outputLine(QCString); + void outputLine(TQCString); private: KSircProcess *proc; diff --git a/ksirc/ioNotify.cpp b/ksirc/ioNotify.cpp index 14c6e9e8..b3b4a52f 100644 --- a/ksirc/ioNotify.cpp +++ b/ksirc/ioNotify.cpp @@ -12,7 +12,7 @@ #include <kdebug.h> KSircIONotify::KSircIONotify(KSircProcess *_proc) - : QObject(), + : TQObject(), KSircMessageReceiver(_proc) { proc = _proc; @@ -24,7 +24,7 @@ KSircIONotify::~KSircIONotify() { } -void KSircIONotify::sirc_receive(QCString str, bool) +void KSircIONotify::sirc_receive(TQCString str, bool) { if(str.contains("*)*")){ int s1, s2; @@ -34,7 +34,7 @@ void KSircIONotify::sirc_receive(QCString str, bool) kdDebug(5008) << "Nick Notify mesage broken: " << str << endl; return; } - QString nick = str.mid(s1, s2 - s1); + TQString nick = str.mid(s1, s2 - s1); emit notify_online(nick); } else if(str.contains("*(*")){ @@ -45,7 +45,7 @@ void KSircIONotify::sirc_receive(QCString str, bool) kdDebug(5008) << "Nick Notify mesage broken: " << str << endl; return; } - QString nick = str.mid(s1, s2 - s1); + TQString nick = str.mid(s1, s2 - s1); emit notify_offline(nick); } else{ @@ -54,7 +54,7 @@ void KSircIONotify::sirc_receive(QCString str, bool) } } -void KSircIONotify::control_message(int, QString) +void KSircIONotify::control_message(int, TQString) { } diff --git a/ksirc/ioNotify.h b/ksirc/ioNotify.h index e95edabe..b5a9890e 100644 --- a/ksirc/ioNotify.h +++ b/ksirc/ioNotify.h @@ -1,11 +1,11 @@ #ifndef KIONOTIFY_H #define KIONOTIFY_H -#include <qobject.h> +#include <tqobject.h> #include "messageReceiver.h" -class KSircIONotify : public QObject, +class KSircIONotify : public TQObject, public KSircMessageReceiver { Q_OBJECT @@ -13,14 +13,14 @@ public: KSircIONotify(KSircProcess *_proc); virtual ~KSircIONotify(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); virtual filterRuleList *defaultRules(); signals: - virtual void notify_online(QString); - virtual void notify_offline(QString); + virtual void notify_online(TQString); + virtual void notify_offline(TQString); protected slots: diff --git a/ksirc/iocontroller.cpp b/ksirc/iocontroller.cpp index 61b0b49c..d63fba7b 100644 --- a/ksirc/iocontroller.cpp +++ b/ksirc/iocontroller.cpp @@ -54,9 +54,9 @@ - Should be called for stderr data, not connected, does nothing. - stdin_write(QString): + stdin_write(TQString): - Slot that get's connected to by KSircProcess to each - window. QString shold be written un touched! Let the + window. TQString shold be written un touched! Let the writter figure out what ever he wants to do. sircDied: @@ -74,11 +74,11 @@ #include "messageReceiver.h" #include "ksopts.h" -#include <qlistbox.h> -#include <qtextcodec.h> +#include <tqlistbox.h> +#include <tqtextcodec.h> #include <kcharsets.h> #include <kglobal.h> -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <kdebug.h> #include <kdeversion.h> @@ -89,7 +89,7 @@ int KSircIOController::counter = 0; KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc) - : QObject() + : TQObject() { counter++; @@ -103,20 +103,20 @@ KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc) // Connect the data arrived // to sirc receive for adding // the main text window - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(stdout_read(KProcess*, char*, int))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(stdout_read(KProcess*, char*, int))); // Connect the stderr data // to sirc receive for adding // the main text window - connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(stderr_read(KProcess*, char*, int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(stderr_read(KProcess*, char*, int))); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(sircDied(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(sircDied(KProcess *))); // Notify on sirc dying - connect(proc, SIGNAL(wroteStdin(KProcess*)), - this, SLOT(procCTS(KProcess*))); + connect(proc, TQT_SIGNAL(wroteStdin(KProcess*)), + this, TQT_SLOT(procCTS(KProcess*))); proc_CTS = TRUE; #if 0 showDebugTraffic(true); @@ -175,12 +175,12 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen) */ int pos,pos2,pos3; - QCString name, line; + TQCString name, line; assert(_buffer != 0); assert(buflen > 0); - QCString buffer(_buffer, buflen+1); + TQCString buffer(_buffer, buflen+1); //fprintf(stderr, "first print: \n"); //my_print(buffer); //kdDebug(5008) << "<-- read: " << buffer << endl; @@ -229,7 +229,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen) line = buffer.mid(pos, pos2 - pos); if(m_debugLB){ - QString s = QString::fromUtf8(line); + TQString s = TQString::fromUtf8(line); m_debugLB->insertItem(s); } @@ -243,9 +243,9 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen) line.remove(0, pos3+1); } } - QString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding ); - QTextCodec *qtc = KGlobal::charsets()->codecForName( enc ); - QString qsname = qtc->toUnicode(name); + TQString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding ); + TQTextCodec *qtc = KGlobal::charsets()->codecForName( enc ); + TQString qsname = qtc->toUnicode(name); /* char *b = qstrdup(line); kdDebug(5008) << "----------------------------------------" << endl; @@ -302,7 +302,7 @@ void KSircIOController::stderr_read(KProcess *p, char *b, int l) stdout_read(p, b, l); } -void KSircIOController::stdin_write(QCString s) +void KSircIOController::stdin_write(TQCString s) { if (!proc->isRunning()) { @@ -328,7 +328,7 @@ void KSircIOController::stdin_write(QCString s) } else{ if(m_debugLB){ - QString s = QString::fromUtf8(buffer); + TQString s = TQString::fromUtf8(buffer); m_debugLB->insertItem(s); m_debugLB->setContentsPos( 0, m_debugLB->contentsHeight()); } @@ -351,7 +351,7 @@ void KSircIOController::sircDied(KProcess *process) kdDebug(5008) << "IOController: KProcess died!\n"; ksircproc->TopList["!all"]->sirc_receive("*E* DSIRC IS DEAD"); ksircproc->TopList["!all"]->sirc_receive("*E* KSIRC WINDOW HALTED"); - ksircproc->TopList["!all"]->sirc_receive( QCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + QCString( "\n" ) ); + ksircproc->TopList["!all"]->sirc_receive( TQCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + TQCString( "\n" ) ); ksircproc->TopList["!all"]->sirc_receive("*E* DID YOU READ THE INSTALL INTRUCTIONS?"); } @@ -361,30 +361,30 @@ void KSircIOController::procCTS ( KProcess *) delete[] send_buf; send_buf = 0x0; if(!buffer.isEmpty()){ - QCString str = ""; + TQCString str = ""; stdin_write(str); } } -void KSircIOController::showContextMenuOnDebugWindow(QListBoxItem *, const QPoint &pos) +void KSircIOController::showContextMenuOnDebugWindow(TQListBoxItem *, const TQPoint &pos) { if (!m_debugLB) return; - QPopupMenu popup(m_debugLB); + TQPopupMenu popup(m_debugLB); popup.insertItem("Save Contents to File...", 1); if (popup.exec( pos ) != 1) return; - QString path = KFileDialog::getSaveFileName(); + TQString path = KFileDialog::getSaveFileName(); if (path.isEmpty()) return; - QFile file(path); + TQFile file(path); if (!file.open(IO_WriteOnly)) return; - QTextStream stream(&file); + TQTextStream stream(&file); for (uint i = 0; i < m_debugLB->count(); ++i) stream << m_debugLB->text(i) << endl; @@ -394,11 +394,11 @@ void KSircIOController::showDebugTraffic(bool show) { kdDebug(5008) << "Got show request: " << show << endl; if(m_debugLB == 0 && show == true){ - m_debugLB = new QListBox(0x0, QCString(this->name()) + "_debugWindow"); + m_debugLB = new TQListBox(0x0, TQCString(this->name()) + "_debugWindow"); m_debugLB->resize(600, 300); m_debugLB->show(); - connect(m_debugLB,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)), - this,SLOT(showContextMenuOnDebugWindow(QListBoxItem *,const QPoint &))); + connect(m_debugLB,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)), + this,TQT_SLOT(showContextMenuOnDebugWindow(TQListBoxItem *,const TQPoint &))); } else if(m_debugLB != 0 && show == false){ delete m_debugLB; @@ -415,7 +415,7 @@ bool KSircIOController::isDebugTraffic() return false; } -void KSircIOController::appendDebug(QString s) +void KSircIOController::appendDebug(TQString s) { if(m_debugLB){ m_debugLB->insertItem(s); diff --git a/ksirc/iocontroller.h b/ksirc/iocontroller.h index 76c97e18..2e7e79f6 100644 --- a/ksirc/iocontroller.h +++ b/ksirc/iocontroller.h @@ -1,7 +1,7 @@ #ifndef IOCONTROL_H #define IOCONTROL_H -#include <qobject.h> +#include <tqobject.h> class KProcess; class KSircProcess; @@ -24,31 +24,31 @@ public slots: virtual void stdout_read(KProcess *proc, char *_buffer, int buflen); virtual void stderr_read(KProcess *proc, char *_buffer, int buflen); - virtual void stdin_write(QCString); + virtual void stdin_write(TQCString); virtual void sircDied(KProcess *); - virtual void appendDebug(QString); + virtual void appendDebug(TQString); protected slots: virtual void procCTS(KProcess *); private slots: - void showContextMenuOnDebugWindow( QListBoxItem *, const QPoint &pos ); + void showContextMenuOnDebugWindow( TQListBoxItem *, const TQPoint &pos ); private: - QCString holder; + TQCString holder; bool proc_CTS; KProcess *proc; KSircProcess *ksircproc; char *send_buf; - QCString buffer; + TQCString buffer; static int counter; - QListBox *m_debugLB; + TQListBox *m_debugLB; }; #endif diff --git a/ksirc/ksirc.cpp b/ksirc/ksirc.cpp index eddb450a..88abb6d6 100644 --- a/ksirc/ksirc.cpp +++ b/ksirc/ksirc.cpp @@ -15,7 +15,7 @@ #include <stdlib.h> -#include <qsessionmanager.h> +#include <tqsessionmanager.h> #include <kuniqueapplication.h> #include <kaboutdata.h> @@ -32,8 +32,8 @@ static const char description[] = I18N_NOOP("KDE IRC client"); -//QDict<KSircTopLevel> TopList; -//QDict<KSircMessageReceiver> TopList; +//TQDict<KSircTopLevel> TopList; +//TQDict<KSircMessageReceiver> TopList; class KCmdLineOptions options[] = { @@ -58,8 +58,8 @@ public: // if the controller is hidden KMWSessionManaged won't send the fake close event. // we want it in any way however. if ( controller->isHidden() ) { - QCloseEvent e; - QApplication::sendEvent( controller, &e ); + TQCloseEvent e; + TQApplication::sendEvent( controller, &e ); } return true; @@ -110,16 +110,16 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString nickName = args->getOption( "nick" ); - QCString server = args->getOption( "server" ); - QCString channel = args->getOption( "channel" ); + TQCString nickName = args->getOption( "nick" ); + TQCString server = args->getOption( "server" ); + TQCString channel = args->getOption( "channel" ); if ( !nickName.isEmpty() ) ksopts->server["global"].nick = nickName; if ( !server.isEmpty() ) { - QString ser = QString::fromLocal8Bit( server ); - QString port = "6667"; + TQString ser = TQString::fromLocal8Bit( server ); + TQString port = "6667"; if(ser.contains(":")){ port = ser.section(":", 1, 1); ser = ser.section(":", 0, 0); @@ -127,9 +127,9 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) KSircServer kss(ser, port, "", "", false); sc->new_ksircprocess( kss ); if ( !channel.isEmpty() ) { - QStringList channels = QStringList::split( ',', QString::fromLocal8Bit( channel ) ); - QStringList::ConstIterator it = channels.begin(); - QStringList::ConstIterator end = channels.end(); + TQStringList channels = TQStringList::split( ',', TQString::fromLocal8Bit( channel ) ); + TQStringList::ConstIterator it = channels.begin(); + TQStringList::ConstIterator end = channels.end(); for ( ; it != end; ++it ) { sc->new_toplevel( KSircChannel(ser, *it), true ); } diff --git a/ksirc/ksircchannel.h b/ksirc/ksircchannel.h index 1913b530..a70f0ef6 100644 --- a/ksirc/ksircchannel.h +++ b/ksirc/ksircchannel.h @@ -1,34 +1,34 @@ #ifndef KSIRCCHANNEL_H #define KSIRCCHANNEL_H -#include <qstring.h> +#include <tqstring.h> class KSircChannel { public: - KSircChannel( const QString server, - const QString channel, - const QString key = QString::null, - const QString encoding = QString::null + KSircChannel( const TQString server, + const TQString channel, + const TQString key = TQString::null, + const TQString encoding = TQString::null ) : m_server(server), m_channel(channel), m_key(key), m_encoding(encoding) {} - const QString server() const { return m_server; } - const QString channel() const { return m_channel; } - const QString key() const { return m_key; } - const QString encoding() const { return m_encoding; } + const TQString server() const { return m_server; } + const TQString channel() const { return m_channel; } + const TQString key() const { return m_key; } + const TQString encoding() const { return m_encoding; } - void setChannel(QString channel) { m_channel = channel; } - void setKey(QString key) { m_key = key; } - void setEncoding(QString encoding) { m_encoding = encoding; } + void setChannel(TQString channel) { m_channel = channel; } + void setKey(TQString key) { m_key = key; } + void setEncoding(TQString encoding) { m_encoding = encoding; } private: - const QString m_server; /* channels can never change server */ - QString m_channel; - QString m_key; - QString m_encoding; + const TQString m_server; /* channels can never change server */ + TQString m_channel; + TQString m_key; + TQString m_encoding; }; diff --git a/ksirc/ksircprocess.cpp b/ksirc/ksircprocess.cpp index 1fff6807..26dbc8c7 100644 --- a/ksirc/ksircprocess.cpp +++ b/ksirc/ksircprocess.cpp @@ -15,7 +15,7 @@ server: is the name of the server to connect to. It must be provided or else start sirc will barf. :( parent: parent window, this _should_ be null - name: name, passed to QObject... + name: name, passed to TQObject... ~KSirProcess: kill the sirc process, and iocontrollller, emit delete_toplevel @@ -105,7 +105,7 @@ #include <stdlib.h> #include <time.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kapplication.h> #include <kconfig.h> #include <kdebug.h> @@ -117,8 +117,8 @@ extern DisplayMgr *displayMgr; -KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * parent, const char * name ) - : QObject(parent, name), m_kss(kss), m_serverid(server_id) +KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * parent, const char * name ) + : TQObject(parent, name), m_kss(kss), m_serverid(server_id) { proc = new KProcess(); @@ -130,7 +130,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare //server = qstrdup(kss.server()); - QDict<KSircMessageReceiver> nTopList(17, FALSE); + TQDict<KSircMessageReceiver> nTopList(17, FALSE); TopList = nTopList; // TopList.setAutoDelete(TRUE) @@ -140,7 +140,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare ksopts->serverSetup(kss); // Setup the environment for KSirc - QString qsNick, qsRealname, qsUserID, qsAltNick; + TQString qsNick, qsRealname, qsUserID, qsAltNick; KConfig *kConfig = kapp->config(); kConfig->setGroup("StartUp"); qsNick = ksopts->serv(kss).nick; @@ -168,7 +168,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare proc->setEnvironment("SIRCLIB", KGlobal::dirs()->findResourceDir("appdata", "ksirc.pl")); proc->setEnvironment("SIRCWAIT", "1"); - QString env = locate("appdata", "ksircrc"); + TQString env = locate("appdata", "ksircrc"); if (!env.isEmpty()) proc->setEnvironment("SIRCRC", env); env = locate("appdata", "ksircrc.pl"); @@ -178,7 +178,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare // Setup the proc now, so iocontroller can use it. It's latter // though. started bellow though. - proc->setName(QCString(name) + "_kprocess"); + proc->setName(TQCString(name) + "_kprocess"); objFinder::insert(proc); // insertChild(proc); @@ -187,7 +187,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare // Fixes 47157. proc->setEnvironment( "SIRCSERVER", "[" + kss.server() + "]:" + kss.port() + ":" + kss.password()); - QString sslopt; + TQString sslopt; if(kss.usessl()) sslopt = "-S"; *proc << "perl" << KGlobal::dirs()->findExe("dsirc") << "-8" << "-r" << sslopt; @@ -195,7 +195,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare // Finally start the iocontroller. iocontrol = new KSircIOController(proc, this); - iocontrol->setName(QCString(name) + "_iocontrol"); + iocontrol->setName(TQCString(name) + "_iocontrol"); // Create toplevel before iocontroller so it has somewhere to write stuff. @@ -215,22 +215,22 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare KSircIODCC *dcc = new KSircIODCC(this); TopList.insert("!dcc", dcc); dcc = static_cast<KSircIODCC *>( TopList["!dcc"] ); // g++ bug - connect(dcc, SIGNAL(outputLine(QCString)), - iocontrol, SLOT(stdin_write(QCString))); + connect(dcc, TQT_SIGNAL(outputLine(TQCString)), + iocontrol, TQT_SLOT(stdin_write(TQCString))); KSircIOLAG *lag = new KSircIOLAG(this); TopList.insert("!lag", lag); lag = static_cast<KSircIOLAG*>( TopList["!lag"] ); // g++ bug! - connect(lag, SIGNAL(outputLine(QCString)), - iocontrol, SLOT(stdin_write(QCString))); + connect(lag, TQT_SIGNAL(outputLine(TQCString)), + iocontrol, TQT_SLOT(stdin_write(TQCString))); KSircIONotify *notify = new KSircIONotify(this); TopList.insert("!notify", notify); notify = static_cast<KSircIONotify *>( TopList["!notify"] ); // g++ bug - connect(notify, SIGNAL(notify_online(QString)), - this, SLOT(notify_forw_online(QString))); - connect(notify, SIGNAL(notify_offline(QString)), - this, SLOT(notify_forw_offline(QString))); + connect(notify, TQT_SIGNAL(notify_online(TQString)), + this, TQT_SLOT(notify_forw_online(TQString))); + connect(notify, TQT_SIGNAL(notify_offline(TQString)), + this, TQT_SLOT(notify_forw_offline(TQString))); TopList.insert("!base_rules", new KSMBaseRules(this)); @@ -239,10 +239,10 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare proc->start(KProcess::NotifyOnExit, KProcess::All); // Intial commands to load ASAP. // turn on sirc ssfe mode - QCString command = "/eval $ssfe=1\n"; + TQCString command = "/eval $ssfe=1\n"; iocontrol->stdin_write(command); - command = "/eval $version .= \"+KSIRC/" + QCString(KSIRC_VERSION) + "\"\n"; + command = "/eval $version .= \"+KSIRC/" + TQCString(KSIRC_VERSION) + "\"\n"; iocontrol->stdin_write(command); command = "/load " + locate("appdata", "filters.pl").local8Bit() + "\n"; iocontrol->stdin_write(command); @@ -279,11 +279,11 @@ KSircProcess::~KSircProcess() cleanup(); } -QPtrList<KSircMessageReceiver> KSircProcess::messageReceivers() const +TQPtrList<KSircMessageReceiver> KSircProcess::messageReceivers() const { - QPtrList<KSircMessageReceiver> res; + TQPtrList<KSircMessageReceiver> res; res.setAutoDelete( false ); - QDictIterator<KSircMessageReceiver> it( TopList ); + TQDictIterator<KSircMessageReceiver> it( TopList ); for (; it.current(); ++it ) if ( it.currentKey() != "!default" && it.currentKey() != "!no_channel" ) @@ -291,7 +291,7 @@ QPtrList<KSircMessageReceiver> KSircProcess::messageReceivers() const return res; } -const QDict<KSircMessageReceiver> &KSircProcess::mrList() const +const TQDict<KSircMessageReceiver> &KSircProcess::mrList() const { return TopList; } @@ -305,12 +305,12 @@ void KSircProcess::cleanup() TopList.setAutoDelete(true); TopList.clear(); - emit ProcMessage(m_serverid, ProcCommand::procClose, QString()); + emit ProcMessage(m_serverid, ProcCommand::procClose, TQString()); // Do closing down commands, this should release all puke widgets #if 0 dsirc does this on SIGTERM (malte) - QString quit_cmd = "/eval &dohooks(\"quit\");\n"; + TQString quit_cmd = "/eval &dohooks(\"quit\");\n"; proc->writeStdin(quit_cmd.ascii(), quit_cmd.length()); sleep(1); #endif @@ -358,7 +358,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe) i18n("Flood Warning"), i18n("Turn Off"), i18n("Keep Enabled")); switch(res) { case KMessageBox::Yes: - emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, QString()); + emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString()); } last_window_open = current_time; number_open = 0; @@ -383,20 +383,20 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe) // Connect needed signals. For a message window we never want it // becomming the default so we ignore focusIn events into it. - connect(wm, SIGNAL(outputLine(QCString)), - iocontrol, SLOT(stdin_write(QCString))); - connect(wm, SIGNAL(open_toplevel(const KSircChannel &)), - this,SLOT(new_toplevel (const KSircChannel &))); - connect(wm, SIGNAL(closing(KSircTopLevel *, QString)), - this,SLOT(close_toplevel(KSircTopLevel *, QString))); - connect(wm, SIGNAL(currentWindow(KSircTopLevel *)), - this,SLOT(default_window(KSircTopLevel *))); - connect(wm, SIGNAL(changeChannel(const QString &, const QString &)), - this,SLOT(recvChangeChannel(const QString &, const QString &))); - connect(wm, SIGNAL(destroyed(QObject *)), - this,SLOT(clean_toplevel(QObject *))); - connect( wm, SIGNAL( requestQuit( const QCString& ) ), - SLOT( request_quit( const QCString& ) ) ); + connect(wm, TQT_SIGNAL(outputLine(TQCString)), + iocontrol, TQT_SLOT(stdin_write(TQCString))); + connect(wm, TQT_SIGNAL(open_toplevel(const KSircChannel &)), + this,TQT_SLOT(new_toplevel (const KSircChannel &))); + connect(wm, TQT_SIGNAL(closing(KSircTopLevel *, TQString)), + this,TQT_SLOT(close_toplevel(KSircTopLevel *, TQString))); + connect(wm, TQT_SIGNAL(currentWindow(KSircTopLevel *)), + this,TQT_SLOT(default_window(KSircTopLevel *))); + connect(wm, TQT_SIGNAL(changeChannel(const TQString &, const TQString &)), + this,TQT_SLOT(recvChangeChannel(const TQString &, const TQString &))); + connect(wm, TQT_SIGNAL(destroyed(TQObject *)), + this,TQT_SLOT(clean_toplevel(TQObject *))); + connect( wm, TQT_SIGNAL( requestQuit( const TQCString& ) ), + TQT_SLOT( request_quit( const TQCString& ) ) ); default_window(wm); // Set it to the default window. emit ProcMessage(serverID(), ProcCommand::addTopLevel, channelInfo.channel()); @@ -407,13 +407,13 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe) wm->lineEdit()->setFocus(); // Give focus back to the linee, someone takes it away on new create } else { - QWidget *w = dynamic_cast<QWidget *>(TopList.find(channelInfo.channel())); + TQWidget *w = dynamic_cast<TQWidget *>(TopList.find(channelInfo.channel())); if(w) displayMgr->raise(w); } } -void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) +void KSircProcess::close_toplevel(KSircTopLevel *wm, TQString name) { if(auto_create_really == TRUE) turn_on_autocreate(); @@ -423,7 +423,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) // the removeTopLevel below also deletes the mditoplevel (in case // we are using mdi) , which deletes its children, which deletes // 'wm' , so watch out not to delete twice! (Simon) - QGuardedPtr<KSircTopLevel> guardedwm = wm; + TQGuardedPtr<KSircTopLevel> guardedwm = wm; // Do this now or we get junk left on the screen displayMgr->removeTopLevel(wm); @@ -436,13 +436,13 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) // So let's go grab a default, and make sure it's not "!" control // object. - QDictIterator<KSircMessageReceiver> it(TopList); + TQDictIterator<KSircMessageReceiver> it(TopList); for(;it.current() && it.currentKey().startsWith("!"); ++it); if (!it.current()) { // No top-level windows left. - QCString command = "/quit\n"; // "/signoff" ? + TQCString command = "/quit\n"; // "/signoff" ? iocontrol->stdin_write(command); // kill sirc kdDebug(5008) << "KSP closing: " << m_kss.server() << endl; delete guardedwm; @@ -456,8 +456,8 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) // Let's let em know she's deleted! if(ksopts->autoCreateWin == TRUE){ - emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, QString()); - QTimer::singleShot(5000, this, SLOT(turn_on_autocreate())); + emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString()); + TQTimer::singleShot(5000, this, TQT_SLOT(turn_on_autocreate())); auto_create_really = TRUE; } else{ @@ -468,7 +468,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) emit ProcMessage(serverID(), ProcCommand::deleteTopLevel, name); } -void KSircProcess::clean_toplevel(QObject *clean){ +void KSircProcess::clean_toplevel(TQObject *clean){ if(!clean){ qWarning("Passed null to cleaner!!"); return; @@ -476,10 +476,10 @@ void KSircProcess::clean_toplevel(QObject *clean){ bool cont = FALSE; do{ cont = FALSE; - QDictIterator<KSircMessageReceiver> it(TopList); + TQDictIterator<KSircMessageReceiver> it(TopList); while(it.current() != 0x0){ - if((QObject *)it.current() == clean){ - QString key = it.currentKey(); + if((TQObject *)it.current() == clean){ + TQString key = it.currentKey(); while(TopList[key] != 0x0){ TopList.remove(key); } @@ -491,22 +491,22 @@ void KSircProcess::clean_toplevel(QObject *clean){ } while(cont == TRUE); } -void KSircProcess::request_quit( const QCString& command ) +void KSircProcess::request_quit( const TQCString& command ) { iocontrol->stdin_write( command ); // Since removing the toplevels will delete the one that emitted this // signal as well, we need to defer this a little (malte) - QTimer::singleShot( 0, this, SLOT( do_quit() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( do_quit() ) ); } void KSircProcess::do_quit() { - for ( QDictIterator< KSircMessageReceiver > it( TopList ); it.current(); ++it ) + for ( TQDictIterator< KSircMessageReceiver > it( TopList ); it.current(); ++it ) { if ( it.currentKey() == "!default" ) continue; if ( KSircTopLevel* topLevel = dynamic_cast< KSircTopLevel* >( it.current() ) ) { - QGuardedPtr< KSircTopLevel > guardedTL = topLevel; + TQGuardedPtr< KSircTopLevel > guardedTL = topLevel; displayMgr->removeTopLevel( topLevel ); delete guardedTL; } @@ -530,7 +530,7 @@ void KSircProcess::default_window(KSircTopLevel *w) } -void KSircProcess::recvChangeChannel(const QString &old_chan, const QString &new_chan) +void KSircProcess::recvChangeChannel(const TQString &old_chan, const TQString &new_chan) { // // Channel changed name, add our own name and off we go. @@ -551,10 +551,10 @@ void KSircProcess::recvChangeChannel(const QString &old_chan, const QString &new void KSircProcess::filters_update() { - QString command, next_part, key, data; + TQString command, next_part, key, data; command = "/crule\n"; iocontrol->stdin_write(command.ascii()); - QDictIterator<KSircMessageReceiver> it(TopList); + TQDictIterator<KSircMessageReceiver> it(TopList); KSircMessageReceiver *cur, *br; filterRuleList *frl; filterRule *fr; @@ -605,17 +605,17 @@ void KSircProcess::filters_update() } -void KSircProcess::notify_forw_online(QString nick) +void KSircProcess::notify_forw_online(TQString nick) { emit ProcMessage(serverID(), ProcCommand::nickOnline, nick); } -void KSircProcess::notify_forw_offline(QString nick) +void KSircProcess::notify_forw_offline(TQString nick) { emit ProcMessage(serverID(), ProcCommand::nickOffline, nick); } -void KSircProcess::ServMessage(QString dst_server, int command, QString args) +void KSircProcess::ServMessage(TQString dst_server, int command, TQString args) { if(dst_server.isEmpty() || (dst_server == serverID())){ switch(command){ @@ -631,13 +631,13 @@ void KSircProcess::ServMessage(QString dst_server, int command, QString args) void KSircProcess::turn_on_autocreate() { - emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, QString()); + emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, TQString()); auto_create_really = FALSE; } -void KSircProcess::setNick(const QString nick) +void KSircProcess::setNick(const TQString nick) { - QString new_nick = nick; + TQString new_nick = nick; while (!new_nick.isEmpty() && (new_nick[0].latin1() == '@' || new_nick[0].latin1() == '*')) new_nick.remove(0, 1); @@ -653,7 +653,7 @@ void KSircProcess::setNick(const QString nick) } -const QString KSircProcess::getNick() const +const TQString KSircProcess::getNick() const { return m_nick; } diff --git a/ksirc/ksircprocess.h b/ksirc/ksircprocess.h index 9a4cf7c3..bf61245a 100644 --- a/ksirc/ksircprocess.h +++ b/ksirc/ksircprocess.h @@ -4,8 +4,8 @@ class KSircProcess; class KSircTopLevel; -#include <qdict.h> -#include <qobject.h> +#include <tqdict.h> +#include <tqobject.h> #include "iocontroller.h" #include "ksircserver.h" @@ -21,45 +21,45 @@ class KSircProcess : public QObject Q_OBJECT friend class KSircIOController; public: - KSircProcess(QString &server_id, KSircServer &kss, QObject * parent=0, const char * name=0); + KSircProcess(TQString &server_id, KSircServer &kss, TQObject * parent=0, const char * name=0); virtual ~KSircProcess(); - QDict<KSircMessageReceiver> &getWindowList() + TQDict<KSircMessageReceiver> &getWindowList() { return TopList; } - QPtrList<KSircMessageReceiver> messageReceivers() const; - const QDict<KSircMessageReceiver> &mrList() const; + TQPtrList<KSircMessageReceiver> messageReceivers() const; + const TQDict<KSircMessageReceiver> &mrList() const; - QString serverName() const { return m_kss.server(); } - QString serverPort() const { return m_kss.port(); } - QString serverID() const { return m_serverid; } + TQString serverName() const { return m_kss.server(); } + TQString serverPort() const { return m_kss.port(); } + TQString serverID() const { return m_serverid; } KSircIOController *getIOController() { return iocontrol; } - const QString getNick() const; - void setNick(const QString nick); + const TQString getNick() const; + void setNick(const TQString nick); signals: - void ProcMessage(QString, int, QString); + void ProcMessage(TQString, int, TQString); public slots: - virtual void ServMessage(QString server, int command, QString args); - virtual void close_toplevel(KSircTopLevel *, QString); + virtual void ServMessage(TQString server, int command, TQString args); + virtual void close_toplevel(KSircTopLevel *, TQString); virtual void default_window(KSircTopLevel *); - virtual void recvChangeChannel(const QString &, const QString &); + virtual void recvChangeChannel(const TQString &, const TQString &); virtual void new_toplevel(const KSircChannel &, bool safe = false); virtual void filters_update(); - virtual void notify_forw_online(QString); - virtual void notify_forw_offline(QString); + virtual void notify_forw_online(TQString); + virtual void notify_forw_offline(TQString); protected slots: - virtual void clean_toplevel(QObject *clean); - virtual void request_quit( const QCString& command ); + virtual void clean_toplevel(TQObject *clean); + virtual void request_quit( const TQCString& command ); virtual void do_quit(); virtual void turn_on_autocreate(); @@ -72,19 +72,19 @@ private: KSircIOController *iocontrol; KProcess *proc; - QDict<KSircMessageReceiver> TopList; + TQDict<KSircMessageReceiver> TopList; bool running_window; bool default_follow_focus; bool auto_create_really; KSircServer m_kss; - const QString m_serverid; + const TQString m_serverid; /* * m_nick is our nick as reported by the lower levels */ - QString m_nick; + TQString m_nick; // char *server; }; diff --git a/ksirc/ksircserver.h b/ksirc/ksircserver.h index ec63e1f6..d2d9ab70 100644 --- a/ksirc/ksircserver.h +++ b/ksirc/ksircserver.h @@ -1,32 +1,32 @@ #ifndef KSIRCSERVER_H #define KSIRCSERVER_H -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> class KSircServer { public: - KSircServer( const QString &server, - const QString &port, - const QString &script = QString::null, - const QString &password = QString::null, + KSircServer( const TQString &server, + const TQString &port, + const TQString &script = TQString::null, + const TQString &password = TQString::null, bool ssl = false ) : m_server(server), m_port(port), m_script(script), m_password(password), m_ssl(ssl) {} - const QString server() const { return m_server; } - const QString port() const { return m_port; } - const QString script() const { return m_script; } - const QString password() const { return m_password; } + const TQString server() const { return m_server; } + const TQString port() const { return m_port; } + const TQString script() const { return m_script; } + const TQString password() const { return m_password; } bool usessl() const { return m_ssl; } private: - const QString m_server; - const QString m_port; - const QString m_script; - const QString m_password; + const TQString m_server; + const TQString m_port; + const TQString m_script; + const TQString m_password; const bool m_ssl; }; diff --git a/ksirc/ksopts.cpp b/ksirc/ksopts.cpp index 11b25ad8..b1df2f40 100644 --- a/ksirc/ksopts.cpp +++ b/ksirc/ksopts.cpp @@ -41,10 +41,10 @@ KSOGeneral::KSOGeneral() } -QPixmap KSOGeneral::backgroundPixmap() +TQPixmap KSOGeneral::backgroundPixmap() { if ( m_backgroundPixmap.isNull() && !backgroundFile.isEmpty() ) - m_backgroundPixmap = QPixmap( backgroundFile ); + m_backgroundPixmap = TQPixmap( backgroundFile ); return m_backgroundPixmap; } @@ -63,9 +63,9 @@ KSOServer::KSOServer() struct passwd *pw = getpwuid( getuid() ); if ( pw ) { - nick = QString::fromLocal8Bit( pw->pw_name ); - userID = QString::fromLocal8Bit( pw->pw_name ); - realName = QString::fromLocal8Bit( pw->pw_gecos ).section( ',', 0, 0 ); + nick = TQString::fromLocal8Bit( pw->pw_name ); + userID = TQString::fromLocal8Bit( pw->pw_name ); + realName = TQString::fromLocal8Bit( pw->pw_gecos ).section( ',', 0, 0 ); } #endif } @@ -89,24 +89,24 @@ KSOColors::KSOColors() msg1Regex = false; msg2Regex = false; - backgroundColor = kapp->palette().color( QPalette::Active, QColorGroup::Mid ); - selBackgroundColor = kapp->palette().color( QPalette::Active, QColorGroup::Highlight ); - selForegroundColor = kapp->palette().color( QPalette::Active, QColorGroup::HighlightedText ); + backgroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::Mid ); + selBackgroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::Highlight ); + selForegroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::HighlightedText ); ircColors[0] = Qt::white; ircColors[1] = Qt::black; ircColors[2] = Qt::darkBlue; ircColors[3] = Qt::darkGreen; ircColors[4] = Qt::red; - ircColors[5] = QColor ( 165, 42, 42 ); + ircColors[5] = TQColor ( 165, 42, 42 ); ircColors[6] = Qt::darkMagenta; - ircColors[7] = QColor( 255, 0x7b, 00 ); + ircColors[7] = TQColor( 255, 0x7b, 00 ); ircColors[8] = Qt::yellow; ircColors[9] = Qt::green; ircColors[10] = Qt::darkCyan; ircColors[11] = Qt::cyan; ircColors[12] = Qt::blue; - ircColors[13] = QColor( 255, 0, 255 ); + ircColors[13] = TQColor( 255, 0, 255 ); ircColors[14] = Qt::gray; ircColors[15] = Qt::lightGray; @@ -232,17 +232,17 @@ void KSOptions::load( int sections ) colourTheme = conf->readEntry("ColourTheme", colourTheme ); for ( int i = 0; i < 16; ++i ) { ircColors[i] = - conf->readColorEntry(QString::fromLatin1( "IRC-%1" ).arg( i ), + conf->readColorEntry(TQString::fromLatin1( "IRC-%1" ).arg( i ), &ircColors[i] ); nickHighlight[i] = - conf->readBoolEntry(QString::fromLatin1( "nickHighlight-%1" ).arg( i ), + conf->readBoolEntry(TQString::fromLatin1( "nickHighlight-%1" ).arg( i ), &nickHighlight[i] ); } } conf->setGroup( "GlobalOptions" ); - QFont df = kapp->font(0); + TQFont df = kapp->font(0); defaultFont = conf->readFontEntry( "MainFont", &df); - QApplication::setFont( defaultFont, true, "KSirc::TextView" ); + TQApplication::setFont( defaultFont, true, "KSirc::TextView" ); } if ( sections & Channels ) { @@ -254,7 +254,7 @@ void KSOptions::load( int sections ) if(channel.contains("global") == FALSE){ KSOChannel global; ChannelOpMap coMap; - channel.insert(QString("global"), coMap); + channel.insert(TQString("global"), coMap); channel["global"].insert("global", global); channel["global"]["global"].server = "global"; channel["global"]["global"].channel = "global"; @@ -268,16 +268,16 @@ void KSOptions::load( int sections ) channel["global"]["global"].encoding = conf->readEntry("globalglobalEncoding", "Default"); } - QDateTime now(QDateTime::currentDateTime()); - QStringList servers = conf->readListEntry("Servers"); - QStringList::ConstIterator ser = servers.begin(); + TQDateTime now(TQDateTime::currentDateTime()); + TQStringList servers = conf->readListEntry("Servers"); + TQStringList::ConstIterator ser = servers.begin(); for( ; ser != servers.end(); ser++){ ChannelOpMap coMap; channel.insert(*ser, coMap); - QStringList channels = conf->readListEntry(*ser); - QStringList::ConstIterator chan = channels.begin(); + TQStringList channels = conf->readListEntry(*ser); + TQStringList::ConstIterator chan = channels.begin(); for( ; chan != channels.end(); chan++){ - QDateTime lastUsed = conf->readDateTimeEntry(*ser + *chan + "lastUsed", &now); + TQDateTime lastUsed = conf->readDateTimeEntry(*ser + *chan + "lastUsed", &now); if((lastUsed.daysTo(now) < 30 )|| (*chan == "global" && *ser == "global")) { @@ -317,7 +317,7 @@ void KSOptions::load( int sections ) */ if(server.contains("global") == FALSE){ KSOServer global; - server.insert(QString("global"), global); + server.insert(TQString("global"), global); server["global"].server = "global"; server["global"].globalCopy = false; @@ -333,9 +333,9 @@ void KSOptions::load( int sections ) kdDebug(5008) << "Load: in Server" << endl; - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); - QStringList::ConstIterator ser = servers.begin(); + TQStringList::ConstIterator ser = servers.begin(); for( ; ser != servers.end(); ser++){ KSOServer ksos; ksos = server["global"]; @@ -422,8 +422,8 @@ void KSOptions::save( int sections ) conf->writeEntry( "nickColourization", nickColourization ); conf->writeEntry( "ColourTheme", colourTheme ); for ( int i = 0; i < 16; ++i ) { - conf->writeEntry( QString::fromLatin1( "IRC-%1" ).arg( i ), ircColors[i] ); - conf->writeEntry( QString::fromLatin1( "nickHighlight-%1" ).arg( i ), nickHighlight[i] ); + conf->writeEntry( TQString::fromLatin1( "IRC-%1" ).arg( i ), ircColors[i] ); + conf->writeEntry( TQString::fromLatin1( "nickHighlight-%1" ).arg( i ), nickHighlight[i] ); } /* Store the font setting */ conf->setGroup( "GlobalOptions" ); @@ -432,14 +432,14 @@ void KSOptions::save( int sections ) } if ( sections & Channels ) { - QStringList servers; + TQStringList servers; conf->deleteGroup( "Channel" ); conf->setGroup( "Channel" ); ServerChannelOpMap::Iterator ser; for( ser = channel.begin(); ser != channel.end(); ++ser ){ - QStringList channels; + TQStringList channels; servers << ser.key(); @@ -462,14 +462,14 @@ void KSOptions::save( int sections ) } if ( sections & Servers ) { - QStringList servers; + TQStringList servers; conf->deleteGroup( "Servers" ); conf->setGroup( "Server" ); ServerOpMap::Iterator ser; for( ser = server.begin(); ser != server.end(); ++ser ){ - QStringList channels; + TQStringList channels; if(ser.data().globalCopy == true) continue; @@ -488,7 +488,7 @@ void KSOptions::save( int sections ) conf->sync(); } -void KSOptions::channelSetup(QString serv, QString chan) +void KSOptions::channelSetup(TQString serv, TQString chan) { if(channel.contains(serv) == FALSE){ ChannelOpMap coMap; @@ -500,10 +500,10 @@ void KSOptions::channelSetup(QString serv, QString chan) channel[serv].insert(chan, ksoc); channel[serv][chan].server = serv; channel[serv][chan].channel = chan; - channel[serv][chan].lastUsed = QDateTime::currentDateTime(); + channel[serv][chan].lastUsed = TQDateTime::currentDateTime(); } else { - channel[serv][chan].lastUsed = QDateTime::currentDateTime(); + channel[serv][chan].lastUsed = TQDateTime::currentDateTime(); } } @@ -522,7 +522,7 @@ void KSOptions::applyChannelGlobal(void) } -void KSOptions::serverSetup(QString serv) +void KSOptions::serverSetup(TQString serv) { if(server.contains(serv) == FALSE){ KSOServer ksos; @@ -530,10 +530,10 @@ void KSOptions::serverSetup(QString serv) server.insert(serv, ksos); server[serv].server = serv; server[serv].globalCopy = true; - server[serv].lastUsed = QDateTime::currentDateTime(); + server[serv].lastUsed = TQDateTime::currentDateTime(); } else { - server[serv].lastUsed = QDateTime::currentDateTime(); + server[serv].lastUsed = TQDateTime::currentDateTime(); } } diff --git a/ksirc/ksopts.h b/ksirc/ksopts.h index 5739f6fd..9bd96192 100644 --- a/ksirc/ksopts.h +++ b/ksirc/ksopts.h @@ -1,15 +1,15 @@ #ifndef _KSOPTS_H_ #define _KSOPTS_H_ -#include <qmap.h> -#include <qdict.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qcolor.h> -#include <qfont.h> -#include <qrect.h> -#include <qpixmap.h> -#include <qdatetime.h> +#include <tqmap.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqrect.h> +#include <tqpixmap.h> +#include <tqdatetime.h> #define IRC_SAFE_MAX_LINE 450 @@ -45,12 +45,12 @@ public: bool dockPopups : 1; bool autoSaveHistory : 1; int windowLength; - QString backgroundFile; + TQString backgroundFile; - QPixmap backgroundPixmap(); + TQPixmap backgroundPixmap(); private: - QPixmap m_backgroundPixmap; + TQPixmap m_backgroundPixmap; }; class KSOChannel @@ -58,8 +58,8 @@ class KSOChannel public: KSOChannel(); - QString server; - QString channel; + TQString server; + TQString channel; bool timeStamp : 1; bool beepNotify : 1; @@ -67,9 +67,9 @@ public: bool logging : 1; bool topicShow : 1; bool filterJoinPart : 1; - QString encoding; + TQString encoding; - QDateTime lastUsed; + TQDateTime lastUsed; static bool applyGlobally; @@ -82,16 +82,16 @@ class KSOServer public: KSOServer(); - QString server; + TQString server; bool globalCopy; - QString nick; - QString altNick; - QString realName; - QString userID; - QStringList notifyList; + TQString nick; + TQString altNick; + TQString realName; + TQString userID; + TQStringList notifyList; - QDateTime lastUsed; + TQDateTime lastUsed; }; class KSOStartup @@ -99,12 +99,12 @@ class KSOStartup public: KSOStartup(); - QRect geometry; -// QString nick; -// QString altNick; -// QString realName; -// QString userID; -// QStringList notifyList; + TQRect geometry; +// TQString nick; +// TQString altNick; +// TQString realName; +// TQString userID; +// TQStringList notifyList; }; class KSOColors @@ -114,36 +114,36 @@ public: KSOColors(); - QColor textColor; - QColor linkColor; - QColor infoColor; - QColor channelColor; - QColor errorColor; - QColor ownNickColor; + TQColor textColor; + TQColor linkColor; + TQColor infoColor; + TQColor channelColor; + TQColor errorColor; + TQColor ownNickColor; bool ownNickBold : 1; bool ownNickUl : 1; bool ownNickRev : 1; - QColor msgContainNick; // needs config + impl - QColor msg1Contain; // needs config - QString msg1String; // needs config + TQColor msgContainNick; // needs config + impl + TQColor msg1Contain; // needs config + TQString msg1String; // needs config bool msg1Regex; - QColor msg2Contain; // need config - QString msg2String; // needs config + TQColor msg2Contain; // need config + TQString msg2String; // needs config bool msg2Regex; - QColor nickForeground; - QColor nickBackground; - QColor backgroundColor; - QColor selBackgroundColor; - QColor selForegroundColor; - //QColor ircColors[numColors]; - BoundsCheckingArray<QColor, numColors> ircColors; + TQColor nickForeground; + TQColor nickBackground; + TQColor backgroundColor; + TQColor selBackgroundColor; + TQColor selForegroundColor; + //TQColor ircColors[numColors]; + BoundsCheckingArray<TQColor, numColors> ircColors; BoundsCheckingArray<bool, numColors> nickHighlight; - QString colourTheme; + TQString colourTheme; - QFont defaultFont; + TQFont defaultFont; bool ksircColors : 1; bool mircColors : 1; bool nickColourization : 1; @@ -162,9 +162,9 @@ public: KSOServChan(); }; -typedef QMap<QString, KSOChannel> ChannelOpMap; -typedef QMap<QString, ChannelOpMap> ServerChannelOpMap; -typedef QMap<QString, KSOServer> ServerOpMap; +typedef TQMap<TQString, KSOChannel> ChannelOpMap; +typedef TQMap<TQString, ChannelOpMap> ServerChannelOpMap; +typedef TQMap<TQString, KSOServer> ServerOpMap; class KSOptions : public KSOGeneral, @@ -194,10 +194,10 @@ public: return server[servInfo.server()]; } - void channelSetup(QString serv, QString chan); + void channelSetup(TQString serv, TQString chan); void applyChannelGlobal(void); - void serverSetup(QString server); + void serverSetup(TQString server); void serverSetup( const KSircServer &servInfo ) { serverSetup(servInfo.server()); diff --git a/ksirc/ksparser.cpp b/ksirc/ksparser.cpp index e0f2f5ee..a02bd3bd 100644 --- a/ksirc/ksparser.cpp +++ b/ksirc/ksparser.cpp @@ -18,33 +18,33 @@ // $Id$ -#include <qstring.h> -#include <qcolor.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqregexp.h> #include <kdebug.h> #include "ksopts.h" #include "ksparser.h" -QString KSParser::parse( const QString &message ) +TQString KSParser::parse( const TQString &message ) { - QString res; + TQString res; m_tags.clear(); m_attributes.clear(); m_beeped = false; for (unsigned int i = 0; i < message.length();) { - QChar ch = message[i++]; + TQChar ch = message[i++]; if (ch.latin1() == 0x03 || ch == '~' && i < message.length()) { - QChar next = message[ i++ ]; + TQChar next = message[ i++ ]; if (next.latin1() >= 0x30 && next.latin1() <= 0x39) { int fg = -1, len; int bg = -1; - QRegExp colorRex("^[0-9]+"); + TQRegExp colorRex("^[0-9]+"); if (colorRex.search(message.mid(--i)) >= 0) { len = colorRex.matchedLength(); @@ -60,15 +60,15 @@ QString KSParser::parse( const QString &message ) i += len; } } - QString at; - QColor c = ircColor(fg); + TQString at; + TQColor c = ircColor(fg); if ( c.isValid() ) { - at += QString( "color=\"%1\" " ).arg( c.name() ); + at += TQString( "color=\"%1\" " ).arg( c.name() ); } c = ircColor(bg); if ( c.isValid() ) { - at += QString( "bgcolor=\"%1\" " ).arg( c.name() ); + at += TQString( "bgcolor=\"%1\" " ).arg( c.name() ); } if(at.length() > 0){ res += pushTag( "font", at ); @@ -108,13 +108,13 @@ QString KSParser::parse( const QString &message ) res += toggleTag( "u" ); break; case 'n': - res += toggleTag( "font", QString( "color=\"%1\"" ).arg( ksopts->nickForeground.name() ) ); + res += toggleTag( "font", TQString( "color=\"%1\"" ).arg( ksopts->nickForeground.name() ) ); break; case 'o': - res += pushTag( "font", QString( "color=\"%1\"" ).arg( ksopts->msgContainNick.name() ) ); + res += pushTag( "font", TQString( "color=\"%1\"" ).arg( ksopts->msgContainNick.name() ) ); break; case '#': - res += pushTag( "font", QString( "color=\"#%1\"" ).arg( message.mid(i, 6) )); + res += pushTag( "font", TQString( "color=\"#%1\"" ).arg( message.mid(i, 6) )); i+=6; break; case '~': @@ -137,9 +137,9 @@ QString KSParser::parse( const QString &message ) return res; } -QString KSParser::pushTag(const QString &tag, const QString &attributes) +TQString KSParser::pushTag(const TQString &tag, const TQString &attributes) { - QString res; + TQString res; m_tags.push(tag); if (!m_attributes.contains(tag)) m_attributes.insert(tag, attributes); @@ -151,13 +151,13 @@ QString KSParser::pushTag(const QString &tag, const QString &attributes) return res + ">"; } -QString KSParser::popTag(const QString &tag) +TQString KSParser::popTag(const TQString &tag) { if (!m_tags.contains(tag)) - return QString::null; + return TQString::null; - QString res; - QValueStack<QString> savedTags; + TQString res; + TQValueStack<TQString> savedTags; while (m_tags.top() != tag) { savedTags.push(m_tags.pop()); @@ -170,23 +170,23 @@ QString KSParser::popTag(const QString &tag) return res; } -QString KSParser::toggleTag(const QString &tag, const QString &attributes) +TQString KSParser::toggleTag(const TQString &tag, const TQString &attributes) { return m_attributes.contains(tag) ? popTag(tag) : pushTag(tag, attributes); } -QString KSParser::popAll() +TQString KSParser::popAll() { - QString res; + TQString res; while (!m_tags.isEmpty()) res.append("</" + m_tags.pop() + ">"); m_attributes.clear(); return res; } -QColor KSParser::ircColor(int code) +TQColor KSParser::ircColor(int code) { if (code >= 0 && code < 16) return ksopts->ircColors[code]; - return QColor(); + return TQColor(); } diff --git a/ksirc/ksparser.h b/ksirc/ksparser.h index e7d2647f..b6e95a5c 100644 --- a/ksirc/ksparser.h +++ b/ksirc/ksparser.h @@ -7,10 +7,10 @@ #ifndef __ksparser_h__ #define __ksparser_h__ -#include <qstring.h> -#include <qmap.h> -#include <qcolor.h> -#include <qvaluestack.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqcolor.h> +#include <tqvaluestack.h> // Helper class to parse IRC colour/style codes and convert them to // richtext. The parser maintains an internal stack of the styles @@ -22,19 +22,19 @@ class KSParser { public: - QString parse(const QString &); + TQString parse(const TQString &); bool beeped() const { return m_beeped; } private: - QString pushTag(const QString &, const QString & = QString::null); - QString popTag(const QString &); - QString toggleTag(const QString &, const QString & = QString::null); - QString popAll(); - QColor ircColor(int); + TQString pushTag(const TQString &, const TQString & = TQString::null); + TQString popTag(const TQString &); + TQString toggleTag(const TQString &, const TQString & = TQString::null); + TQString popAll(); + TQColor ircColor(int); private: - QValueStack<QString> m_tags; - QMap<QString, QString> m_attributes; + TQValueStack<TQString> m_tags; + TQMap<TQString, TQString> m_attributes; bool m_beeped; }; diff --git a/ksirc/kstextview.cpp b/ksirc/kstextview.cpp index deb7d6c4..2589e59a 100644 --- a/ksirc/kstextview.cpp +++ b/ksirc/kstextview.cpp @@ -20,12 +20,12 @@ #include "kstextview.h" #include "stringparserstate.h" -#include <qpainter.h> -#include <qvaluestack.h> -#include <qdragobject.h> -#include <qtimer.h> -#include <qclipboard.h> -#include <qdict.h> +#include <tqpainter.h> +#include <tqvaluestack.h> +#include <tqdragobject.h> +#include <tqtimer.h> +#include <tqclipboard.h> +#include <tqdict.h> #include <kcharsets.h> #include <kapplication.h> #include <kmimesourcefactory.h> @@ -36,37 +36,37 @@ using namespace KSirc; -typedef StringParserState<QChar> ParsingState; +typedef StringParserState<TQChar> ParsingState; static const int PaintBufferExtend = 128; // temporary(!) -static QDict<QPixmap> *ksTextViewPixmapDict = 0; +static TQDict<TQPixmap> *ksTextViewPixmapDict = 0; static void cleanupKSTextViewPixmapDict() { delete ksTextViewPixmapDict; ksTextViewPixmapDict = 0; } -QPixmap ksTextViewLoadPixmap( const QString &icon ) +TQPixmap ksTextViewLoadPixmap( const TQString &icon ) { if ( !ksTextViewPixmapDict ) { - ksTextViewPixmapDict = new QDict<QPixmap>; + ksTextViewPixmapDict = new TQDict<TQPixmap>; ksTextViewPixmapDict->setAutoDelete( true ); qAddPostRoutine( cleanupKSTextViewPixmapDict ); } - QPixmap *pix = ksTextViewPixmapDict->find( icon ); + TQPixmap *pix = ksTextViewPixmapDict->find( icon ); if ( !pix ) { - QImage img; + TQImage img; - const QMimeSource *src = kapp->mimeSourceFactory()->data( icon, QString::null ); - if ( !src || !QImageDrag::decode( src, img ) || img.isNull() ) - return QPixmap(); + const TQMimeSource *src = kapp->mimeSourceFactory()->data( icon, TQString::null ); + if ( !src || !TQImageDrag::decode( src, img ) || img.isNull() ) + return TQPixmap(); - pix = new QPixmap( img ); + pix = new TQPixmap( img ); ksTextViewPixmapDict->insert( icon, pix ); } return *pix; @@ -153,11 +153,11 @@ Item *Item::create( TextParag *parag, const Token &tok, const ItemProperties &pr if ( tok.value == "img" ) { - QString url = CONSTSTRING( tok.attributes[ "src" ] ); + TQString url = CONSTSTRING( tok.attributes[ "src" ] ); if ( url.isEmpty() ) return 0; - QPixmap pixmap = ksTextViewLoadPixmap( url ); + TQPixmap pixmap = ksTextViewLoadPixmap( url ); if ( pixmap.isNull() ) return 0; @@ -178,7 +178,7 @@ TextChunk::TextChunk( TextParag *parag, const StringPtr &text, const ItemPropert { } -void TextChunk::paint( QPainter &p ) +void TextChunk::paint( TQPainter &p ) { p.setFont( m_props.font ); @@ -276,8 +276,8 @@ int TextChunk::calcSelectionOffset( int x ) { // ### how to optimize? - QConstString tmp( m_text.ptr, m_text.len ); - const QString &s = tmp.string(); + TQConstString tmp( m_text.ptr, m_text.len ); + const TQString &s = tmp.string(); uint i = 0; int px = 0; @@ -302,13 +302,13 @@ StringPtr TextChunk::text() const void TextChunk::setProps( const ItemProperties &props ) { Item::setProps( props ); - m_metrics = QFontMetrics( props.font ); + m_metrics = TQFontMetrics( props.font ); } void TextChunk::calcExtends() const { - QConstString tmp( m_text.ptr, m_text.len ); - const QString &text = tmp.string(); + TQConstString tmp( m_text.ptr, m_text.len ); + const TQString &text = tmp.string(); m_width = m_metrics.width( text ); m_height = m_metrics.lineSpacing(); @@ -334,8 +334,8 @@ void TextChunk::calcExtends() const StringPtr TextChunk::breakInTheMiddle( int width ) { - QConstString tmp( m_text.ptr, m_text.len ); - const QString &s = tmp.string(); + TQConstString tmp( m_text.ptr, m_text.len ); + const TQString &s = tmp.string(); uint i = 0; for (; i < m_text.len; ++i ) @@ -396,7 +396,7 @@ Item *TextChunk::hardBreak( const StringPtr &rightHandSide ) return chunk; } -void TextChunk::paintSelection( QPainter &p ) +void TextChunk::paintSelection( TQPainter &p ) { int selectionStart = 0; int selectionEnd = 0; @@ -426,14 +426,14 @@ void TextChunk::paintSelection( QPainter &p ) } } -int TextChunk::paintSelection( QPainter &p, int x, const StringPtr &text ) +int TextChunk::paintSelection( TQPainter &p, int x, const StringPtr &text ) { - QConstString constString( text.ptr, text.len ); - const QString &str = constString.string(); + TQConstString constString( text.ptr, text.len ); + const TQString &str = constString.string(); const int width = m_metrics.width( str ); - const QColorGroup &cg = m_parag->textView()->colorGroup(); + const TQColorGroup &cg = m_parag->textView()->colorGroup(); if (m_props.bgSelColor.isValid()) p.fillRect( x, 0, width, height(), m_props.bgSelColor ); @@ -450,10 +450,10 @@ int TextChunk::paintSelection( QPainter &p, int x, const StringPtr &text ) return width; } -int TextChunk::paintText( QPainter &p, int x, const StringPtr &text ) +int TextChunk::paintText( TQPainter &p, int x, const StringPtr &text ) { - QConstString constString( text.ptr, text.len ); - const QString &str = constString.string(); + TQConstString constString( text.ptr, text.len ); + const TQString &str = constString.string(); const int width = m_metrics.width( str ); @@ -489,12 +489,12 @@ void TextChunk::mergeSelection( TextChunk *child, SelectionPoint *selection ) m_selection = child->selectionStatus(); } -ImageItem::ImageItem( TextParag *parag, const QPixmap &pixmap ) +ImageItem::ImageItem( TextParag *parag, const TQPixmap &pixmap ) : Item( parag ), m_pixmap( pixmap ) { } -void ImageItem::paint( QPainter &painter ) +void ImageItem::paint( TQPainter &painter ) { int y = 0; if(m_line) { @@ -512,7 +512,7 @@ void ImageItem::paint( QPainter &painter ) if (m_props.bgSelColor.isValid()) painter.fillRect( 0, 0, width(), h, m_props.bgSelColor ); else { - const QColorGroup &cg = m_parag->textView()->colorGroup(); + const TQColorGroup &cg = m_parag->textView()->colorGroup(); painter.fillRect( 0, 0, width(), h, cg.highlight() ); } } @@ -549,7 +549,7 @@ Tokenizer::Tokenizer( PString &text ) } } -Tokenizer::PString Tokenizer::preprocess( const QString &richText ) +Tokenizer::PString Tokenizer::preprocess( const TQString &richText ) { PString result; result.data = richText; @@ -558,12 +558,12 @@ Tokenizer::PString Tokenizer::preprocess( const QString &richText ) return result; } -QString Tokenizer::convertToRichText( const PString &ptext ) +TQString Tokenizer::convertToRichText( const PString &ptext ) { if ( ptext.tags.isEmpty() ) return ptext.data; - QString result = ptext.data; + TQString result = ptext.data; uint i = 0; TagIndexList tags = ptext.tags; TagIndexList::Iterator it = tags.begin(); @@ -578,13 +578,13 @@ QString Tokenizer::convertToRichText( const PString &ptext ) } unsigned short indexAdjustment = 0; - const QChar ch = result[ i ]; + const TQChar ch = result[ i ]; // ### incomplete! /* this doesn't work quite right (when resolving back * KCharSet's fromEntity breaks) if ( ch == '<' || ch == '>' || ch == '&' ) { - QString entity = KGlobal::charsets()->toEntity( ch ); + TQString entity = KGlobal::charsets()->toEntity( ch ); indexAdjustment = entity.length() - 1; result.replace( i, 1, entity ); } @@ -676,7 +676,7 @@ bool Tokenizer::parseNextToken( Token &tok ) if ( lastType == TagIndex::Open && type == TagIndex::Close ) { - const QChar *tagStart = m_text.unicode() + lastIndex + 1; + const TQChar *tagStart = m_text.unicode() + lastIndex + 1; uint tagLen = ( index - 1 ) - ( lastIndex + 1 ) + 1; // </bleh> ? if ( *tagStart == '/' ) @@ -713,11 +713,11 @@ bool Tokenizer::parseNextToken( Token &tok ) return false; } -Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text ) +Tokenizer::TagIndexList Tokenizer::scanTagIndices( const TQString &text ) { - const QChar *start = text.unicode(); - const QChar *p = start; - const QChar *endP = p + text.length(); + const TQChar *start = text.unicode(); + const TQChar *p = start; + const TQChar *endP = p + text.length(); bool quoted = false; bool inTag = false; @@ -725,7 +725,7 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text ) for (; p < endP; ++p ) { - const QChar ch = *p; + const TQChar ch = *p; if ( ch == '"' && inTag ) { quoted = quoted ? false : true; @@ -752,13 +752,13 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text ) return tags; } -void Tokenizer::resolveEntities( QString &text, TagIndexList &tags ) +void Tokenizer::resolveEntities( TQString &text, TagIndexList &tags ) { - const QChar *p = text.unicode(); - const QChar *endP = p + text.length(); + const TQChar *p = text.unicode(); + const TQChar *endP = p + text.length(); uint i = 0; bool scanForSemicolon = false; - const QChar *ampersand = 0; + const TQChar *ampersand = 0; TagIndexList::Iterator tagInfoIt = tags.begin(); TagIndexList::Iterator tagsEnd = tags.end(); @@ -768,7 +768,7 @@ void Tokenizer::resolveEntities( QString &text, TagIndexList &tags ) i > (*tagInfoIt).index ) ++tagInfoIt; - const QChar ch = *p; + const TQChar ch = *p; if ( ch == '&' ) { ampersand = p; @@ -783,13 +783,13 @@ void Tokenizer::resolveEntities( QString &text, TagIndexList &tags ) scanForSemicolon = false; - const QChar *entityBegin = ampersand + 1; + const TQChar *entityBegin = ampersand + 1; const uint entityLength = p - entityBegin; if ( entityLength == 0 ) continue; - const QChar entityValue = KCharsets::fromEntity( QConstString( entityBegin, entityLength ).string() ); + const TQChar entityValue = KCharsets::fromEntity( TQConstString( entityBegin, entityLength ).string() ); if ( entityValue.isNull() ) continue; @@ -818,9 +818,9 @@ void Tokenizer::parseTag( const StringPtr &text, attributes.clear(); tag = StringPtr(); - const QChar *p = text.ptr; - const QChar *endP = p + text.len; - const QChar *start = p; + const TQChar *p = text.ptr; + const TQChar *endP = p + text.len; + const TQChar *start = p; int state = ScanForName; @@ -828,7 +828,7 @@ void Tokenizer::parseTag( const StringPtr &text, while ( p < endP ) { - const QChar ch = *p; + const TQChar ch = *p; if ( ch == ' ' ) { @@ -889,7 +889,7 @@ void Tokenizer::parseTag( const StringPtr &text, continue; } - const QChar *valueEnd = p; + const TQChar *valueEnd = p; StringPtr value = StringPtr( start, valueEnd - start ); attributes[ key ] = value; @@ -934,7 +934,7 @@ ItemProperties::ItemProperties() { } -ItemProperties::ItemProperties( const QFont &defaultFont ) +ItemProperties::ItemProperties( const TQFont &defaultFont ) : font( defaultFont ), reversed( false ) { } @@ -975,7 +975,7 @@ ItemProperties::ItemProperties( const ItemProperties &other, StringPtr colAttr = attributes[ "color" ]; if ( !colAttr.isNull() ) { - QColor col( CONSTSTRING( colAttr ) ); + TQColor col( CONSTSTRING( colAttr ) ); if ( col.isValid() ){ if(!reversed) color = col; @@ -986,7 +986,7 @@ ItemProperties::ItemProperties( const ItemProperties &other, colAttr = attributes[ "bgcolor" ]; if ( !colAttr.isNull() ) { - QColor col( CONSTSTRING( colAttr ) ); + TQColor col( CONSTSTRING( colAttr ) ); if ( col.isValid() ) { if(!reversed) bgColor = col; @@ -1019,9 +1019,9 @@ ItemProperties &ItemProperties::operator=( const ItemProperties &rhs ) return *this; } -void ItemProperties::updateFont( const QFont &newFont ) +void ItemProperties::updateFont( const TQFont &newFont ) { - QFont f = newFont; + TQFont f = newFont; f.setUnderline( font.underline() ); f.setBold( font.bold() ); f.setItalic( font.italic() ); @@ -1034,25 +1034,25 @@ TextLine::TextLine() m_items.setAutoDelete( true ); } -TextLine::TextLine( const QPtrList<Item> &items ) +TextLine::TextLine( const TQPtrList<Item> &items ) : m_maxHeight( 0 ) { m_items.setAutoDelete( true ); assert( !items.autoDelete() ); - QPtrListIterator<Item> it( items ); + TQPtrListIterator<Item> it( items ); for (; it.current(); ++it ) appendItem( it.current(), UpdateMaxHeight ); } -QString TextLine::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) +TQString TextLine::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) { - QString selectedText; + TQString selectedText; // fixes a crash where because of an empty list i becomes null if ( m_items.isEmpty() ) - return QString::null; + return TQString::null; if ( start.line == this ) { @@ -1085,7 +1085,7 @@ QString TextLine::updateSelection( const SelectionPoint &start, const SelectionP StringPtr txt = i->text(); if ( !txt.isNull() ) - selectedText += QString( txt.ptr + start.offset, + selectedText += TQString( txt.ptr + start.offset, txt.len - start.offset ); } else if ( i == end.item ) @@ -1094,7 +1094,7 @@ QString TextLine::updateSelection( const SelectionPoint &start, const SelectionP StringPtr txt = i->text(); if ( !txt.isNull() ) - selectedText += QString( txt.ptr, end.offset + 1 ); + selectedText += TQString( txt.ptr, end.offset + 1 ); } else { @@ -1123,13 +1123,13 @@ void TextLine::appendItem( Item *i, int layoutUpdatePolicy ) m_maxHeight = kMax( m_maxHeight, i->height() ); } -Item *TextLine::resetLayout( QPtrList<Item> &remainingItems) +Item *TextLine::resetLayout( TQPtrList<Item> &remainingItems) { Item *lastLineItem = m_items.getLast(); Item *it = m_items.first(); // We have to use the tobeDel structure or we call resetLayout on the Item // twice for each item we want to delete - QPtrList<Item> tobeDel; + TQPtrList<Item> tobeDel; while ( it ) { if ( it->resetLayout() == Item::KeepItem ) @@ -1143,9 +1143,9 @@ Item *TextLine::resetLayout( QPtrList<Item> &remainingItems) return lastLineItem; } -void TextLine::paint( QPainter &p, int y ) +void TextLine::paint( TQPainter &p, int y ) { - QPtrListIterator<Item> it( m_items ); + TQPtrListIterator<Item> it( m_items ); int x = 0; for (; it.current(); ++it ) { @@ -1159,7 +1159,7 @@ void TextLine::paint( QPainter &p, int y ) Item *TextLine::itemAt( int px, SelectionPoint *selectionInfo, Item::SelectionAccuracy accuracy ) { - QPtrListIterator<Item> it( m_items ); + TQPtrListIterator<Item> it( m_items ); int x = 0; int width = 0; for (; it.current(); ++it ) @@ -1193,18 +1193,18 @@ Item *TextLine::itemAt( int px, SelectionPoint *selectionInfo, return 0; } -QString TextLine::plainText() const +TQString TextLine::plainText() const { - QString res; - QPtrListIterator<Item> it( m_items ); + TQString res; + TQPtrListIterator<Item> it( m_items ); for (; it.current(); ++it ) res += it.current()->text().toQString(); return res; } -void TextLine::fontChange( const QFont &newFont ) +void TextLine::fontChange( const TQFont &newFont ) { - QPtrListIterator<Item> it( m_items ); + TQPtrListIterator<Item> it( m_items ); for (; it.current(); ++it ) { ItemProperties props = it.current()->props(); @@ -1213,7 +1213,7 @@ void TextLine::fontChange( const QFont &newFont ) } } -TextParag::TextParag( TextView *textView, const QString &richText ) +TextParag::TextParag( TextView *textView, const TQString &richText ) : m_layouted( false ), m_height( 0 ), m_minWidth( 0 ), m_textView( textView ) { @@ -1227,7 +1227,7 @@ TextParag::~TextParag() void TextParag::layout( int width ) { - QPtrList<Item> items; + TQPtrList<Item> items; TextLine *row = m_lines.first(); @@ -1249,7 +1249,7 @@ void TextParag::layout( int width ) SelectionPoint *selEnd = m_textView->selectionEnd(); assert( selStart && selEnd ); - QPtrListIterator<Item> it( items ); + TQPtrListIterator<Item> it( items ); while ( it.current() ) { m_minWidth = kMax( m_minWidth, it.current()->minWidth() ); @@ -1313,7 +1313,7 @@ void TextParag::layout( int width ) selEnd->parag == this ) { // ### move to TextLine? - QPtrListIterator<Item> it( line->iterator() ); + TQPtrListIterator<Item> it( line->iterator() ); for (; it.current(); ++it ) { if ( selStart->item == it.current() ) @@ -1327,7 +1327,7 @@ void TextParag::layout( int width ) m_layouted = true; } -void TextParag::paint( QPainter &p, int y, int maxY ) +void TextParag::paint( TQPainter &p, int y, int maxY ) { TextLine *row = m_lines.first(); for (; row; row = m_lines.next() ) @@ -1374,9 +1374,9 @@ Item *TextParag::itemAt( int px, int py, SelectionPoint *selectionInfo, return 0; } -QString TextParag::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) +TQString TextParag::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) { - QString selectedText; + TQString selectedText; // sanity check // (don't put it lower because it changes the current list item) @@ -1415,7 +1415,7 @@ void TextParag::clearSelection() line->clearSelection(); } -void TextParag::setRichText( const QString &richText ) +void TextParag::setRichText( const TQString &richText ) { m_layouted = false; m_height = 0; @@ -1434,7 +1434,7 @@ void TextParag::setRichText( const QString &richText ) Token tok; Token lastTextToken; - QValueStack<Tag> tagStack; + TQValueStack<Tag> tagStack; TextLine *line = new TextLine; @@ -1500,25 +1500,25 @@ void TextParag::setRichText( const QString &richText ) m_lines.append( line ); } -QString TextParag::plainText() const +TQString TextParag::plainText() const { - QString result; - QPtrListIterator<TextLine> it( m_lines ); + TQString result; + TQPtrListIterator<TextLine> it( m_lines ); for (; it.current(); ++it ) result += it.current()->plainText(); return result; } -void TextParag::fontChange( const QFont &newFont ) +void TextParag::fontChange( const TQFont &newFont ) { - QPtrListIterator<TextLine> it( m_lines ); + TQPtrListIterator<TextLine> it( m_lines ); for (; it.current(); ++it ) it.current()->fontChange( newFont ); } -ContentsPaintAlgorithm::ContentsPaintAlgorithm( const QPtrListIterator<TextParag> ¶gIt, - QWidget *viewport, QPixmap &paintBuffer, - QPainter &painter, int clipX, int clipY, +ContentsPaintAlgorithm::ContentsPaintAlgorithm( const TQPtrListIterator<TextParag> ¶gIt, + TQWidget *viewport, TQPixmap &paintBuffer, + TQPainter &painter, int clipX, int clipY, int clipHeight ) : m_paragIt( paragIt ), m_viewport( viewport ), m_paintBuffer( paintBuffer ), m_painter( painter ), m_clipX( clipX ), m_clipY( clipY ), m_clipHeight( clipHeight ), @@ -1539,7 +1539,7 @@ int ContentsPaintAlgorithm::goToFirstVisibleParagraph() return y; } -int ContentsPaintAlgorithm::paint( QPainter &bufferedPainter, int currentY ) +int ContentsPaintAlgorithm::paint( TQPainter &bufferedPainter, int currentY ) { const int startY = currentY; @@ -1600,7 +1600,7 @@ void ContentsPaintAlgorithm::paint() while ( y < yEnd ) { m_paintBuffer.fill( m_viewport, 0, y ); - QPainter bufferedPainter( &m_paintBuffer ); + TQPainter bufferedPainter( &m_paintBuffer ); bufferedPainter.translate( -m_clipX, -y ); int nextY = paint( bufferedPainter, y ); @@ -1613,8 +1613,8 @@ void ContentsPaintAlgorithm::paint() } } -TextView::TextView( QWidget *parent, const char *name ) - : QScrollView( parent, name, WRepaintNoErase ), +TextView::TextView( TQWidget *parent, const char *name ) + : TQScrollView( parent, name, WRepaintNoErase ), m_paintBuffer( PaintBufferExtend, PaintBufferExtend ), m_selectionEndBeforeStart( false ), m_mousePressed( false ), m_mmbPressed( false ), @@ -1624,9 +1624,9 @@ TextView::TextView( QWidget *parent, const char *name ) m_parags.setAutoDelete( true ); viewport()->setBackgroundMode( PaletteBase ); viewport()->setMouseTracking( true ); - m_autoScrollTimer = new QTimer( this ); - connect(verticalScrollBar(), SIGNAL(valueChanged( int ) ), - this, SLOT(scrolling( int ))); + m_autoScrollTimer = new TQTimer( this ); + connect(verticalScrollBar(), TQT_SIGNAL(valueChanged( int ) ), + this, TQT_SLOT(scrolling( int ))); setDragAutoScroll( false ); @@ -1637,7 +1637,7 @@ TextView::~TextView() { } -void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int clipHeight ) +void TextView::drawContents( TQPainter *painter, int clipX, int clipY, int , int clipHeight ) { if ( m_parags.isEmpty() ) return; @@ -1645,7 +1645,7 @@ void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int if ( m_paintBuffer.width() != visibleWidth() ) m_paintBuffer.resize( visibleWidth(), PaintBufferExtend ); - QPtrListIterator<TextParag> paragIt( m_parags ); + TQPtrListIterator<TextParag> paragIt( m_parags ); ContentsPaintAlgorithm( paragIt, viewport(), m_paintBuffer, *painter, clipX, clipY, @@ -1653,9 +1653,9 @@ void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int .paint(); } -void TextView::viewportResizeEvent( QResizeEvent *ev ) +void TextView::viewportResizeEvent( TQResizeEvent *ev ) { - QScrollView::viewportResizeEvent(ev); + TQScrollView::viewportResizeEvent(ev); if ( ev->size().width() != ev->oldSize().width() ) layout(); @@ -1724,13 +1724,13 @@ void TextView::clear() viewport()->erase(); } -TextParagIterator TextView::appendParag( const QString &richText ) +TextParagIterator TextView::appendParag( const TQString &richText ) { TextParag *parag = new TextParag( this, richText ); m_parags.append( parag ); layout( false ); scrollToBottom(); - QPtrListIterator<TextParag> it( m_parags ); + TQPtrListIterator<TextParag> it( m_parags ); it.toLast(); return TextParagIterator( it ); } @@ -1773,7 +1773,7 @@ void TextView::clearSelection( bool repaint ) m_selectionStart = SelectionPoint(); m_selectionEnd = SelectionPoint(); m_selectionEndBeforeStart = false; - m_selectedText = QString::null; + m_selectedText = TQString::null; clearSelectionInternal(); if ( repaint ) updateContents(); @@ -1781,16 +1781,16 @@ void TextView::clearSelection( bool repaint ) TextParagIterator TextView::firstParag() const { - return TextParagIterator( QPtrListIterator<TextParag>( m_parags ) ); + return TextParagIterator( TQPtrListIterator<TextParag>( m_parags ) ); } -QString TextView::plainText() const +TQString TextView::plainText() const { if ( m_parags.isEmpty() ) - return QString::null; + return TQString::null; - QString result; - QPtrListIterator<TextParag> paragIt( m_parags ); + TQString result; + TQPtrListIterator<TextParag> paragIt( m_parags ); while ( paragIt.current() ) { result += paragIt.current()->plainText(); @@ -1802,19 +1802,19 @@ QString TextView::plainText() const return result; } -QColor TextView::linkColor() const +TQColor TextView::linkColor() const { return m_linkColor; } -void TextView::setLinkColor( const QColor &linkColor ) +void TextView::setLinkColor( const TQColor &linkColor ) { m_linkColor = linkColor; } void TextView::copy() { - QApplication::clipboard()->setText( m_selectedText ); + TQApplication::clipboard()->setText( m_selectedText ); } void TextView::clearSelectionInternal() @@ -1825,7 +1825,7 @@ void TextView::clearSelectionInternal() p->clearSelection(); } -void TextView::contentsMousePressEvent( QMouseEvent *ev ) +void TextView::contentsMousePressEvent( TQMouseEvent *ev ) { if ( ev->button() & RightButton ) { emitLinkClickedForMouseEvent( ev ); @@ -1855,7 +1855,7 @@ void TextView::contentsMousePressEvent( QMouseEvent *ev ) } } -void TextView::contentsMouseMoveEvent( QMouseEvent *ev ) +void TextView::contentsMouseMoveEvent( TQMouseEvent *ev ) { if ( m_mousePressed && ev->state() == NoButton ) { @@ -1864,14 +1864,14 @@ void TextView::contentsMouseMoveEvent( QMouseEvent *ev ) } if ( m_mousePressed && !m_dragURL.isEmpty() && - ( m_dragStartPos - ev->pos() ).manhattanLength() > QApplication::startDragDistance() ) { + ( m_dragStartPos - ev->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { m_mousePressed = false; - m_dragStartPos = QPoint(); + m_dragStartPos = TQPoint(); startDrag(); - m_dragURL = QString::null; + m_dragURL = TQString::null; return; } @@ -1934,26 +1934,26 @@ void TextView::contentsMouseMoveEvent( QMouseEvent *ev ) } } - QCursor c = KCursor::arrowCursor(); + TQCursor c = KCursor::arrowCursor(); if ( viewport()->cursor().handle() != c.handle() ) viewport()->setCursor( c ); } -void TextView::contentsMouseReleaseEvent( QMouseEvent *ev ) +void TextView::contentsMouseReleaseEvent( TQMouseEvent *ev ) { stopAutoScroll(); bool clicked = (m_mousePressed || m_mmbPressed) && - (m_dragStartPos - ev->pos()).manhattanLength() < QApplication::startDragDistance(); + (m_dragStartPos - ev->pos()).manhattanLength() < TQApplication::startDragDistance(); m_mousePressed = false; m_mmbPressed = false; - m_dragStartPos = QPoint(); - m_dragURL = QString::null; + m_dragStartPos = TQPoint(); + m_dragURL = TQString::null; m_selectionMaybeStart = SelectionPoint(); if ( (ev->button() & Qt::LeftButton) && !m_selectedText.isEmpty() ) - QApplication::clipboard()->setText( m_selectedText, QClipboard::Selection ); + TQApplication::clipboard()->setText( m_selectedText, QClipboard::Selection ); if ( clicked ) { emitLinkClickedForMouseEvent( ev ); @@ -1967,9 +1967,9 @@ void TextView::contentsMouseReleaseEvent( QMouseEvent *ev ) } } -void TextView::fontChange( const QFont & ) +void TextView::fontChange( const TQFont & ) { - QPtrListIterator<TextParag> it( m_parags ); + TQPtrListIterator<TextParag> it( m_parags ); for (; it.current(); ++it ) it.current()->fontChange( font() ); @@ -1978,7 +1978,7 @@ void TextView::fontChange( const QFont & ) void TextView::startDrag() { - QDragObject *dragObj = dragObject( m_dragURL ); + TQDragObject *dragObj = dragObject( m_dragURL ); if ( !dragObj ) return; @@ -1987,7 +1987,7 @@ void TextView::startDrag() dragObj->drag(); } -QDragObject *TextView::dragObject( const QString &dragURL ) +TQDragObject *TextView::dragObject( const TQString &dragURL ) { #if KDE_IS_VERSION(3,1,92) return new KURLDrag( KURL( dragURL ), viewport() ); @@ -1998,9 +1998,9 @@ QDragObject *TextView::dragObject( const QString &dragURL ) void TextView::autoScroll() { - QPoint cursor = viewport()->mapFromGlobal( QCursor::pos() ); + TQPoint cursor = viewport()->mapFromGlobal( TQCursor::pos() ); - QPoint contentsPos = viewportToContents( cursor ); + TQPoint contentsPos = viewportToContents( cursor ); cursor.rx() -= viewport()->x(); cursor.ry() -= viewport()->y(); @@ -2012,7 +2012,7 @@ void TextView::autoScroll() } } -void TextView::emitLinkClickedForMouseEvent( QMouseEvent *ev ) +void TextView::emitLinkClickedForMouseEvent( TQMouseEvent *ev ) { TextChunk *text = dynamic_cast<TextChunk *>( itemAt( ev->pos() ) ); if ( !text ) @@ -2028,16 +2028,16 @@ void TextView::emitLinkClickedForMouseEvent( QMouseEvent *ev ) void TextView::startAutoScroll() { if(m_autoScrollTimer->isActive() == false){ - connect( m_autoScrollTimer, SIGNAL( timeout() ), - this, SLOT( autoScroll() ) ); + connect( m_autoScrollTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( autoScroll() ) ); m_autoScrollTimer->start( 75, false ); } } void TextView::stopAutoScroll() { - disconnect( m_autoScrollTimer, SIGNAL( timeout() ), - this, SLOT( autoScroll() ) ); + disconnect( m_autoScrollTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( autoScroll() ) ); m_autoScrollTimer->stop(); } @@ -2090,9 +2090,9 @@ SelectionPoint *TextView::selectionEnd() return m_selectionEndBeforeStart ? &m_selectionStart : &m_selectionEnd; } -QString TextView::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) +TQString TextView::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) { - QString selectedText; + TQString selectedText; if ( start.item == end.item ) { @@ -2104,7 +2104,7 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP if ( start.pos.x() == end.pos.x() ) { i->setSelectionStatus( Item::NoSelection ); - return QString::null; + return TQString::null; } i->setSelectionStatus( Item::SelectionBoth ); @@ -2114,7 +2114,7 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP if ( t ) { StringPtr text = t->text(); - selectedText = QString( text.ptr + start.offset, 1 ); + selectedText = TQString( text.ptr + start.offset, 1 ); } } else @@ -2127,10 +2127,10 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP { StringPtr text = t->text(); if (end.offset > start.offset) - selectedText = QString( text.ptr + start.offset, + selectedText = TQString( text.ptr + start.offset, end.offset - start.offset + 1 ); else - selectedText = QString( text.ptr + end.offset, + selectedText = TQString( text.ptr + end.offset, start.offset - end.offset + 1 ); } @@ -2162,7 +2162,7 @@ void TextView::layout( bool force ) int contentsWidth = visibleWidth(); int width = contentsWidth; - QPtrListIterator<TextParag> it( m_parags ); + TQPtrListIterator<TextParag> it( m_parags ); for (; it.current(); ++it ) { if ( !it.current()->isLayouted() || force ) @@ -2195,7 +2195,7 @@ void TextView::contentsChange(int heightChange, bool force) } -Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo, +Item *TextView::itemAt( const TQPoint &pos, SelectionPoint *selectionInfo, Item::SelectionAccuracy accuracy ) { int px = pos.x(); @@ -2203,7 +2203,7 @@ Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo, int y = 0; int height = 0; - QPtrListIterator<TextParag> it( m_parags ); + TQPtrListIterator<TextParag> it( m_parags ); for (; it.current(); ++it ) { height = it.current()->height(); @@ -2232,15 +2232,15 @@ Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo, return 0; } -QString TextParagIterator::richText() const +TQString TextParagIterator::richText() const { if ( atEnd() ) - return QString::null; + return TQString::null; return Tokenizer::convertToRichText( m_paragIt.current()->processedRichText() ); } -void TextParagIterator::setRichText( const QString &richText ) +void TextParagIterator::setRichText( const TQString &richText ) { if ( atEnd() ) return; @@ -2254,10 +2254,10 @@ void TextParagIterator::setRichText( const QString &richText ) textView->updateContents(); } -QString TextParagIterator::plainText() const +TQString TextParagIterator::plainText() const { if ( atEnd() ) - return QString::null; + return TQString::null; return m_paragIt.current()->plainText(); } diff --git a/ksirc/kstextview.h b/ksirc/kstextview.h index 27a63eb5..4f9d59f4 100644 --- a/ksirc/kstextview.h +++ b/ksirc/kstextview.h @@ -19,12 +19,12 @@ #ifndef __kstextview_h__ #define __kstextview_h__ -#include <qscrollview.h> -#include <qpen.h> -#include <qptrlist.h> -#include <qvaluelist.h> -#include <qmap.h> -#include <qpixmap.h> +#include <tqscrollview.h> +#include <tqpen.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> +#include <tqmap.h> +#include <tqpixmap.h> class QTimer; class QDragObject; @@ -37,22 +37,22 @@ class TextView; struct StringPtr { StringPtr() : ptr( 0 ), len( 0 ) {} - StringPtr( const QChar *_ptr, uint _len ) + StringPtr( const TQChar *_ptr, uint _len ) : ptr( _ptr ), len( _len ) {} - explicit StringPtr( const QString &s ) // use with care! + explicit StringPtr( const TQString &s ) // use with care! : ptr( s.unicode() ), len( s.length() ) {} inline bool isNull() const { return ptr == 0; } // makes deep copy - inline QString toQString() const - { return ( ptr && len > 0 ) ? QString( ptr, len ) : QString::null; } + inline TQString toQString() const + { return ( ptr && len > 0 ) ? TQString( ptr, len ) : TQString::null; } - const QChar *ptr; + const TQChar *ptr; uint len; }; -#define CONSTSTRING( substr ) QConstString( substr.ptr, substr.len ).string() +#define CONSTSTRING( substr ) TQConstString( substr.ptr, substr.len ).string() inline bool operator<( const StringPtr &s1, const StringPtr &s2 ) { @@ -69,23 +69,23 @@ inline bool operator==( const StringPtr &s1, const char *s2 ) return CONSTSTRING( s1 ) == s2; } -class AttributeMap : public QMap<StringPtr, StringPtr> +class AttributeMap : public TQMap<StringPtr, StringPtr> { public: AttributeMap() {} - AttributeMap( const AttributeMap &rhs ) : QMap<StringPtr, StringPtr>( rhs ) {} + AttributeMap( const AttributeMap &rhs ) : TQMap<StringPtr, StringPtr>( rhs ) {} AttributeMap &operator=( const AttributeMap &rhs ) - { QMap<StringPtr, StringPtr>::operator=( rhs ); return *this; } + { TQMap<StringPtr, StringPtr>::operator=( rhs ); return *this; } // helper for 'const char *' key... ConstIterator findAttribute( const char *key ) const { - QString qkey( key ); + TQString qkey( key ); return find( StringPtr( qkey ) ); } Iterator findAttribute( const char *key ) { - QString qkey( key ); + TQString qkey( key ); return find( StringPtr( qkey ) ); } @@ -98,7 +98,7 @@ public: } StringPtr &operator[]( const StringPtr &key ) { - return QMap<StringPtr, StringPtr>::operator[]( key ); + return TQMap<StringPtr, StringPtr>::operator[]( key ); } }; @@ -115,21 +115,21 @@ struct Token struct ItemProperties { ItemProperties(); - ItemProperties( const QFont &defaultFont ); + ItemProperties( const TQFont &defaultFont ); ItemProperties( const ItemProperties &other, const Token &token, TextView *textView ); ItemProperties( const ItemProperties &rhs ); ItemProperties &operator=( const ItemProperties &rhs ); - void updateFont( const QFont &newFont ); + void updateFont( const TQFont &newFont ); // these three are inherited/merged - QFont font; - QColor color; - QColor selColor; - QColor bgColor; - QColor bgSelColor; + TQFont font; + TQColor color; + TQColor selColor; + TQColor bgColor; + TQColor bgSelColor; bool reversed; // ### todo: inherit these, too AttributeMap attributes; @@ -153,7 +153,7 @@ public: virtual const char *type() { return "Item"; } - virtual void paint( QPainter &painter ) = 0; + virtual void paint( TQPainter &painter ) = 0; int width() const; @@ -207,7 +207,7 @@ public: virtual const char *type() { return "TextChunk"; } - virtual void paint( QPainter &painter ); + virtual void paint( TQPainter &painter ); virtual Item *breakLine( int width ); @@ -226,26 +226,26 @@ private: StringPtr breakInTheMiddle( int width ); Item *hardBreak( const StringPtr &rightHandSide ); - void paintSelection( QPainter &p ); - int paintSelection( QPainter &p, int x, const StringPtr &text ); - int paintText( QPainter &p, int x, const StringPtr &text ); + void paintSelection( TQPainter &p ); + int paintSelection( TQPainter &p, int x, const StringPtr &text ); + int paintText( TQPainter &p, int x, const StringPtr &text ); void mergeSelection( TextChunk *child, SelectionPoint *selection ); StringPtr m_text; uint m_originalTextLength; - QFontMetrics m_metrics; + TQFontMetrics m_metrics; class TextChunk *m_parent; }; class ImageItem : public Item { public: - ImageItem( TextParag *parag, const QPixmap &pixmap ); + ImageItem( TextParag *parag, const TQPixmap &pixmap ); virtual const char *type() { return "Image"; } - virtual void paint( QPainter &painter ); + virtual void paint( TQPainter &painter ); virtual LayoutResetStatus resetLayout(); @@ -253,7 +253,7 @@ protected: virtual void calcExtends() const; private: - QPixmap m_pixmap; + TQPixmap m_pixmap; }; class Tokenizer @@ -268,20 +268,20 @@ public: uint index; int type; }; - typedef QValueList<TagIndex> TagIndexList; + typedef TQValueList<TagIndex> TagIndexList; // preprocessed string struct PString { - QString data; + TQString data; TagIndexList tags; }; Tokenizer( PString &text ); - static PString preprocess( const QString &richText ); + static PString preprocess( const TQString &richText ); - static QString convertToRichText( const PString &ptext ); + static TQString convertToRichText( const PString &ptext ); bool parseNextToken( Token &tok ); @@ -290,12 +290,12 @@ private: StringPtr &tag, AttributeMap &attributes ); - static TagIndexList scanTagIndices( const QString &text ); - static void resolveEntities( QString &text, TagIndexList &tags ); + static TagIndexList scanTagIndices( const TQString &text ); + static void resolveEntities( TQString &text, TagIndexList &tags ); enum TagParsingState { ScanForName, ScanForEqual, ScanForValue }; - QString &m_text; + TQString &m_text; TagIndexList m_tags; TagIndexList::ConstIterator m_lastTag; bool m_textBeforeFirstTagProcessed; @@ -315,11 +315,11 @@ public: TextLine(); // tranfers ownership of items! make sure that 'items' does not // have autodeletion enabled! - TextLine( const QPtrList<Item> &items ); + TextLine( const TQPtrList<Item> &items ); int maxHeight() const { return m_maxHeight; } - QString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); + TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); void clearSelection(); // transfers ownership @@ -327,21 +327,21 @@ public: bool isEmpty() const { return m_items.isEmpty(); } - Item *resetLayout( QPtrList<Item> &remainingItems); + Item *resetLayout( TQPtrList<Item> &remainingItems); - void paint( QPainter &p, int y ); + void paint( TQPainter &p, int y ); Item *itemAt( int px, SelectionPoint *selectionInfo, Item::SelectionAccuracy accuracy = Item::SelectExact ); - QPtrListIterator<Item> iterator() const { return QPtrListIterator<Item>( m_items ); } + TQPtrListIterator<Item> iterator() const { return TQPtrListIterator<Item>( m_items ); } - QString plainText() const; + TQString plainText() const; - void fontChange( const QFont &newFont ); + void fontChange( const TQFont &newFont ); private: - QPtrList<Item> m_items; + TQPtrList<Item> m_items; int m_maxHeight; }; @@ -350,13 +350,13 @@ class SelectionPoint; class TextParag { public: - TextParag( TextView *textView, const QString &richText ); + TextParag( TextView *textView, const TQString &richText ); ~TextParag(); void layout( int width ); - void paint( QPainter &p, int y, int maxY ); + void paint( TQPainter &p, int y, int maxY ); inline void setLayouted( bool l ) { m_layouted = l; } inline bool isLayouted() const { return m_layouted; } @@ -369,21 +369,21 @@ public: TextView *textView() const { return m_textView; } - QString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); + TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); void clearSelection(); - void setRichText( const QString &richText ); + void setRichText( const TQString &richText ); Tokenizer::PString processedRichText() const { return m_processedRichText; } - QString plainText() const; + TQString plainText() const; - void fontChange( const QFont &newFont ); + void fontChange( const TQFont &newFont ); private: Tokenizer::PString m_processedRichText; - QPtrList<TextLine> m_lines; + TQPtrList<TextLine> m_lines; bool m_layouted; int m_height; int m_minWidth; @@ -410,7 +410,7 @@ struct SelectionPoint TextLine *line; TextParag *parag; uint offset; - QPoint pos; + TQPoint pos; }; class TextParagIterator @@ -422,10 +422,10 @@ public: TextParagIterator &operator=( const TextParagIterator &rhs ) { m_paragIt = rhs.m_paragIt; return *this; } - QString richText() const; - void setRichText( const QString &richText ); + TQString richText() const; + void setRichText( const TQString &richText ); - QString plainText() const; + TQString plainText() const; bool atEnd() const { return m_paragIt.current() == 0; } @@ -435,31 +435,31 @@ public: TextParagIterator &operator--( int steps ) { m_paragIt -= steps; return *this; } protected: - TextParagIterator( const QPtrListIterator<TextParag> ¶gIt ) + TextParagIterator( const TQPtrListIterator<TextParag> ¶gIt ) : m_paragIt( paragIt ) {} private: - QPtrListIterator<TextParag> m_paragIt; + TQPtrListIterator<TextParag> m_paragIt; }; class ContentsPaintAlgorithm { public: - ContentsPaintAlgorithm( const QPtrListIterator<TextParag> ¶gIt, - QWidget *viewport, QPixmap &paintBuffer, - QPainter &painter, int clipX, int clipY, int clipHeight ); + ContentsPaintAlgorithm( const TQPtrListIterator<TextParag> ¶gIt, + TQWidget *viewport, TQPixmap &paintBuffer, + TQPainter &painter, int clipX, int clipY, int clipHeight ); void paint(); private: int goToFirstVisibleParagraph(); - int paint( QPainter &bufferedPainter, int currentY ); + int paint( TQPainter &bufferedPainter, int currentY ); int adjustYAndIterator( int startY, int currentY, int nextY ); - QPtrListIterator<TextParag> m_paragIt; - QWidget *m_viewport; - QPixmap &m_paintBuffer; - QPainter &m_painter; + TQPtrListIterator<TextParag> m_paragIt; + TQWidget *m_viewport; + TQPixmap &m_paintBuffer; + TQPainter &m_painter; int m_clipX, m_clipY, m_clipHeight; int m_overshoot; }; @@ -472,32 +472,32 @@ class TextView : public QScrollView friend class TextParag; friend class TextParagIterator; public: - TextView( QWidget *parent, const char *name = 0 ); + TextView( TQWidget *parent, const char *name = 0 ); virtual ~TextView(); virtual void clear(); - TextParagIterator appendParag( const QString &richText ); + TextParagIterator appendParag( const TQString &richText ); bool removeParag( const TextParagIterator ¶g ); void clearSelection( bool repaint = false ); // ### re-consider the repaint arg... - QString selectedText() const { return m_selectedText; } + TQString selectedText() const { return m_selectedText; } TextParagIterator firstParag() const; - QString plainText() const; + TQString plainText() const; - QColor linkColor() const; - void setLinkColor( const QColor &linkColor ); + TQColor linkColor() const; + void setLinkColor( const TQColor &linkColor ); void scrollToBottom( bool force = false ); signals: void selectionChanged(); - void pasteReq(const QString&); - void linkClicked( const QMouseEvent *ev, const QString &url ); + void pasteReq(const TQString&); + void linkClicked( const TQMouseEvent *ev, const TQString &url ); public slots: void copy(); @@ -506,22 +506,22 @@ protected slots: void scrolling(int value); protected: - virtual void viewportResizeEvent( QResizeEvent *ev ); - virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); - virtual void contentsMousePressEvent( QMouseEvent *ev ); - virtual void contentsMouseMoveEvent( QMouseEvent *ev ); - virtual void contentsMouseReleaseEvent( QMouseEvent *ev ); - virtual void fontChange( const QFont & ); + virtual void viewportResizeEvent( TQResizeEvent *ev ); + virtual void drawContents( TQPainter *p, int cx, int cy, int cw, int ch ); + virtual void contentsMousePressEvent( TQMouseEvent *ev ); + virtual void contentsMouseMoveEvent( TQMouseEvent *ev ); + virtual void contentsMouseReleaseEvent( TQMouseEvent *ev ); + virtual void fontChange( const TQFont & ); virtual void startDrag(); - virtual QDragObject *dragObject( const QString &dragURL ); + virtual TQDragObject *dragObject( const TQString &dragURL ); private slots: void autoScroll(); private: - void emitLinkClickedForMouseEvent( QMouseEvent *ev ); + void emitLinkClickedForMouseEvent( TQMouseEvent *ev ); void startAutoScroll(); @@ -531,38 +531,38 @@ private: void updateSelectionOrder(); - QString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); + TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); SelectionPoint *selectionStart(); SelectionPoint *selectionEnd(); void layout( bool force = true ); - Item *itemAt( const QPoint &pos, SelectionPoint *selectionInfo = 0, + Item *itemAt( const TQPoint &pos, SelectionPoint *selectionInfo = 0, Item::SelectionAccuracy accuracy = Item::SelectExact ); void clearSelectionInternal(); void contentsChange(int heightChange, bool force = false); - QPtrList<TextParag> m_parags; - QPixmap m_paintBuffer; + TQPtrList<TextParag> m_parags; + TQPixmap m_paintBuffer; SelectionPoint m_selectionMaybeStart; SelectionPoint m_selectionStart; SelectionPoint m_selectionEnd; bool m_selectionEndBeforeStart; - QTimer *m_autoScrollTimer; + TQTimer *m_autoScrollTimer; - QString m_selectedText; + TQString m_selectedText; - QPoint m_dragStartPos; - QString m_dragURL; + TQPoint m_dragStartPos; + TQString m_dragURL; bool m_mousePressed : 1; bool m_mmbPressed : 1; - QColor m_linkColor; - QColor m_selectionBackgroundColor; + TQColor m_linkColor; + TQColor m_selectionBackgroundColor; int m_height; bool m_inScroll; diff --git a/ksirc/kstextviewtest.cpp b/ksirc/kstextviewtest.cpp index f3326351..d20e6e50 100644 --- a/ksirc/kstextviewtest.cpp +++ b/ksirc/kstextviewtest.cpp @@ -11,13 +11,13 @@ public: { //startTimer( 5000 ); } - void timerEvent( QTimerEvent * ) + void timerEvent( TQTimerEvent * ) { m_lines++; if ( m_lines > 15 ) m_view->removeParag( m_view->firstParag() ); - m_view->appendParag( QString::fromLatin1( "<font color=#0000ff>color test</font><font color=#00ff00>color test</font><font color=#ff0000>color test</font><font color=#000088>color test</font><font color=#008800>color test</font><font color=#880000>color test</font><font color=#0000ff>color test</font><font color=#02ff00>color test</font><font color=#2000ff>color test</font>" ) ); - m_view->appendParag( QString::fromLatin1( "<r>aaaaaa</r> bbbbbb cccccccc ddddddddd eeeeeee " ) ); + m_view->appendParag( TQString::fromLatin1( "<font color=#0000ff>color test</font><font color=#00ff00>color test</font><font color=#ff0000>color test</font><font color=#000088>color test</font><font color=#008800>color test</font><font color=#880000>color test</font><font color=#0000ff>color test</font><font color=#02ff00>color test</font><font color=#2000ff>color test</font>" ) ); + m_view->appendParag( TQString::fromLatin1( "<r>aaaaaa</r> bbbbbb cccccccc ddddddddd eeeeeee " ) ); m_view->setContentsPos( 0, m_view->contentsHeight() ); } private: @@ -33,17 +33,17 @@ int main( int argc, char **argv ) app.setMainWidget( &view ); view.show(); - view.appendParag( QString::fromLatin1( "<b>bold</b>Normal<i>Italic hey!</i><r>reverse!</r>" ) ); - view.appendParag( QString::fromLatin1( "bleh foo hey bar schubidu bliep blop" ) ); - view.appendParag( QString::fromLatin1( "more longish paragraphs .. yaddayadda yadda" ) ); - view.appendParag( QString::fromLatin1( "<tronical> hah! &" ) ); - view.appendParag( QString::fromLatin1( "<a href=\"http://www.kde.org/\">url</a>" ) ); - view.appendParag( QString::fromLatin1( "<font color=#0000ff bgcolor=#ff0000>color test</font>" ) ); - view.appendParag( QString::fromLatin1( "<font color=\"#00ff00\">another color test</font>" ) ); - view.appendParag( QString::fromLatin1( "<font color=\"#00ff00\" bgcolor=\"#ff0000\">another color test</font>" ) ); - view.appendParag( QString::fromLatin1( "<i bleh>simple attr test</i><b leh foo=15 doo=\"& > 123 \" oof>complicated attr test</b>" ) ); - view.appendParag( QString::fromLatin1( "\"<b doo=\"& > 123 \" oof>\"third attr test 2</b>\"" ) ); - view.appendParag( QString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee" ) ); + view.appendParag( TQString::fromLatin1( "<b>bold</b>Normal<i>Italic hey!</i><r>reverse!</r>" ) ); + view.appendParag( TQString::fromLatin1( "bleh foo hey bar schubidu bliep blop" ) ); + view.appendParag( TQString::fromLatin1( "more longish paragraphs .. yaddayadda yadda" ) ); + view.appendParag( TQString::fromLatin1( "<tronical> hah! &" ) ); + view.appendParag( TQString::fromLatin1( "<a href=\"http://www.kde.org/\">url</a>" ) ); + view.appendParag( TQString::fromLatin1( "<font color=#0000ff bgcolor=#ff0000>color test</font>" ) ); + view.appendParag( TQString::fromLatin1( "<font color=\"#00ff00\">another color test</font>" ) ); + view.appendParag( TQString::fromLatin1( "<font color=\"#00ff00\" bgcolor=\"#ff0000\">another color test</font>" ) ); + view.appendParag( TQString::fromLatin1( "<i bleh>simple attr test</i><b leh foo=15 doo=\"& > 123 \" oof>complicated attr test</b>" ) ); + view.appendParag( TQString::fromLatin1( "\"<b doo=\"& > 123 \" oof>\"third attr test 2</b>\"" ) ); + view.appendParag( TQString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee" ) ); Timer t( &view ); return app.exec(); diff --git a/ksirc/ksview.cpp b/ksirc/ksview.cpp index 12ac357e..d9cac283 100644 --- a/ksirc/ksview.cpp +++ b/ksirc/ksview.cpp @@ -18,12 +18,12 @@ // $Id$ -#include <qclipboard.h> -#include <qdatetime.h> -#include <qregexp.h> -#include <qdragobject.h> -#include <qvaluestack.h> -#include <qstylesheet.h> +#include <tqclipboard.h> +#include <tqdatetime.h> +#include <tqregexp.h> +#include <tqdragobject.h> +#include <tqvaluestack.h> +#include <tqstylesheet.h> #include <kapplication.h> #include <kdebug.h> @@ -42,17 +42,17 @@ #include "nickColourMaker.h" #include "ksircprocess.h" -KSircView::KSircView(KSircProcess *proc, QWidget *parent, const char *name) +KSircView::KSircView(KSircProcess *proc, TQWidget *parent, const char *name) : KSirc::TextView(parent, name), m_proc(proc) { m_acceptFiles = false; m_timestamps = false; viewport()->setAcceptDrops(true); clear(); - connect( this, SIGNAL( linkClicked( const QMouseEvent *, const QString & ) ), - this, SLOT( anchorClicked( const QMouseEvent *, const QString & ) ) ); + connect( this, TQT_SIGNAL( linkClicked( const TQMouseEvent *, const TQString & ) ), + this, TQT_SLOT( anchorClicked( const TQMouseEvent *, const TQString & ) ) ); - QPixmap background = ksopts->backgroundPixmap(); + TQPixmap background = ksopts->backgroundPixmap(); if ( !background.isNull() ) viewport()->setBackgroundPixmap( background ); @@ -70,21 +70,21 @@ void KSircView::clear() KSirc::TextView::clear(); } -QString KSircView::makeTimeStamp() +TQString KSircView::makeTimeStamp() { - QTime now = QTime::currentTime(); - QString timeStamp = QString::fromLatin1( "[%1:%2:%3] " ) - .arg( QString::number( now.hour() ).rightJustify( 2, '0' ) ) - .arg( QString::number( now.minute() ).rightJustify( 2, '0' ) ) - .arg( QString::number( now.second() ).rightJustify( 2, '0' ) ); + TQTime now = TQTime::currentTime(); + TQString timeStamp = TQString::fromLatin1( "[%1:%2:%3] " ) + .arg( TQString::number( now.hour() ).rightJustify( 2, '0' ) ) + .arg( TQString::number( now.minute() ).rightJustify( 2, '0' ) ) + .arg( TQString::number( now.second() ).rightJustify( 2, '0' ) ); return timeStamp; } -void KSircView::saveURL( const QString &url ) +void KSircView::saveURL( const TQString &url ) { KURL kurl( url ); - KFileDialog *dlg = new KFileDialog( QString::null, QString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ ); + KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ ); dlg->setKeepLocation( true ); @@ -104,24 +104,24 @@ void KSircView::saveURL( const QString &url ) delete dlg; } -QString KSircView::addLine(const QString &pixmap, const QColor &color, const QString &_text) +TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const TQString &_text) { //kdDebug(5008) << "Start Text: " << _text << endl; - QString richText( "<font color=\"%1\">" ); + TQString richText( "<font color=\"%1\">" ); richText = richText.arg( color.name() ); if ( !pixmap.isEmpty() ) - richText.prepend( QString::fromLatin1( "<img src=\"%1\"></img>" ).arg( pixmap ) ); + richText.prepend( TQString::fromLatin1( "<img src=\"%1\"></img>" ).arg( pixmap ) ); - QString timeStamp = QString::fromLatin1( "<font color=\"%1\">%2</font>" ) + TQString timeStamp = TQString::fromLatin1( "<font color=\"%1\">%2</font>" ) .arg( ksopts->textColor.name() ) .arg( makeTimeStamp() ); m_timeStamps.append(timeStamp); if ( m_timestamps ) richText.prepend( timeStamp ); - QString text = QStyleSheet::escape(_text); + TQString text = TQStyleSheet::escape(_text); // ### a bit of a hack: turn '<nick> message' into // <span><nick><span> message' . span itself isn't supported but it @@ -130,30 +130,30 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt // according to UV Kochavi <uv1st@yahoo.com> , to prevent output like // '<nick message<' , which is supposedly a bug in Qt's reordering. The // same is done for [nick] and >nick< to catch queries. - QRegExp bidiRe( "^(<\\S+>)(.+)$" ); - text.replace( bidiRe, QString::fromLatin1( "<span>\\1</span>\\2" ) ); - QRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); - text.replace( bidiRe2, QString::fromLatin1( "<span>\\1</span>\\2" ) ); - QRegExp bidiRe3( "^(>\\S+<)(.+)$" ); - text.replace( bidiRe3, QString::fromLatin1( "<span>\\1</span>\\2" ) ); - - QRegExp nickCol( "~n(.+)~n" ); + TQRegExp bidiRe( "^(<\\S+>)(.+)$" ); + text.replace( bidiRe, TQString::fromLatin1( "<span>\\1</span>\\2" ) ); + TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); + text.replace( bidiRe2, TQString::fromLatin1( "<span>\\1</span>\\2" ) ); + TQRegExp bidiRe3( "^(>\\S+<)(.+)$" ); + text.replace( bidiRe3, TQString::fromLatin1( "<span>\\1</span>\\2" ) ); + + TQRegExp nickCol( "~n(.+)~n" ); nickCol.setMinimal(true); int pos; while( (pos = nickCol.search(text)) >= 0 ){ //kdDebug(5008) << "Found nick: " << nickCol.cap(1) << endl; - QString newText = nickCol.cap(1); + TQString newText = nickCol.cap(1); if( nickCol.cap(1) != m_proc->getNick()){ - QColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1)); + TQColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1)); - newText.prepend(QString("<font color=\"%1\">").arg(col.name())); + newText.prepend(TQString("<font color=\"%1\">").arg(col.name())); newText.append("</font>"); } else { - QColor col = ksopts->ownNickColor.name(); + TQColor col = ksopts->ownNickColor.name(); if( ! col.isValid()) nickColourMaker::colourMaker()->findFg(nickCol.cap(1)); - newText.prepend(QString("<font color=\"%1\">").arg(col.name())); + newText.prepend(TQString("<font color=\"%1\">").arg(col.name())); newText.append("</font>"); if(ksopts->ownNickBold){ newText.prepend("<b>"); @@ -199,11 +199,11 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt } if (parser.beeped()) { - KNotifyClient::event(winId(), QString::fromLatin1("BeepReceived"), + KNotifyClient::event(winId(), TQString::fromLatin1("BeepReceived"), i18n("Beep Received")); } - QString logText = parag.plainText(); + TQString logText = parag.plainText(); // append timestamp if it's not already there if ( ! m_timestamps ) logText.prepend( makeTimeStamp() ); @@ -211,20 +211,20 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt return logText + '\n'; } -void KSircView::addRichText(const QString &_text) +void KSircView::addRichText(const TQString &_text) { //kdDebug(5008) << "Start Text: " << _text << endl; - QString text = _text; + TQString text = _text; - QRegExp re("^(<font color=\"[^\"]+\">\\[[0-9:]+\\] </font>)"); - QString timeStamp; + TQRegExp re("^(<font color=\"[^\"]+\">\\[[0-9:]+\\] </font>)"); + TQString timeStamp; if(re.search(text) >= 0){ timeStamp = re.cap(1); } else { - timeStamp = QString::fromLatin1( "<font color=\"%1\">%2</font>" ) + timeStamp = TQString::fromLatin1( "<font color=\"%1\">%2</font>" ) .arg( ksopts->textColor.name() ) .arg( makeTimeStamp() ); if ( m_timestamps ) @@ -254,10 +254,10 @@ void KSircView::enableTimeStamps(bool enable) setUpdatesEnabled( false ); m_timestamps = enable; KSirc::TextParagIterator paragIt = firstParag(); - QStringList::ConstIterator timeStampIt = m_timeStamps.begin(); + TQStringList::ConstIterator timeStampIt = m_timeStamps.begin(); for (; !paragIt.atEnd(); ++paragIt, ++timeStampIt ) { - QString text = paragIt.richText(); + TQString text = paragIt.richText(); if ( enable ) text.prepend( *timeStampIt ); else @@ -268,7 +268,7 @@ void KSircView::enableTimeStamps(bool enable) updateContents(); } -void KSircView::anchorClicked(const QMouseEvent *ev, const QString &url) +void KSircView::anchorClicked(const TQMouseEvent *ev, const TQString &url) { if ( (ev->button() & LeftButton) && (ev->state() & ShiftButton ) ) saveURL( url ); @@ -301,43 +301,43 @@ void KSircView::anchorClicked(const QMouseEvent *ev, const QString &url) } } -void KSircView::openBrowser(const QString &url ) +void KSircView::openBrowser(const TQString &url ) { - (void) new KRun( KURL( url.startsWith("www") ? QString::fromLatin1("http://") + url : url)); + (void) new KRun( KURL( url.startsWith("www") ? TQString::fromLatin1("http://") + url : url)); } -void KSircView::copyLinkToClipboard( const QString &url ) +void KSircView::copyLinkToClipboard( const TQString &url ) { - QApplication::clipboard()->setText( url, QClipboard::Clipboard ); + TQApplication::clipboard()->setText( url, QClipboard::Clipboard ); } -QColor KSircView::ircColor(int code) +TQColor KSircView::ircColor(int code) { if (code >= 0 && code < 16) return ksopts->ircColors[code]; - return QColor(); + return TQColor(); } -void KSircView::contentsDragEnterEvent(QDragEnterEvent* event) +void KSircView::contentsDragEnterEvent(TQDragEnterEvent* event) { - event->accept((QTextDrag::canDecode(event) || + event->accept((TQTextDrag::canDecode(event) || (m_acceptFiles && KURLDrag::canDecode(event))) && (!event->source() || event->source() != viewport())); } -void KSircView::contentsDragMoveEvent(QDragMoveEvent* event) +void KSircView::contentsDragMoveEvent(TQDragMoveEvent* event) { event->accept(!event->source() || event->source() != viewport()); } -void KSircView::contentsDropEvent(QDropEvent* event) +void KSircView::contentsDropEvent(TQDropEvent* event) { - QStringList urls; - QString text; + TQStringList urls; + TQString text; if (m_acceptFiles && KURLDrag::decodeLocalFiles(event, urls)) emit urlsDropped(urls); - else if (QTextDrag::decode(event, text)) + else if (TQTextDrag::decode(event, text)) emit textDropped(text); } diff --git a/ksirc/ksview.h b/ksirc/ksview.h index 8b26faea..a4ee782e 100644 --- a/ksirc/ksview.h +++ b/ksirc/ksview.h @@ -29,41 +29,41 @@ class KSircView : public KSirc::TextView { Q_OBJECT public: - KSircView(KSircProcess *proc, QWidget *parent, const char *name); + KSircView(KSircProcess *proc, TQWidget *parent, const char *name); virtual ~KSircView(); virtual void clear(); // returns the plain-text string added (for logging) - QString addLine(const QString &pixmap, const QColor &color, const QString &text); - void addRichText(const QString &_text); + TQString addLine(const TQString &pixmap, const TQColor &color, const TQString &text); + void addRichText(const TQString &_text); void enableTimeStamps(bool enable); void setAcceptFiles(bool _acceptFiles) { m_acceptFiles = _acceptFiles; } signals: - void urlsDropped(const QStringList&); - void textDropped(const QString&); + void urlsDropped(const TQStringList&); + void textDropped(const TQString&); protected: - virtual void contentsDragEnterEvent(QDragEnterEvent *); - virtual void contentsDragMoveEvent(QDragMoveEvent *); - virtual void contentsDropEvent(QDropEvent *); + virtual void contentsDragEnterEvent(TQDragEnterEvent *); + virtual void contentsDragMoveEvent(TQDragMoveEvent *); + virtual void contentsDropEvent(TQDropEvent *); private: virtual bool linksEnabled() const { return true; } - void openBrowser( const QString &url ); - void copyLinkToClipboard( const QString &url ); - static QString makeTimeStamp(); + void openBrowser( const TQString &url ); + void copyLinkToClipboard( const TQString &url ); + static TQString makeTimeStamp(); - void saveURL( const QString &url ); + void saveURL( const TQString &url ); private slots: - void anchorClicked(const QMouseEvent *ev, const QString &url); + void anchorClicked(const TQMouseEvent *ev, const TQString &url); - QColor ircColor(int); + TQColor ircColor(int); private: int m_lines; - QStringList m_timeStamps; + TQStringList m_timeStamps; bool m_acceptFiles; bool m_timestamps; KSircProcess *m_proc; diff --git a/ksirc/logfile.cpp b/ksirc/logfile.cpp index 6a15e51e..2246cd30 100644 --- a/ksirc/logfile.cpp +++ b/ksirc/logfile.cpp @@ -9,12 +9,12 @@ #include <assert.h> -#include <qdir.h> +#include <tqdir.h> #include <kstandarddirs.h> -LogFile::LogFile( const QString &channel, const QString &server ) - : m_channel( channel ), m_server( server ), m_file( new QFile() ), +LogFile::LogFile( const TQString &channel, const TQString &server ) + : m_channel( channel ), m_server( server ), m_file( new TQFile() ), m_flushTimerId( -1 ) { } @@ -39,16 +39,16 @@ void LogFile::open() assert( m_file->isOpen() == true ); - log( QString::fromLatin1( "### Log session started at " ) - + QDateTime::currentDateTime().toString() - + QString::fromLatin1( "###\n" ) ); + log( TQString::fromLatin1( "### Log session started at " ) + + TQDateTime::currentDateTime().toString() + + TQString::fromLatin1( "###\n" ) ); } void LogFile::closeLog() { - log( QString::fromLatin1( "### Log session terminated at " ) - + QDateTime::currentDateTime().toString() - + QString::fromLatin1( "###\n" ) ); + log( TQString::fromLatin1( "### Log session terminated at " ) + + TQDateTime::currentDateTime().toString() + + TQString::fromLatin1( "###\n" ) ); if ( m_flushTimerId != -1 ) killTimer( m_flushTimerId ); @@ -56,7 +56,7 @@ void LogFile::closeLog() m_file->close(); } -void LogFile::log( const QString &message ) +void LogFile::log( const TQString &message ) { m_file->writeBlock( message.local8Bit(), message.length() ); @@ -64,7 +64,7 @@ void LogFile::log( const QString &message ) m_flushTimerId = startTimer( 60000 ); // flush each minute } -void LogFile::timerEvent( QTimerEvent * ) +void LogFile::timerEvent( TQTimerEvent * ) { if ( m_file ) m_file->flush(); @@ -73,12 +73,12 @@ void LogFile::timerEvent( QTimerEvent * ) m_flushTimerId = -1; } -QString LogFile::makeLogFileName( const QString &channel, const QString &server, int suffix ) +TQString LogFile::makeLogFileName( const TQString &channel, const TQString &server, int suffix ) { - QString res = channel + '_'; + TQString res = channel + '_'; - QDate dt = QDate::currentDate(); - QString dateStr; + TQDate dt = TQDate::currentDate(); + TQString dateStr; dateStr.sprintf( "%.4d_%.2d_%.2d_", dt.year(), dt.month(), dt.day() ); res += dateStr; @@ -87,7 +87,7 @@ QString LogFile::makeLogFileName( const QString &channel, const QString &server, res += ".log"; if ( suffix > -1 ) - res += '.' + QString::number( suffix ); + res += '.' + TQString::number( suffix ); return locateLocal( "appdata", "logs/" + res ); } diff --git a/ksirc/logfile.h b/ksirc/logfile.h index 337b9912..1a343728 100644 --- a/ksirc/logfile.h +++ b/ksirc/logfile.h @@ -7,34 +7,34 @@ #ifndef __logfile_h__ #define __logfile_h__ -#include <qobject.h> +#include <tqobject.h> class QFile; class LogFile : public QObject { public: - LogFile( const QString &channel, const QString &server ); + LogFile( const TQString &channel, const TQString &server ); virtual ~LogFile(); void open(); void closeLog(); - void log( const QString &message ); + void log( const TQString &message ); protected: - virtual void timerEvent( QTimerEvent * ); + virtual void timerEvent( TQTimerEvent * ); private: - QString m_channel; - QString m_server; + TQString m_channel; + TQString m_server; - QFile *m_file; + TQFile *m_file; int m_flushTimerId; - QString makeLogFileName( const QString &channel, const QString &server, int suffix = -1 ); + TQString makeLogFileName( const TQString &channel, const TQString &server, int suffix = -1 ); }; #endif diff --git a/ksirc/mditoplevel.cpp b/ksirc/mditoplevel.cpp index 3f35d464..73c464c3 100644 --- a/ksirc/mditoplevel.cpp +++ b/ksirc/mditoplevel.cpp @@ -1,7 +1,7 @@ -#include <qguardedptr.h> +#include <tqguardedptr.h> -#include <qtabbar.h> +#include <tqtabbar.h> #include <kapplication.h> #include <kiconloader.h> @@ -17,11 +17,11 @@ #define ID_CLOSE 5 -void KSTabWidget::mousePressEvent(QMouseEvent *e) +void KSTabWidget::mousePressEvent(TQMouseEvent *e) { if(e->button() == RightButton){ - QPoint p = tabBar()->mapFromParent(e->pos()); - QTab *tab = tabBar()->selectTab(p); + TQPoint p = tabBar()->mapFromParent(e->pos()); + TQTab *tab = tabBar()->selectTab(p); if(tab){ int id = tab->identifier(); emit showContexMenu(page(id), tabBar()->mapToGlobal(p)); @@ -29,32 +29,32 @@ void KSTabWidget::mousePressEvent(QMouseEvent *e) } } -MDITopLevel::MDITopLevel(QWidget *parent, const char *name) +MDITopLevel::MDITopLevel(TQWidget *parent, const char *name) : KMainWindow(parent, name) { m_closing = false; m_tab = new KSTabWidget( this ); - m_tab->setTabPosition( QTabWidget::Bottom ); + m_tab->setTabPosition( TQTabWidget::Bottom ); setCentralWidget( m_tab ); - connect( m_tab, SIGNAL( currentChanged( QWidget * ) ), - this, SLOT( slotCurrentChanged( QWidget * ) ) ); + connect( m_tab, TQT_SIGNAL( currentChanged( TQWidget * ) ), + this, TQT_SLOT( slotCurrentChanged( TQWidget * ) ) ); - connect( m_tab, SIGNAL( showContexMenu(QWidget *, const QPoint &) ), - this, SLOT( slotShowContexMenu(QWidget *, const QPoint &) ) ); + connect( m_tab, TQT_SIGNAL( showContexMenu(TQWidget *, const TQPoint &) ), + this, TQT_SLOT( slotShowContexMenu(TQWidget *, const TQPoint &) ) ); KConfig *config = kapp->config(); config->setGroup("MDI"); - QSize s( 600, 360 ); + TQSize s( 600, 360 ); resize(config->readSizeEntry( "TopLevelSize", &s )); m_dirtyIcon = UserIcon( "star" ); m_addressedIcon = UserIcon( "info" ); m_pop = new KPopupMenu(m_tab, ""); - m_pop->insertItem( SmallIcon("fileclose"), i18n("Close"), this, SLOT( slotCloseLastWid() )); + m_pop->insertItem( SmallIcon("fileclose"), i18n("Close"), this, TQT_SLOT( slotCloseLastWid() )); } @@ -67,21 +67,21 @@ MDITopLevel::~MDITopLevel() config->writeEntry( "TopLevelSize", this->size() ); config->sync(); - QPtrListIterator<QWidget> it( m_tabWidgets ); + TQPtrListIterator<TQWidget> it( m_tabWidgets ); for (; it.current(); ++it ) it.current()->disconnect( this, 0 ); kdDebug(5008) << "~MDITopLevel out" << endl; } -void MDITopLevel::addWidget( QWidget *widget, bool show ) +void MDITopLevel::addWidget( TQWidget *widget, bool show ) { if ( m_tabWidgets.containsRef( widget ) ) return; kdDebug(5008) << "In add widget" << endl; - widget->reparent( m_tab, 0, QPoint( 0, 0 ), show ); + widget->reparent( m_tab, 0, TQPoint( 0, 0 ), show ); if(show == TRUE){ showWidget(widget); @@ -89,19 +89,19 @@ void MDITopLevel::addWidget( QWidget *widget, bool show ) m_tabWidgets.append( widget ); - connect( widget, SIGNAL( destroyed() ) , - this, SLOT( slotWidgetDestroyed() ) ); + connect( widget, TQT_SIGNAL( destroyed() ) , + this, TQT_SLOT( slotWidgetDestroyed() ) ); - connect( widget, SIGNAL( changeChannel( const QString &, const QString & ) ), - this, SLOT( slotChangeChannelName( const QString &, const QString & ) ) ); + connect( widget, TQT_SIGNAL( changeChannel( const TQString &, const TQString & ) ), + this, TQT_SLOT( slotChangeChannelName( const TQString &, const TQString & ) ) ); widget->installEventFilter( this ); - connect( widget, SIGNAL( changed( bool, QString ) ), - this, SLOT( slotMarkPageDirty( bool ) ) ); + connect( widget, TQT_SIGNAL( changed( bool, TQString ) ), + this, TQT_SLOT( slotMarkPageDirty( bool ) ) ); } -void MDITopLevel::removeWidget( QWidget *widget ) +void MDITopLevel::removeWidget( TQWidget *widget ) { if (m_closing) return; @@ -112,17 +112,17 @@ void MDITopLevel::removeWidget( QWidget *widget ) widget->disconnect( this, 0 ); } -void MDITopLevel::hideWidget( QWidget *widget ) +void MDITopLevel::hideWidget( TQWidget *widget ) { m_tab->removePage( widget ); widget->hide(); } -void MDITopLevel::showWidget( QWidget *widget ) +void MDITopLevel::showWidget( TQWidget *widget ) { if(m_tab->indexOf(widget) == -1){ int space = widget->caption().find(" "); - QString cap = space < 1 ? widget->caption():widget->caption().left(space); + TQString cap = space < 1 ? widget->caption():widget->caption().left(space); m_tab->addTab( widget, cap); m_tab->showPage( widget ); m_tab->setCurrentPage( m_tab->indexOf(widget) ); @@ -145,7 +145,7 @@ void MDITopLevel::previous() m_tab->setCurrentPage(m_tab->count() - 1); } -void MDITopLevel::closeEvent( QCloseEvent *ev ) +void MDITopLevel::closeEvent( TQCloseEvent *ev ) { m_closing = true; // Don't use iterators on a list while deleting elements @@ -154,11 +154,11 @@ void MDITopLevel::closeEvent( QCloseEvent *ev ) kdDebug(5008) << "Mdi got close event " << endl; while ( m_tabWidgets.count() && (i++ < 100000)) { kdDebug(5008) << "MDITopLevel trying to close: " << m_tabWidgets.first()->name() << endl; - QGuardedPtr<QWidget> w = m_tabWidgets.take(0); + TQGuardedPtr<TQWidget> w = m_tabWidgets.take(0); w->show(); w->close( false ); if(w) - delete (QWidget *)w; + delete (TQWidget *)w; } KMainWindow::closeEvent( ev ); @@ -167,18 +167,18 @@ void MDITopLevel::closeEvent( QCloseEvent *ev ) void MDITopLevel::slotWidgetDestroyed() { - const QWidget *widget = static_cast<const QWidget *>( sender() ); + const TQWidget *widget = static_cast<const TQWidget *>( sender() ); m_tabWidgets.removeRef( widget ); removeFromAddressedList( widget ); } -bool MDITopLevel::eventFilter( QObject *obj, QEvent *ev ) +bool MDITopLevel::eventFilter( TQObject *obj, TQEvent *ev ) { - if ( ev->type() != QEvent::CaptionChange ) + if ( ev->type() != TQEvent::CaptionChange ) return false; - QWidget *widget = dynamic_cast<QWidget *>( obj ); + TQWidget *widget = dynamic_cast<TQWidget *>( obj ); if ( !widget || !m_tabWidgets.containsRef( widget ) ) return false; @@ -189,13 +189,13 @@ bool MDITopLevel::eventFilter( QObject *obj, QEvent *ev ) return false; } -void MDITopLevel::slotCurrentChanged( QWidget *page ) +void MDITopLevel::slotCurrentChanged( TQWidget *page ) { - m_tab->setTabIconSet( page, QIconSet() ); + m_tab->setTabIconSet( page, TQIconSet() ); removeFromAddressedList( page ); - setPlainCaption( page->QWidget::caption() ); + setPlainCaption( page->TQWidget::caption() ); KSircTopLevel *kst = dynamic_cast<KSircTopLevel *>( page ); if ( !kst ) @@ -207,7 +207,7 @@ void MDITopLevel::slotMarkPageDirty( bool addressed ) { // This is called when a line appeared in this channel. // addressed is true if it was addressed to the user - KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<QObject *>( sender() ) ); + KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<TQObject *>( sender() ) ); if ( !window ) return; @@ -223,27 +223,27 @@ void MDITopLevel::slotMarkPageDirty( bool addressed ) } } -void MDITopLevel::slotChangeChannelName( const QString &, const QString &channelName ) +void MDITopLevel::slotChangeChannelName( const TQString &, const TQString &channelName ) { - KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<QObject *>( sender() ) ); + KMainWindow *window = dynamic_cast<KMainWindow *>( const_cast<TQObject *>( sender() ) ); if ( !window ) return; - QString esc = channelName; + TQString esc = channelName; esc.replace("&", "&&"); m_tab->setTabLabel( window, esc ); removeFromAddressedList( window ); } -void MDITopLevel::removeFromAddressedList( const QWidget* w ) +void MDITopLevel::removeFromAddressedList( const TQWidget* w ) { // If this tab was showing a "you're being talked to" icon, remove it // and tell the servercontroller (so that it can update the docked icon). m_addressed.removeRef( w ); } -void MDITopLevel::slotShowContexMenu(QWidget *w, const QPoint &p) +void MDITopLevel::slotShowContexMenu(TQWidget *w, const TQPoint &p) { m_last_pop_wid = w; m_pop->popup(p); diff --git a/ksirc/mditoplevel.h b/ksirc/mditoplevel.h index 7f58619c..c0f1c010 100644 --- a/ksirc/mditoplevel.h +++ b/ksirc/mditoplevel.h @@ -1,8 +1,8 @@ #ifndef __mditoplevel_h__ #define __mditoplevel_h__ -#include <qptrlist.h> -#include <qtabwidget.h> +#include <tqptrlist.h> +#include <tqtabwidget.h> #include <kmainwindow.h> @@ -10,16 +10,16 @@ class KSTabWidget : public QTabWidget { Q_OBJECT public: - KSTabWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) - : QTabWidget(parent, name, f) + KSTabWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) + : TQTabWidget(parent, name, f) { } protected: - virtual void mousePressEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); signals: - void showContexMenu(QWidget *, const QPoint &); + void showContexMenu(TQWidget *, const TQPoint &); }; @@ -30,45 +30,45 @@ class MDITopLevel : public KMainWindow { Q_OBJECT public: - MDITopLevel(QWidget *parent = 0, const char *name = 0); + MDITopLevel(TQWidget *parent = 0, const char *name = 0); virtual ~MDITopLevel(); - void addWidget( QWidget *widget, bool show ); + void addWidget( TQWidget *widget, bool show ); - void removeWidget( QWidget *widget ); + void removeWidget( TQWidget *widget ); - QTabWidget *tabWidget() const { return m_tab; } + TQTabWidget *tabWidget() const { return m_tab; } void next(); void previous(); - QPtrList<QWidget> &widgets() { return m_tabWidgets; } + TQPtrList<TQWidget> &widgets() { return m_tabWidgets; } - void hideWidget( QWidget *widget ); - void showWidget( QWidget *widget ); + void hideWidget( TQWidget *widget ); + void showWidget( TQWidget *widget ); - virtual bool eventFilter( QObject *obj, QEvent *ev ); + virtual bool eventFilter( TQObject *obj, TQEvent *ev ); bool closing() const { return m_closing; } protected: - void removeFromAddressedList( const QWidget* w ); - virtual void closeEvent( QCloseEvent *ev ); + void removeFromAddressedList( const TQWidget* w ); + virtual void closeEvent( TQCloseEvent *ev ); private slots: void slotWidgetDestroyed(); - void slotCurrentChanged( QWidget *page ); + void slotCurrentChanged( TQWidget *page ); void slotMarkPageDirty( bool ); - void slotChangeChannelName( const QString &, const QString &newName ); - void slotShowContexMenu(QWidget *, const QPoint &); + void slotChangeChannelName( const TQString &, const TQString &newName ); + void slotShowContexMenu(TQWidget *, const TQPoint &); void slotCloseLastWid(); private: KSTabWidget *m_tab; KPopupMenu *m_pop; - QWidget *m_last_pop_wid; - QPtrList<QWidget> m_tabWidgets; - QPtrList<QWidget> m_addressed; - QPixmap m_dirtyIcon; - QPixmap m_addressedIcon; + TQWidget *m_last_pop_wid; + TQPtrList<TQWidget> m_tabWidgets; + TQPtrList<TQWidget> m_addressed; + TQPixmap m_dirtyIcon; + TQPixmap m_addressedIcon; bool m_closing; }; diff --git a/ksirc/messageReceiver.cpp b/ksirc/messageReceiver.cpp index f2ac6ee0..e60d82e3 100644 --- a/ksirc/messageReceiver.cpp +++ b/ksirc/messageReceiver.cpp @@ -1,6 +1,6 @@ #include "messageReceiver.h" -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kcharsets.h> #include <kglobal.h> #include <kdebug.h> @@ -36,7 +36,7 @@ UnicodeMessageReceiver::UnicodeMessageReceiver( KSircProcess *process ) { } -void UnicodeMessageReceiver::sirc_receive( QCString str, bool broadcast ) +void UnicodeMessageReceiver::sirc_receive( TQCString str, bool broadcast ) { assert( encoder() ); //kdDebug(5008) << "Encoder: " << encoder()->name() << endl; @@ -44,23 +44,23 @@ void UnicodeMessageReceiver::sirc_receive( QCString str, bool broadcast ) sirc_receive( encoder()->toUnicode( str ), broadcast ); } -void UnicodeMessageReceiver::setEncoding( const QString &encoding ) +void UnicodeMessageReceiver::setEncoding( const TQString &encoding ) { m_encoding = encoding; m_encoder = 0; } -QString UnicodeMessageReceiver::encoding() const +TQString UnicodeMessageReceiver::encoding() const { if ( m_encoding.isEmpty() ) - return QTextCodec::codecForLocale()->mimeName(); + return TQTextCodec::codecForLocale()->mimeName(); return m_encoding; } -QTextCodec *UnicodeMessageReceiver::encoder() const +TQTextCodec *UnicodeMessageReceiver::encoder() const { if ( m_encoding.isEmpty() ) { - return QTextCodec::codecForLocale(); + return TQTextCodec::codecForLocale(); } if ( !m_encoder ) { diff --git a/ksirc/messageReceiver.h b/ksirc/messageReceiver.h index a86817b0..e70e82f3 100644 --- a/ksirc/messageReceiver.h +++ b/ksirc/messageReceiver.h @@ -2,8 +2,8 @@ #ifndef KMESSAGERECEIVER_H #define KMESSAGERECEIVER_H -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class KSircProcess; class QTextCodec; @@ -15,7 +15,7 @@ struct filterRule { const char *to; }; -typedef QPtrList<filterRule> filterRuleList; +typedef TQPtrList<filterRule> filterRuleList; class KSircMessageReceiver { @@ -23,9 +23,9 @@ public: KSircMessageReceiver(KSircProcess *_proc); virtual ~KSircMessageReceiver(); - virtual void sirc_receive(QCString str, bool broadcast = false) = 0; + virtual void sirc_receive(TQCString str, bool broadcast = false) = 0; - virtual void control_message(int, QString) = 0; + virtual void control_message(int, TQString) = 0; bool getBroadcast(); void setBroadcast(bool bd); @@ -45,18 +45,18 @@ class UnicodeMessageReceiver : public KSircMessageReceiver public: UnicodeMessageReceiver( KSircProcess *process ); - virtual void sirc_receive(QCString str, bool broadcast = false); - virtual void sirc_receive(QString str, bool broadcast = false) = 0; + virtual void sirc_receive(TQCString str, bool broadcast = false); + virtual void sirc_receive(TQString str, bool broadcast = false) = 0; protected: - void setEncoding( const QString &encoding ); - QString encoding() const; + void setEncoding( const TQString &encoding ); + TQString encoding() const; - QTextCodec *encoder() const; + TQTextCodec *encoder() const; private: - QString m_encoding; - QTextCodec *m_encoder; + TQString m_encoding; + TQTextCodec *m_encoder; }; #endif diff --git a/ksirc/nickColourMaker.cpp b/ksirc/nickColourMaker.cpp index b3f793a6..ce866349 100644 --- a/ksirc/nickColourMaker.cpp +++ b/ksirc/nickColourMaker.cpp @@ -18,9 +18,9 @@ // $Id$ -#include <qstring.h> -#include <qcolor.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqregexp.h> #include <kdebug.h> #include "nickColourMaker.h" @@ -33,7 +33,7 @@ nickColourMaker::nickColourMaker() s_ncm = this; } -int nickColourMaker::findIdx(QString nick) const +int nickColourMaker::findIdx(TQString nick) const { unsigned int value = 0; uint i; @@ -71,7 +71,7 @@ int nickColourMaker::findIdx(QString nick) const } -QColor nickColourMaker::findFg(QString nick) const +TQColor nickColourMaker::findFg(TQString nick) const { int value = findIdx(nick); diff --git a/ksirc/nickColourMaker.h b/ksirc/nickColourMaker.h index 239a7935..ab3593fd 100644 --- a/ksirc/nickColourMaker.h +++ b/ksirc/nickColourMaker.h @@ -7,10 +7,10 @@ #ifndef __nickcolourmaker_h__ #define __nickcolourmaker_h__ -#include <qdict.h> -#include <qstring.h> -#include <qmap.h> -#include <qcolor.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqcolor.h> #include "ksopts.h" struct nickColourInfo @@ -26,9 +26,9 @@ class nickColourMaker public: nickColourMaker(); - int findIdx(QString nick) const; - QColor findFg(QString nick) const; - QColor operator[]( QString nick ) const + int findIdx(TQString nick) const; + TQColor findFg(TQString nick) const; + TQColor operator[]( TQString nick ) const { return findFg(nick); } @@ -38,7 +38,7 @@ public: private: static nickColourMaker *s_ncm; - QDict<nickColourInfo> m_nicks; + TQDict<nickColourInfo> m_nicks; }; #endif diff --git a/ksirc/objFinder.cpp b/ksirc/objFinder.cpp index 4625b6cf..5988903d 100644 --- a/ksirc/objFinder.cpp +++ b/ksirc/objFinder.cpp @@ -1,15 +1,15 @@ #include "objFinder.h" -#include <qapplication.h> -#include <qobjectlist.h> -#include <qwidgetlist.h> +#include <tqapplication.h> +#include <tqobjectlist.h> +#include <tqwidgetlist.h> #include <stdlib.h> #include <time.h> #include <kdebug.h> -QDict<QObject> *objFinder::objList = new QDict<QObject>; +TQDict<TQObject> *objFinder::objList = new TQDict<TQObject>; /* * So we can connect to the slots, etc @@ -17,7 +17,7 @@ QDict<QObject> *objFinder::objList = new QDict<QObject>; objFinder *objFind = new objFinder(); objFinder::objFinder() - : QObject() + : TQObject() { } @@ -25,8 +25,8 @@ objFinder::~objFinder() { } -void objFinder::insert(QObject *obj, const char *key){ - QString name; +void objFinder::insert(TQObject *obj, const char *key){ + TQString name; if(obj == 0x0){ qWarning("objFinder: Passed Null Object"); @@ -43,22 +43,22 @@ void objFinder::insert(QObject *obj, const char *key){ } } objList->insert(name, obj); - connect(obj, SIGNAL(destroyed()), - objFind, SLOT(objDest())); + connect(obj, TQT_SIGNAL(destroyed()), + objFind, TQT_SLOT(objDest())); emit objFind->inserted(obj); } -QObject *objFinder::find(const char *name, const char *inherits){ - QObject *found; - QDictIterator<QObject> it(*objList); +TQObject *objFinder::find(const char *name, const char *inherits){ + TQObject *found; + TQDictIterator<TQObject> it(*objList); uint len = strlen(name); while(it.current()){ if(len == strlen(it.current()->name()) && strcmp(it.current()->name(), name) == 0) return it.current(); - QObjectList *qobl = it.current()->queryList(inherits, name, FALSE); - QObjectListIt itql( *qobl ); + TQObjectList *qobl = it.current()->queryList(inherits, name, FALSE); + TQObjectListIt itql( *qobl ); if(itql.current() != 0x0){ found = itql.current(); delete qobl; @@ -67,8 +67,8 @@ QObject *objFinder::find(const char *name, const char *inherits){ delete qobl; ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ if(len == strlen(itW.current()->name()) && strcmp(itW.current()->name(), name) == 0){ @@ -88,13 +88,13 @@ QObject *objFinder::find(const char *name, const char *inherits){ } void objFinder::dumpTree(){ - QDictIterator<QObject> it(*objList); + TQDictIterator<TQObject> it(*objList); while(it.current()){ it.current()->dumpObjectTree(); ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ kdDebug(5008) << itW.current()->className() << "::" << itW.current()->name("unnamed") << endl; ++itW; @@ -102,14 +102,14 @@ void objFinder::dumpTree(){ } -QStringList objFinder::allObjects(){ - QStringList allNames; - QDictIterator<QObject> it(*objList); +TQStringList objFinder::allObjects(){ + TQStringList allNames; + TQDictIterator<TQObject> it(*objList); while(it.current()){ - QObjectList *qobl = it.current()->queryList(); // Matches everything - QObjectListIt itql( *qobl ); + TQObjectList *qobl = it.current()->queryList(); // Matches everything + TQObjectListIt itql( *qobl ); while(itql.current()){ - QString name; + TQString name; name = itql.current()->className(); name += "::"; name += itql.current()->name("unnamed"); @@ -119,10 +119,10 @@ QStringList objFinder::allObjects(){ delete qobl; ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ - QString name; + TQString name; name = itW.current()->className(); name += "::"; name += itW.current()->name("unnamed"); @@ -133,9 +133,9 @@ QStringList objFinder::allObjects(){ return allNames; } -QString objFinder::randString(){ +TQString objFinder::randString(){ static bool runSrand = 0; - QString str = ""; + TQString str = ""; if(runSrand == 0){ srand(time(NULL)); } @@ -149,7 +149,7 @@ void objFinder::objDest(){ if(sender() == 0x0){ return; } - QDictIterator<QObject> it(*objList); + TQDictIterator<TQObject> it(*objList); while(it.current()){ if(it.current() == sender()){ objList->remove(it.currentKey()); diff --git a/ksirc/objFinder.h b/ksirc/objFinder.h index 8777dd68..f4f6fbd2 100644 --- a/ksirc/objFinder.h +++ b/ksirc/objFinder.h @@ -1,24 +1,24 @@ #ifndef OBJFINGER_H #define OBJFINGER_H -#include <qobject.h> -#include <qdict.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqdict.h> +#include <tqstringlist.h> -class objFinder : public QObject { +class objFinder : public TQObject { Q_OBJECT public: objFinder(); virtual ~objFinder(); - static void insert(QObject *obj, const char *key = 0); - static QObject *find(const char *name, const char *inherits); + static void insert(TQObject *obj, const char *key = 0); + static TQObject *find(const char *name, const char *inherits); static void dumpTree(); - static QStringList allObjects(); + static TQStringList allObjects(); signals: - void inserted(QObject *obj); + void inserted(TQObject *obj); protected slots: void objDest(); @@ -28,10 +28,10 @@ private: * Don't allow the object to be created, all it's members are static */ - static QString randString(); + static TQString randString(); - static QDict<QObject> *objList; + static TQDict<TQObject> *objList; }; diff --git a/ksirc/puke/commands.h b/ksirc/puke/commands.h index 3e45d8ba..50ff88b2 100644 --- a/ksirc/puke/commands.h +++ b/ksirc/puke/commands.h @@ -166,7 +166,7 @@ // cArg: not defined #define PUKE_WIDGET_RESIZE_ACK -1015 -// -1020 to -1040 defines QEvent types +// -1020 to -1040 defines TQEvent types // All arguments are 0 unless otherwise stated #define PUKE_WIDGET_EVENT_NONE -1020 // iArg: timerId @@ -347,7 +347,7 @@ // cArg: 0 #define PUKE_WIDGET_RECREATE_ACK -1091 -// QFrame gets 1100 +// TQFrame gets 1100 // 1100 defines QFrame // Desc: set Frame style @@ -587,11 +587,11 @@ // cArg: not defined #define PUKE_KSPROGRESS_CANCEL_ACK -1425 -// QTable View at 1500 +// TQTable View at 1500 // none yet -// QListBox at 1600 +// TQListBox at 1600 // Desc: insert string item // iWinId: window id @@ -935,7 +935,7 @@ // OBJECT base class #define PWIDGET_OBJECT 1 -// WIDGET defines a base QWidget class +// WIDGET defines a base TQWidget class #define PWIDGET_WIDGET 2 // FRAME defines a base class diff --git a/ksirc/puke/controller.cpp b/ksirc/puke/controller.cpp index 1e798be7..04017529 100644 --- a/ksirc/puke/controller.cpp +++ b/ksirc/puke/controller.cpp @@ -16,7 +16,7 @@ using namespace std; // iostream.h include cstring which puts strlen into // std:: namespace, which breaks Qt's strlen() call - // in qcstring.h (in gcc3's libstdc++) + // in tqcstring.h (in gcc3's libstdc++) #include <klibloader.h> #include <kdebug.h> @@ -50,7 +50,7 @@ using namespace std; // iostream.h include cstring which puts strlen into uint PukeController::uiBaseWinId = 10; // Gives a little seperation from the controller id -PukeController::PukeController(QString sock, QObject *parent, const char *name) : PObject( parent, name ) +PukeController::PukeController(TQString sock, TQObject *parent, const char *name) : PObject( parent, name ) { int len, prev_umask; struct sockaddr_un unix_addr; @@ -102,12 +102,12 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name) fcntl(iListenFd, F_SETFL, O_NONBLOCK); // Set it non-block so that // accept() never blocks. - qsnListen = new QSocketNotifier(iListenFd, QSocketNotifier::Read, this, QString(name) + "_iListen"); - connect(qsnListen, SIGNAL(activated(int)), - this, SLOT(NewConnect(int))); + qsnListen = new TQSocketNotifier(iListenFd, TQSocketNotifier::Read, this, TQString(name) + "_iListen"); + connect(qsnListen, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(NewConnect(int))); - connect(objFind, SIGNAL(inserted(QObject *)), - this, SLOT(slotInserted(QObject *))); + connect(objFind, TQT_SIGNAL(inserted(TQObject *)), + this, TQT_SLOT(slotInserted(TQObject *))); qidConnectFd.setAutoDelete(TRUE); @@ -124,8 +124,8 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name) * Connect outputMessage to the acutal write buffer function * outputMessage signals from pobjects are chained until they finally reach us. */ - connect(this, SIGNAL(outputMessage(int, PukeMessage *)), - this, SLOT(writeBuffer(int, PukeMessage *))); + connect(this, TQT_SIGNAL(outputMessage(int, PukeMessage *)), + this, TQT_SLOT(writeBuffer(int, PukeMessage *))); initHdlr(); // Setup message command handlers. @@ -142,7 +142,7 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name) } void -PukeController::slotInserted(QObject *obj) +PukeController::slotInserted(TQObject *obj) { emit inserted(obj); } @@ -154,7 +154,7 @@ PukeController::~PukeController() unlink(qsPukeSocket); } -QStrList PukeController::allObjects() +TQStrList PukeController::allObjects() { return objFinder::allObjects(); } @@ -174,12 +174,12 @@ void PukeController::NewConnect(int) // cfd() never blocks. fdStatus *fds = new fdStatus(); - fds->sr = new QSocketNotifier(cfd, QSocketNotifier::Read, this); - fds->sw = new QSocketNotifier(cfd, QSocketNotifier::Write, this); - connect(fds->sr, SIGNAL(activated(int)), - this, SLOT(Traffic(int))); - connect(fds->sw, SIGNAL(activated(int)), - this, SLOT(Writeable(int))); + fds->sr = new TQSocketNotifier(cfd, TQSocketNotifier::Read, this); + fds->sw = new TQSocketNotifier(cfd, TQSocketNotifier::Write, this); + connect(fds->sr, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(Traffic(int))); + connect(fds->sw, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(Writeable(int))); qidConnectFd.insert(cfd, fds); qsnListen->setEnabled(TRUE); @@ -350,7 +350,7 @@ void PukeController::Traffic(int fd) } -void PukeController::ServMessage(QString, int, QString) +void PukeController::ServMessage(TQString, int, TQString) { } @@ -585,7 +585,7 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm) // Let's go looking for the widget // Match any class with the right name - QObject *obj = 0x0; + TQObject *obj = 0x0; if(parent() && (strcmp(name, parent()->name()) == 0)){ obj = parent(); } @@ -609,8 +609,8 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm) } ws->type = iType; - connect(ws->pwidget, SIGNAL(outputMessage(int, PukeMessage*)), - this, SIGNAL(outputMessage(int, PukeMessage*))); + connect(ws->pwidget, TQT_SIGNAL(outputMessage(int, PukeMessage*)), + this, TQT_SIGNAL(outputMessage(int, PukeMessage*))); // insertPBoject(fd, uiBaseWinId, ws); // The widget list has to exist since we have ourselves in the list @@ -637,7 +637,7 @@ void PukeController::hdlrPukeDeleteWidget(int fd, PukeMessage *pm) throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_CONTROL)); /* - QIntDict<WidgetS> *qidWS = WidgetList[fd]; + TQIntDict<WidgetS> *qidWS = WidgetList[fd]; if(qidWS == 0){ kdDebug(5008) << "WidgetRunner:: no such set of widget descriptors?" << endl; throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_SUCH_CONNECTION)); @@ -691,7 +691,7 @@ void PukeController::closefd(int fd) /* * Now let's remove all traces of the widgets */ - QIntDict<WidgetS> *qidWS = WidgetList[fd]; + TQIntDict<WidgetS> *qidWS = WidgetList[fd]; if(qidWS == 0){ kdDebug(5008) << "WidgetRunner:: Close called twice?" << endl; bClosing = FALSE; @@ -702,7 +702,7 @@ void PukeController::closefd(int fd) do { - QIntDictIterator<WidgetS> it(*qidWS); + TQIntDictIterator<WidgetS> it(*qidWS); if(it.count() == 0){ kdDebug(5008) << "WidgetRunner: nothing left to delete\n" << endl; break; @@ -778,7 +778,7 @@ PWidget *PukeController::id2pwidget(widgetId *pwi){ void PukeController::insertPObject(int fd, int iWinId, WidgetS *obj){ // If no widget list exists for this fd, create one if(WidgetList[fd] == NULL){ - QIntDict<WidgetS> *qidWS = new QIntDict<WidgetS>; + TQIntDict<WidgetS> *qidWS = new TQIntDict<WidgetS>; qidWS->setAutoDelete(TRUE); WidgetList.insert(fd, qidWS); } @@ -796,8 +796,8 @@ void PukeController::insertPObject(int fd, int iWinId, WidgetS *obj){ // Now connect to the destroyed signal so we can remove the object from the lists // Once it is deleted - connect(obj->pwidget, SIGNAL(destroyed()), - this, SLOT(pobjectDestroyed())); + connect(obj->pwidget, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(pobjectDestroyed())); } void PukeController::pobjectDestroyed(){ @@ -868,7 +868,7 @@ void PukeController::messageHandler(int fd, PukeMessage *pm) { return; } - QString libName = "ksirc/lib"+QString::fromLatin1(pm->cArg); + TQString libName = "ksirc/lib"+TQString::fromLatin1(pm->cArg); if (libName.right(3) == ".so") libName = libName.left(libName.length()-2)+"la"; @@ -959,8 +959,8 @@ widgetId PukeController::createWidget(widgetId wI, PukeMessage *pm) } ws->type = iType; - connect(ws->pwidget, SIGNAL(outputMessage(int, PukeMessage*)), - this, SIGNAL(outputMessage(int, PukeMessage*))); + connect(ws->pwidget, TQT_SIGNAL(outputMessage(int, PukeMessage*)), + this, TQT_SIGNAL(outputMessage(int, PukeMessage*))); // insertPBoject(fd, uiBaseWinId, ws); // The widget list has to exist since we have ourselves in the list diff --git a/ksirc/puke/controller.h b/ksirc/puke/controller.h index 80728224..5daa1629 100644 --- a/ksirc/puke/controller.h +++ b/ksirc/puke/controller.h @@ -8,12 +8,12 @@ #ifndef PUKE_CONTROLLER_H #define PUKE_CONTROLLER_H -#include <qobject.h> -#include <qsocketnotifier.h> -#include <qstring.h> -#include <qdict.h> -#include <qintdict.h> -#include <qstrlist.h> +#include <tqobject.h> +#include <tqsocketnotifier.h> +#include <tqstring.h> +#include <tqdict.h> +#include <tqintdict.h> +#include <tqstrlist.h> #include "pmessage.h" #include "pobject.h" @@ -24,9 +24,9 @@ class PukeController; class KLibrary; typedef struct { - QString server; + TQString server; bool writeable; - QSocketNotifier *sr,*sw; + TQSocketNotifier *sr,*sw; } fdStatus; @@ -81,7 +81,7 @@ class PukeController : public PObject { Q_OBJECT public: - PukeController(QString socket = "", QObject *parent=0, const char *name=0); + PukeController(TQString socket = "", TQObject *parent=0, const char *name=0); virtual ~PukeController(); bool running; @@ -102,20 +102,20 @@ public: */ PWidget *id2pwidget(widgetId *pwi); - QStrList allObjects(); + TQStrList allObjects(); signals: - void PukeMessages(QString server, int command, QString args); - void inserted(QObject *); + void PukeMessages(TQString server, int command, TQString args); + void inserted(TQObject *); public slots: - void ServMessage(QString, int, QString); + void ServMessage(TQString, int, TQString); protected slots: void Traffic(int); void Writeable(int); void NewConnect(int); - void slotInserted(QObject *obj); + void slotInserted(TQObject *obj); /** * When we delete a widget, this removes it from our internal @@ -132,11 +132,11 @@ protected slots: private: - QString qsPukeSocket; + TQString qsPukeSocket; int iListenFd; bool bClosing; // Set true if we are closing, we don't try and close twice at the same time. - QSocketNotifier *qsnListen; - QIntDict<fdStatus> qidConnectFd; + TQSocketNotifier *qsnListen; + TQIntDict<fdStatus> qidConnectFd; /** * Controller ID is defined as 1 @@ -145,15 +145,15 @@ private: // List of widgets and the fle descriptors they belong too - QIntDict<QIntDict<WidgetS> > WidgetList; + TQIntDict<TQIntDict<WidgetS> > WidgetList; // I use a char * key that's the %p (hex address) of the pwidget - QDict<widgetId> revWidgetList; + TQDict<widgetId> revWidgetList; enum { keySize = 10 }; // Funtions used to create new widget - QIntDict<widgetCreate> widgetCF; // widgetCreatingFuntion List + TQIntDict<widgetCreate> widgetCF; // widgetCreatingFuntion List - QIntDict<commandStruct> qidCommandTable; + TQIntDict<commandStruct> qidCommandTable; void initHdlr(); @@ -181,11 +181,11 @@ private: /** * NOT APPLICAABLE */ - void setWidget(QObject *) { } + void setWidget(TQObject *) { } /** * NOT APPLICAABLE */ - virtual QObject *widget() { return 0x0; } + virtual TQObject *widget() { return 0x0; } /** * Inserts a PObject into our internal list diff --git a/ksirc/puke/palistbox.cpp b/ksirc/puke/palistbox.cpp index 8f3f22f1..9f43b124 100644 --- a/ksirc/puke/palistbox.cpp +++ b/ksirc/puke/palistbox.cpp @@ -13,7 +13,7 @@ PAListBox::createWidget(CreateArgs &ca) plb->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - lb = new aListBox((QWidget *) ca.parent->widget()); + lb = new aListBox((TQWidget *) ca.parent->widget()); else lb = new aListBox(); plb->setWidget(lb); @@ -123,7 +123,7 @@ void PAListBox::messageHandler(int fd, PukeMessage *pm) } } -void PAListBox::setWidget(QObject *_lb) +void PAListBox::setWidget(TQObject *_lb) { if(_lb != 0 && _lb->inherits("aListBox") == FALSE) { diff --git a/ksirc/puke/palistbox.h b/ksirc/puke/palistbox.h index 0731bef9..a902b018 100644 --- a/ksirc/puke/palistbox.h +++ b/ksirc/puke/palistbox.h @@ -19,7 +19,7 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_lb = 0x0); + virtual void setWidget(TQObject *_lb = 0x0); virtual aListBox *widget(); public slots: diff --git a/ksirc/puke/pbutton.cpp b/ksirc/puke/pbutton.cpp index 309f2ac7..edccbe81 100644 --- a/ksirc/puke/pbutton.cpp +++ b/ksirc/puke/pbutton.cpp @@ -1,7 +1,7 @@ #include <stdio.h> -#include <qpixmap.h> +#include <tqpixmap.h> #include <kdebug.h> @@ -11,11 +11,11 @@ PObject * PButton::createWidget(CreateArgs &ca) { PButton *pb = new PButton(ca.parent); - QButton *qb; + TQButton *qb; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qb = new QButton((QWidget *) ca.parent->widget()); + qb = new TQButton((TQWidget *) ca.parent->widget()); else - qb = new QButton(); + qb = new TQButton(); pb->setWidget(qb); pb->setWidgetId(ca.pwI); return pb; @@ -60,7 +60,7 @@ void PButton::messageHandler(int fd, PukeMessage *pm) if(checkWidget() == FALSE) return; - widget()->setPixmap(QPixmap(pm->cArg)); + widget()->setPixmap(TQPixmap(pm->cArg)); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -82,24 +82,24 @@ void PButton::messageHandler(int fd, PukeMessage *pm) } } -void PButton::setWidget(QObject *_qb) +void PButton::setWidget(TQObject *_qb) { - if(_qb != 0 && _qb->inherits("QButton") == FALSE) + if(_qb != 0 && _qb->inherits("TQButton") == FALSE) { errorInvalidSet(_qb); return; } - button = (QButton *) _qb; + button = (TQButton *) _qb; if(button != 0){ - connect(button, SIGNAL(pressed()), - this, SLOT(buttonPressed())); - connect(button, SIGNAL(released()), - this, SLOT(buttonReleased())); - connect(button, SIGNAL(clicked()), - this, SLOT(buttonClicked())); - connect(button, SIGNAL(toggled(bool)), - this, SLOT(buttonToggled(bool))); + connect(button, TQT_SIGNAL(pressed()), + this, TQT_SLOT(buttonPressed())); + connect(button, TQT_SIGNAL(released()), + this, TQT_SLOT(buttonReleased())); + connect(button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(buttonClicked())); + connect(button, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(buttonToggled(bool))); } PWidget::setWidget(_qb); @@ -107,7 +107,7 @@ void PButton::setWidget(QObject *_qb) } -QButton *PButton::widget() +TQButton *PButton::widget() { return button; } diff --git a/ksirc/puke/pbutton.h b/ksirc/puke/pbutton.h index e43bd681..addc7713 100644 --- a/ksirc/puke/pbutton.h +++ b/ksirc/puke/pbutton.h @@ -3,7 +3,7 @@ class PButton; -#include <qbutton.h> +#include <tqbutton.h> #include "pmessage.h" #include "pwidget.h" #include "pobject.h" @@ -21,8 +21,8 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_qb = 0x0); - virtual QButton *widget(); + virtual void setWidget(TQObject *_qb = 0x0); + virtual TQButton *widget(); public slots: void buttonPressed(); @@ -31,7 +31,7 @@ public slots: void buttonToggled(bool); private: - QButton *button; + TQButton *button; void buttonMessage(int iCommand); bool checkWidget(); diff --git a/ksirc/puke/pframe.cpp b/ksirc/puke/pframe.cpp index fcff1d96..d0dc79e3 100644 --- a/ksirc/puke/pframe.cpp +++ b/ksirc/puke/pframe.cpp @@ -5,12 +5,12 @@ PObject * PFrame::createWidget(CreateArgs &ca) { PFrame *pw = new PFrame(ca.parent); - QFrame *tf; + TQFrame *tf; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - tf = new QFrame((QWidget *) ca.parent->widget()); + tf = new TQFrame((TQWidget *) ca.parent->widget()); else - tf = new QFrame(); + tf = new TQFrame(); pw->setWidget(tf); pw->setWidgetId(ca.pwI); pw->setPukeController(ca.pc); @@ -61,20 +61,20 @@ void PFrame::messageHandler(int fd, PukeMessage *pm) } } -void PFrame::setWidget(QObject *w) +void PFrame::setWidget(TQObject *w) { - if(w != 0 && w->inherits("QFrame") == FALSE) + if(w != 0 && w->inherits("TQFrame") == FALSE) { errorInvalidSet(w); return; } - frame = (QFrame *) w; - PWidget::setWidget((QWidget *) w); + frame = (TQFrame *) w; + PWidget::setWidget((TQWidget *) w); } -QFrame *PFrame::widget() +TQFrame *PFrame::widget() { // kdDebug(5008) << "PFrame widget called" << endl; return frame; diff --git a/ksirc/puke/pframe.h b/ksirc/puke/pframe.h index e98750aa..8d7fbc82 100644 --- a/ksirc/puke/pframe.h +++ b/ksirc/puke/pframe.h @@ -3,7 +3,7 @@ class PFrame; -#include <qframe.h> +#include <tqframe.h> #include "pmessage.h" #include "pwidget.h" @@ -18,11 +18,11 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *w = 0x0); - virtual QFrame *widget(); + virtual void setWidget(TQObject *w = 0x0); + virtual TQFrame *widget(); private: - QFrame *frame; + TQFrame *frame; }; #endif diff --git a/ksirc/puke/pkfiledialog.cpp b/ksirc/puke/pkfiledialog.cpp index c99aea9f..f78ae895 100644 --- a/ksirc/puke/pkfiledialog.cpp +++ b/ksirc/puke/pkfiledialog.cpp @@ -16,7 +16,7 @@ PKFileDialog::createWidget(CreateArgs &ca) pw->setDeleteAble(FALSE); } else // Never takes a parent in Puke - kfbd = new KFileDialog("/", QString::null, 0L, "PukeKFileDialog", TRUE); + kfbd = new KFileDialog("/", TQString::null, 0L, "PukeKFileDialog", TRUE); pw->setWidget(kfbd); pw->setWidgetId(ca.pwI); return pw; @@ -42,7 +42,7 @@ PKFileDialog::~PKFileDialog() void PKFileDialog::messageHandler(int fd, PukeMessage *pm) { - QString selFile; + TQString selFile; PukeMessage pmRet; if(widget() == 0){ kdDebug(5008) << "PKFileDialog: No Widget set" << endl; @@ -102,7 +102,7 @@ void PKFileDialog::messageHandler(int fd, PukeMessage *pm) } } -void PKFileDialog::setWidget(QObject *_kbfd) +void PKFileDialog::setWidget(TQObject *_kbfd) { if(_kbfd != 0 && _kbfd->inherits("KFileBaseDialog") == FALSE) { diff --git a/ksirc/puke/pkfiledialog.h b/ksirc/puke/pkfiledialog.h index c8dbea3f..dbfd7dd5 100644 --- a/ksirc/puke/pkfiledialog.h +++ b/ksirc/puke/pkfiledialog.h @@ -19,7 +19,7 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_f = 0x0); + virtual void setWidget(TQObject *_f = 0x0); virtual KFileDialog *widget(); public slots: diff --git a/ksirc/puke/plabel.cpp b/ksirc/puke/plabel.cpp index 17ca851d..4d2bba48 100644 --- a/ksirc/puke/plabel.cpp +++ b/ksirc/puke/plabel.cpp @@ -1,4 +1,4 @@ -#include <qmovie.h> +#include <tqmovie.h> #include <kdebug.h> @@ -9,15 +9,15 @@ PObject * PLabel::createWidget(CreateArgs &ca) { PLabel *pw = new PLabel(ca.parent); - QLabel *le; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QLabel") == TRUE){ - le = (QLabel *) ca.fetchedObj; + TQLabel *le; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQLabel") == TRUE){ + le = (TQLabel *) ca.fetchedObj; pw->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - le = new QLabel((QWidget *) ca.parent->widget()); + le = new TQLabel((TQWidget *) ca.parent->widget()); else - le = new QLabel((QWidget *)0L); + le = new TQLabel((TQWidget *)0L); pw->setWidget(le); pw->setWidgetId(ca.pwI); return pw; @@ -61,7 +61,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->setPixmap(QPixmap(pm->cArg)); + widget()->setPixmap(TQPixmap(pm->cArg)); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -72,7 +72,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->setMovie(QMovie(pm->cArg)); + widget()->setMovie(TQMovie(pm->cArg)); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -95,21 +95,21 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) } } -void PLabel::setWidget(QObject *_l) +void PLabel::setWidget(TQObject *_l) { - if(_l != 0 && _l->inherits("QLabel") == FALSE) + if(_l != 0 && _l->inherits("TQLabel") == FALSE) { errorInvalidSet(_l); return; } - label = (QLabel *) _l; + label = (TQLabel *) _l; PWidget::setWidget(_l); } -QLabel *PLabel::widget() +TQLabel *PLabel::widget() { return label; } diff --git a/ksirc/puke/plabel.h b/ksirc/puke/plabel.h index c53705b1..f68ffd28 100644 --- a/ksirc/puke/plabel.h +++ b/ksirc/puke/plabel.h @@ -3,7 +3,7 @@ class PLabel; -#include <qlabel.h> +#include <tqlabel.h> #include "pmessage.h" #include "pframe.h" #include "controller.h" @@ -19,8 +19,8 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_obj = 0); - virtual QLabel *widget(); + virtual void setWidget(TQObject *_obj = 0); + virtual TQLabel *widget(); public slots: @@ -28,7 +28,7 @@ protected: bool checkWidget(); private: - QLabel *label; + TQLabel *label; }; #endif diff --git a/ksirc/puke/playout.cpp b/ksirc/puke/playout.cpp index 9690f418..ae4fa6d1 100644 --- a/ksirc/puke/playout.cpp +++ b/ksirc/puke/playout.cpp @@ -4,7 +4,7 @@ #include "playout.h" #include "commands.h" -PLayout::PLayout(QObject *pobject) +PLayout::PLayout(TQObject *pobject) : PObject(pobject) { // Connect slots as needed @@ -24,7 +24,7 @@ PLayout::~PLayout() PObject *PLayout::createWidget(CreateArgs &ca) { PLayout *pw = new PLayout(ca.parent); - QBoxLayout *qbl; + TQBoxLayout *qbl; int direction, border, iType, iParent; // Retreive the border and direction information out of the // carg string @@ -33,12 +33,12 @@ PObject *PLayout::createWidget(CreateArgs &ca) if((ca.parent != 0) && (ca.parent->widget()->isWidgetType() == TRUE)){ - qbl = new QBoxLayout((QWidget *) ca.parent->widget(), (QBoxLayout::Direction) direction, border); + qbl = new TQBoxLayout((TQWidget *) ca.parent->widget(), (TQBoxLayout::Direction) direction, border); // kdDebug(5008) << "Creating layout with parent: " << parent.iWinId << endl; } else{ - qbl = new QBoxLayout((QBoxLayout::Direction) direction, border); + qbl = new TQBoxLayout((TQBoxLayout::Direction) direction, border); // kdDebug(5008) << "Creating layout NO PARENT" << endl; } pw->setWidget(qbl); @@ -88,7 +88,7 @@ void PLayout::messageHandler(int fd, PukeMessage *pm) } PObject *pld = controller()->id2pobject(fd, pm->iWinId); PObject *pls = controller()->id2pobject(fd, pm->iArg); - if( (pld->widget()->inherits("QBoxLayout") == FALSE) || (pls->widget()->inherits("QBoxLayout") == FALSE)) + if( (pld->widget()->inherits("TQBoxLayout") == FALSE) || (pls->widget()->inherits("TQBoxLayout") == FALSE)) throw(errorCommandFailed(PUKE_LAYOUT_ADDLAYOUT_ACK, 1)); PLayout *plbd = (PLayout *) pld; PLayout *plbs = (PLayout *) pls; @@ -133,21 +133,21 @@ void PLayout::messageHandler(int fd, PukeMessage *pm) } -void PLayout::setWidget(QObject *_layout) +void PLayout::setWidget(TQObject *_layout) { // kdDebug(5008) << "PObject setwidget called" << endl; - if(_layout != 0 && _layout->inherits("QBoxLayout") == FALSE) + if(_layout != 0 && _layout->inherits("TQBoxLayout") == FALSE) { errorInvalidSet(_layout); return; } - layout = (QBoxLayout *) _layout; + layout = (TQBoxLayout *) _layout; PObject::setWidget(_layout); } -QBoxLayout *PLayout::widget() +TQBoxLayout *PLayout::widget() { return layout; } diff --git a/ksirc/puke/playout.h b/ksirc/puke/playout.h index 4aec01a1..90a606b8 100644 --- a/ksirc/puke/playout.h +++ b/ksirc/puke/playout.h @@ -3,8 +3,8 @@ class PLayout; -#include <qobject.h> -#include <qlayout.h> +#include <tqobject.h> +#include <tqlayout.h> #include "pmessage.h" #include "pobject.h" @@ -14,7 +14,7 @@ class PLayout : public PObject public: static PObject *createWidget(CreateArgs &ca); - PLayout(QObject *parent = 0); + PLayout(TQObject *parent = 0); virtual ~PLayout(); /** @@ -26,16 +26,16 @@ public: /** * Sets the current opbect */ - virtual void setWidget(QObject *qb = 0x0); + virtual void setWidget(TQObject *qb = 0x0); /** * Returns the current object */ - virtual QBoxLayout *widget(); + virtual TQBoxLayout *widget(); private: - QBoxLayout *layout; + TQBoxLayout *layout; }; diff --git a/ksirc/puke/plined.cpp b/ksirc/puke/plined.cpp index 3f3e6a09..56a4ddc0 100644 --- a/ksirc/puke/plined.cpp +++ b/ksirc/puke/plined.cpp @@ -9,11 +9,11 @@ PObject * PLineEdit::createWidget(CreateArgs &ca) { PLineEdit *pw = new PLineEdit(ca.parent); - QLineEdit *le; + TQLineEdit *le; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - le = new QLineEdit((QWidget *) ca.parent->widget()); + le = new TQLineEdit((TQWidget *) ca.parent->widget()); else - le = new QLineEdit(0L); + le = new TQLineEdit(0L); pw->setWidget(le); pw->setWidgetId(ca.pwI); return pw; @@ -59,7 +59,7 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm) kdDebug(5008) << "PLineEdit: No Widget set" << endl; return; } - widget()->setEchoMode((QLineEdit::EchoMode) pm->iArg); + widget()->setEchoMode((TQLineEdit::EchoMode) pm->iArg); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = widget()->echoMode(); @@ -101,27 +101,27 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm) } } -void PLineEdit::setWidget(QObject *_le) +void PLineEdit::setWidget(TQObject *_le) { - if(_le != 0 && _le->inherits("QLineEdit") == FALSE) + if(_le != 0 && _le->inherits("TQLineEdit") == FALSE) { errorInvalidSet(_le); return; } - lineedit = (QLineEdit *) _le; + lineedit = (TQLineEdit *) _le; if(lineedit != 0){ - connect(lineedit, SIGNAL(textChanged(const char *)), - this, SLOT(updateText(const char *))); - connect(lineedit, SIGNAL(returnPressed()), - this, SLOT(returnPress())); + connect(lineedit, TQT_SIGNAL(textChanged(const char *)), + this, TQT_SLOT(updateText(const char *))); + connect(lineedit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(returnPress())); } PWidget::setWidget(_le); } -QLineEdit *PLineEdit::widget() +TQLineEdit *PLineEdit::widget() { return lineedit; } diff --git a/ksirc/puke/plined.h b/ksirc/puke/plined.h index 78f04bdf..91ca7413 100644 --- a/ksirc/puke/plined.h +++ b/ksirc/puke/plined.h @@ -3,7 +3,7 @@ class PLineEdit; -#include <qlineedit.h> +#include <tqlineedit.h> #include "pmessage.h" #include "pwidget.h" #include "controller.h" @@ -19,15 +19,15 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_f); - virtual QLineEdit *widget(); + virtual void setWidget(TQObject *_f); + virtual TQLineEdit *widget(); public slots: void updateText(const char *); void returnPress(); private: - QLineEdit *lineedit; + TQLineEdit *lineedit; }; #endif diff --git a/ksirc/puke/plistbox.cpp b/ksirc/puke/plistbox.cpp index 482e08c7..d0b98305 100644 --- a/ksirc/puke/plistbox.cpp +++ b/ksirc/puke/plistbox.cpp @@ -7,15 +7,15 @@ PObject * PListBox::createWidget(CreateArgs &ca) { PListBox *plb = new PListBox(ca.parent); - QListBox *lb; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QListBox") == TRUE){ - lb = (QListBox *) ca.fetchedObj; + TQListBox *lb; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQListBox") == TRUE){ + lb = (TQListBox *) ca.fetchedObj; plb->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - lb = new QListBox((QWidget *) ca.parent->widget()); + lb = new TQListBox((TQWidget *) ca.parent->widget()); else - lb = new QListBox(); + lb = new TQListBox(); plb->setWidget(lb); plb->setWidgetId(ca.pwI); return plb; @@ -71,7 +71,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->insertItem(QPixmap(pm->cArg), pm->iArg); + widget()->insertItem(TQPixmap(pm->cArg), pm->iArg); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = widget()->count(); @@ -122,7 +122,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) } break; case PUKE_LISTBOX_SET_SCROLLBAR: - widget()->setVScrollBarMode( (bool) pm->iArg ? QListBox::AlwaysOn : QListBox::AlwaysOff ); + widget()->setVScrollBarMode( (bool) pm->iArg ? TQListBox::AlwaysOn : TQListBox::AlwaysOff ); pmRet.iCommand = PUKE_LISTBOX_SET_SCROLLBAR_ACK; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -130,7 +130,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_LISTBOX_SET_AUTO_SCROLLBAR: - widget()->setVScrollBarMode( (bool) pm->iArg ? QListBox::Auto : QListBox::AlwaysOff ); + widget()->setVScrollBarMode( (bool) pm->iArg ? TQListBox::Auto : TQListBox::AlwaysOff ); pmRet.iCommand = PUKE_LISTBOX_SET_AUTO_SCROLLBAR_ACK; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -150,27 +150,27 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) } } -void PListBox::setWidget(QObject *_lb) +void PListBox::setWidget(TQObject *_lb) { - if(_lb != 0 && _lb->inherits("QListBox") == FALSE) + if(_lb != 0 && _lb->inherits("TQListBox") == FALSE) { errorInvalidSet(_lb); return; } - lb = (QListBox *) _lb; + lb = (TQListBox *) _lb; if(lb != 0){ - connect(lb, SIGNAL(highlighted(int)), - this, SLOT(highlighted(int))); - connect(lb, SIGNAL(selected(int)), - this, SLOT(selected(int))); + connect(lb, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(highlighted(int))); + connect(lb, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(selected(int))); } PFrame::setWidget(lb); } -QListBox *PListBox::widget() +TQListBox *PListBox::widget() { return lb; } diff --git a/ksirc/puke/plistbox.h b/ksirc/puke/plistbox.h index cad454a8..c7683b22 100644 --- a/ksirc/puke/plistbox.h +++ b/ksirc/puke/plistbox.h @@ -3,7 +3,7 @@ class PListBox; -#include <qlistbox.h> +#include <tqlistbox.h> #include "pmessage.h" #include "ptablevw.h" #include "controller.h" @@ -19,8 +19,8 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_lb); - virtual QListBox *widget(); + virtual void setWidget(TQObject *_lb); + virtual TQListBox *widget(); public slots: void highlighted(int); @@ -30,7 +30,7 @@ protected: bool checkWidget(); private: - QListBox *lb; + TQListBox *lb; }; diff --git a/ksirc/puke/pmenudta.cpp b/ksirc/puke/pmenudta.cpp index 30b375fc..576ebc39 100644 --- a/ksirc/puke/pmenudta.cpp +++ b/ksirc/puke/pmenudta.cpp @@ -1,14 +1,14 @@ #include "pmenudta.h" #include "pobject.h" -#include <qpopupmenu.h> +#include <tqpopupmenu.h> PMenuData::PMenuData(PObject *_child) : PObject() { child = _child; - connect(this, SIGNAL(outputMessage(int, PukeMessage*)), - child, SIGNAL(outputMessage(int, PukeMessage*))); + connect(this, TQT_SIGNAL(outputMessage(int, PukeMessage*)), + child, TQT_SIGNAL(outputMessage(int, PukeMessage*))); } PMenuData::~PMenuData() @@ -28,7 +28,7 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm) switch(pm->iCommand){ case PUKE_MENUDATA_INSERT_TEXT: { - QPopupMenu *widget = (QPopupMenu *) child->widget(); + TQPopupMenu *widget = (TQPopupMenu *) child->widget(); id = widget->insertItem(pm->cArg); if(pm->iArg > 0){ widget->setAccel(pm->iArg, id); @@ -43,8 +43,8 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm) } case PUKE_MENUDATA_INSERT_PIXMAP: { - QPopupMenu *widget = (QPopupMenu *) child->widget(); - id = widget->insertItem(QPixmap(pm->cArg)); + TQPopupMenu *widget = (TQPopupMenu *) child->widget(); + id = widget->insertItem(TQPixmap(pm->cArg)); if(pm->iArg > 0){ widget->setAccel(pm->iArg, id); } @@ -58,7 +58,7 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm) } case PUKE_MENUDATA_REMOVE_ITEM: { - QPopupMenu *widget = (QPopupMenu *) child->widget(); + TQPopupMenu *widget = (TQPopupMenu *) child->widget(); widget->removeItem(pm->iArg); pmRet.iCommand = PUKE_MENUDATA_REMOVE_ITEM_ACK; diff --git a/ksirc/puke/pmenudta.h b/ksirc/puke/pmenudta.h index 0c3bfc6a..03227134 100644 --- a/ksirc/puke/pmenudta.h +++ b/ksirc/puke/pmenudta.h @@ -3,8 +3,8 @@ class PMenuData; -#include <qobject.h> -#include <qmenudata.h> +#include <tqobject.h> +#include <tqmenudata.h> #include "pmessage.h" #include "pframe.h" #include "pobject.h" @@ -18,17 +18,17 @@ class PMenuData; class PMenuDataHelper : public QMenuData { public: - PMenuDataHelper(QMenuData &qmd) { - memcpy(this, &qmd, sizeof(QMenuData)); + PMenuDataHelper(TQMenuData &qmd) { + memcpy(this, &qmd, sizeof(TQMenuData)); } int active() { - return QMenuData::actItem; + return TQMenuData::actItem; } int actItem; }; /** - * We're subclased off QMenuData so we can access it's internal proteted vars + * We're subclased off TQMenuData so we can access it's internal proteted vars * We do not initialize NOR create it!!!! */ @@ -42,12 +42,12 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); virtual bool menuMessageHandler(int fd, PukeMessage *pm); -// virtual void setWidget(QMenuData *_qmd); - // virtual QMenuData *widget(); +// virtual void setWidget(TQMenuData *_qmd); + // virtual TQMenuData *widget(); virtual int activeItem() { - return PMenuDataHelper(*((QMenuData *) child->widget())).active(); + return PMenuDataHelper(*((TQMenuData *) child->widget())).active(); } private: diff --git a/ksirc/puke/pmessage.h b/ksirc/puke/pmessage.h index 5c777b24..a93cd154 100644 --- a/ksirc/puke/pmessage.h +++ b/ksirc/puke/pmessage.h @@ -20,16 +20,16 @@ const uint iPukeHeader = 42U; #if 0 class errorInvalidSet { public: - errorInvalidSet(QObject *_from, const char *_to) + errorInvalidSet(TQObject *_from, const char *_to) : __from(_from), __to(_to) { } - QObject *from() { return __from; } + TQObject *from() { return __from; } const char *to() { return __to; } private: - QObject *__from; + TQObject *__from; const char *__to; }; diff --git a/ksirc/puke/pobject.cpp b/ksirc/puke/pobject.cpp index f2481a04..9e46e042 100644 --- a/ksirc/puke/pobject.cpp +++ b/ksirc/puke/pobject.cpp @@ -2,8 +2,8 @@ #include "commands.h" -PObject::PObject(QObject *pobject, const char *name) - : QObject(pobject, name) +PObject::PObject(TQObject *pobject, const char *name) + : TQObject(pobject, name) { // Connect slots as needed obj = 0; @@ -24,11 +24,11 @@ PObject::~PObject() PObject *PObject::createWidget(CreateArgs &ca) { PObject *pw = new PObject(ca.parent); - QObject *o; + TQObject *o; if(ca.parent != 0) - o = new QObject(ca.parent->widget()); + o = new TQObject(ca.parent->widget()); else - o = new QObject(); + o = new TQObject(); pw->setWidget(o); pw->setWidgetId(ca.pwI); pw->setPukeController(ca.pc); @@ -78,23 +78,23 @@ void PObject::messageHandler(int fd, PukeMessage *pm) } } -void PObject::setWidget(QObject *_o) +void PObject::setWidget(TQObject *_o) { // Disconnect everything from the object we where listning too // Just in case it fires something off, we don't want to get it if(widget() != 0){ - disconnect(widget(), SIGNAL(destroyed()), - this, SLOT(swidgetDestroyed())); + disconnect(widget(), TQT_SIGNAL(destroyed()), + this, TQT_SLOT(swidgetDestroyed())); } obj = _o; if(obj != 0){ - connect(widget(), SIGNAL(destroyed()), - this, SLOT(swidgetDestroyed())); + connect(widget(), TQT_SIGNAL(destroyed()), + this, TQT_SLOT(swidgetDestroyed())); } } -QObject *PObject::widget() +TQObject *PObject::widget() { // kdDebug(5008) << "PObject widget called" << endl; return obj; @@ -129,9 +129,9 @@ void PObject::manTerm() { manualTerm = TRUE; } -void PObject::errorInvalidSet(QObject *_w) +void PObject::errorInvalidSet(TQObject *_w) { - m_error = QString("Tried setting a %1 to %2").arg(_w->className()).arg(className()); + m_error = TQString("Tried setting a %1 to %2").arg(_w->className()).arg(className()); m_hasError = true; } #include "pobject.moc" diff --git a/ksirc/puke/pobject.h b/ksirc/puke/pobject.h index 8e5c7c5a..d27fab58 100644 --- a/ksirc/puke/pobject.h +++ b/ksirc/puke/pobject.h @@ -5,7 +5,7 @@ class PObject; class PukeController; class CreateArgs; -#include <qobject.h> +#include <tqobject.h> #include "pmessage.h" @@ -26,18 +26,18 @@ public: /** * name of the widget which was fetched from kSirc, this has to be set explicitly */ - QObject *fetchedObj; + TQObject *fetchedObj; }; class PObject : public QObject { Q_OBJECT public: - PObject(QObject *parent = 0, const char *name = 0); + PObject(TQObject *parent = 0, const char *name = 0); virtual ~PObject(); /** - * Creates a new QObject and returns a PObject + * Creates a new TQObject and returns a PObject */ static PObject *createWidget(CreateArgs &ca); @@ -50,12 +50,12 @@ class PObject : public QObject /** * Sets the current opbect */ - virtual void setWidget(QObject *w); + virtual void setWidget(TQObject *w); /** * Returns the current object */ - virtual QObject *widget(); + virtual TQObject *widget(); /** * Sets the window id @@ -90,7 +90,7 @@ class PObject : public QObject /** * Returns error description */ - QString error() { + TQString error() { m_hasError = false; return m_error; } @@ -117,16 +117,16 @@ class PObject : public QObject protected: PukeController *controller(); - void errorInvalidSet(QObject *_w); + void errorInvalidSet(TQObject *_w); private: - QObject *obj; + TQObject *obj; PukeController *pController; widgetId wI; bool manualTerm; bool deleteAble; - QString m_error; + TQString m_error; bool m_hasError; }; diff --git a/ksirc/puke/pobjfinder.cpp b/ksirc/puke/pobjfinder.cpp index 0f510ea4..6870e142 100644 --- a/ksirc/puke/pobjfinder.cpp +++ b/ksirc/puke/pobjfinder.cpp @@ -19,8 +19,8 @@ PObjFinder::PObjFinder(PObject *parent) // We don't actually encase a widget since all the ObjFinder interface // is static setWidget(0x0); - connect(controller(), SIGNAL(inserted(QObject *)), - this, SLOT(newObject(QObject *))); + connect(controller(), TQT_SIGNAL(inserted(TQObject *)), + this, TQT_SLOT(newObject(TQObject *))); } PObjFinder::~PObjFinder() @@ -33,8 +33,8 @@ void PObjFinder::messageHandler(int fd, PukeMessage *pm) switch(pm->iCommand){ case PUKE_OBJFINDER_ALLOBJECTS: { - QString qscArg; - QStrList allObj = controller()->allObjects(); + TQString qscArg; + TQStrList allObj = controller()->allObjects(); for(uint i = 0; i <= allObj.count(); i++){ qscArg += allObj.at(i); qscArg += "\n"; @@ -54,7 +54,7 @@ void PObjFinder::messageHandler(int fd, PukeMessage *pm) } } -void PObjFinder::setWidget(QObject *_obj) +void PObjFinder::setWidget(TQObject *_obj) { PObject::setWidget(_obj); } @@ -66,8 +66,8 @@ objFinder *PObjFinder::widget() } -void PObjFinder::newObject(QObject *name){ - QString info; +void PObjFinder::newObject(TQObject *name){ + TQString info; info = name->className(); info += "::"; diff --git a/ksirc/puke/pobjfinder.h b/ksirc/puke/pobjfinder.h index 9149aa86..32b4ff86 100644 --- a/ksirc/puke/pobjfinder.h +++ b/ksirc/puke/pobjfinder.h @@ -18,11 +18,11 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_obj = 0); + virtual void setWidget(TQObject *_obj = 0); virtual objFinder *widget(); public slots: - virtual void newObject(QObject *obj); + virtual void newObject(TQObject *obj); protected: bool checkWidget(); diff --git a/ksirc/puke/ppopmenu.cpp b/ksirc/puke/ppopmenu.cpp index 4c07d800..cabf4d94 100644 --- a/ksirc/puke/ppopmenu.cpp +++ b/ksirc/puke/ppopmenu.cpp @@ -1,5 +1,5 @@ #include <kdebug.h> -#include <qcursor.h> +#include <tqcursor.h> #include "ppopmenu.h" @@ -7,15 +7,15 @@ PObject * PPopupMenu::createWidget(CreateArgs &ca) { PPopupMenu *pm = new PPopupMenu(ca.parent); - QPopupMenu *qpm; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QPopupMenu") == TRUE){ - qpm= (QPopupMenu *) ca.fetchedObj; + TQPopupMenu *qpm; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQPopupMenu") == TRUE){ + qpm= (TQPopupMenu *) ca.fetchedObj; pm->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qpm = new QPopupMenu((QWidget *) ca.parent->widget()); + qpm = new TQPopupMenu((TQWidget *) ca.parent->widget()); else - qpm = new QPopupMenu(); + qpm = new TQPopupMenu(); pm->setWidget(qpm); pm->setWidgetId(ca.pwI); return pm; @@ -64,7 +64,7 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm) return; } - widget()->popup(QCursor::pos(), 0); + widget()->popup(TQCursor::pos(), 0); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -79,24 +79,24 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm) } } -void PPopupMenu::setWidget(QObject *_menu) +void PPopupMenu::setWidget(TQObject *_menu) { - if(_menu != 0 && _menu->inherits("QPopupMenu") == FALSE) + if(_menu != 0 && _menu->inherits("TQPopupMenu") == FALSE) { errorInvalidSet(_menu); return; } - menu = (QPopupMenu *) _menu; + menu = (TQPopupMenu *) _menu; if(menu != 0x0){ - connect(menu, SIGNAL(activated(int)), - this, SLOT(got_activated(int))); + connect(menu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(got_activated(int))); } PFrame::setWidget(menu); } -QPopupMenu *PPopupMenu::widget() +TQPopupMenu *PPopupMenu::widget() { return menu; } diff --git a/ksirc/puke/ppopmenu.h b/ksirc/puke/ppopmenu.h index 9044b935..4f5af16e 100644 --- a/ksirc/puke/ppopmenu.h +++ b/ksirc/puke/ppopmenu.h @@ -3,7 +3,7 @@ class PPopupMenu; -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include "pobject.h" #include "pmessage.h" @@ -21,14 +21,14 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_menu); - virtual QPopupMenu *widget(); + virtual void setWidget(TQObject *_menu); + virtual TQPopupMenu *widget(); protected slots: void got_activated ( int itemId ); private: - QPopupMenu *menu; + TQPopupMenu *menu; PMenuData *pmd; }; diff --git a/ksirc/puke/pprogress.cpp b/ksirc/puke/pprogress.cpp index 75c7fa4b..09ed39d2 100644 --- a/ksirc/puke/pprogress.cpp +++ b/ksirc/puke/pprogress.cpp @@ -11,7 +11,7 @@ PProgress::createWidget(CreateArgs &ca) PProgress *pw = new PProgress(ca.parent); KSProgress *ksp; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - ksp = new KSProgress((QWidget *) ca.parent->widget()); + ksp = new KSProgress((TQWidget *) ca.parent->widget()); else ksp = new KSProgress(); pw->setWidget(ksp); @@ -66,7 +66,7 @@ void PProgress::messageHandler(int fd, PukeMessage *pm) break; } case PUKE_KSPROGRESS_SET_TOPTEXT: - widget()->setTopText(QString(pm->cArg)); + widget()->setTopText(TQString(pm->cArg)); pmRet.iCommand = PUKE_KSPROGRESS_SET_TOPTEXT; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -74,7 +74,7 @@ void PProgress::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_KSPROGRESS_SET_BOTTEXT: - widget()->setBotText(QString(pm->cArg)); + widget()->setBotText(TQString(pm->cArg)); pmRet.iCommand = PUKE_KSPROGRESS_SET_BOTTEXT; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -104,7 +104,7 @@ void PProgress::cancelPressed(){ emit outputMessage(widgetIden().fd, &pmRet); } -void PProgress::setWidget(QObject *_f) +void PProgress::setWidget(TQObject *_f) { // kdDebug(5008) << "PProgress setWidget called" << endl; if(_f != 0 && _f->inherits("KSProgress") == FALSE) @@ -115,8 +115,8 @@ void PProgress::setWidget(QObject *_f) ksp = (KSProgress *) _f; if(widget() != 0){ - connect(widget(), SIGNAL(cancel()), - this, SLOT(cancelPressed())); + connect(widget(), TQT_SIGNAL(cancel()), + this, TQT_SLOT(cancelPressed())); } PWidget::setWidget(ksp); diff --git a/ksirc/puke/pprogress.h b/ksirc/puke/pprogress.h index f81fd976..8542abab 100644 --- a/ksirc/puke/pprogress.h +++ b/ksirc/puke/pprogress.h @@ -19,7 +19,7 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_f); + virtual void setWidget(TQObject *_f); virtual KSProgress *widget(); protected slots: diff --git a/ksirc/puke/ppushbt.cpp b/ksirc/puke/ppushbt.cpp index 48cf6121..346abcd3 100644 --- a/ksirc/puke/ppushbt.cpp +++ b/ksirc/puke/ppushbt.cpp @@ -6,11 +6,11 @@ PObject * PPushButton::createWidget(CreateArgs &ca) { PPushButton *pb = new PPushButton(ca.parent); - QPushButton *qb; + TQPushButton *qb; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qb = new QPushButton((QWidget *) ca.parent->widget()); + qb = new TQPushButton((TQWidget *) ca.parent->widget()); else - qb = new QPushButton(0L); + qb = new TQPushButton(0L); pb->setWidget(qb); pb->setWidgetId(ca.pwI); return pb; @@ -43,15 +43,15 @@ void PPushButton::messageHandler(int fd, PukeMessage *pm) } } -void PPushButton::setWidget(QObject *_qb) +void PPushButton::setWidget(TQObject *_qb) { - if(_qb != 0 && _qb->inherits("QPushButton") == FALSE) + if(_qb != 0 && _qb->inherits("TQPushButton") == FALSE) { errorInvalidSet(_qb); return; } - button = (QPushButton *) _qb; + button = (TQPushButton *) _qb; if(_qb != 0){ } PButton::setWidget(_qb); @@ -59,7 +59,7 @@ void PPushButton::setWidget(QObject *_qb) } -QPushButton *PPushButton::widget() +TQPushButton *PPushButton::widget() { return button; } diff --git a/ksirc/puke/ppushbt.h b/ksirc/puke/ppushbt.h index 87336679..fd624a24 100644 --- a/ksirc/puke/ppushbt.h +++ b/ksirc/puke/ppushbt.h @@ -3,7 +3,7 @@ class PPushButton; -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "pmessage.h" #include "pbutton.h" #include "pobject.h" @@ -20,13 +20,13 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_b = 0); - virtual QPushButton *widget(); + virtual void setWidget(TQObject *_b = 0); + virtual TQPushButton *widget(); public slots: private: - QPushButton *button; + TQPushButton *button; }; diff --git a/ksirc/puke/ptabdialog.cpp b/ksirc/puke/ptabdialog.cpp index b0e3ba2c..4099aa0a 100644 --- a/ksirc/puke/ptabdialog.cpp +++ b/ksirc/puke/ptabdialog.cpp @@ -9,24 +9,24 @@ PObject * PTabDialog::createWidget(CreateArgs &ca) { PTabDialog *ptd = new PTabDialog(ca.parent); - QTabDialog *qtd; + TQTabDialog *qtd; // Retreive the border and direction information out of the // carg string - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QTabDialog") == TRUE){ - qtd = (QTabDialog *) ca.fetchedObj; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQTabDialog") == TRUE){ + qtd = (TQTabDialog *) ca.fetchedObj; ptd->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qtd = new QTabDialog((QWidget *) ca.parent->widget()); + qtd = new TQTabDialog((TQWidget *) ca.parent->widget()); else - qtd = new QTabDialog(); + qtd = new TQTabDialog(); ptd->setWidget(qtd); ptd->setWidgetId(ca.pwI); ptd->setPukeController(ca.pc); return ptd; } -PTabDialog::PTabDialog(QObject *) +PTabDialog::PTabDialog(TQObject *) : PWidget() { // Connect slots as needed @@ -76,22 +76,22 @@ void PTabDialog::messageHandler(int fd, PukeMessage *pm) } -void PTabDialog::setWidget(QObject *tb) +void PTabDialog::setWidget(TQObject *tb) { - if(tb != 0 && tb->inherits("QTabDialog") == FALSE) + if(tb != 0 && tb->inherits("TQTabDialog") == FALSE) { errorInvalidSet(tb); return; } - tab = (QTabDialog *) tb; + tab = (TQTabDialog *) tb; if(tab != 0){ } PObject::setWidget(tb); } -QTabDialog *PTabDialog::widget() +TQTabDialog *PTabDialog::widget() { // kdDebug(5008) << "PObject widget called" << endl; return tab; diff --git a/ksirc/puke/ptabdialog.h b/ksirc/puke/ptabdialog.h index 6e669074..17132301 100644 --- a/ksirc/puke/ptabdialog.h +++ b/ksirc/puke/ptabdialog.h @@ -3,7 +3,7 @@ class PTabDialog; -#include <qtabdialog.h> +#include <tqtabdialog.h> #include "pmessage.h" #include "pwidget.h" @@ -13,7 +13,7 @@ class PTabDialog : public PWidget public: static PObject *createWidget(CreateArgs &ca); - PTabDialog(QObject *parent = 0); + PTabDialog(TQObject *parent = 0); virtual ~PTabDialog(); /** @@ -25,16 +25,16 @@ public: /** * Sets the current opbect */ - virtual void setWidget(QObject *tb); + virtual void setWidget(TQObject *tb); /** * Returns the current object */ - virtual QTabDialog *widget(); + virtual TQTabDialog *widget(); private: - QTabDialog *tab; + TQTabDialog *tab; }; diff --git a/ksirc/puke/ptablevw.cpp b/ksirc/puke/ptablevw.cpp index 1dba614b..7c744ac9 100644 --- a/ksirc/puke/ptablevw.cpp +++ b/ksirc/puke/ptablevw.cpp @@ -50,15 +50,15 @@ void PTableView::messageHandler(int fd, PukeMessage *pm) } } -void PTableView::setWidget(QObject *_tbv) +void PTableView::setWidget(TQObject *_tbv) { - if(_tbv != 0 && _tbv->inherits("QGridView") == FALSE) + if(_tbv != 0 && _tbv->inherits("TQGridView") == FALSE) { errorInvalidSet(_tbv); return; } - tbl = (QGridView *) _tbv; + tbl = (TQGridView *) _tbv; if(tbl != 0){ } PFrame::setWidget(_tbv); @@ -66,7 +66,7 @@ void PTableView::setWidget(QObject *_tbv) } -QGridView *PTableView::widget() +TQGridView *PTableView::widget() { return tbl; } diff --git a/ksirc/puke/ptablevw.h b/ksirc/puke/ptablevw.h index 33ba4015..c1043a4b 100644 --- a/ksirc/puke/ptablevw.h +++ b/ksirc/puke/ptablevw.h @@ -3,7 +3,7 @@ class PTableView; -#include <qgridview.h> +#include <tqgridview.h> #include "pmessage.h" #include "pframe.h" @@ -21,13 +21,13 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_tbl); - virtual QGridView *widget(); + virtual void setWidget(TQObject *_tbl); + virtual TQGridView *widget(); public slots: private: - QGridView *tbl; + TQGridView *tbl; }; #endif diff --git a/ksirc/puke/pwidget.cpp b/ksirc/puke/pwidget.cpp index d254832b..9ce99a2b 100644 --- a/ksirc/puke/pwidget.cpp +++ b/ksirc/puke/pwidget.cpp @@ -6,7 +6,7 @@ #include <unistd.h> #include <stdlib.h> -#include <qpixmap.h> +#include <tqpixmap.h> PWidget::PWidget(PObject *) : PObject() @@ -54,15 +54,15 @@ PWidget::~PWidget() PObject *PWidget::createWidget(CreateArgs &ca) { PWidget *pw = new PWidget(); - QWidget *tw; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QWidget") == TRUE){ - tw = (QWidget *) ca.fetchedObj; + TQWidget *tw; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQWidget") == TRUE){ + tw = (TQWidget *) ca.fetchedObj; pw->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - tw = new QWidget((QWidget *) ca.parent->widget()); + tw = new TQWidget((TQWidget *) ca.parent->widget()); else - tw = new QWidget(); + tw = new TQWidget(); pw->setWidget(tw); pw->setWidgetId(ca.pwI); pw->setPukeController(ca.pc); @@ -175,7 +175,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) { pmRet.cArg = new char[15]; pmRet.iTextSize = 15; - QColor back = widget()->backgroundColor(); + TQColor back = widget()->backgroundColor(); sprintf(pmRet.cArg, "%d,%d,%d", back.red(), back.green(), back.blue()); pmRet.iCommand = -pm->iCommand; @@ -186,7 +186,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) break; } case PUKE_WIDGET_SET_BACKGROUND_PIXMAP: - widget()->setBackgroundPixmap(QPixmap(pm->cArg)); + widget()->setBackgroundPixmap(TQPixmap(pm->cArg)); pmRet.iCommand = -pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -195,7 +195,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_WIDGET_SET_BACKGROUND_MODE: - widget()->setBackgroundMode((QWidget::BackgroundMode) pm->iArg); + widget()->setBackgroundMode((TQWidget::BackgroundMode) pm->iArg); pmRet.iCommand = -pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -208,15 +208,15 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) { int *pos; pos = (int *) pm->cArg; - QColor bg(pos[0], pos[1], pos[2]); - QColorGroup cg = QColorGroup(widget()->colorGroup().foreground(), + TQColor bg(pos[0], pos[1], pos[2]); + TQColorGroup cg = TQColorGroup(widget()->colorGroup().foreground(), bg, widget()->colorGroup().light(), widget()->colorGroup().dark(), widget()->colorGroup().mid(), widget()->colorGroup().text(), bg); - widget()->setPalette(QPalette(cg,cg,cg)); + widget()->setPalette(TQPalette(cg,cg,cg)); pmRet.iCommand = -pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -236,7 +236,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) break; case PUKE_WIDGET_RECREATE: { - QWidget *nparent = 0x0; + TQWidget *nparent = 0x0; if(pm->iArg != 0x0){ widgetId wiWidget; wiWidget.fd = fd; @@ -250,7 +250,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) qWarning("Recreate: %d %d %d", point_show[0], point_show[1], point_show[3]); - widget()->reparent(nparent, (WFlags) 0, QPoint(point_show[0], point_show[1]), point_show[3]); + widget()->reparent(nparent, (WFlags) 0, TQPoint(point_show[0], point_show[1]), point_show[3]); pmRet.iCommand = PUKE_WIDGET_RECREATE_ACK; pmRet.iWinId = pm->iWinId; @@ -264,29 +264,29 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) } } -void PWidget::setWidget(QObject *_w) +void PWidget::setWidget(TQObject *_w) { - if(_w != 0 && _w->inherits("QWidget") == FALSE) + if(_w != 0 && _w->inherits("TQWidget") == FALSE) { errorInvalidSet(_w); return; } - w = (QWidget *) _w; + w = (TQWidget *) _w; if(w != 0){ widget()->installEventFilter(this); } PObject::setWidget(_w); } -QWidget *PWidget::widget() +TQWidget *PWidget::widget() { // kdDebug(5008) << "PWidget widget called" << endl; return w; } // PWidget specific -bool PWidget::eventFilter(QObject *o, QEvent *e) +bool PWidget::eventFilter(TQObject *o, TQEvent *e) { if(e->type() < 20 && e->type() >= 0){ (this->*(eventList[e->type()]))(o,e); @@ -307,7 +307,7 @@ bool PWidget::eventFilter(QObject *o, QEvent *e) return false; } -void PWidget::eventNone(QObject *, QEvent *e) +void PWidget::eventNone(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; @@ -324,12 +324,12 @@ void PWidget::eventNone(QObject *, QEvent *e) } -void PWidget::eventTimer(QObject *, QEvent *e) +void PWidget::eventTimer(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QTimerEvent *et = (QTimerEvent *)(e); + TQTimerEvent *et = (TQTimerEvent *)(e); wI = widgetIden(); pm.iCommand = PUKE_WIDGET_EVENT_TIMER; @@ -341,12 +341,12 @@ void PWidget::eventTimer(QObject *, QEvent *e) } -void PWidget::eventMouse(QObject *, QEvent *e) +void PWidget::eventMouse(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QMouseEvent *me = (QMouseEvent *)(e); + TQMouseEvent *me = (TQMouseEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -368,12 +368,12 @@ void PWidget::eventMouse(QObject *, QEvent *e) } -void PWidget::eventKey(QObject *, QEvent *e) +void PWidget::eventKey(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QKeyEvent *ke = (QKeyEvent *)(e); + TQKeyEvent *ke = (TQKeyEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -394,14 +394,14 @@ void PWidget::eventKey(QObject *, QEvent *e) } -void PWidget::eventFocus(QObject *, QEvent *e) +void PWidget::eventFocus(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; // kdDebug(5008) << "PWidget: eventFocus" << endl; - QFocusEvent *fe = (QFocusEvent *)(e); + TQFocusEvent *fe = (TQFocusEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -418,7 +418,7 @@ void PWidget::eventFocus(QObject *, QEvent *e) delete[] pm.cArg; } -void PWidget::eventPaint(QObject *, QEvent *e) +void PWidget::eventPaint(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; @@ -433,12 +433,12 @@ void PWidget::eventPaint(QObject *, QEvent *e) } -void PWidget::eventMove(QObject *, QEvent *e) +void PWidget::eventMove(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QMoveEvent *me = (QMoveEvent *)(e); + TQMoveEvent *me = (TQMoveEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -460,12 +460,12 @@ void PWidget::eventMove(QObject *, QEvent *e) } -void PWidget::eventResize(QObject *, QEvent *e) +void PWidget::eventResize(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QResizeEvent *re = (QResizeEvent *)(e); + TQResizeEvent *re = (TQResizeEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events diff --git a/ksirc/puke/pwidget.h b/ksirc/puke/pwidget.h index f7f748fb..68853e63 100644 --- a/ksirc/puke/pwidget.h +++ b/ksirc/puke/pwidget.h @@ -3,8 +3,8 @@ class PWidget; -#include <qobject.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqwidget.h> #include "pobject.h" #include "pmessage.h" @@ -20,25 +20,25 @@ class PWidget : public PObject virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *w = 0x0); - virtual QWidget *widget(); + virtual void setWidget(TQObject *w = 0x0); + virtual TQWidget *widget(); protected: - bool eventFilter(QObject *o, QEvent *e); + bool eventFilter(TQObject *o, TQEvent *e); private: - QWidget *w; - - void (PWidget::*eventList[20])(QObject *, QEvent *); - - void eventNone(QObject *, QEvent *); - void eventTimer(QObject *, QEvent *); - void eventMouse(QObject *, QEvent *); - void eventKey(QObject *, QEvent *); - void eventFocus(QObject *, QEvent *); - void eventPaint(QObject *, QEvent *); - void eventMove(QObject *, QEvent *); - void eventResize(QObject *, QEvent *); + TQWidget *w; + + void (PWidget::*eventList[20])(TQObject *, TQEvent *); + + void eventNone(TQObject *, TQEvent *); + void eventTimer(TQObject *, TQEvent *); + void eventMouse(TQObject *, TQEvent *); + void eventKey(TQObject *, TQEvent *); + void eventFocus(TQObject *, TQEvent *); + void eventPaint(TQObject *, TQEvent *); + void eventMove(TQObject *, TQEvent *); + void eventResize(TQObject *, TQEvent *); }; diff --git a/ksirc/servercontroller.cpp b/ksirc/servercontroller.cpp index 0b03d1ab..0e7892b9 100644 --- a/ksirc/servercontroller.cpp +++ b/ksirc/servercontroller.cpp @@ -13,14 +13,14 @@ new_connection(): Creates popup asking for new connection - new_ksircprocess(QString): + new_ksircprocess(TQString): Args: - QString: new server name or IP to connect to. + TQString: new server name or IP to connect to. Action: Creates a new sirc process and window !default connected to the server. Does nothing if a server connection already exists. - add_toplevel(QString parent, QString child): + add_toplevel(TQString parent, TQString child): Args: parent: the server name that the new channel is being joined on child: the new channel name @@ -28,7 +28,7 @@ Adds "child" to the list of joined channles in the main window. Always call this on new window creation! - delete_toplevel(QString parent, QString child): + delete_toplevel(TQString parent, TQString child): Args: parent: the server name of which channel is closing child: the channle that is closing. IFF Emtpy, parent is @@ -40,7 +40,7 @@ new_channel: Creates popup asking for new channel name - new_toplevel(QString str): + new_toplevel(TQString str): Args: str: name of the new channel to be created Action: @@ -48,7 +48,7 @@ list and join the requested channel. Does nothing if nothing is selected in the tree list. - recvChangeChanel(QString parent, QString old, QString new): + recvChangeChanel(TQString parent, TQString old, TQString new): Args: parent: parent server connection old: the old name for the window @@ -78,8 +78,8 @@ #include <stdlib.h> #include "objFinder.h" -#include <qlabel.h> -#include <qregexp.h> +#include <tqlabel.h> +#include <tqregexp.h> #include <kmenubar.h> #include <kconfig.h> @@ -98,7 +98,7 @@ #include <kglobalaccel.h> #include <kstdguiitem.h> -#include <qfile.h> +#include <tqfile.h> #include "displayMgrSDI.h" #include "displayMgrMDI.h" @@ -116,7 +116,7 @@ DisplayMgr *displayMgr; servercontroller *servercontroller::s_self = 0; -servercontroller::servercontroller( QWidget*, const char* name ) +servercontroller::servercontroller( TQWidget*, const char* name ) : KMainWindow( 0, name ) { we_are_exiting = false; @@ -139,43 +139,43 @@ servercontroller::servercontroller( QWidget*, const char* name ) break; } - sci = new scInside(this, QCString(name) + "_mainview"); + sci = new scInside(this, TQCString(name) + "_mainview"); setCentralWidget(sci); - sci->setFrameStyle(QFrame::Box | QFrame::Raised); + sci->setFrameStyle(TQFrame::Box | TQFrame::Raised); ConnectionTree = sci->ConnectionTree; - connect(ConnectionTree, SIGNAL(clicked( QListViewItem * )), - this, SLOT(WindowSelected(QListViewItem *))); + connect(ConnectionTree, TQT_SIGNAL(clicked( TQListViewItem * )), + this, TQT_SLOT(WindowSelected(TQListViewItem *))); setFrameBorderWidth(5); - QPopupMenu *file = new QPopupMenu(this, QCString(name) + "_menu_file"); - KStdAction::quit(this, SLOT(endksirc()), actionCollection())->plug(file); + TQPopupMenu *file = new TQPopupMenu(this, TQCString(name) + "_menu_file"); + KStdAction::quit(this, TQT_SLOT(endksirc()), actionCollection())->plug(file); #ifndef NDEBUG - file->insertItem(i18n("Dump Object Tree"), this, SLOT(dump_obj())); - file->insertItem(i18n("Server Debug Window"), this, SLOT(server_debug())); + file->insertItem(i18n("Dump Object Tree"), this, TQT_SLOT(dump_obj())); + file->insertItem(i18n("Server Debug Window"), this, TQT_SLOT(server_debug())); #endif MenuBar->insertItem(i18n("&File"), file); - connections = new QPopupMenu(this, QCString(name) + "_menu_connections"); + connections = new TQPopupMenu(this, TQCString(name) + "_menu_connections"); - server_id = connections->insertItem(i18n("&New Server..."), this, SLOT(new_connection()), Key_F2 ); - join_id = connections->insertItem(i18n("&Join Channel..."), this, SLOT(new_channel()), Key_F3 ); + server_id = connections->insertItem(i18n("&New Server..."), this, TQT_SLOT(new_connection()), Key_F2 ); + join_id = connections->insertItem(i18n("&Join Channel..."), this, TQT_SLOT(new_channel()), Key_F3 ); connections->insertSeparator(); - connections->insertItem(i18n("&Do Autoconnect..."), this, SLOT(start_autoconnect_check())); + connections->insertItem(i18n("&Do Autoconnect..."), this, TQT_SLOT(start_autoconnect_check())); connections->setItemEnabled(join_id, FALSE); MenuBar->insertItem(i18n("&Connections"), connections); - options = new QPopupMenu(this, QCString(name) + "_menu_options"); + options = new TQPopupMenu(this, TQCString(name) + "_menu_options"); options->setCheckable(TRUE); options->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."), - this, SLOT(filter_rule_editor())); + this, TQT_SLOT(filter_rule_editor())); options->insertSeparator(); - KStdAction::configureNotifications(this, SLOT(notification_prefs()), actionCollection())->plug(options); + KStdAction::configureNotifications(this, TQT_SLOT(notification_prefs()), actionCollection())->plug(options); - KStdAction::preferences(this, SLOT(general_prefs()), actionCollection())->plug(options); + KStdAction::preferences(this, TQT_SLOT(general_prefs()), actionCollection())->plug(options); MenuBar->insertItem(i18n("&Settings"), options); @@ -188,7 +188,7 @@ servercontroller::servercontroller( QWidget*, const char* name ) "when in docked mode, since you don't need to click on the " "dock icon."), ALT+CTRL+Key_C, KKey::QtWIN+CTRL+Key_C, this, - SLOT(new_connection())); + TQT_SLOT(new_connection())); open_toplevels = 0; @@ -239,41 +239,41 @@ void servercontroller::checkDocking() void servercontroller::new_connection() { open_ksirc *w = new open_ksirc(); // Create new ksirc popup - connect(w, SIGNAL(open_ksircprocess(KSircServer &)), // connected ok to process - this, SLOT(new_ksircprocess(KSircServer &))); // start + connect(w, TQT_SIGNAL(open_ksircprocess(KSircServer &)), // connected ok to process + this, TQT_SLOT(new_ksircprocess(KSircServer &))); // start w->exec(); // show the sucker! delete w; } void servercontroller::new_ksircprocess(KSircServer &kss) { - QString server_id; + TQString server_id; int id = 1; if(kss.server().isEmpty()) // nothing entered, nothing done return; server_id = kss.server(); while(proc_list[server_id]){ // if it already exists, quit - server_id = QString("%1 %2").arg(kss.server()).arg(id++); + server_id = TQString("%1 %2").arg(kss.server()).arg(id++); } // Insert new base - QListViewItem *rootItem = new QListViewItem( ConnectionTree, server_id ); + TQListViewItem *rootItem = new TQListViewItem( ConnectionTree, server_id ); rootItem->setPixmap( 0, pic_server ); rootItem->setOpen( true ); // We do no_channel here since proc emits the signal in the // constructor, and we can't connect to before then, so we have to // do the dirty work here. - ProcMessage(server_id, ProcCommand::addTopLevel, QString("no_channel")); + ProcMessage(server_id, ProcCommand::addTopLevel, TQString("no_channel")); - KSircProcess *proc = new KSircProcess(server_id, kss, 0, (QString(name()) + "_" + server_id + "_ksp").ascii() ); // Create proc + KSircProcess *proc = new KSircProcess(server_id, kss, 0, (TQString(name()) + "_" + server_id + "_ksp").ascii() ); // Create proc //this->insertChild(proc); // Add it to out inheritance tree so we can retreive child widgets from it. objFinder::insert(proc); proc_list.insert(server_id, proc); // Add proc to hash - connect(proc, SIGNAL(ProcMessage(QString, int, QString)), - this, SLOT(ProcMessage(QString, int, QString))); - connect(this, SIGNAL(ServMessage(QString, int, QString)), - proc, SLOT(ServMessage(QString, int, QString))); + connect(proc, TQT_SIGNAL(ProcMessage(TQString, int, TQString)), + this, TQT_SLOT(ProcMessage(TQString, int, TQString))); + connect(this, TQT_SIGNAL(ServMessage(TQString, int, TQString)), + proc, TQT_SLOT(ServMessage(TQString, int, TQString))); if(!ConnectionTree->currentItem()){ // If nothing's highlighted ConnectionTree->setCurrentItem(rootItem); // highlight it. @@ -286,8 +286,8 @@ void servercontroller::new_ksircprocess(KSircServer &kss) void servercontroller::new_channel() { - QString server; - QListViewItem *citem = ConnectionTree->currentItem(); // get item + TQString server; + TQListViewItem *citem = ConnectionTree->currentItem(); // get item if(citem){ // if it exist, ie something is highlighted, continue if(proc_list[citem->text(0)]){ // If it's a match with a server, ok server = citem->text(0); @@ -303,10 +303,10 @@ void servercontroller::new_channel() if(server.isEmpty()) return; - KSircChannel ci(server, QString::null); + KSircChannel ci(server, TQString::null); NewWindowDialog w(ci); - connect(&w, SIGNAL(openTopLevel(const KSircChannel &)), - this, SLOT(new_toplevel(const KSircChannel &))); + connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)), + this, TQT_SLOT(new_toplevel(const KSircChannel &))); w.exec(); } @@ -330,8 +330,8 @@ void servercontroller::ToggleAutoCreate() void servercontroller::general_prefs() { KSPrefs *kp = new KSPrefs(); - connect(kp, SIGNAL(update(int)), - this, SLOT(configChange())); + connect(kp, TQT_SIGNAL(update(int)), + this, TQT_SLOT(configChange())); kp->resize(550, 450); kp->show(); } @@ -349,9 +349,9 @@ void servercontroller::dump_obj() } void servercontroller::server_debug() { - QListViewItem *citem = ConnectionTree->currentItem(); // get item + TQListViewItem *citem = ConnectionTree->currentItem(); // get item if(citem){ // if it exist, ie something is highlighted, continue - QString server; + TQString server; if(proc_list[citem->text(0)]){ // If it's a match with a server, ok server = citem->text(0); } @@ -373,12 +373,12 @@ void servercontroller::server_debug() void servercontroller::filter_rule_editor() { FilterRuleEditor *fe = new FilterRuleEditor(); - connect(fe, SIGNAL(destroyed()), - this, SLOT(slot_filters_update())); + connect(fe, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(slot_filters_update())); fe->show(); } -void servercontroller::font_update(const QFont &font) +void servercontroller::font_update(const TQFont &font) { ksopts->defaultFont = font; /* configChange(); */ @@ -386,12 +386,12 @@ void servercontroller::font_update(const QFont &font) KConfig *kConfig = kapp->config(); kConfig->setGroup("GlobalOptions"); kConfig->sync(); - QApplication::setFont( font, true, "KSirc::TextView" ); + TQApplication::setFont( font, true, "KSirc::TextView" ); } void servercontroller::configChange() { - QDictIterator<KSircProcess> it( proc_list ); + TQDictIterator<KSircProcess> it( proc_list ); while(it.current()){ it.current()->filters_update(); it.current()->getWindowList()["!all"]->control_message(REREAD_CONFIG, ""); @@ -401,10 +401,10 @@ void servercontroller::configChange() m_kga->updateConnections(); } -void servercontroller::ProcMessage(QString server, int command, QString args) +void servercontroller::ProcMessage(TQString server, int command, TQString args) { - QListViewItem *serverItem = 0L; - QListViewItem *item = ConnectionTree->firstChild(); + TQListViewItem *serverItem = 0L; + TQListViewItem *item = ConnectionTree->firstChild(); while ( item ) { if ( !item->parent() && item->text(0) == server ) { serverItem = item; @@ -428,7 +428,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) // Args == nick comming on/offline. case ProcCommand::nickOffline: { - QListViewItem *online_item = findChild(serverItem, i18n("Online")); + TQListViewItem *online_item = findChild(serverItem, i18n("Online")); if(online_item){ item = findChild(online_item, args); delete item; @@ -442,9 +442,9 @@ void servercontroller::ProcMessage(QString server, int command, QString args) } case ProcCommand::nickOnline: { - QListViewItem *online_item = findChild(serverItem, i18n("Online")); + TQListViewItem *online_item = findChild(serverItem, i18n("Online")); if(!online_item){ - online_item = new QListViewItem(serverItem, i18n("Online")); + online_item = new TQListViewItem(serverItem, i18n("Online")); online_item->setPixmap( 0, pic_gf ); online_item->setOpen( true ); } @@ -454,7 +454,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) delete item; } } - item = new QListViewItem(online_item, args); + item = new TQListViewItem(online_item, args); item->setPixmap( 0, pic_run ); if(ksopts->runDocked && ksopts->dockPopups) KPassivePopup::message(i18n("%1 just came online on %2").arg(args).arg(server), dockWidget); @@ -490,7 +490,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) if(args[0] == '!') args.remove(0, 1); // If the first char is !, it's control, remove it // add a new child item with parent as it's parent - item = new QListViewItem( serverItem, args ); + item = new TQListViewItem( serverItem, args ); item->setPixmap( 0, pic_ppl ); open_toplevels++; @@ -543,7 +543,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) item = findChild( serverItem, old_s ); delete item; - item = new QListViewItem( serverItem, new_s ); + item = new TQListViewItem( serverItem, new_s ); item->setPixmap( 0, pic_ppl ); delete[] new_s; @@ -578,7 +578,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) void servercontroller::slot_filters_update() { - emit ServMessage(QString(), ServCommand::updateFilters, QString()); + emit ServMessage(TQString(), ServCommand::updateFilters, TQString()); } void servercontroller::saveGlobalProperties(KConfig *ksc) @@ -589,7 +589,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc) // Ignore all !<name> windows - QString group = ksc->group(); + TQString group = ksc->group(); ksc->setGroup( "KSircSession" ); SessionConfigMap::ConstIterator it = m_sessionConfig.begin(); @@ -597,15 +597,15 @@ void servercontroller::saveGlobalProperties(KConfig *ksc) ChannelSessionInfoList infoList = *it; - QStringList channels; - QString port = "6667"; - QStringList desktops; + TQStringList channels; + TQString port = "6667"; + TQStringList desktops; for ( ChannelSessionInfoList::ConstIterator sessionInfoIt = infoList.begin(); sessionInfoIt != infoList.end(); ++sessionInfoIt ) { channels << ( *sessionInfoIt ).name; port = ( *sessionInfoIt ).port; - desktops << QString::number( ( *sessionInfoIt ).desktop ); + desktops << TQString::number( ( *sessionInfoIt ).desktop ); } KConfigGroup( ksc, "KSircSession" ).writeEntry( it.key(), channels ); @@ -621,7 +621,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc) void servercontroller::readGlobalProperties(KConfig *ksc) { - QString group = ksc->group(); + TQString group = ksc->group(); // ksc == K Session Config @@ -631,22 +631,22 @@ void servercontroller::readGlobalProperties(KConfig *ksc) // commented in for testing... ksc->setGroup( "KSircSession" ); - QMap<QString,QString> keyMap = ksc->entryMap( ksc->group() ); - QMap<QString,QString>::Iterator it = keyMap.begin(); + TQMap<TQString,TQString> keyMap = ksc->entryMap( ksc->group() ); + TQMap<TQString,TQString>::Iterator it = keyMap.begin(); while(it != keyMap.end()) { - QString server = it.key(); - QString port = KConfigGroup( ksc, "KSircSessionPort" ).readEntry( server ); + TQString server = it.key(); + TQString port = KConfigGroup( ksc, "KSircSessionPort" ).readEntry( server ); // debug("%s", it.key().latin1()); KSircServer kss(server, port); new_ksircprocess( kss ); // sets up proc_list - QStringList channels = ksc->readListEntry( server ); + TQStringList channels = ksc->readListEntry( server ); - QStringList desktops = KConfigGroup( ksc, "KSircSessionDesktopNumbers" ).readListEntry( server ); + TQStringList desktops = KConfigGroup( ksc, "KSircSessionDesktopNumbers" ).readListEntry( server ); for(uint i = 0; i < channels.count(); i++){ - QString channel = channels[ i ]; + TQString channel = channels[ i ]; proc_list[ server ]->new_toplevel( KSircChannel(server, channel), true ); @@ -654,7 +654,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc) if ( !topLevel || !topLevel->isTopLevel() ) continue; - QStringList::ConstIterator desktopNumberIt = desktops.at( i ); + TQStringList::ConstIterator desktopNumberIt = desktops.at( i ); if ( desktopNumberIt == desktops.end() ) continue; @@ -669,7 +669,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc) ++it; } - QRect geom; + TQRect geom; // ksc->setGroup("ServerController"); // bool docked = ksc->readBoolEntry("Docked", FALSE); @@ -687,11 +687,11 @@ void servercontroller::readGlobalProperties(KConfig *ksc) void servercontroller::saveSessionConfig() { - QDictIterator<KSircProcess> ksp(proc_list); + TQDictIterator<KSircProcess> ksp(proc_list); for (; ksp.current(); ++ksp ) { ChannelSessionInfoList channels; - QDictIterator<KSircMessageReceiver> ksm(ksp.current()->getWindowList()); + TQDictIterator<KSircMessageReceiver> ksm(ksp.current()->getWindowList()); for (; ksm.current(); ++ksm ) if(ksm.currentKey()[0] != '!') { // Ignore !ksm's (system created) ChannelSessionInfo sessionInfo; @@ -714,20 +714,20 @@ void servercontroller::saveSessionConfig() } } -void servercontroller::showEvent( QShowEvent *e ) +void servercontroller::showEvent( TQShowEvent *e ) { - QWidget::showEvent( e ); + TQWidget::showEvent( e ); if ( !e->spontaneous() ) saveDockingStatus(); } -void servercontroller::hideEvent( QHideEvent * ) +void servercontroller::hideEvent( TQHideEvent * ) { /* - QWidget::hideEvent( e ); + TQWidget::hideEvent( e ); if ( !e->spontaneous() ) saveDockingStatus(); - if(QWidget::isMinimized()){ + if(TQWidget::isMinimized()){ hide(); KWin::setState(winId(), NET::SkipTaskbar); } @@ -750,27 +750,27 @@ void servercontroller::endksirc(){ exit(0); } -void servercontroller::closeEvent( QCloseEvent *e ) +void servercontroller::closeEvent( TQCloseEvent *e ) { we_are_exiting = true; saveSessionConfig(); KMainWindow::closeEvent( e ); } -void servercontroller::WindowSelected(QListViewItem *item) +void servercontroller::WindowSelected(TQListViewItem *item) { if ( !item ) return; - QListViewItem *parent_server = item->parent(); + TQListViewItem *parent_server = item->parent(); if(!parent_server) return; - QString txt = QString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel"; - QWidget *obj = dynamic_cast<QWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel")); + TQString txt = TQString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel"; + TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel")); if(obj == 0x0){ - txt =QString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel"; - obj = dynamic_cast<QWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel")); + txt =TQString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel"; + obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel")); } if(obj != 0x0){ @@ -782,14 +782,14 @@ void servercontroller::WindowSelected(QListViewItem *item) } -QListViewItem * servercontroller::findChild( QListViewItem *parent, - const QString& text ) +TQListViewItem * servercontroller::findChild( TQListViewItem *parent, + const TQString& text ) { if ( !parent || parent->childCount() == 0 ) { return 0L; } - QListViewItem *item = parent->firstChild(); + TQListViewItem *item = parent->firstChild(); while ( item ) { if ( item->text(0) == text ) { return item; @@ -800,13 +800,13 @@ QListViewItem * servercontroller::findChild( QListViewItem *parent, return 0L; } -void servercontroller::increaseNotificationCount(const QString& reason, const QString& text) +void servercontroller::increaseNotificationCount(const TQString& reason, const TQString& text) { dockWidget->startBlink(reason, text); m_notificationCount++; } -void servercontroller::decreaseNotificationCount(QString reason) +void servercontroller::decreaseNotificationCount(TQString reason) { m_notificationCount--; if ( m_notificationCount == 0 ) @@ -821,8 +821,8 @@ void servercontroller::decreaseNotificationCount(QString reason) void servercontroller::resetNotification() { m_notificationCount = 0; - dockWidget->stopBlink(QString::null, true); - QDictIterator<KSircProcess> it( proc_list ); + dockWidget->stopBlink(TQString::null, true); + TQDictIterator<KSircProcess> it( proc_list ); while(it.current()){ it.current()->filters_update(); it.current()->getWindowList()["!all"]->control_message(RESET_NOTIF, ""); @@ -840,21 +840,21 @@ void servercontroller::do_autoconnect() KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); servers.sort(); - QStringList::ConstIterator ser = servers.begin(); + TQStringList::ConstIterator ser = servers.begin(); loop = 0; for( ; ser != servers.end(); ser++){ if(loop++ == stime){ stime++; - QString server = *ser; - QString port = "6667"; + TQString server = *ser; + TQString port = "6667"; bool usessl = false; - QString pass = QString::null; + TQString pass = TQString::null; - QRegExp rx("(.+) \\(SSL\\)(.*)"); + TQRegExp rx("(.+) \\(SSL\\)(.*)"); if(rx.search(server) >= 0){ server = rx.cap(1) + rx.cap(3); usessl = true; @@ -880,23 +880,23 @@ void servercontroller::do_autoconnect() ser = servers.begin(); for( ; ser != servers.end(); ser++){ - QStringList channels = conf->readListEntry(*ser); + TQStringList channels = conf->readListEntry(*ser); if(channels.empty() == FALSE){ channels.sort(); - QStringList::ConstIterator chan = channels.begin(); + TQStringList::ConstIterator chan = channels.begin(); for(; chan != channels.end(); chan++){ if(loop++ == ctime){ ctime++; - QString channel = *chan; - QString key = QString::null; - QRegExp crx("(.+) \\(key: (\\S+)\\)"); + TQString channel = *chan; + TQString key = TQString::null; + TQRegExp crx("(.+) \\(key: (\\S+)\\)"); if(crx.search(channel) >= 0){ channel = crx.cap(1); key = crx.cap(2); } - QString server = *ser; + TQString server = *ser; - QRegExp rx("^([^ :]+)"); + TQRegExp rx("^([^ :]+)"); if(rx.search(server) >= 0){ server = rx.cap(1); } @@ -916,8 +916,8 @@ void servercontroller::do_autoconnect() } void servercontroller::start_autoconnect() { - at = new QTimer(this); - connect(at, SIGNAL(timeout()), this, SLOT(do_autoconnect())); + at = new TQTimer(this); + connect(at, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_autoconnect())); at->start(250, FALSE); } @@ -925,36 +925,36 @@ void servercontroller::start_autoconnect_check() { KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); if(servers.count() == 0){ KSPrefs *kp = new KSPrefs(); - connect(kp, SIGNAL(update(int)), - this, SLOT(configChange())); + connect(kp, TQT_SIGNAL(update(int)), + this, TQT_SLOT(configChange())); kp->resize(550, 450); kp->showPage(7); /* Show auto connect page */ kp->show(); } else { - at = new QTimer(this); - connect(at, SIGNAL(timeout()), this, SLOT(do_autoconnect())); + at = new TQTimer(this); + connect(at, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_autoconnect())); at->start(250, FALSE); } } -scInside::scInside ( QWidget * parent, const char * name, WFlags +scInside::scInside ( TQWidget * parent, const char * name, WFlags f ) - : QFrame(parent, name, f) + : TQFrame(parent, name, f) { - ASConn = new QLabel(i18n("Active server connections:"), this, "servercontroller_label"); - QFont asfont = ASConn->font(); + ASConn = new TQLabel(i18n("Active server connections:"), this, "servercontroller_label"); + TQFont asfont = ASConn->font(); asfont.setBold(TRUE); ASConn->setFont(asfont); ConnectionTree = new KListView(this, "connectiontree"); - ConnectionTree->addColumn(QString::null); + ConnectionTree->addColumn(TQString::null); ConnectionTree->setRootIsDecorated( true ); ConnectionTree->setSorting( 0 ); ConnectionTree->header()->hide(); @@ -966,9 +966,9 @@ scInside::~scInside() delete ConnectionTree; } -void scInside::resizeEvent ( QResizeEvent *e ) +void scInside::resizeEvent ( TQResizeEvent *e ) { - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); ASConn->setGeometry(10,10, width() - 20, ASConn->fontMetrics().height()+5); ConnectionTree->setGeometry(10, 10 + ASConn->height(), diff --git a/ksirc/servercontroller.h b/ksirc/servercontroller.h index 54d0292c..2f45f3b2 100644 --- a/ksirc/servercontroller.h +++ b/ksirc/servercontroller.h @@ -19,10 +19,10 @@ class dockServerController; class ServMessage; class ProcCommand; -#include <qdict.h> -#include <qpixmap.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqdict.h> +#include <tqpixmap.h> +#include <tqheader.h> +#include <tqtimer.h> #include <klistview.h> #include <kmainwindow.h> @@ -69,15 +69,15 @@ class scInside : QFrame Q_OBJECT friend class servercontroller; public: - scInside ( QWidget *parent = 0L, const char * name = 0, WFlags f=0 ); + scInside ( TQWidget *parent = 0L, const char * name = 0, WFlags f=0 ); ~scInside(); protected: - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); private: KListView *ConnectionTree; - QLabel *ASConn; + TQLabel *ASConn; }; @@ -87,23 +87,23 @@ class servercontroller : public KMainWindow friend class dockServerController; public: - servercontroller ( QWidget* parent = 0L, const char* name = NULL ); + servercontroller ( TQWidget* parent = 0L, const char* name = NULL ); virtual ~servercontroller(); - const QDict<KSircProcess> &processes() const { return proc_list; } + const TQDict<KSircProcess> &processes() const { return proc_list; } static servercontroller *self() { return s_self; } /** * Someone is talking to the user (blue icon), notify him (using the docked icon). */ - void increaseNotificationCount(const QString& reason = QString::null, const QString& text = QString::null); + void increaseNotificationCount(const TQString& reason = TQString::null, const TQString& text = TQString::null); /** * The channel in which the user was talked to, has been read. * -> decrease count of blue icons. */ - void decreaseNotificationCount(QString reason = QString::null); + void decreaseNotificationCount(TQString reason = TQString::null); /** * This resets all notificaiton counts and allows new ones @@ -122,7 +122,7 @@ signals: */ virtual void filters_update(); - void ServMessage(QString server, int command, QString args); + void ServMessage(TQString server, int command, TQString args); public slots: // All slots are described in servercontroll.cpp file @@ -136,12 +136,12 @@ public slots: virtual void new_connection(); /** * Args: - * QString: new server name or IP to connect to. + * TQString: new server name or IP to connect to. * Action: * Creates a new sirc process and window !default connected to the * server. Does nothing if a server connection already exists. */ - // virtual void new_ksircprocess(QString); + // virtual void new_ksircprocess(TQString); virtual void new_ksircprocess(KSircServer &); /** * Creates popup asking for new channel name @@ -172,11 +172,11 @@ public slots: * Opens the dialog that lets the user configure system notifications */ virtual void notification_prefs(); - virtual void font_update(const QFont&); + virtual void font_update(const TQFont&); virtual void filter_rule_editor(); virtual void configChange(); - virtual void ProcMessage(QString server, int command, QString args); + virtual void ProcMessage(TQString server, int command, TQString args); /** * On quit we sync the config to disk and exit */ @@ -191,19 +191,19 @@ public slots: void start_autoconnect_check(); - QListViewItem * findChild( QListViewItem *parent, const QString& text ); + TQListViewItem * findChild( TQListViewItem *parent, const TQString& text ); protected slots: - void WindowSelected(QListViewItem *); + void WindowSelected(TQListViewItem *); void dump_obj(); void server_debug(); protected: - virtual void showEvent( QShowEvent *e ); - virtual void hideEvent( QHideEvent *e ); - virtual void closeEvent( QCloseEvent * ); + virtual void showEvent( TQShowEvent *e ); + virtual void hideEvent( TQHideEvent *e ); + virtual void closeEvent( TQCloseEvent * ); void saveDockingStatus(); void saveGlobalProperties(KConfig *); @@ -223,19 +223,19 @@ private: // Hold a list of all KSircProcess's for access latter. Index by server // name - QDict<KSircProcess> proc_list; - QPopupMenu *options, *connections; + TQDict<KSircProcess> proc_list; + TQPopupMenu *options, *connections; int join_id, server_id; KGlobalAccel *m_kga; int open_toplevels; - QPixmap pic_icon; - QPixmap pic_server; - QPixmap pic_gf; - QPixmap pic_run; - QPixmap pic_ppl; + TQPixmap pic_icon; + TQPixmap pic_server; + TQPixmap pic_gf; + TQPixmap pic_run; + TQPixmap pic_ppl; // PukeController *PukeC; @@ -249,18 +249,18 @@ private: { ChannelSessionInfo() : desktop( -1 ) {} - QString name; - QString port; + TQString name; + TQString port; int desktop; }; - typedef QValueList<ChannelSessionInfo> ChannelSessionInfoList; + typedef TQValueList<ChannelSessionInfo> ChannelSessionInfoList; - typedef QMap<QString, ChannelSessionInfoList> SessionConfigMap; + typedef TQMap<TQString, ChannelSessionInfoList> SessionConfigMap; SessionConfigMap m_sessionConfig; static servercontroller *s_self; - QTimer *at; + TQTimer *at; nickColourMaker *m_ncm; }; diff --git a/ksirc/ssfeprompt.cpp b/ksirc/ssfeprompt.cpp index 46e68909..74868c5b 100644 --- a/ksirc/ssfeprompt.cpp +++ b/ksirc/ssfeprompt.cpp @@ -15,8 +15,8 @@ ssfePrompt::ssfePrompt ( - QString prompttext, - QWidget* parent, + TQString prompttext, + TQWidget* parent, const char* name ) : @@ -37,9 +37,9 @@ void ssfePrompt::terminate() done(0); } -QString ssfePrompt::text() +TQString ssfePrompt::text() { - QString text; + TQString text; text = SLine->text(); return text; } @@ -47,8 +47,8 @@ QString ssfePrompt::text() void ssfePrompt::setPassword(bool pass) { if(pass == TRUE) - SLine->setEchoMode(QLineEdit::Password); + SLine->setEchoMode(TQLineEdit::Password); else - SLine->setEchoMode(QLineEdit::Normal); + SLine->setEchoMode(TQLineEdit::Normal); } #include "ssfeprompt.moc" diff --git a/ksirc/ssfeprompt.h b/ksirc/ssfeprompt.h index ff777912..5a239869 100644 --- a/ksirc/ssfeprompt.h +++ b/ksirc/ssfeprompt.h @@ -20,14 +20,14 @@ public: ssfePrompt ( - QString prompttext, - QWidget* parent = NULL, + TQString prompttext, + TQWidget* parent = NULL, const char* name = NULL ); virtual ~ssfePrompt(); - QString text(); + TQString text(); void setPassword(bool); protected slots: diff --git a/ksirc/ssfepromptdata.cpp b/ksirc/ssfepromptdata.cpp index ce1dc368..94e52002 100644 --- a/ksirc/ssfepromptdata.cpp +++ b/ksirc/ssfepromptdata.cpp @@ -20,13 +20,13 @@ ssfepromptdata::ssfepromptdata ( - QWidget* parent, + TQWidget* parent, const char* name ) : Inherited( parent, name, TRUE, 20480 ) { - prompt = new QLabel( this, "Label_1" ); + prompt = new TQLabel( this, "Label_1" ); prompt->setGeometry( 10, 10, 220, 30 ); prompt->setMinimumSize( 10, 10 ); prompt->setMaximumSize( 32767, 32767 ); @@ -34,22 +34,22 @@ ssfepromptdata::ssfepromptdata prompt->setAlignment( 289 ); prompt->setMargin( -1 ); - SLine = new QLineEdit( this, "LineEdit_1" ); + SLine = new TQLineEdit( this, "LineEdit_1" ); SLine->setGeometry( 240, 10, 100, 30 ); SLine->setMinimumSize( 10, 10 ); SLine->setMaximumSize( 32767, 32767 ); - connect( SLine, SIGNAL(returnPressed()), SLOT(terminate()) ); + connect( SLine, TQT_SIGNAL(returnPressed()), TQT_SLOT(terminate()) ); SLine->setText( "" ); SLine->setMaxLength( 32767 ); - SLine->setEchoMode( QLineEdit::Normal ); + SLine->setEchoMode( TQLineEdit::Normal ); SLine->setFrame( TRUE ); - QPushButton* dlgedit_PushButton_1; + TQPushButton* dlgedit_PushButton_1; dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::ok(), this, "PushButton_1" ); dlgedit_PushButton_1->setGeometry( 240, 50, 100, 30 ); dlgedit_PushButton_1->setMinimumSize( 10, 10 ); dlgedit_PushButton_1->setMaximumSize( 32767, 32767 ); - connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(terminate()) ); + connect( dlgedit_PushButton_1, TQT_SIGNAL(clicked()), TQT_SLOT(terminate()) ); dlgedit_PushButton_1->setAutoRepeat( FALSE ); dlgedit_PushButton_1->setAutoDefault( TRUE ); diff --git a/ksirc/ssfepromptdata.h b/ksirc/ssfepromptdata.h index c4b6a4e6..e4b97994 100644 --- a/ksirc/ssfepromptdata.h +++ b/ksirc/ssfepromptdata.h @@ -13,9 +13,9 @@ #ifndef ssfepromptdata_included #define ssfepromptdata_included -#include <qdialog.h> -#include <qlabel.h> -#include <qlineedit.h> +#include <tqdialog.h> +#include <tqlabel.h> +#include <tqlineedit.h> class ssfepromptdata : public QDialog { @@ -25,7 +25,7 @@ public: ssfepromptdata ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -39,8 +39,8 @@ protected slots: virtual void terminate(); protected: - QLabel* prompt; - QLineEdit* SLine; + TQLabel* prompt; + TQLineEdit* SLine; }; diff --git a/ksirc/stringparserstate.h b/ksirc/stringparserstate.h index cd9220a4..04fb96ea 100644 --- a/ksirc/stringparserstate.h +++ b/ksirc/stringparserstate.h @@ -11,7 +11,7 @@ public: typedef CharType ValueType; typedef const CharType * ConstIterator; typedef _SizeType SizeType; - typedef QValueList<ValueType> ValueList; + typedef TQValueList<ValueType> ValueList; StringParserState( ConstIterator start, SizeType maxSteps, const ValueList &optionalEndItems = ValueList() ) diff --git a/ksirc/topic.cpp b/ksirc/topic.cpp index 9e0d8f3e..49334f43 100644 --- a/ksirc/topic.cpp +++ b/ksirc/topic.cpp @@ -8,12 +8,12 @@ #include "topic.h" -#include <qapplication.h> -#include <qtimer.h> -#include <qregexp.h> -#include <qlayout.h> -#include <qtextedit.h> -#include <qtooltip.h> +#include <tqapplication.h> +#include <tqtimer.h> +#include <tqregexp.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqtooltip.h> #include <kapplication.h> #include <kdebug.h> @@ -28,27 +28,27 @@ #include "ksparser.h" -KSircTopic::KSircTopic( QWidget *parent, const char *name ) +KSircTopic::KSircTopic( TQWidget *parent, const char *name ) : KActiveLabel( parent, name ) { m_editor = 0; m_doEdit = false; m_height = 0; // setBackgroundColor( colorGroup().light() ); - setFrameStyle( QFrame::Panel | QFrame::Sunken ); - setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); setTextFormat( RichText ); - setWordWrap(QTextEdit::NoWrap); + setWordWrap(TQTextEdit::NoWrap); doResize(); // setAlignment( alignment() | WordBreak ); } -void KSircTopic::setText( const QString &_text) +void KSircTopic::setText( const TQString &_text) { m_text = _text; /* save a raw copy for us */ - QString text = _text; + TQString text = _text; - QString richText( "<font color=\"%1\">" ); + TQString richText( "<font color=\"%1\">" ); richText = richText.arg( ksopts->textColor.name() ); text.replace('&', "&"); @@ -64,12 +64,12 @@ void KSircTopic::setText( const QString &_text) // according to UV Kochavi <uv1st@yahoo.com> , to prevent output like // '<nick message<' , which is supposedly a bug in Qt's reordering. The // same is done for [nick] and >nick< to catch queries. - QRegExp bidiRe( "^(<\\S+>)(.+)$" ); - text.replace( bidiRe, QString::fromLatin1( "<span>\\1</span>\\2" ) ); - QRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); - text.replace( bidiRe2, QString::fromLatin1( "<span>\\1</span>\\2" ) ); - QRegExp bidiRe3( "^(>\\S+<)(.+)$" ); - text.replace( bidiRe3, QString::fromLatin1( "<span>\\1</span>\\2" ) ); + TQRegExp bidiRe( "^(<\\S+>)(.+)$" ); + text.replace( bidiRe, TQString::fromLatin1( "<span>\\1</span>\\2" ) ); + TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); + text.replace( bidiRe2, TQString::fromLatin1( "<span>\\1</span>\\2" ) ); + TQRegExp bidiRe3( "^(>\\S+<)(.+)$" ); + text.replace( bidiRe3, TQString::fromLatin1( "<span>\\1</span>\\2" ) ); KSParser parser; richText += parser.parse( text ); @@ -82,12 +82,12 @@ void KSircTopic::setText( const QString &_text) } -void KSircTopic::contentsMouseDoubleClickEvent( QMouseEvent * ) +void KSircTopic::contentsMouseDoubleClickEvent( TQMouseEvent * ) { m_doEdit = true; } -void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) +void KSircTopic::contentsMouseReleaseEvent( TQMouseEvent *e ) { if ( m_doEdit ) { m_doEdit = false; @@ -99,12 +99,12 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) m_editor = new KSircTopicEditor( this ); - connect( m_editor, SIGNAL( returnPressed() ), - this, SLOT( setNewTopic() ) ); - connect( m_editor, SIGNAL( resized() ), - this, SLOT( slotEditResized() ) ); - connect( m_editor, SIGNAL( destroyed() ), - this, SLOT( doResize() ) ); + connect( m_editor, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setNewTopic() ) ); + connect( m_editor, TQT_SIGNAL( resized() ), + this, TQT_SLOT( slotEditResized() ) ); + connect( m_editor, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( doResize() ) ); /* * If you don't do this order @@ -116,7 +116,7 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) m_editor->show(); m_editor->setText( m_text ); - QToolTip::remove(this); + TQToolTip::remove(this); } KActiveLabel::contentsMouseReleaseEvent(e); @@ -124,7 +124,7 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) void KSircTopic::setNewTopic() { - QString topic = m_editor->text().stripWhiteSpace(); + TQString topic = m_editor->text().stripWhiteSpace(); /* * don't change the channel display @@ -132,9 +132,9 @@ void KSircTopic::setNewTopic() * from the server. If we can't set the topic * don't make it look like it was set */ - QTimer::singleShot( 0, m_editor, SLOT( close() ) ); - disconnect( m_editor, SIGNAL( resized() ), - this, SLOT( slotEditResized() ) ); + TQTimer::singleShot( 0, m_editor, TQT_SLOT( close() ) ); + disconnect( m_editor, TQT_SIGNAL( resized() ), + this, TQT_SLOT( slotEditResized() ) ); doResize(); emit topicChange( topic ); } @@ -149,18 +149,18 @@ void KSircTopic::doResize() { int h; - QFontMetrics metrics( currentFont() ); + TQFontMetrics metrics( currentFont() ); h = metrics.lineSpacing()+8; m_height = h; setFixedHeight( h ); - QToolTip::remove(this); - QStringList sep = QStringList::split(" ", m_text); + TQToolTip::remove(this); + TQStringList sep = TQStringList::split(" ", m_text); int len = 0; - QString brok; - QStringList::Iterator it = sep.begin(); + TQString brok; + TQStringList::Iterator it = sep.begin(); for(; it != sep.end(); ++it) { brok += *it + " "; len += (*it).length(); @@ -170,30 +170,30 @@ void KSircTopic::doResize() } } - QToolTip::add(this, brok); + TQToolTip::add(this, brok); } -void KSircTopic::fontChange(QFont &f) +void KSircTopic::fontChange(TQFont &f) { KActiveLabel::fontChange(f); doResize(); } -KSircTopicEditor::KSircTopicEditor( QWidget *parent, const char *name ) - : QTextEdit( parent, name ) +KSircTopicEditor::KSircTopicEditor( TQWidget *parent, const char *name ) + : TQTextEdit( parent, name ) { setWFlags( WDestructiveClose ); - setFocusPolicy( QWidget::ClickFocus ); - connect( this, SIGNAL( textChanged () ), this, SLOT( slotMaybeResize() ) ); + setFocusPolicy( TQWidget::ClickFocus ); + connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) ); } -void KSircTopicEditor::keyPressEvent( QKeyEvent *ev ) +void KSircTopicEditor::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Escape ) { ev->accept(); - QTimer::singleShot( 0, this, SLOT( close() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( close() ) ); return; } else if ( ev->key() == Key_Return ) @@ -202,26 +202,26 @@ void KSircTopicEditor::keyPressEvent( QKeyEvent *ev ) emit returnPressed(); return; } - QTextEdit::keyPressEvent( ev ); + TQTextEdit::keyPressEvent( ev ); } -void KSircTopicEditor::focusOutEvent( QFocusEvent * ) +void KSircTopicEditor::focusOutEvent( TQFocusEvent * ) { // we don't want to quit editing when someone brings up QLE's popup // menu - if ( QFocusEvent::reason() == QFocusEvent::Popup ) + if ( TQFocusEvent::reason() == TQFocusEvent::Popup ) { - QWidget *focusw = qApp->focusWidget(); + TQWidget *focusw = qApp->focusWidget(); if ( focusw && m_popup && focusw == m_popup ) return; } - QTimer::singleShot( 0, this, SLOT( close() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( close() ) ); } -QPopupMenu *KSircTopicEditor::createPopupMenu( const QPoint &pos ) +TQPopupMenu *KSircTopicEditor::createPopupMenu( const TQPoint &pos ) { - QPopupMenu *popup = QTextEdit::createPopupMenu( pos ); + TQPopupMenu *popup = TQTextEdit::createPopupMenu( pos ); m_popup = popup; return popup; } @@ -229,13 +229,13 @@ QPopupMenu *KSircTopicEditor::createPopupMenu( const QPoint &pos ) void KSircTopicEditor::slotMaybeResize() { if(text().contains("\n")){ - QString s = text(); + TQString s = text(); s.replace('\n', " "); setText(s); setCursorPosition(0, s.length()); } - QFontMetrics metrics( currentFont() ); + TQFontMetrics metrics( currentFont() ); int h = metrics.lineSpacing() * lines()+8; setFixedHeight( h ); diff --git a/ksirc/topic.h b/ksirc/topic.h index 73191128..e435d864 100644 --- a/ksirc/topic.h +++ b/ksirc/topic.h @@ -8,10 +8,10 @@ #define __topic_h__ #include <kactivelabel.h> -#include <qtextedit.h> -#include <qlineedit.h> -#include <qpopupmenu.h> -#include <qguardedptr.h> +#include <tqtextedit.h> +#include <tqlineedit.h> +#include <tqpopupmenu.h> +#include <tqguardedptr.h> class KSircTopicEditor; @@ -19,18 +19,18 @@ class KSircTopic : public KActiveLabel { Q_OBJECT public: - KSircTopic( QWidget *parent, const char *name = 0 ); + KSircTopic( TQWidget *parent, const char *name = 0 ); public slots: - virtual void setText( const QString &); + virtual void setText( const TQString &); signals: - void topicChange( const QString &newTopic ); + void topicChange( const TQString &newTopic ); protected: - virtual void contentsMouseDoubleClickEvent( QMouseEvent * ); - virtual void contentsMouseReleaseEvent( QMouseEvent * ); - virtual void fontChange(QFont &); + virtual void contentsMouseDoubleClickEvent( TQMouseEvent * ); + virtual void contentsMouseReleaseEvent( TQMouseEvent * ); + virtual void fontChange(TQFont &); private slots: void setNewTopic(); @@ -40,17 +40,17 @@ private slots: private: - QGuardedPtr<KSircTopicEditor> m_editor; + TQGuardedPtr<KSircTopicEditor> m_editor; bool m_doEdit; int m_height; - QString m_text; + TQString m_text; }; class KSircTopicEditor : public QTextEdit { Q_OBJECT public: - KSircTopicEditor( QWidget *parent, const char *name = 0 ); + KSircTopicEditor( TQWidget *parent, const char *name = 0 ); signals: void resized(); @@ -59,12 +59,12 @@ public slots: virtual void slotMaybeResize(); protected: - virtual void keyPressEvent( QKeyEvent *ev ); - virtual void focusOutEvent( QFocusEvent * ); - virtual QPopupMenu *createPopupMenu( const QPoint &pos ); + virtual void keyPressEvent( TQKeyEvent *ev ); + virtual void focusOutEvent( TQFocusEvent * ); + virtual TQPopupMenu *createPopupMenu( const TQPoint &pos ); private: - QGuardedPtr<QPopupMenu> m_popup; + TQGuardedPtr<TQPopupMenu> m_popup; }; #endif diff --git a/ksirc/toplevel.cpp b/ksirc/toplevel.cpp index f064a291..f5f4d002 100644 --- a/ksirc/toplevel.cpp +++ b/ksirc/toplevel.cpp @@ -15,12 +15,12 @@ Signals: - outputLine(QString &): - output_toplevel(QString): + outputLine(TQString &): + output_toplevel(TQString): - closing(KSircTopLevel *, QString channel): + closing(KSircTopLevel *, TQString channel): - changeChannel(QString old, QString new): + changeChannel(TQString old, TQString new): currentWindow(KSircTopLevel *): @@ -49,15 +49,15 @@ #include <stdlib.h> -#include <qaccel.h> -#include <qclipboard.h> -#include <qregexp.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qtextcodec.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqaccel.h> +#include <tqclipboard.h> +#include <tqregexp.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqtextcodec.h> +#include <tqvbox.h> +#include <tqlabel.h> #include <kmenubar.h> #include <kapplication.h> @@ -78,26 +78,26 @@ #include <kstdguiitem.h> extern DisplayMgr *displayMgr; -//QPopupMenu *KSircTopLevel::user_controls = 0L; -QPtrList<UserControlMenu> *KSircTopLevel::user_menu = 0L; -QStringList KSircTopLevel::cmd_menu; +//TQPopupMenu *KSircTopLevel::user_controls = 0L; +TQPtrList<UserControlMenu> *KSircTopLevel::user_menu = 0L; +TQStringList KSircTopLevel::cmd_menu; void KSircTopLevel::initColors() { - QColorGroup cg_mainw = kapp->palette().active(); - cg_mainw.setColor(QColorGroup::Base, ksopts->backgroundColor); - cg_mainw.setColor(QColorGroup::Text, ksopts->textColor); - cg_mainw.setColor(QColorGroup::Link, ksopts->linkColor); - cg_mainw.setColor(QColorGroup::Highlight, ksopts->selBackgroundColor); - cg_mainw.setColor(QColorGroup::HighlightedText, ksopts->selForegroundColor); - mainw->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - nicks->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - linee->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - lag->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - cg_mainw.setColor(QColorGroup::Background, ksopts->backgroundColor); - cg_mainw.setColor(QColorGroup::Foreground, ksopts->textColor); - ksTopic->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); + TQColorGroup cg_mainw = kapp->palette().active(); + cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor); + cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor); + cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor); + cg_mainw.setColor(TQColorGroup::Highlight, ksopts->selBackgroundColor); + cg_mainw.setColor(TQColorGroup::HighlightedText, ksopts->selForegroundColor); + mainw->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + nicks->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + linee->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + lag->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + cg_mainw.setColor(TQColorGroup::Background, ksopts->backgroundColor); + cg_mainw.setColor(TQColorGroup::Foreground, ksopts->textColor); + ksTopic->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); selector->setFont( ksopts->defaultFont.family() ); mainw->setFont( ksopts->defaultFont ); nicks->setFont( ksopts->defaultFont ); @@ -109,7 +109,7 @@ KSircTopLevel::initColors() KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInfo, const char * name) : KMainWindow(0, name, 0/*no WDestructiveClose !*/), UnicodeMessageReceiver(_proc), - lastBeep( QTime::currentTime() ), + lastBeep( TQTime::currentTime() ), m_channelInfo(channelInfo) { @@ -119,9 +119,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf kapp->ref(); - m_topic = QString::null; + m_topic = TQString::null; - QCString kstl_name = QCString(QObject::name()) + "_" + "toplevel"; + TQCString kstl_name = TQCString(TQObject::name()) + "_" + "toplevel"; setName(kstl_name); if(!m_channelInfo.channel().isEmpty()) { @@ -130,7 +130,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf } else { - caption = QString::null; + caption = TQString::null; } Buffer = FALSE; @@ -149,34 +149,34 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf m_channelInfo.setEncoding(ksopts->chan(m_channelInfo).encoding); selector = new charSelector(); - connect(selector, SIGNAL(clicked()), this, SLOT(insertText())); + connect(selector, TQT_SIGNAL(clicked()), this, TQT_SLOT(insertText())); selector->setFont(ksopts->defaultFont.family()); - file = new QPopupMenu(this, QCString(QObject::name()) + "_popup_file"); + file = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_file"); file->setCheckable(true); - KAction *act = KStdAction::openNew( this, SLOT( newWindow() ), actionCollection() ); + KAction *act = KStdAction::openNew( this, TQT_SLOT( newWindow() ), actionCollection() ); act->plug( file ); - file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), SLOT(new_connection()), Key_F2); + file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), TQT_SLOT(new_connection()), Key_F2); file->insertSeparator(); - file->insertItem(i18n("&DCC Manager..."), this, SLOT(showDCCMgr())); - file->insertItem(i18n("&Save to Logfile..."), this, SLOT(saveCurrLog()), CTRL + Key_S); + file->insertItem(i18n("&DCC Manager..."), this, TQT_SLOT(showDCCMgr())); + file->insertItem(i18n("&Save to Logfile..."), this, TQT_SLOT(saveCurrLog()), CTRL + Key_S); - tsitem = file->insertItem(i18n("Time St&"), this, SLOT(toggleTimestamp()), CTRL + Key_T); + tsitem = file->insertItem(i18n("Time St&"), this, TQT_SLOT(toggleTimestamp()), CTRL + Key_T); file->setItemChecked(tsitem, ksopts->chan(m_channelInfo).timeStamp); - fjpitem = file->insertItem(i18n("Hide Join/Part Messages"), this, SLOT(toggleFilterJoinPart())); + fjpitem = file->insertItem(i18n("Hide Join/Part Messages"), this, TQT_SLOT(toggleFilterJoinPart())); file->setItemChecked(fjpitem, ksopts->chan(m_channelInfo).filterJoinPart); - file->insertItem(i18n("Character &Table"), selector, SLOT(show()), CTRL + Key_H); - beepitem = file->insertItem(i18n("N&otify on Change"), this, SLOT(toggleBeep()), CTRL + Key_P); + file->insertItem(i18n("Character &Table"), selector, TQT_SLOT(show()), CTRL + Key_H); + beepitem = file->insertItem(i18n("N&otify on Change"), this, TQT_SLOT(toggleBeep()), CTRL + Key_P); file->setItemChecked(beepitem, ksopts->chan(m_channelInfo).beepOnMsg); encodingAction = new KSelectAction( i18n( "&Encoding" ), 0, this ); - connect( encodingAction, SIGNAL( activated() ), this, SLOT( setEncoding() ) ); - QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); + connect( encodingAction, TQT_SIGNAL( activated() ), this, TQT_SLOT( setEncoding() ) ); + TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); - topicitem = file->insertItem(i18n("S&how Topic"), this, SLOT(toggleTopic()), CTRL + Key_O); + topicitem = file->insertItem(i18n("S&how Topic"), this, TQT_SLOT(toggleTopic()), CTRL + Key_O); if (isPrivateChat() || m_channelInfo.channel().startsWith("!no_channel")) { file->setItemEnabled(topicitem, false); } @@ -184,10 +184,10 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf file->setItemChecked(topicitem, ksopts->chan(m_channelInfo).topicShow); } - tickeritem = file->insertItem(i18n("Ticker &Mode"), this, SLOT(toggleTicker())); + tickeritem = file->insertItem(i18n("Ticker &Mode"), this, TQT_SLOT(toggleTicker())); // remove utf16/ucs2 as it just doesn't work for IRC - QStringList::Iterator encodingIt = encodings.begin(); + TQStringList::Iterator encodingIt = encodings.begin(); while ( encodingIt != encodings.end() ) { if ( ( *encodingIt ).find( "utf16" ) != -1 || ( *encodingIt ).find( "iso-10646" ) != -1 ) @@ -208,7 +208,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf setEncoding(); file->insertSeparator(); - act = KStdAction::close( this, SLOT( terminate() ), actionCollection() ); + act = KStdAction::close( this, TQT_SLOT( terminate() ), actionCollection() ); act->plug( file ); kmenu = menuBar(); @@ -217,26 +217,26 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf /* * Ok, let's look at the basic widget "layout" - * Everything belongs to q QFrame F, this is use so we + * Everything belongs to q TQFrame F, this is use so we * can give the KApplication a single main client widget, which is needs. * * A QVbox and a QHbox is used to ctronl the 3 sub widget - * The Modified QListBox is then added side by side with the User list box. + * The Modified TQListBox is then added side by side with the User list box. * The SLE is then fit bello. */ // kstInside does not setup fonts, etc, it simply handles sizing - top = new QVBox( this ); + top = new TQVBox( this ); ksTopic = new KSircTopic( top ); ksTopic->setFont(ksopts->defaultFont); - connect( ksTopic, SIGNAL( topicChange( const QString & ) ), - this, SLOT( setTopicIntern( const QString & ) ) ); + connect( ksTopic, TQT_SIGNAL( topicChange( const TQString & ) ), + this, TQT_SLOT( setTopicIntern( const TQString & ) ) ); - QCString kstn = QCString(QObject::name()) + "_"; + TQCString kstn = TQCString(TQObject::name()) + "_"; - pan = new QSplitter(QSplitter::Horizontal, top, kstn + "splitter"); + pan = new TQSplitter(TQSplitter::Horizontal, top, kstn + "splitter"); #if KDE_IS_VERSION(3,1,92) pan->setOpaqueResize( KGlobalSettings::opaqueResize() ); #else @@ -244,31 +244,31 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf #endif mainw = new KSircView(ksircProcess(), pan, kstn + "KSircView" ); - mainw->setFocusPolicy(QWidget::NoFocus); + mainw->setFocusPolicy(TQWidget::NoFocus); - nicks_box = new QVBox(pan); + nicks_box = new TQVBox(pan); channelButtons = new chanButtons(ksircProcess(), nicks_box); - connect(channelButtons, SIGNAL(mode(QString, int, QString)), - this, SLOT(setMode(QString, int, QString))); + connect(channelButtons, TQT_SIGNAL(mode(TQString, int, TQString)), + this, TQT_SLOT(setMode(TQString, int, TQString))); nicks = new aListBox(nicks_box, kstn + "aListBox"); - nicks->setFocusPolicy(QWidget::NoFocus); + nicks->setFocusPolicy(TQWidget::NoFocus); //nicks->hide(); // default = only the main widget - lag = new QLabel(nicks_box); - lag->setFrameStyle(QFrame::Panel|QFrame::Sunken); + lag = new TQLabel(nicks_box); + lag->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); lag->setAlignment(Qt::AlignCenter | Qt::SingleLine); lag->setText(i18n("Lag: Wait")); - QValueList<int> sizes; + TQValueList<int> sizes; sizes << int(width()*0.85) << int(width()*0.15); pan->setSizes(sizes); - pan->setResizeMode( mainw, QSplitter::Stretch ); - pan->setResizeMode( nicks_box, QSplitter::Stretch ); + pan->setResizeMode( mainw, TQSplitter::Stretch ); + pan->setResizeMode( nicks_box, TQSplitter::Stretch ); -// f = new kstInside(top, QString(QObject::name()) + "_" + "kstIFrame"); +// f = new kstInside(top, TQString(TQObject::name()) + "_" + "kstIFrame"); top->setStretchFactor(pan, 1); setCentralWidget(top); // Tell the KApplication what the main widget is. @@ -291,15 +291,15 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf if(isPrivateChat()){ KConfig conf("ksirc/winlog/" + channelInfo.server() + "-" + channelInfo.channel(), false, false, "data"); - QString group = "Message-History"; + TQString group = "Message-History"; if(conf.hasGroup( group )){ conf.setGroup( group ); - QStringList strlist = conf.readListEntry("History"); + TQStringList strlist = conf.readListEntry("History"); if(strlist.count() > 0){ mainw->enableTimeStamps(true); - for ( QStringList::Iterator it = strlist.begin(); + for ( TQStringList::Iterator it = strlist.begin(); it != strlist.end(); ++it ) { mainw->addRichText(*it); @@ -311,12 +311,12 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf mainw->enableTimeStamps(ksopts->chan(m_channelInfo).timeStamp); - edit = new QPopupMenu(this); - act = KStdAction::copy( mainw, SLOT( copy() ), actionCollection() ); + edit = new TQPopupMenu(this); + act = KStdAction::copy( mainw, TQT_SLOT( copy() ), actionCollection() ); act->plug( edit ); - act = KStdAction::paste( this, SLOT( pasteToWindow() ), actionCollection() ); + act = KStdAction::paste( this, TQT_SLOT( pasteToWindow() ), actionCollection() ); act->plug( edit ); - edit->insertItem(i18n("C&lear Window"), this, SLOT(clearWindow()), CTRL + Key_L); + edit->insertItem(i18n("C&lear Window"), this, TQT_SLOT(clearWindow()), CTRL + Key_L); kmenu->insertItem(i18n("&Edit"), edit, -1, -1); linee = new aHistLineEdit(top, ""); @@ -353,34 +353,34 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf } - connect(mainw, SIGNAL(pasteReq( const QString& )), - this, SLOT( slotTextDropped( const QString& ))); + connect(mainw, TQT_SIGNAL(pasteReq( const TQString& )), + this, TQT_SLOT( slotTextDropped( const TQString& ))); nicks->setFont(ksopts->defaultFont); // setup line editor - linee->setFocusPolicy(QWidget::StrongFocus); + linee->setFocusPolicy(TQWidget::StrongFocus); linee->setFont(ksopts->defaultFont); if(ksopts->oneLineEntry == true) { - linee->setWordWrap(QTextEdit::NoWrap); + linee->setWordWrap(TQTextEdit::NoWrap); } else { - linee->setWordWrap(QTextEdit::WidgetWidth); + linee->setWordWrap(TQTextEdit::WidgetWidth); } - connect(linee, SIGNAL(gotFocus()), - this, SLOT(gotFocus())); - connect(linee, SIGNAL(lostFocus()), - this, SLOT(lostFocus())); - connect(linee, SIGNAL(pasteText(const QString&)), - this, SLOT(slotTextDropped(const QString&))); - connect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + connect(linee, TQT_SIGNAL(gotFocus()), + this, TQT_SLOT(gotFocus())); + connect(linee, TQT_SIGNAL(lostFocus()), + this, TQT_SLOT(lostFocus())); + connect(linee, TQT_SIGNAL(pasteText(const TQString&)), + this, TQT_SLOT(slotTextDropped(const TQString&))); + connect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); - connect( linee, SIGNAL( gotReturnPressed() ), - this, SLOT( returnPressed() ) ); + connect( linee, TQT_SIGNAL( gotReturnPressed() ), + this, TQT_SLOT( returnPressed() ) ); linee->setFocus(); // Give SLE focus linee->slotMaybeResize(); @@ -421,56 +421,56 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf if(user_menu == 0) user_menu = UserControlMenu::parseKConfig(); - user_controls = new QPopupMenu(this); + user_controls = new TQPopupMenu(this); kmenu->insertItem(i18n("&Users"), user_controls); - command = new QPopupMenu(this); + command = new TQPopupMenu(this); setupCommandMenu(); int i = 0; - QDict<QPopupMenu> cml; - for(QStringList::Iterator it = cmd_menu.begin(); + TQDict<TQPopupMenu> cml; + for(TQStringList::Iterator it = cmd_menu.begin(); it != cmd_menu.end(); ++it){ - QString top, item; + TQString top, item; top = (*it).section('/', 0, 0); item = (*it).section('/', 1, 1); if(!cml[top]) { - cml.insert(top, new QPopupMenu(this)); + cml.insert(top, new TQPopupMenu(this)); command->insertItem(top, cml[top]); } - cml[top]->insertItem(item, this, SLOT(cmd_process(int)), 0, i); + cml[top]->insertItem(item, this, TQT_SLOT(cmd_process(int)), 0, i); i++; } kmenu->insertItem(i18n("C&ommand"), command); - kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( QString::null, false )); + kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( TQString::null, false )); - connect(user_controls, SIGNAL(activated(int)), - this, SLOT(UserParseMenu(int))); + connect(user_controls, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(UserParseMenu(int))); - connect(nicks, SIGNAL(contextMenuRequested(int)), this, - SLOT(UserSelected(int))); - connect(nicks, SIGNAL(selectedNick(const QString &)), - this, SLOT(openQueryFromNick(const QString &))); - connect(nicks, SIGNAL(mouseButtonClicked ( int, QListBoxItem *, const QPoint &)), - this, SLOT(pasteToNickList(int, QListBoxItem *, const QPoint &))); - connect(nicks, SIGNAL(textDropped( const QListBoxItem *, const QString& )), - this, SLOT(dndTextToNickList(const QListBoxItem *, const QString&))); + connect(nicks, TQT_SIGNAL(contextMenuRequested(int)), this, + TQT_SLOT(UserSelected(int))); + connect(nicks, TQT_SIGNAL(selectedNick(const TQString &)), + this, TQT_SLOT(openQueryFromNick(const TQString &))); + connect(nicks, TQT_SIGNAL(mouseButtonClicked ( int, TQListBoxItem *, const TQPoint &)), + this, TQT_SLOT(pasteToNickList(int, TQListBoxItem *, const TQPoint &))); + connect(nicks, TQT_SIGNAL(textDropped( const TQListBoxItem *, const TQString& )), + this, TQT_SLOT(dndTextToNickList(const TQListBoxItem *, const TQString&))); UserUpdateMenu(); // Must call to update Popup. - accel = new QAccel(this, "accel"); + accel = new TQAccel(this, "accel"); accel->connectItem(accel->insertItem(SHIFT + Key_PageUp), this, - SLOT(AccelScrollUpPage())); + TQT_SLOT(AccelScrollUpPage())); accel->connectItem(accel->insertItem(SHIFT + Key_PageDown), this, - SLOT(AccelScrollDownPage())); + TQT_SLOT(AccelScrollDownPage())); /* * Pageup/dn @@ -479,41 +479,41 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf accel->connectItem(accel->insertItem(Key_PageUp), this, - SLOT(AccelScrollUpPage())); + TQT_SLOT(AccelScrollUpPage())); accel->connectItem(accel->insertItem(Key_PageDown), this, - SLOT(AccelScrollDownPage())); + TQT_SLOT(AccelScrollDownPage())); /* * These are not presently implemented, so let's not fill the logs. accel->connectItem(accel->insertItem(CTRL + Key_Return), this, - SLOT(AccelPriorMsgNick())); + TQT_SLOT(AccelPriorMsgNick())); accel->connectItem(accel->insertItem(CTRL + SHIFT + Key_Return), this, - SLOT(AccelNextMsgNick())); + TQT_SLOT(AccelNextMsgNick())); */ accel->connectItem(accel->insertItem(Key_Tab), // adds TAB accelerator this, // connected to the main - SLOT(TabNickCompletionNormal())); // TabNickCompletion() slot + TQT_SLOT(TabNickCompletionNormal())); // TabNickCompletion() slot accel->connectItem(accel->insertItem(SHIFT+Key_Tab), // adds TAB accelerator this, // connected to the main - SLOT(TabNickCompletionShift())); // TabNickCompletion() slot + TQT_SLOT(TabNickCompletionShift())); // TabNickCompletion() slot accel->connectItem(accel->insertItem(CTRL + Key_N), - this, SLOT(newWindow())); + this, TQT_SLOT(newWindow())); // accel->connectItem(accel->insertItem(CTRL + Key_S), -// this, SLOT(toggleTimestamp())); +// this, TQT_SLOT(toggleTimestamp())); // Drag & Drop - connect( mainw, SIGNAL( textDropped(const QString&) ), - SLOT( slotTextDropped(const QString&) )); - connect( mainw, SIGNAL( urlsDropped(const QStringList&) ), - SLOT( slotDropURLs(const QStringList&) )); - connect( nicks, SIGNAL( urlsDropped( const QStringList&, const QString& )), - SLOT( slotDccURLs( const QStringList&, const QString& ))); - connect( this, SIGNAL( changed(bool, QString) ), this, SLOT( doChange(bool, QString) )); + connect( mainw, TQT_SIGNAL( textDropped(const TQString&) ), + TQT_SLOT( slotTextDropped(const TQString&) )); + connect( mainw, TQT_SIGNAL( urlsDropped(const TQStringList&) ), + TQT_SLOT( slotDropURLs(const TQStringList&) )); + connect( nicks, TQT_SIGNAL( urlsDropped( const TQStringList&, const TQString& )), + TQT_SLOT( slotDccURLs( const TQStringList&, const TQString& ))); + connect( this, TQT_SIGNAL( changed(bool, TQString) ), this, TQT_SLOT( doChange(bool, TQString) )); mainw->setAcceptFiles( isPrivateChat() ); resize(600, 360); @@ -530,7 +530,7 @@ KSircTopLevel::~KSircTopLevel() // ksircProcess()->getWindowList().remove(m_channelInfo.channel()); // if((m_channelInfo.channel()[0] == '#') || (m_channelInfo.channel()[0] == '&')){ - // QString str = QString("/part ") + m_channelInfo.channel() + "\n"; + // TQString str = TQString("/part ") + m_channelInfo.channel() + "\n"; // emit outputLine(str); // } @@ -539,11 +539,11 @@ KSircTopLevel::~KSircTopLevel() { if ( isPublicChat() ) { kdDebug(5008) << "*** parting channel: " << m_channelInfo.channel() << endl; - QString str = QString("/part ") + m_channelInfo.channel() + "\n"; + TQString str = TQString("/part ") + m_channelInfo.channel() + "\n"; emit outputUnicodeLine(str); } else { - QStringList strlist; + TQStringList strlist; mainw->addLine("user|X", ksopts->channelColor, " Saved log of previous messages"); @@ -552,7 +552,7 @@ KSircTopLevel::~KSircTopLevel() for(KSirc::TextParagIterator ksit = mainw->firstParag(); ksit.atEnd() == 0; ++ksit) { - QString rt = ksit.richText(); + TQString rt = ksit.richText(); if(rt.contains("<img src=\"user|servinfo\">")) continue; @@ -565,7 +565,7 @@ KSircTopLevel::~KSircTopLevel() KConfig conf("ksirc/winlog/" + channelInfo().server() + "-" + channelInfo().channel(), false, false, "data"); - QString group = "Message-History"; + TQString group = "Message-History"; conf.setGroup( group ); @@ -583,13 +583,13 @@ KSircTopLevel::~KSircTopLevel() kdDebug(5008) << "~KSircToplevel out" << endl; } -void KSircTopLevel::setMode(QString mode, int mode_type, QString currentNick) +void KSircTopLevel::setMode(TQString mode, int mode_type, TQString currentNick) { - QString command; + TQString command; if (mode_type == 0) - command = QString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode); + command = TQString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode); else - command = QString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode); + command = TQString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode); sirc_write(command); linee->setFocus(); } @@ -598,8 +598,8 @@ void KSircTopLevel::setEncoding() { int index = encodingAction->currentItem(); if ( index == 0 ) {// default (locale) encoding - ksopts->chan(m_channelInfo).encoding = QString::null; - UnicodeMessageReceiver::setEncoding( QString::null ); + ksopts->chan(m_channelInfo).encoding = TQString::null; + UnicodeMessageReceiver::setEncoding( TQString::null ); } else { ksopts->chan(m_channelInfo).encoding = encodingAction->currentText(); @@ -713,7 +713,7 @@ void KSircTopLevel::TabNickCompletion(int dir) int start, end; int extra = 0; bool first = false; - QString s; + TQString s; if(tab_pressed == -1){ s = linee->text(); @@ -745,11 +745,11 @@ void KSircTopLevel::TabNickCompletion(int dir) lineeNotTab(); return; } - QString line = tab_nick + ": "; // tab_nick holds the last night since we haven't overritten it yet. + TQString line = tab_nick + ": "; // tab_nick holds the last night since we haven't overritten it yet. linee->setText(line); linee->setCursorPosition(line.length()); - connect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + connect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); return; } @@ -800,12 +800,12 @@ void KSircTopLevel::TabNickCompletion(int dir) tab_pressed = tab; // setText causes lineeTextChanged to get called and erase tab_pressed - connect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + connect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); } -void KSircTopLevel::sirc_receive(QString str, bool broadcast) +void KSircTopLevel::sirc_receive(TQString str, bool broadcast) { /* @@ -825,14 +825,14 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast) bool addressed = false; BufferedLine line; - // be careful not to use a QValueList iterator here, as it is possible + // be careful not to use a TQValueList iterator here, as it is possible // that we enter a local event loop (think of the ssfeprompt dialog!) // which might trigger a socketnotifier activation which in turn // might result in the execution of code that modifies the LineBuffer, // which would invalidate iterators (Simon) while ( LineBuffer.begin() != LineBuffer.end() ) { - QString plainText(""); + TQString plainText(""); line = *LineBuffer.begin(); LineBuffer.remove( LineBuffer.begin() ); @@ -850,7 +850,7 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast) } // detect /msg's -- needed when auto-create-window is off - if ( line.message.find( QRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 ) + if ( line.message.find( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 ) addressedLine = true; if ( addressedLine == true && line.message.startsWith("* " + ksircProcess()->getNick())) @@ -871,22 +871,22 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast) LineBuffer.append( BufferedLine( str, broadcast ) ); } - QValueList<int> list; - QValueList<int>::iterator it; - QString values; + TQValueList<int> list; + TQValueList<int>::iterator it; + TQString values; list = pan->sizes(); it = list.begin(); while( it != list.end()){ - values += QString("%1 ").arg(*it); + values += TQString("%1 ").arg(*it); ++it; } } -void KSircTopLevel::sirc_line_return(const QString &text) +void KSircTopLevel::sirc_line_return(const TQString &text) { /* Take line from SLE, and output if to dsirc */ - QString s = text; + TQString s = text; if(s.length() == 0) return; @@ -901,34 +901,34 @@ void KSircTopLevel::sirc_line_return(const QString &text) } -void KSircTopLevel::sirc_write(const QString &str) +void KSircTopLevel::sirc_write(const TQString &str) { /* * Parse line forcommand we handle */ - QString command = str, plain = str.lower().simplifyWhiteSpace(); + TQString command = str, plain = str.lower().simplifyWhiteSpace(); if(plain.startsWith("/join ") || plain.startsWith("/j ") || plain.startsWith("/query ")) { - QString s = plain.mid(plain.find(' ')+1); + TQString s = plain.mid(plain.find(' ')+1); - QStringList channels = QStringList::split(",", s); - QStringList::ConstIterator it = channels.begin(); + TQStringList channels = TQStringList::split(",", s); + TQStringList::ConstIterator it = channels.begin(); for( ; it != channels.end(); ++it){ - QString name = *it; + TQString name = *it; //kdDebug(5008) << "Doing " << name << endl; - QRegExp rx("(\\S+)\\s*(\\S*)"); + TQRegExp rx("(\\S+)\\s*(\\S*)"); rx.search(name); KSircChannel ci(m_channelInfo.server(), rx.cap(1), // channel rx.cap(2)); // optional key - linee->setText(QString::null); + linee->setText(TQString::null); emit open_toplevel(ci); /* if(name[0] != '#'){ emit open_toplevel(name); - linee->setText(QString::null); + linee->setText(TQString::null); } else { emit outputUnicodeLine(plain + "\n"); @@ -941,11 +941,11 @@ void KSircTopLevel::sirc_write(const QString &str) } else if(plain.startsWith("/server ")) { plain.simplifyWhiteSpace(); - QRegExp rx("/server (\\S+) *(\\S*) *(\\S*)"); + TQRegExp rx("/server (\\S+) *(\\S*) *(\\S*)"); if(rx.search(str) >= 0){ - QString server = rx.cap(1); - QString port = rx.cap(2); - QString pass = rx.cap(3); + TQString server = rx.cap(1); + TQString port = rx.cap(2); + TQString pass = rx.cap(3); bool ssl = false; if(server.startsWith("+")){ @@ -953,7 +953,7 @@ void KSircTopLevel::sirc_write(const QString &str) ssl = true; } - KSircServer serv(server, port, QString::null, pass, ssl); + KSircServer serv(server, port, TQString::null, pass, ssl); servercontroller::self()->new_ksircprocess(serv); return; @@ -962,19 +962,19 @@ void KSircTopLevel::sirc_write(const QString &str) else if(plain.startsWith("/part") || plain.startsWith("/leave") || plain.startsWith("/hop")) { - QApplication::postEvent(this, new QCloseEvent()); // WE'RE DEAD - linee->setText(QString::null); + TQApplication::postEvent(this, new TQCloseEvent()); // WE'RE DEAD + linee->setText(TQString::null); return; } else if( plain.startsWith( "/bye" ) || plain.startsWith( "/exit" ) || plain.startsWith( "/quit" )) { - linee->setText( QString::null ); + linee->setText( TQString::null ); emit requestQuit( command.ascii() ); return; } else if ( plain.startsWith( "/away" ) ) { - QString awayEvalCommand = QString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' ); + TQString awayEvalCommand = TQString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' ); emit outputUnicodeLine( awayEvalCommand ); } @@ -985,11 +985,11 @@ void KSircTopLevel::sirc_write(const QString &str) if(!isSpecialWindow()) { // channel or private chat if(plain[0].latin1() != '/'){ - command.prepend(QString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel())); + command.prepend(TQString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel())); } else if(plain.startsWith("/me ")) { command.remove(0, 3); - command.prepend(QString("/de ") + m_channelInfo.channel()); + command.prepend(TQString("/de ") + m_channelInfo.channel()); } } @@ -1003,7 +1003,7 @@ void KSircTopLevel::sirc_write(const QString &str) mainw->scrollToBottom(true); } -bool KSircTopLevel::parse_input(const QString &string, QString &plainText) +bool KSircTopLevel::parse_input(const TQString &string, TQString &plainText) { /* * Parsing routines are broken into 3 majour sections @@ -1033,7 +1033,7 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText) parseSucc *item = dynamic_cast<parseSucc *>(pResult); parseError *err = dynamic_cast<parseError *>(pResult); - QString logString; + TQString logString; if(item) { @@ -1069,14 +1069,14 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText) } else { - logString = mainw->addLine( QString::null, ksopts->textColor, string ); + logString = mainw->addLine( TQString::null, ksopts->textColor, string ); if(ticker != NULL){ ticker->mergeString(string); } // If it contains our nick, move the speaker to the top // of the nick completion list if(string.contains("~o")){ - QRegExp rx("<(\\S+)>"); + TQRegExp rx("<(\\S+)>"); if ( (rx.search(logString) >= 0) && (rx.cap(1) != ksircProcess()->getNick()) ) { //kdDebug(5008) << "addCompleteNick: " << rx.cap(1) << endl; @@ -1099,10 +1099,10 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText) void KSircTopLevel::returnPressed() { - QString s = linee->text(); + TQString s = linee->text(); uint i; - QChar c; + TQChar c; for(i = 0; (c = s[i]); i++){ switch(c.unicode()){ case 0336: @@ -1146,17 +1146,17 @@ void KSircTopLevel::UserParseMenu(int id) if(nicks->currentItem() < 0) return; - QString s; - s = QString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem())); + TQString s; + s = TQString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem())); sirc_write(s); // set $$dest_chan variable - s = QString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel()); + s = TQString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel()); sirc_write(s); - QString action = user_menu->at(id)->action; + TQString action = user_menu->at(id)->action; if (action.length() && action[0] == '/') action.remove(0, 1); - s = QString("/eval &docommand(eval{\"%1\"});\n").arg(action); - s.replace(QRegExp("\\$\\$"), "$"); + s = TQString("/eval &docommand(eval{\"%1\"});\n").arg(action); + s.replace(TQRegExp("\\$\\$"), "$"); sirc_write(s); } @@ -1192,12 +1192,12 @@ void KSircTopLevel::AccelScrollUpPage() void KSircTopLevel::newWindow() { - NewWindowDialog w(KSircChannel(m_channelInfo.server(), QString::null)); - connect(&w, SIGNAL(openTopLevel(const KSircChannel &)), SIGNAL(open_toplevel(const KSircChannel &))); + NewWindowDialog w(KSircChannel(m_channelInfo.server(), TQString::null)); + connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)), TQT_SIGNAL(open_toplevel(const KSircChannel &))); w.exec(); } -void KSircTopLevel::closeEvent(QCloseEvent *e) +void KSircTopLevel::closeEvent(TQCloseEvent *e) { KMainWindow::closeEvent( e ); e->accept(); @@ -1205,7 +1205,7 @@ void KSircTopLevel::closeEvent(QCloseEvent *e) //Let's not part the channel till we are acutally delete. // We should always get a close event, *BUT* we will always be deleted. // if( isPublicChat() ) { - // QString str = QString("/part ") + m_channelInfo.channel() + "\n"; + // TQString str = TQString("/part ") + m_channelInfo.channel() + "\n"; // emit outputLine(str); // } @@ -1217,9 +1217,9 @@ void KSircTopLevel::closeEvent(QCloseEvent *e) emit closing(this, m_channelInfo.channel()); } -void KSircTopLevel::focusChange(QWidget *w) +void KSircTopLevel::focusChange(TQWidget *w) { - QWidget *me = this; + TQWidget *me = this; if(w == me){ gotFocus(); } @@ -1233,7 +1233,7 @@ void KSircTopLevel::gotFocus() if(isVisible() == TRUE){ if(have_focus == 0){ if(m_channelInfo.channel()[0] != '!' ){ - QString str = QString("/join %1").arg(m_channelInfo.channel()); + TQString str = TQString("/join %1").arg(m_channelInfo.channel()); if(m_channelInfo.key().length() > 0){ str.append(" " + m_channelInfo.key()); } @@ -1247,7 +1247,7 @@ void KSircTopLevel::gotFocus() } if(m_gotMsgWithoutFocus == true){ m_gotMsgWithoutFocus = false; - servercontroller::self()->decreaseNotificationCount(QString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel())); + servercontroller::self()->decreaseNotificationCount(TQString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel())); } } @@ -1259,13 +1259,13 @@ void KSircTopLevel::lostFocus() } } -void KSircTopLevel::control_message(int command, QString str) +void KSircTopLevel::control_message(int command, TQString str) { switch(command){ case CHANGE_CHANNEL: // 001 is defined as changeChannel { - KSircChannel ci(m_channelInfo.server(), QString::null); - QRegExp rx("([^!]+)!+([^!]+)!*([^!]*)"); + KSircChannel ci(m_channelInfo.server(), TQString::null); + TQRegExp rx("([^!]+)!+([^!]+)!*([^!]*)"); if(rx.search(str) < 0){ ci.setChannel(str); } @@ -1285,22 +1285,22 @@ void KSircTopLevel::control_message(int command, QString str) logFile->open(); } setName(m_channelInfo.server().utf8() + "_" + m_channelInfo.channel().utf8() + "_" + "toplevel"); - pan->setName(QCString(QObject::name()) + "_" + "QSplitter"); - kmenu->setName(QCString(QObject::name()) + "_ktoolframe"); - linee->setName(QCString(QObject::name()) + "_" + "LineEnter"); + pan->setName(TQCString(TQObject::name()) + "_" + "TQSplitter"); + kmenu->setName(TQCString(TQObject::name()) + "_ktoolframe"); + linee->setName(TQCString(TQObject::name()) + "_" + "LineEnter"); kmenu->show(); setCaption(m_channelInfo.channel()); emit currentWindow(this); if(m_channelInfo.channel()[0] == '#' || m_channelInfo.channel()[0] == '&'){ - QString str = QString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key()); + TQString str = TQString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key()); kdDebug(5008) << "Doing /join " << m_channelInfo.channel() << " :" << str << endl; emit outputUnicodeLine(str); emit outputLine("/eval $query=''\n"); } else if (m_channelInfo.channel()[0] != '!') { - emit outputUnicodeLine(QString("/eval $query='%1'\n").arg(m_channelInfo.channel())); + emit outputUnicodeLine(TQString("/eval $query='%1'\n").arg(m_channelInfo.channel())); } bool isPrivate = isPrivateChat(); @@ -1356,7 +1356,7 @@ void KSircTopLevel::control_message(int command, QString str) case RESUME_UPDATES: Buffer = FALSE; if(LineBuffer.isEmpty() == FALSE) - sirc_receive(QString::null); + sirc_receive(TQString::null); break; case REREAD_CONFIG: emit freezeUpdates(TRUE); // Stop the list boxes update @@ -1380,10 +1380,10 @@ void KSircTopLevel::control_message(int command, QString str) } mainw->enableTimeStamps(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].timeStamp); if(ksopts->oneLineEntry == true) { - linee->setWordWrap(QTextEdit::NoWrap); + linee->setWordWrap(TQTextEdit::NoWrap); } else { - linee->setWordWrap(QTextEdit::WidgetWidth); + linee->setWordWrap(TQTextEdit::WidgetWidth); } mainw->scrollToBottom(true); update(); @@ -1396,7 +1396,7 @@ void KSircTopLevel::control_message(int command, QString str) double lag = str.toDouble(&ok); if(ok == TRUE){ lag -= (lag*100.0 - int(lag*100.0))/100.0; - QString s_lag; + TQString s_lag; s_lag.sprintf("Lag: %.2f", lag); this->lag->setText(s_lag); } @@ -1413,7 +1413,7 @@ void KSircTopLevel::control_message(int command, QString str) } } -void KSircTopLevel::setTopic( const QString &topic ) +void KSircTopLevel::setTopic( const TQString &topic ) { m_topic = topic; ksTopic->setText( topic ); @@ -1434,11 +1434,11 @@ void KSircTopLevel::toggleFilterJoinPart() file->setItemChecked( fjpitem, ksopts->chan(m_channelInfo).filterJoinPart ); } -QString KSircTopLevel::findNick(QString part, uint which) +TQString KSircTopLevel::findNick(TQString part, uint which) { - QStringList matches; + TQStringList matches; - for (QStringList::ConstIterator it = completeNicks.begin(); + for (TQStringList::ConstIterator it = completeNicks.begin(); it != completeNicks.end(); ++it) { @@ -1462,33 +1462,33 @@ QString KSircTopLevel::findNick(QString part, uint which) if(which < matches.count()) return *(matches.at(which)); else - return QString::null; + return TQString::null; } - return QString::null; + return TQString::null; } -void KSircTopLevel::removeCompleteNick(const QString &nick) +void KSircTopLevel::removeCompleteNick(const TQString &nick) { - QStringList::Iterator it = completeNicks.find(nick); + TQStringList::Iterator it = completeNicks.find(nick); if (it != completeNicks.end()) completeNicks.remove(it); } -void KSircTopLevel::addCompleteNick(const QString &nick) +void KSircTopLevel::addCompleteNick(const TQString &nick) { removeCompleteNick(nick); completeNicks.prepend(nick); } -void KSircTopLevel::changeCompleteNick(const QString &oldNick, const QString &newNick) +void KSircTopLevel::changeCompleteNick(const TQString &oldNick, const TQString &newNick) { - QStringList::Iterator it = completeNicks.find(oldNick); + TQStringList::Iterator it = completeNicks.find(oldNick); if (it != completeNicks.end()) *it = newNick; } -void KSircTopLevel::openQueryFromNick(const QString &nick) +void KSircTopLevel::openQueryFromNick(const TQString &nick) { KSircChannel ci(m_channelInfo.server(), nick.lower()); emit open_toplevel(ci); @@ -1502,25 +1502,25 @@ void KSircTopLevel::pasteToWindow() } void KSircTopLevel::pasteToNickList(int button, - QListBoxItem *item, - const QPoint &) + TQListBoxItem *item, + const TQPoint &) { if(button == Qt::MidButton && item){ KSircChannel ci(m_channelInfo.server(), item->text().lower()); emit open_toplevel(ci); - QStringList lines = QStringList::split( '\n', + TQStringList lines = TQStringList::split( '\n', KApplication::clipboard()->text( QClipboard::Selection ), true ); - QStringList::ConstIterator it = lines.begin(); - QStringList::ConstIterator end = lines.end(); + TQStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator end = lines.end(); for (; it != end; ++it ) { if ((*it).isEmpty()) continue; - QString str = - QString("/msg ") + item->text().lower() + " " + + TQString str = + TQString("/msg ") + item->text().lower() + " " + *it + "\n"; emit outputUnicodeLine(str); @@ -1529,25 +1529,25 @@ void KSircTopLevel::pasteToNickList(int button, } -void KSircTopLevel::dndTextToNickList(const QListBoxItem *item, - const QString& text) +void KSircTopLevel::dndTextToNickList(const TQListBoxItem *item, + const TQString& text) { if(item){ KSircChannel ci(m_channelInfo.server(), item->text().lower()); emit open_toplevel(ci); - QStringList lines = QStringList::split( '\n', + TQStringList lines = TQStringList::split( '\n', text, true ); - QStringList::ConstIterator it = lines.begin(); - QStringList::ConstIterator end = lines.end(); + TQStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator end = lines.end(); for (; it != end; ++it ) { if ((*it).isEmpty()) continue; - QString str = - QString("/msg ") + item->text().lower() + " " + + TQString str = + TQString("/msg ") + item->text().lower() + " " + *it + "\n"; emit outputUnicodeLine(str); @@ -1557,11 +1557,11 @@ void KSircTopLevel::dndTextToNickList(const QListBoxItem *item, } enum KSircTopLevelCommands{ Ask, Parse, Escape }; -void KSircTopLevel::slotTextDropped( const QString& _text ) +void KSircTopLevel::slotTextDropped( const TQString& _text ) { if (_text.isEmpty()) return; - QString text = linee->text(); + TQString text = linee->text(); int curPos = linee->cursorPosition(); text = text.mid( 0, curPos ) + _text + text.mid( curPos ); @@ -1575,7 +1575,7 @@ void KSircTopLevel::slotTextDropped( const QString& _text ) if (lines > 4) { int result = KMessageBox::warningContinueCancel(this, i18n("You are about to send %1 lines of text.\nDo you really want to send that much?").arg(approx_lines), - QString::null, i18n("Send")); + TQString::null, i18n("Send")); if (result != KMessageBox::Continue) { // linee->setText(""); @@ -1587,21 +1587,21 @@ void KSircTopLevel::slotTextDropped( const QString& _text ) if(lines > 1){ linee->setUpdatesEnabled(FALSE); - QStringList lines = QStringList::split( '\n', text, true ); - QStringList::ConstIterator it = lines.begin(); - QStringList::ConstIterator end = lines.end(); + TQStringList lines = TQStringList::split( '\n', text, true ); + TQStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator end = lines.end(); KSircTopLevelCommands commands = Ask; for (; it != end; ++it ) { if ((*it).isEmpty()) continue; - QString line = *it; + TQString line = *it; if ( line[0].latin1() == '/' ) { if ( commands == Ask ) switch ( KMessageBox::questionYesNo( this, i18n( "The text you pasted contains lines that start with /.\n" - "Should they be interpreted as IRC commands?" ), QString::null, i18n("Interpret"), i18n("Do Not Interpret") ) ) + "Should they be interpreted as IRC commands?" ), TQString::null, i18n("Interpret"), i18n("Do Not Interpret") ) ) { case KMessageBox::Yes: commands = Parse; @@ -1622,7 +1622,7 @@ void KSircTopLevel::slotTextDropped( const QString& _text ) linee->update(); } else{ - text.replace(QRegExp("\n"), ""); + text.replace(TQRegExp("\n"), ""); linee->setText(text); linee->setCursorPosition( curPos + _text.length() ); } @@ -1637,8 +1637,8 @@ void KSircTopLevel::clearWindow() void KSircTopLevel::lineeNotTab() { tab_pressed = -1; - disconnect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + disconnect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); addCompleteNick(tab_nick); } @@ -1646,12 +1646,12 @@ void KSircTopLevel::toggleRootWindow() { } -bool KSircTopLevel::event( QEvent *e) +bool KSircTopLevel::event( TQEvent *e) { - if(e->type() == QEvent::ApplicationPaletteChange || - e->type() == QEvent::ApplicationFontChange) + if(e->type() == TQEvent::ApplicationPaletteChange || + e->type() == TQEvent::ApplicationFontChange) { - QTimer::singleShot(750, this, SLOT(initColors())); + TQTimer::singleShot(750, this, TQT_SLOT(initColors())); initColors(); } return KMainWindow::event(e); @@ -1659,14 +1659,14 @@ bool KSircTopLevel::event( QEvent *e) void KSircTopLevel::saveCurrLog() { - KURL url = KURL( KFileDialog::getSaveFileName(QString::null, + KURL url = KURL( KFileDialog::getSaveFileName(TQString::null, "*.log", 0L, i18n("Save Chat/Query Logfile"))); if( url.isEmpty()) return; KTempFile temp; - QTextStream *str = temp.textStream(); + TQTextStream *str = temp.textStream(); *str << mainw->plainText(); @@ -1679,7 +1679,7 @@ void KSircTopLevel::saveCurrLog() } -void KSircTopLevel::slotDropURLs( const QStringList& urls ) +void KSircTopLevel::slotDropURLs( const TQStringList& urls ) { if ( !isPrivateChat() ) return; @@ -1688,16 +1688,16 @@ void KSircTopLevel::slotDropURLs( const QStringList& urls ) } // sends the list of urls to $dest_nick -void KSircTopLevel::slotDccURLs( const QStringList& urls, const QString& nick ) +void KSircTopLevel::slotDccURLs( const TQStringList& urls, const TQString& nick ) { if ( urls.isEmpty() || nick.isEmpty() ) return; - QStringList::ConstIterator it = urls.begin(); - // QString s("/eval &docommand(eval{\"dcc send " + nick + " %1\"});\n"); - QString s("/dcc send " + nick + " %1\n"); + TQStringList::ConstIterator it = urls.begin(); + // TQString s("/eval &docommand(eval{\"dcc send " + nick + " %1\"});\n"); + TQString s("/dcc send " + nick + " %1\n"); for ( ; it != urls.end(); ++it ) { - QString file( *it ); + TQString file( *it ); kdDebug(5008) << "........ " << file << endl; if ( !file.isEmpty() ) sirc_write(s.arg( file )); @@ -1720,33 +1720,33 @@ bool KSircTopLevel::isSpecialWindow() const return (m_channelInfo.channel()[0] == '!'); } -void KSircTopLevel::outputUnicodeLine( const QString &message ) +void KSircTopLevel::outputUnicodeLine( const TQString &message ) { emit outputLine( encoder()->fromUnicode( message ) ); } -void KSircTopLevel::setTopicIntern( const QString &topic ) +void KSircTopLevel::setTopicIntern( const TQString &topic ) { - QString command = QString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic ); + TQString command = TQString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic ); sirc_write( command ); linee->setFocus(); } -void KSircTopLevel::doChange(bool pers, QString text) +void KSircTopLevel::doChange(bool pers, TQString text) { - QTime ctime = QTime::currentTime(); + TQTime ctime = TQTime::currentTime(); if (ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].beepOnMsg) { // beep only every 2 seconds otherwise it'll get very noisy in the room ;) if ( QABS( lastBeep.secsTo( ctime ) ) > 1 ) { if ( pers ) { int winId = !ticker ? topLevelWidget()->winId() : ticker->winId(); KNotifyClient::event(winId, - QString::fromLatin1("ChannelPersonal"), + TQString::fromLatin1("ChannelPersonal"), i18n("Your nick appeared on channel %1").arg(m_channelInfo.channel())); } else { int winId = !ticker ? topLevelWidget()->winId() : ticker->winId(); KNotifyClient::event(winId, - QString::fromLatin1("ChannelChanged"), + TQString::fromLatin1("ChannelChanged"), i18n("Channel %1 changed").arg(m_channelInfo.channel())); } lastBeep = ctime; @@ -1755,7 +1755,7 @@ void KSircTopLevel::doChange(bool pers, QString text) if(have_focus == 0 && pers == true && m_gotMsgWithoutFocus == false){ m_gotMsgWithoutFocus = true; - servercontroller::self()->increaseNotificationCount(QString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text); + servercontroller::self()->increaseNotificationCount(TQString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text); } } @@ -1804,7 +1804,7 @@ void KSircTopLevel::toggleTicker() ticker->show(); displayMgr->hide(this); - connect(ticker, SIGNAL(doubleClick()), this, SLOT(toggleTicker())); + connect(ticker, TQT_SIGNAL(doubleClick()), this, TQT_SLOT(toggleTicker())); } } @@ -1816,7 +1816,7 @@ bool KSircTopLevel::atBottom() void KSircTopLevel::cmd_process(int id) { if(cmd_menu.at(id) != cmd_menu.end()) { - QString item, arg, out; + TQString item, arg, out; item = cmd_menu[id].section('/', 1, 1); arg = cmd_menu[id].section('/', 2, 2); diff --git a/ksirc/toplevel.h b/ksirc/toplevel.h index ef8d4a57..8c64b150 100644 --- a/ksirc/toplevel.h +++ b/ksirc/toplevel.h @@ -1,7 +1,7 @@ #ifndef KSIRCTOPLEVEL_H #define KSIRCTOPLEVEL_H -#include <qdatetime.h> +#include <tqdatetime.h> #include <kmainwindow.h> #include "ahistlineedit.h" @@ -54,18 +54,18 @@ public: * ready processing. This is a single line, and it NOT \n * terminated. */ - virtual void sirc_receive(QString str, bool broadcast = false); + virtual void sirc_receive(TQString str, bool broadcast = false); /** * Reimplement the ksircmessagereceiver control messages. These * are parsed and dealt with quickly. */ - virtual void control_message(int, QString); + virtual void control_message(int, TQString); - QWidget *lineEdit() const { return linee; } + TQWidget *lineEdit() const { return linee; } - void setTopic( const QString &topic ); - QString topic() const { return m_topic; } + void setTopic( const TQString &topic ); + TQString topic() const { return m_topic; } /** * This returns the current channel information for a toplevel @@ -78,10 +78,10 @@ signals: * output a new line. The line is correctly * linefeed terminated, etc. */ - void outputLine(QCString); + void outputLine(TQCString); /** * open a new toplevel widget with for the - * channel/user QString. + * channel/user TQString. */ void open_toplevel(const KSircChannel &); /** @@ -89,18 +89,18 @@ signals: * this window is closing. Refrence to outselves * is include. */ - void closing(KSircTopLevel *, QString channel); + void closing(KSircTopLevel *, TQString channel); /** * emitted when the user typed /quit, will disconnect from this * server and close all toplevels belonging to it. */ - void requestQuit( const QCString& command ); + void requestQuit( const TQCString& command ); /** * emitted when we change channel name * on the fly. old is the old channel name, new * is the new one. */ - void changeChannel(const QString &oldName, const QString &newName); + void changeChannel(const TQString &oldName, const TQString &newName); /** * emitted to say that KSircTopLevel * (this) is now the window with focus. Used by @@ -115,14 +115,14 @@ signals: /** * Emitted when a new message appeared in the irc window */ - void changed(bool, QString); + void changed(bool, TQString); public slots: /** * When enter is pressed, we read the SLE and output the results * after processing via emitting outputLine. */ - virtual void sirc_line_return(const QString &s); + virtual void sirc_line_return(const TQString &s); /** * Clears the message window @@ -134,7 +134,7 @@ public slots: * the widget that just got focus. Used in MDI modes * where the toplevel doesn't get focus in/out events. */ - void focusChange(QWidget *w); + void focusChange(TQWidget *w); protected slots: /** @@ -236,30 +236,30 @@ protected slots: * On a midle mouse button press to the nick list we open * a query window and paste the text there */ - void pasteToNickList(int button, QListBoxItem *item, const QPoint &pos); + void pasteToNickList(int button, TQListBoxItem *item, const TQPoint &pos); /** * dnd paste to nick list */ - void dndTextToNickList(const QListBoxItem *itom, const QString& text); + void dndTextToNickList(const TQListBoxItem *itom, const TQString& text); /** * open a toplevel on double click */ - void openQueryFromNick(const QString &); + void openQueryFromNick(const TQString &); /** * Some text was dropped on the listbox */ - void slotTextDropped(const QString&); + void slotTextDropped(const TQString&); /** * Calls slotDccURLs with the current nick we're talking to */ - void slotDropURLs(const QStringList& urls); + void slotDropURLs(const TQStringList& urls); /** * Sends the list of urls to nick */ - void slotDccURLs(const QStringList& urls, const QString& nick ); + void slotDccURLs(const TQStringList& urls, const TQString& nick ); /** * Re-apply color settings. @@ -275,7 +275,7 @@ protected slots: * Makes a beep when a change happens (if the user has this on) * the bool is TRUE if changed line contained user's nick */ - void doChange(bool, QString); + void doChange(bool, TQString); /** * show the ticker window @@ -298,32 +298,32 @@ protected: /** * Make sure to update colors correctly. */ - virtual bool event( QEvent *e); + virtual bool event( TQEvent *e); /** * Redfine closeEvent to emit closing and delete itself. */ - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); /** * Searches through the nick list and finds the nick with the best match. * which, arg2, selects nicks other than the first shouldarg1 match more * than 1 nick. */ - virtual QString findNick(QString, uint which = 0); + virtual TQString findNick(TQString, uint which = 0); /** * remove a nick from the prefered in nick completion list */ - virtual void removeCompleteNick(const QString &); + virtual void removeCompleteNick(const TQString &); /** * Adds a nick to the list of nicks to prefer in nick completion * or moves it to the top of the list if it was already there */ - virtual void addCompleteNick(const QString &); + virtual void addCompleteNick(const TQString &); /** * Changes a nick in the completion list if it has been listed, * otherwise does nothing */ - virtual void changeCompleteNick(const QString &, const QString &); + virtual void changeCompleteNick(const TQString &, const TQString &); virtual void setupCommandMenu(); @@ -344,33 +344,33 @@ protected: bool isSpecialWindow() const; private slots: - void setTopicIntern( const QString &topic ); + void setTopicIntern( const TQString &topic ); void insertText(); - void setMode(QString, int, QString currentNick=0); + void setMode(TQString, int, TQString currentNick=0); void setEncoding(); void returnPressed(); void toggleTopic(); private: - void outputUnicodeLine( const QString &message ); + void outputUnicodeLine( const TQString &message ); bool atBottom(); bool continued_line; charSelector *selector; chanButtons *channelButtons; - QSplitter *pan; - QVBox *nicks_box; - QVBox *top; + TQSplitter *pan; + TQVBox *nicks_box; + TQVBox *top; KMenuBar *kmenu; - QLabel *lag; + TQLabel *lag; enum {PING = 10, TOPIC = 20}; KSircView *mainw; aHistLineEdit *linee; aListBox *nicks; - //QString m_currentNick; + //TQString m_currentNick; //KSircProcess *proc; @@ -379,44 +379,44 @@ private: struct BufferedLine { BufferedLine() { wasBroadcast = false; } - BufferedLine( const QString &msg, bool broadc ) + BufferedLine( const TQString &msg, bool broadc ) { message = msg; wasBroadcast = broadc; } bool operator==( const BufferedLine &other ) { return message == other.message && wasBroadcast == other.wasBroadcast; } - QString message; + TQString message; bool wasBroadcast; }; bool Buffer; - QValueList<BufferedLine> LineBuffer; + TQValueList<BufferedLine> LineBuffer; // QPopupMenu's used for the menubar - QPopupMenu *file, *edit, *command; + TQPopupMenu *file, *edit, *command; - bool parse_input(const QString &string, QString &plainText); - void sirc_write(const QString &str); + bool parse_input(const TQString &string, TQString &plainText); + void sirc_write(const TQString &str); - QPopupMenu *user_controls; - static QPtrList<UserControlMenu> *user_menu; + TQPopupMenu *user_controls; + static TQPtrList<UserControlMenu> *user_menu; int opami; - QAccel *accel; + TQAccel *accel; /** * The channel name that we belong too. */ - //QString channel_name; + //TQString channel_name; /** * Caption at the top of the window. */ - QString caption; + TQString caption; /** * Current topic for the channel */ - QString m_topic; + TQString m_topic; /** * Does the window have focus? 1 when yes, 0 when no. @@ -433,7 +433,7 @@ private: * tab_nick holds the last nick found so when a blank tab is pressed * we pop the last niick and ": " up. */ - QString tab_saved, tab_nick; + TQString tab_saved, tab_nick; int tab_start, tab_end; // Ticker specific variables. @@ -447,20 +447,20 @@ private: * Size and position of the main window. Main window is returns this * this position when it reappears. */ - QRect myrect; + TQRect myrect; /** * Position of the main window */ - QPoint mypoint; + TQPoint mypoint; /** * Ticker's size and geometry */ - QRect tickerrect; + TQRect tickerrect; /** * Tickers position */ - QPoint tickerpoint; - QSize tickersize; + TQPoint tickerpoint; + TQSize tickersize; /** * Do we have a kick window open? * Remember not to open 2 @@ -475,9 +475,9 @@ private: ChannelParser *ChanParser; /** - * QSize maintains size information in case it changes somehow + * TQSize maintains size information in case it changes somehow */ - QSize current_size; + TQSize current_size; /** * ID of the timestamp menu item, to use in (un)checking it from slot @@ -508,13 +508,13 @@ private: * List of nicks already used in nick completion to give them * higher priority */ - QStringList completeNicks; + TQStringList completeNicks; /** * The time of the last beep to prevent your soundcard from detonating * in high traffic channels */ - QTime lastBeep; + TQTime lastBeep; KSircTopic *ksTopic; @@ -522,7 +522,7 @@ private: KSelectAction *encodingAction; - static QStringList cmd_menu; + static TQStringList cmd_menu; bool m_gotMsgWithoutFocus; diff --git a/ksirc/usercontrolmenu.cpp b/ksirc/usercontrolmenu.cpp index ca35e094..704b5511 100644 --- a/ksirc/usercontrolmenu.cpp +++ b/ksirc/usercontrolmenu.cpp @@ -4,10 +4,10 @@ #include <kconfig.h> #include <klocale.h> -QPtrList<UserControlMenu> UserControlMenu::UserMenu; +TQPtrList<UserControlMenu> UserControlMenu::UserMenu; -UserControlMenu::UserControlMenu(const QString& _title, - const QString& _action, +UserControlMenu::UserControlMenu(const TQString& _title, + const TQString& _action, int _accel, int _type, bool _op_only) @@ -23,7 +23,7 @@ UserControlMenu::~UserControlMenu() { } -QPtrList<UserControlMenu> *UserControlMenu::parseKConfig() +TQPtrList<UserControlMenu> *UserControlMenu::parseKConfig() { // Reset the UserMenu to nothing before we start. @@ -102,7 +102,7 @@ QPtrList<UserControlMenu> *UserControlMenu::parseKConfig() TRUE)); } else{ - QString key, cindex, title, action; + TQString key, cindex, title, action; int accel, type, oponly; for(int i = 0; i < items; i++){ cindex.sprintf("%d", i); @@ -138,8 +138,8 @@ void UserControlMenu::writeKConfig() kConfig->writeEntry("Number", items); - QString key; - QString cindex; + TQString key; + TQString cindex; UserControlMenu *ucm; int type; diff --git a/ksirc/usercontrolmenu.h b/ksirc/usercontrolmenu.h index 1f7a983a..02a313f9 100644 --- a/ksirc/usercontrolmenu.h +++ b/ksirc/usercontrolmenu.h @@ -1,8 +1,8 @@ #ifndef USERCONTROLLERMENU_H #define USERCONTROLLERMENU_H -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class UserControlMenu { public: @@ -11,28 +11,28 @@ class UserControlMenu { is public so there is no problems changing it in the future. Data is copied internally and deleted when finished. */ - UserControlMenu(const QString& _title = 0, - const QString& _action = 0, + UserControlMenu(const TQString& _title = 0, + const TQString& _action = 0, int _accel = 0, int _type = 0, bool _op_only = FALSE); ~UserControlMenu(); - static QPtrList<UserControlMenu> UserMenu; + static TQPtrList<UserControlMenu> UserMenu; - static QPtrList<UserControlMenu> *parseKConfig(); + static TQPtrList<UserControlMenu> *parseKConfig(); static void writeKConfig(); /** * title in the popup menu */ - QString title; + TQString title; /** * Action to preform, must be of the format "blah lbah %s blah" * where %s will be expanded into the selected nick. */ - QString action; + TQString action; /** * Accelerator key, currently does nothing. |