summaryrefslogtreecommitdiffstats
path: root/ksirc/alistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/alistbox.cpp')
-rw-r--r--ksirc/alistbox.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/ksirc/alistbox.cpp b/ksirc/alistbox.cpp
index 9b632676..779bd730 100644
--- a/ksirc/alistbox.cpp
+++ b/ksirc/alistbox.cpp
@@ -16,42 +16,42 @@
#include "alistbox.h"
#include "nickColourMaker.h"
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kurldrag.h>
-aListBox::aListBox(QWidget *parent, const char *name )
- : QListBox(parent,name)
+aListBox::aListBox(TQWidget *parent, const char *name )
+ : TQListBox(parent,name)
{
clear();
p_scroll = palette().copy();
setAcceptDrops( true );
- connect(this, SIGNAL(selected (const QString&)),
- this, SIGNAL(selectedNick(const QString&)));
+ connect(this, TQT_SIGNAL(selected (const TQString&)),
+ this, TQT_SIGNAL(selectedNick(const TQString&)));
m_nickListDirty = true;
updateNickPrefixWidth();
- connect( this, SIGNAL( contextMenuRequested( QListBoxItem *, const QPoint & ) ),
- this, SLOT( reEmitContextMenuRequest( QListBoxItem * ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *, const TQPoint & ) ),
+ this, TQT_SLOT( reEmitContextMenuRequest( TQListBoxItem * ) ) );
}
aListBox::~aListBox()
{
}
-void aListBox::reEmitContextMenuRequest( QListBoxItem *item )
+void aListBox::reEmitContextMenuRequest( TQListBoxItem *item )
{
emit contextMenuRequested( index( item ) );
}
void aListBox::clear()
{
- QListBox::clear();
+ TQListBox::clear();
}
@@ -72,7 +72,7 @@ void aListBox::inSort ( nickListItem *lbi)
m_nickListDirty = true;
}
-void aListBox::inSort ( QString text, bool top)
+void aListBox::inSort ( TQString text, bool top)
{
nickListItem *nli = new nickListItem();
nli->setText(text);
@@ -91,7 +91,7 @@ int aListBox::findSep()
return i;
}
-int aListBox::searchFor(const QString &nick, bool &found, bool top)
+int aListBox::searchFor(const TQString &nick, bool &found, bool top)
{
int min = 0, max = 0;
int current = 0, compare = 0;
@@ -198,7 +198,7 @@ bool aListBox::isTop(int index)
return TRUE;
}
-int aListBox::findNick(const QString &str)
+int aListBox::findNick(const TQString &str)
{
bool found;
int index;
@@ -213,15 +213,15 @@ int aListBox::findNick(const QString &str)
}
nickListItem *aListBox::item(int index){
- return (nickListItem *) QListBox::item(index);
+ return (nickListItem *) TQListBox::item(index);
}
-void aListBox::dragMoveEvent( QDragMoveEvent *e )
+void aListBox::dragMoveEvent( TQDragMoveEvent *e )
{
bool ok = (count() > 0 && KURLDrag::canDecode( e ));
if(!ok)
- ok = QTextDrag::canDecode(e);
+ ok = TQTextDrag::canDecode(e);
e->accept( ok );
if ( ok )
@@ -229,22 +229,22 @@ void aListBox::dragMoveEvent( QDragMoveEvent *e )
}
-void aListBox::dropEvent( QDropEvent *e )
+void aListBox::dropEvent( TQDropEvent *e )
{
- QListBoxItem *item = itemAt( e->pos() );
+ TQListBoxItem *item = itemAt( e->pos() );
if ( !item )
return;
setCurrentItem( item );
- QStringList urls;
+ TQStringList urls;
KURLDrag::decodeLocalFiles( e, urls );
- QString text;
+ TQString text;
if ( !urls.isEmpty() )
emit urlsDropped( urls, item->text() );
- else if(QTextDrag::decode(e, text)){
+ else if(TQTextDrag::decode(e, text)){
emit textDropped( item, text);
}
}
@@ -264,7 +264,7 @@ void aListBox::updateNeedNickPrefixFlag() const
m_needNickPrefix = false;
if(ksopts->useColourNickList == false){
- QListBoxItem *item = firstItem();
+ TQListBoxItem *item = firstItem();
for (; item; item = item->next() )
{
nickListItem *nickItem = static_cast<nickListItem *>( item );
@@ -282,15 +282,15 @@ void aListBox::updateNeedNickPrefixFlag() const
m_nickListDirty = false;
}
-void aListBox::fontChange( const QFont &f )
+void aListBox::fontChange( const TQFont &f )
{
- QListBox::fontChange( f );
+ TQListBox::fontChange( f );
updateNickPrefixWidth();
}
void aListBox::updateNickPrefixWidth()
{
- QFontMetrics metrics( font() );
+ TQFontMetrics metrics( font() );
m_nickPrefixWidth = 0;
@@ -320,7 +320,7 @@ void aListBox::clearAdvOps()
}
nickListItem::nickListItem()
- : QListBoxItem()
+ : TQListBoxItem()
{
is_op = FALSE;
is_voice = FALSE;
@@ -330,7 +330,7 @@ nickListItem::nickListItem()
}
nickListItem::nickListItem(const nickListItem &old)
- : QListBoxItem()
+ : TQListBoxItem()
{
is_op = old.is_op;
is_voice = old.is_voice;
@@ -372,20 +372,20 @@ void nickListItem::setIrcOp(bool _ircop)
static_cast<aListBox *>( listBox() )->setNickListDirty();
}
-void nickListItem::forceColour(const QColor *col)
+void nickListItem::forceColour(const TQColor *col)
{
forcedCol = col;
}
-void nickListItem::paint(QPainter *p)
+void nickListItem::paint(TQPainter *p)
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int yPos; // vertical text position
int nickPosX = 3;
yPos = fm.ascent() + fm.leading()/2;
- QPen pen = p->pen();
- QFont font = p->font();
+ TQPen pen = p->pen();
+ TQFont font = p->font();
if(ksopts->useColourNickList == true) {
if(ksopts->nickColourization){
@@ -400,25 +400,25 @@ void nickListItem::paint(QPainter *p)
}
if(is_voice == TRUE){
- QPen open = p->pen();
+ TQPen open = p->pen();
p->setPen(ksopts->channelColor);
p->drawText( nickPosX, yPos, "+" );
nickPosX += fm.width( "+" );
p->setPen(open);
-// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->channelColor, Qt::Dense7Pattern));
+// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->channelColor, Qt::Dense7Pattern));
}
if(is_op == TRUE) {
- QPen open = p->pen();
+ TQPen open = p->pen();
p->setPen(ksopts->errorColor);
p->drawText( nickPosX, yPos, "@" );
nickPosX += fm.width( "@" );
p->setPen(open);
-// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->errorColor, Qt::Dense7Pattern));
+// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->errorColor, Qt::Dense7Pattern));
}
if(is_away == TRUE)
p->setPen(p->pen().color().dark(150));
if(is_ircop == TRUE){
- QPen open = p->pen();
+ TQPen open = p->pen();
p->setPen(ksopts->errorColor);
p->drawText( nickPosX, yPos, "*" );
nickPosX += fm.width( "*" );
@@ -435,7 +435,7 @@ void nickListItem::paint(QPainter *p)
if(is_away == TRUE)
p->setPen(p->pen().color().dark(150));
if(is_ircop == TRUE){
- QFont bfont = font;
+ TQFont bfont = font;
bfont.setBold(TRUE);
p->setFont(bfont);
}
@@ -460,9 +460,9 @@ void nickListItem::paint(QPainter *p)
p->setFont(font);
}
-QString nickListItem::nickPrefix() const
+TQString nickListItem::nickPrefix() const
{
- QString prefix;
+ TQString prefix;
if ( voice() )
prefix += aListBox::nickPrefixVoice();
@@ -479,19 +479,19 @@ QString nickListItem::nickPrefix() const
return prefix;
}
-int nickListItem::height(const QListBox *lb ) const
+int nickListItem::height(const TQListBox *lb ) const
{
return lb->fontMetrics().lineSpacing() + 1;
}
-int nickListItem::width(const QListBox *lb ) const
+int nickListItem::width(const TQListBox *lb ) const
{
return
static_cast<const aListBox *>( lb )->nickPrefixWidth() +
lb->fontMetrics().width( text() ) + 6;
}
-const QPixmap* nickListItem::pixmap() const
+const TQPixmap* nickListItem::pixmap() const
{
return 0l;
}