summaryrefslogtreecommitdiffstats
path: root/ksirc/ahistlineedit.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/ahistlineedit.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/ahistlineedit.cpp')
-rw-r--r--ksirc/ahistlineedit.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/ksirc/ahistlineedit.cpp b/ksirc/ahistlineedit.cpp
index 2455047d..80eb2eec 100644
--- a/ksirc/ahistlineedit.cpp
+++ b/ksirc/ahistlineedit.cpp
@@ -55,13 +55,13 @@
#include <kshortcut.h>
-aHistLineEdit::aHistLineEdit(TQWidget *parent, const char *name)
- : TQTextEdit(parent, name)
+aHistLineEdit::aHistLineEdit(TQWidget *tqparent, const char *name)
+ : TQTextEdit(tqparent, name)
{
m_drawrect = false;
m_height = 0;
- current = hist.append(TQString::null); // Set the current as blank
+ current = hist.append(TQString()); // Set the current as blank
setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
setVScrollBarMode( AlwaysOff );
setHScrollBarMode( AlwaysOff );
@@ -93,7 +93,7 @@ int aHistLineEdit::cursorPosition() const
void aHistLineEdit::slotMaybeResize()
{
/*
- if(TQTextEdit::text().contains("\n")){
+ if(TQTextEdit::text().tqcontains("\n")){
setText(text());
setCursorPosition(text().length());
}
@@ -102,13 +102,13 @@ void aHistLineEdit::slotMaybeResize()
if(text().length() > IRC_SAFE_MAX_LINE){
if(m_drawrect == false){
m_drawrect = true;
- repaint();
+ tqrepaint();
}
}
else {
if(m_drawrect == true){
m_drawrect = false;
- repaint();
+ tqrepaint();
}
}
@@ -116,9 +116,9 @@ void aHistLineEdit::slotMaybeResize()
// 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
- if(h > (topLevelWidget()->height() >> 2)) {
- if(this != topLevelWidget()) {
- h = topLevelWidget()->height() >> 2;
+ if(h > (tqtopLevelWidget()->height() >> 2)) {
+ if(this != tqtopLevelWidget()) {
+ h = tqtopLevelWidget()->height() >> 2;
setVScrollBarMode( Auto );
}
}
@@ -131,9 +131,9 @@ void aHistLineEdit::slotMaybeResize()
s.setHeight(h);
resize(s);
setFixedHeight( h );
- TQLayout *l = topLevelWidget()->layout();
+ TQLayout *l = tqtopLevelWidget()->tqlayout();
if(l){
- l->invalidate();
+ l->tqinvalidate();
l->activate();
}
emit resized();
@@ -304,7 +304,7 @@ bool aHistLineEdit::processKeyEvent( TQKeyEvent *e )
/*
* Only put key sequences in here you
* want us to ignore and to pass upto
- * parent widgets for handling
+ * tqparent widgets for handling
*/
bool eat = false;
@@ -352,7 +352,7 @@ void aHistLineEdit::mousePressEvent ( TQMouseEvent *e )
{
if(e->button() == MidButton){
/*
- * emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection));
+ * emit pasteText(TQApplication::tqclipboard()->text(TQClipboard::Selection));
*/
}
else{
@@ -362,8 +362,8 @@ void aHistLineEdit::mousePressEvent ( TQMouseEvent *e )
#endif
bool aHistLineEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == this && e->type() == TQEvent::AccelOverride )
- if(processKeyEvent( static_cast<TQKeyEvent*>( e ) ) == true)
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::AccelOverride )
+ if(processKeyEvent( TQT_TQKEYEVENT( e ) ) == true)
return true;
return TQTextEdit::eventFilter( o, e );
@@ -381,11 +381,11 @@ void aHistLineEdit::paste()
{
/* we let the top level take it */
if(ksopts->oneLineEntry) {
- emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection));
+ emit pasteText(TQApplication::tqclipboard()->text(TQClipboard::Selection));
}
else {
- TQString paste = TQApplication::clipboard()->text(QClipboard::Selection);
- paste.replace("\n", " ~ ");
+ TQString paste = TQApplication::tqclipboard()->text(TQClipboard::Selection);
+ paste.tqreplace("\n", " ~ ");
insert(paste);
}
}
@@ -399,7 +399,7 @@ void aHistLineEdit::paintEvent ( TQPaintEvent *p )
TQPen pen = paint.pen();
pen.setWidth(5);
pen.setStyle(Qt::SolidLine);
- pen.setColor(palette().active().highlight());
+ pen.setColor(tqpalette().active().highlight());
paint.setPen(pen);
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(TQString::null); // always add empty line at end
+ hist.append(TQString()); // 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(TQString::null); // always add empty line at end
+ hist.append(TQString()); // 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
}