summaryrefslogtreecommitdiffstats
path: root/ksirc/KSTicker/ksticker.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/KSTicker/ksticker.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/KSTicker/ksticker.cpp')
-rw-r--r--ksirc/KSTicker/ksticker.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/ksirc/KSTicker/ksticker.cpp b/ksirc/KSTicker/ksticker.cpp
index e6199427..bedc0328 100644
--- a/ksirc/KSTicker/ksticker.cpp
+++ b/ksirc/KSTicker/ksticker.cpp
@@ -21,8 +21,8 @@
#include <kwin.h>
#include <kdebug.h>
-KSTicker::KSTicker(TQWidget * parent, const char * name, WFlags f)
-: TQFrame(parent, name, f)
+KSTicker::KSTicker(TQWidget * tqparent, const char * name, WFlags f)
+: TQFrame(tqparent, name, f)
{
pHeight = 1;
@@ -90,7 +90,7 @@ KSTicker::KSTicker(TQWidget * parent, const char * name, WFlags f)
KSTicker::~KSTicker()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
delete pic;
}
@@ -110,26 +110,26 @@ void KSTicker::show()
if(currentStr.length() != 0)
startTicker();
currentChar = 0;
- repaint(TRUE);
+ tqrepaint(TRUE);
}
void KSTicker::hide()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
TQFrame::hide();
}
void KSTicker::iconify()
{
TQFrame::showMinimized();
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
}
void KSTicker::setString(TQString str)
{
strlist.clear();
strlist.append(str);
- repaint(TRUE);
+ tqrepaint(TRUE);
startTicker();
}
@@ -138,7 +138,7 @@ void KSTicker::mergeString(TQString str, TQColor c)
int num = KSPainter::colour2num(c);
if(num != -1){
- str.prepend(TQString("~%1").arg(num));
+ str.prepend(TQString("~%1").tqarg(num));
}
mergeString(str);
@@ -150,8 +150,8 @@ void KSTicker::mergeString(TQString str)
if(rx.search(str) >= 0){
int value = nickColourMaker::colourMaker()->findIdx(rx.cap(1));
if(value >= 0){
- TQString newText = TQString("~%1\\1~c").arg(value);
- str.replace(rx, newText);
+ TQString newText = TQString("~%1\\1~c").tqarg(value);
+ str.tqreplace(rx, newText);
}
}
@@ -162,8 +162,8 @@ void KSTicker::mergeString(TQString str)
int found = 0;
TQStringList::Iterator it = strlist.begin();
for(; it != strlist.end(); it++){
- if(((*it).find(ksopts->server["global"].nick, 0, FALSE) == -1) &&
- ((*it).find(ksopts->server["global"].altNick, 0, FALSE) == -1)){
+ if(((*it).tqfind(ksopts->server["global"].nick, 0, FALSE) == -1) &&
+ ((*it).tqfind(ksopts->server["global"].altNick, 0, FALSE) == -1)){
strlist.remove(it);
found = 1;
break;
@@ -231,7 +231,7 @@ void KSTicker::timerEvent(TQTimerEvent *)
}
bAtEnd = FALSE;
- static BGMode bgmode = TransparentMode;
+ static Qt::BGMode bgmode = Qt::TransparentMode;
bitBlt(pic, -tickStep, 0, pic);
TQPainter p(pic);
@@ -275,12 +275,12 @@ void KSTicker::timerEvent(TQTimerEvent *)
int col = buf.toInt();
if((col >= 0) || (col <= KSPainter::maxcolour)){
bg = KSPainter::num2colour[col];
- bgmode = OpaqueMode;
+ bgmode = Qt::OpaqueMode;
}
}
}
else{
- bgmode = TransparentMode;
+ bgmode = Qt::TransparentMode;
}
}
else {
@@ -352,7 +352,7 @@ void KSTicker::timerEvent(TQTimerEvent *)
p.setPen(fg);
p.setBackgroundColor(bg);
- p.setBackgroundMode(OpaqueMode);
+ p.setBackgroundMode(Qt::OpaqueMode);
p.drawText(this->width() - cOffset + onechar, // remove -onechar.
this->height() / 4 + p.fontMetrics().height() / 2,
currentStr.mid(currentChar, 1),
@@ -376,12 +376,12 @@ void KSTicker::resizeEvent( TQResizeEvent *e)
TQFrame::resizeEvent(e);
onechar = fontMetrics().width("X");
chars = this->width() / onechar;
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
TQPixmap *new_pic = new TQPixmap(width() + onechar, height());
new_pic->fill(backgroundColor());
- bitBlt(new_pic,
+ bitBlt(TQT_TQPAINTDEVICE(new_pic),
new_pic->width() - pic->width(), 0,
- pic, 0, 0,
+ TQT_TQPAINTDEVICE(pic), 0, 0,
pic->width(), pic->height(),
CopyROP, TRUE);
delete pic;
@@ -393,19 +393,19 @@ void KSTicker::resizeEvent( TQResizeEvent *e)
void KSTicker::closeEvent( TQCloseEvent *)
{
emit closing();
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
// delete this;
}
void KSTicker::startTicker()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
startTimer(tickRate);
}
void KSTicker::stopTicker()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
}
void KSTicker::mouseDoubleClickEvent( TQMouseEvent * )
@@ -415,7 +415,7 @@ void KSTicker::mouseDoubleClickEvent( TQMouseEvent * )
void KSTicker::mousePressEvent( TQMouseEvent *e)
{
- if(e->button() == RightButton){
+ if(e->button() == Qt::RightButton){
popup->popup(this->cursor().pos());
}
else{