summaryrefslogtreecommitdiffstats
path: root/ksirc/toplevel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/toplevel.cpp')
-rw-r--r--ksirc/toplevel.cpp526
1 files changed, 263 insertions, 263 deletions
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&amp"), this, SLOT(toggleTimestamp()), CTRL + Key_T);
+ tsitem = file->insertItem(i18n("Time St&amp"), 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);