summaryrefslogtreecommitdiffstats
path: root/ksirc/ahistlineedit.cpp
diff options
context:
space:
mode:
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
}