summaryrefslogtreecommitdiffstats
path: root/ksirc/topic.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /ksirc/topic.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/topic.cpp')
-rw-r--r--ksirc/topic.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/ksirc/topic.cpp b/ksirc/topic.cpp
index 49334f43..3afa199d 100644
--- a/ksirc/topic.cpp
+++ b/ksirc/topic.cpp
@@ -28,19 +28,19 @@
#include "ksparser.h"
-KSircTopic::KSircTopic( TQWidget *parent, const char *name )
- : KActiveLabel( parent, name )
+KSircTopic::KSircTopic( TQWidget *tqparent, const char *name )
+ : KActiveLabel( tqparent, name )
{
m_editor = 0;
m_doEdit = false;
m_height = 0;
-// setBackgroundColor( colorGroup().light() );
+// setBackgroundColor( tqcolorGroup().light() );
setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
setTextFormat( RichText );
setWordWrap(TQTextEdit::NoWrap);
doResize();
-// setAlignment( alignment() | WordBreak );
+// tqsetAlignment( tqalignment() | WordBreak );
}
void KSircTopic::setText( const TQString &_text)
@@ -49,27 +49,27 @@ void KSircTopic::setText( const TQString &_text)
TQString text = _text;
TQString richText( "<font color=\"%1\">" );
- richText = richText.arg( ksopts->textColor.name() );
+ richText = richText.tqarg( ksopts->textColor.name() );
- text.replace('&', "&amp;");
- text.replace('<', "&lt;");
- text.replace('>', "&gt;");
+ text.tqreplace('&', "&amp;");
+ text.tqreplace('<', "&lt;");
+ text.tqreplace('>', "&gt;");
- text.replace('~', "~~");
+ text.tqreplace('~', "~~");
// ### a bit of a hack: turn '&lt;nick&gt; message' into
// <span>&lt;nick&gt;<span> message' . span itself isn't supported but it
// 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 <uv1st@yahoo.com> , 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" ) );
KSParser parser;
richText += parser.parse( text );
@@ -111,7 +111,7 @@ void KSircTopic::contentsMouseReleaseEvent( TQMouseEvent *e )
* the size really breaks and you get
* a huge widget
*/
- m_editor->setGeometry( geometry() );
+ m_editor->setGeometry( tqgeometry() );
m_editor->setFocus();
m_editor->show();
@@ -180,11 +180,11 @@ void KSircTopic::fontChange(TQFont &f)
doResize();
}
-KSircTopicEditor::KSircTopicEditor( TQWidget *parent, const char *name )
- : TQTextEdit( parent, name )
+KSircTopicEditor::KSircTopicEditor( TQWidget *tqparent, const char *name )
+ : TQTextEdit( tqparent, name )
{
setWFlags( WDestructiveClose );
- setFocusPolicy( TQWidget::ClickFocus );
+ setFocusPolicy( TQ_ClickFocus );
connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) );
}
@@ -205,13 +205,13 @@ void KSircTopicEditor::keyPressEvent( TQKeyEvent *ev )
TQTextEdit::keyPressEvent( ev );
}
-void KSircTopicEditor::focusOutEvent( TQFocusEvent * )
+void KSircTopicEditor::focusOutEvent( TQFocusEvent * fe )
{
- // we don't want to quit editing when someone brings up QLE's popup
+ // we don't want to quit editing when someone brings up TQLE's popup
// menu
- if ( TQFocusEvent::reason() == TQFocusEvent::Popup )
+ if ( fe->reason() == TQFocusEvent::Popup )
{
- TQWidget *focusw = qApp->focusWidget();
+ TQWidget *focusw = tqApp->tqfocusWidget();
if ( focusw && m_popup && focusw == m_popup )
return;
}
@@ -228,9 +228,9 @@ TQPopupMenu *KSircTopicEditor::createPopupMenu( const TQPoint &pos )
void KSircTopicEditor::slotMaybeResize()
{
- if(text().contains("\n")){
+ if(text().tqcontains("\n")){
TQString s = text();
- s.replace('\n', " ");
+ s.tqreplace('\n', " ");
setText(s);
setCursorPosition(0, s.length());
}