summaryrefslogtreecommitdiffstats
path: root/ksirc/ksview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/ksview.cpp')
-rw-r--r--ksirc/ksview.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/ksirc/ksview.cpp b/ksirc/ksview.cpp
index d9cac283..85d0fd1f 100644
--- a/ksirc/ksview.cpp
+++ b/ksirc/ksview.cpp
@@ -42,8 +42,8 @@
#include "nickColourMaker.h"
#include "ksircprocess.h"
-KSircView::KSircView(KSircProcess *proc, TQWidget *parent, const char *name)
- : KSirc::TextView(parent, name), m_proc(proc)
+KSircView::KSircView(KSircProcess *proc, TQWidget *tqparent, const char *name)
+ : KSirc::TextView(tqparent, name), m_proc(proc)
{
m_acceptFiles = false;
m_timestamps = false;
@@ -73,10 +73,10 @@ void KSircView::clear()
TQString KSircView::makeTimeStamp()
{
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' ) );
+ TQString timeStamp = TQString::tqfromLatin1( "[%1:%2:%3] " )
+ .tqarg( TQString::number( now.hour() ).rightJustify( 2, '0' ) )
+ .tqarg( TQString::number( now.minute() ).rightJustify( 2, '0' ) )
+ .tqarg( TQString::number( now.second() ).rightJustify( 2, '0' ) );
return timeStamp;
}
@@ -84,7 +84,7 @@ void KSircView::saveURL( const TQString &url )
{
KURL kurl( url );
- KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ );
+ KFileDialog *dlg = new KFileDialog( TQString(), TQString() /*filter*/, this /*tqparent*/, "filedialog" /*name*/, true /*modal*/ );
dlg->setKeepLocation( true );
@@ -109,14 +109,14 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
//kdDebug(5008) << "Start Text: " << _text << endl;
TQString richText( "<font color=\"%1\">" );
- richText = richText.arg( color.name() );
+ richText = richText.tqarg( color.name() );
if ( !pixmap.isEmpty() )
- richText.prepend( TQString::fromLatin1( "<img src=\"%1\"></img>" ).arg( pixmap ) );
+ richText.prepend( TQString::tqfromLatin1( "<img src=\"%1\"></img>" ).tqarg( pixmap ) );
- TQString timeStamp = TQString::fromLatin1( "<font color=\"%1\">%2</font>" )
- .arg( ksopts->textColor.name() )
- .arg( makeTimeStamp() );
+ TQString timeStamp = TQString::tqfromLatin1( "<font color=\"%1\">%2</font>" )
+ .tqarg( ksopts->textColor.name() )
+ .tqarg( makeTimeStamp() );
m_timeStamps.append(timeStamp);
if ( m_timestamps )
richText.prepend( timeStamp );
@@ -128,14 +128,14 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
// enforces the creation of separate item objects and hence separate
// drawing of '<nick>' and 'message' , which is needed for BiDi users,
// according to UV Kochavi <[email protected]> , to prevent output like
- // '<nick message<' , which is supposedly a bug in Qt's reordering. The
+ // '<nick message<' , which is supposedly a bug in TQt's reordering. The
// same is done for [nick] and >nick< to catch queries.
TQRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
- text.replace( bidiRe, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ text.tqreplace( bidiRe, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
- text.replace( bidiRe2, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ text.tqreplace( bidiRe2, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
- text.replace( bidiRe3, TQString::fromLatin1( "<span>\\1</span>\\2" ) );
+ text.tqreplace( bidiRe3, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp nickCol( "~n(.+)~n" );
nickCol.setMinimal(true);
@@ -147,13 +147,13 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
if( nickCol.cap(1) != m_proc->getNick()){
TQColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1));
- newText.prepend(TQString("<font color=\"%1\">").arg(col.name()));
+ newText.prepend(TQString("<font color=\"%1\">").tqarg(col.name()));
newText.append("</font>");
} else {
TQColor col = ksopts->ownNickColor.name();
if( ! col.isValid())
nickColourMaker::colourMaker()->findFg(nickCol.cap(1));
- newText.prepend(TQString("<font color=\"%1\">").arg(col.name()));
+ newText.prepend(TQString("<font color=\"%1\">").tqarg(col.name()));
newText.append("</font>");
if(ksopts->ownNickBold){
newText.prepend("<b>");
@@ -168,7 +168,7 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
newText.append("</r>");
}
}
- text.replace(pos, nickCol.matchedLength(), newText);
+ text.tqreplace(pos, nickCol.matchedLength(), newText);
}
//kdDebug(5008) << "After Text: " << text << endl;
@@ -199,7 +199,7 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
}
if (parser.beeped()) {
- KNotifyClient::event(winId(), TQString::fromLatin1("BeepReceived"),
+ KNotifyClient::event(winId(), TQString::tqfromLatin1("BeepReceived"),
i18n("Beep Received"));
}
@@ -224,9 +224,9 @@ void KSircView::addRichText(const TQString &_text)
timeStamp = re.cap(1);
}
else {
- timeStamp = TQString::fromLatin1( "<font color=\"%1\">%2</font>" )
- .arg( ksopts->textColor.name() )
- .arg( makeTimeStamp() );
+ timeStamp = TQString::tqfromLatin1( "<font color=\"%1\">%2</font>" )
+ .tqarg( ksopts->textColor.name() )
+ .tqarg( makeTimeStamp() );
if ( m_timestamps )
text.prepend( timeStamp );
}
@@ -270,13 +270,13 @@ void KSircView::enableTimeStamps(bool enable)
void KSircView::anchorClicked(const TQMouseEvent *ev, const TQString &url)
{
- if ( (ev->button() & LeftButton) && (ev->state() & ShiftButton ) )
+ if ( (ev->button() & Qt::LeftButton) && (ev->state() & ShiftButton ) )
saveURL( url );
- else if ( (ev->button() & LeftButton) || (ev->button() & MidButton) )
+ else if ( (ev->button() & Qt::LeftButton) || (ev->button() & Qt::MidButton) )
{
openBrowser( url );
}
- else if ( ev->button() & RightButton )
+ else if ( ev->button() & Qt::RightButton )
{
static const int openURLID = 0;
static const int copyLinkLocationID = 1;
@@ -303,12 +303,12 @@ void KSircView::anchorClicked(const TQMouseEvent *ev, const TQString &url)
void KSircView::openBrowser(const TQString &url )
{
- (void) new KRun( KURL( url.startsWith("www") ? TQString::fromLatin1("http://") + url : url));
+ (void) new KRun( KURL( url.startsWith("www") ? TQString::tqfromLatin1("http://") + url : url));
}
void KSircView::copyLinkToClipboard( const TQString &url )
{
- TQApplication::clipboard()->setText( url, QClipboard::Clipboard );
+ TQApplication::tqclipboard()->setText( url, TQClipboard::Clipboard );
}
TQColor KSircView::ircColor(int code)