diff options
Diffstat (limited to 'ksirc/KSTicker')
-rw-r--r-- | ksirc/KSTicker/kspainter.cpp | 30 | ||||
-rw-r--r-- | ksirc/KSTicker/ksticker.cpp | 46 | ||||
-rw-r--r-- | ksirc/KSTicker/ksticker.h | 5 | ||||
-rw-r--r-- | ksirc/KSTicker/ksttest.cpp | 6 | ||||
-rw-r--r-- | ksirc/KSTicker/ksttest.h | 1 | ||||
-rw-r--r-- | ksirc/KSTicker/speeddialog.cpp | 6 | ||||
-rw-r--r-- | ksirc/KSTicker/speeddialog.dlg | 18 | ||||
-rw-r--r-- | ksirc/KSTicker/speeddialog.h | 5 | ||||
-rw-r--r-- | ksirc/KSTicker/speeddialogData.cpp | 14 | ||||
-rw-r--r-- | ksirc/KSTicker/speeddialogData.h | 7 |
10 files changed, 71 insertions, 67 deletions
diff --git a/ksirc/KSTicker/kspainter.cpp b/ksirc/KSTicker/kspainter.cpp index 90ffac0d..e9e63bce 100644 --- a/ksirc/KSTicker/kspainter.cpp +++ b/ksirc/KSTicker/kspainter.cpp @@ -12,22 +12,22 @@ const TQColor KSPainter::lightCyan( 224, 255, 255 ); const TQColor KSPainter::lightBlue( 173, 216, 230 ); const TQColor KSPainter::pink ( 255, 192, 203 ); -TQColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white, - Qt::black, - Qt::darkBlue, - Qt::darkGreen, - Qt::red, +TQColor KSPainter::num2colour[KSPainter::maxcolour] = { TQt::white, + TQt::black, + TQt::darkBlue, + TQt::darkGreen, + TQt::red, brown, - Qt::darkMagenta, + TQt::darkMagenta, orange, - Qt::yellow, - Qt::green, - Qt::darkCyan, - Qt::cyan, - Qt::blue, + TQt::yellow, + TQt::green, + TQt::darkCyan, + TQt::cyan, + TQt::blue, pink, - Qt::gray, - Qt::lightGray }; + TQt::gray, + TQt::lightGray }; void KSPainter::initOptColours() { @@ -67,7 +67,7 @@ void KSPainter::colourDrawText(TQPainter *p, int startx, int starty, for(loc = 0; (str[loc] != 0x00) && (loc != length) ; loc++){ if(str[loc] == 0x03 || str[loc] == '~'){ i = loc; - p->drawText(startx, starty, str + offset, i-offset); + p->drawText(startx, starty, TQString(str + offset), i-offset); startx += p->fontMetrics().width(str + offset, i-offset); offset = i; // lastp = i; @@ -180,7 +180,7 @@ void KSPainter::colourDrawText(TQPainter *p, int startx, int starty, offset += i - loc; } } - p->drawText(startx, starty, str + offset, loc-offset); + p->drawText(startx, starty, TQString(str + offset), loc-offset); } 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{ diff --git a/ksirc/KSTicker/ksticker.h b/ksirc/KSTicker/ksticker.h index 47beecac..0ded7da9 100644 --- a/ksirc/KSTicker/ksticker.h +++ b/ksirc/KSTicker/ksticker.h @@ -12,12 +12,13 @@ public: int length; }; -class KSTicker : public QFrame +class KSTicker : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KSTicker(TQWidget * parent=0, const char * name=0, WFlags f=0); + KSTicker(TQWidget * tqparent=0, const char * name=0, WFlags f=0); virtual ~KSTicker(); void setString(TQString); diff --git a/ksirc/KSTicker/ksttest.cpp b/ksirc/KSTicker/ksttest.cpp index 36ad249a..904aedf1 100644 --- a/ksirc/KSTicker/ksttest.cpp +++ b/ksirc/KSTicker/ksttest.cpp @@ -35,8 +35,8 @@ StdInTicker::~StdInTicker() kConfig->writeEntry("font", KSTicker::font()); kConfig->writeEntry("tick", tick); kConfig->writeEntry("step", step); - kConfig->writeEntry("text", colorGroup().text() ); - kConfig->writeEntry("background", colorGroup().background() ); + kConfig->writeEntry("text", tqcolorGroup().text() ); + kConfig->writeEntry("background", tqcolorGroup().background() ); kConfig->sync(); } @@ -46,7 +46,7 @@ void StdInTicker::readsocket(int socket) int bytes = read(socket, buf, 1024); if(bytes){ TQCString str(buf, bytes); - str.replace(TQRegExp("\n"), " // "); + str.tqreplace(TQRegExp("\n"), " // "); mergeString(str); } } diff --git a/ksirc/KSTicker/ksttest.h b/ksirc/KSTicker/ksttest.h index d3e988ff..5b93d330 100644 --- a/ksirc/KSTicker/ksttest.h +++ b/ksirc/KSTicker/ksttest.h @@ -7,6 +7,7 @@ class StdInTicker : public KSTicker { Q_OBJECT + TQ_OBJECT public: StdInTicker(); ~StdInTicker(); diff --git a/ksirc/KSTicker/speeddialog.cpp b/ksirc/KSTicker/speeddialog.cpp index 50cb8d80..e9597ace 100644 --- a/ksirc/KSTicker/speeddialog.cpp +++ b/ksirc/KSTicker/speeddialog.cpp @@ -1,6 +1,6 @@ /********************************************************************** - --- Qt Architect generated file --- + --- TQt Architect generated file --- File: speeddialog.cpp Last generated: Sun Dec 21 08:52:31 1997 @@ -15,10 +15,10 @@ SpeedDialog::SpeedDialog ( int tick, int step, - TQWidget* parent, + TQWidget* tqparent, const char* name ) - : speeddialogData( parent, name ) + : speeddialogData( tqparent, name ) { setCaption(i18n( "Speed Setup") ); connect(sliderTick, TQT_SIGNAL(valueChanged(int)), diff --git a/ksirc/KSTicker/speeddialog.dlg b/ksirc/KSTicker/speeddialog.dlg index 00e26c67..aff83de2 100644 --- a/ksirc/KSTicker/speeddialog.dlg +++ b/ksirc/KSTicker/speeddialog.dlg @@ -18,7 +18,7 @@ MaxSize {32767 32767} Grid {10} Slider { - Orientation {Horizontal} + Qt::Orientation {Horizontal} MinValue {10} MaxValue {200} Initial {30} @@ -31,12 +31,12 @@ Slider { Name {Slider_1} Variable {sliderTick} Signal {[Protected] valueChanged --> updateTick (int)} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } Slider { - Orientation {Horizontal} + Qt::Orientation {Horizontal} MinValue {1} MaxValue {10} Initial {3} @@ -49,7 +49,7 @@ Slider { Name {Slider_2} Variable {sliderStep} Signal {[Protected] valueChanged --> updateStep (int)} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } @@ -62,7 +62,7 @@ LCDNumber { Rect {200 5 60 30} Name {LCDNumber_1} Variable {lcdTick} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } @@ -75,7 +75,7 @@ LCDNumber { Rect {200 40 60 30} Name {LCDNumber_2} Variable {lcdStep} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } @@ -85,7 +85,7 @@ Label { Margin {-1} Rect {10 5 80 30} Name {Label_1} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } @@ -95,7 +95,7 @@ Label { Margin {-1} Rect {10 40 80 30} Name {Label_2} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } @@ -109,7 +109,7 @@ PushButton { Rect {140 80 120 30} Name {PushButton_2} Signal {[Protected] pressed --> terminate ()} - LayoutStatus {NoLayout} + LayouttqStatus {NoLayout} MinimumSize {10 10} MaximumSize {32767 32767} } diff --git a/ksirc/KSTicker/speeddialog.h b/ksirc/KSTicker/speeddialog.h index 514c72ee..c5ade254 100644 --- a/ksirc/KSTicker/speeddialog.h +++ b/ksirc/KSTicker/speeddialog.h @@ -1,6 +1,6 @@ /********************************************************************** - --- Qt Architect generated file --- + --- TQt Architect generated file --- File: speeddialog.h Last generated: Sun Dec 21 08:52:31 1997 @@ -15,6 +15,7 @@ class SpeedDialog : public speeddialogData { Q_OBJECT + TQ_OBJECT public: @@ -22,7 +23,7 @@ public: ( int tick, int step, - TQWidget* parent = NULL, + TQWidget* tqparent = NULL, const char* name = NULL ); diff --git a/ksirc/KSTicker/speeddialogData.cpp b/ksirc/KSTicker/speeddialogData.cpp index 822d6f7f..ddb733df 100644 --- a/ksirc/KSTicker/speeddialogData.cpp +++ b/ksirc/KSTicker/speeddialogData.cpp @@ -1,6 +1,6 @@ /********************************************************************** - --- Qt Architect generated file --- + --- TQt Architect generated file --- File: speeddialogData.cpp Last generated: Sun Dec 21 09:13:46 1997 @@ -19,14 +19,14 @@ #include <tqlayout.h> #include <kdialog.h> -speeddialogData::speeddialogData ( TQWidget* parent, const char* name ) - :TQDialog( parent, name, 0 ) +speeddialogData::speeddialogData ( TQWidget* tqparent, const char* name ) + :TQDialog( tqparent, name, 0 ) { TQGridLayout *grid = new TQGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint()); sliderTick = new TQSlider( this, "Slider_1" ); grid->addWidget( sliderTick, 0, 1 ); connect( sliderTick, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateTick(int)) ); - sliderTick->setOrientation( TQSlider::Horizontal ); + sliderTick->setOrientation( Qt::Horizontal ); sliderTick->setRange( 10, 200 ); sliderTick->setSteps( 10, 50 ); sliderTick->setValue( 30 ); @@ -38,7 +38,7 @@ speeddialogData::speeddialogData ( TQWidget* parent, const char* name ) grid->addWidget( sliderStep, 1, 1 ); connect( sliderStep, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateStep(int)) ); - sliderStep->setOrientation( TQSlider::Horizontal ); + sliderStep->setOrientation( Qt::Horizontal ); sliderStep->setRange( 1, 10 ); sliderStep->setSteps( 1, 2 ); sliderStep->setValue( 3 ); @@ -66,7 +66,7 @@ speeddialogData::speeddialogData ( TQWidget* parent, const char* name ) TQLabel* dlgedit_Label_1; dlgedit_Label_1 = new TQLabel( this, "Label_1" ); dlgedit_Label_1->setText( i18n("Tick interval:") ); - dlgedit_Label_1->setAlignment( 289 ); + dlgedit_Label_1->tqsetAlignment( 289 ); dlgedit_Label_1->setMargin( -1 ); grid->addWidget( dlgedit_Label_1, 0, 0 ); @@ -74,7 +74,7 @@ speeddialogData::speeddialogData ( TQWidget* parent, const char* name ) TQLabel* dlgedit_Label_2; dlgedit_Label_2 = new TQLabel( this, "Label_2" ); dlgedit_Label_2->setText( i18n("Step size:") ); - dlgedit_Label_2->setAlignment( 289 ); + dlgedit_Label_2->tqsetAlignment( 289 ); dlgedit_Label_2->setMargin( -1 ); grid->addWidget( dlgedit_Label_2, 1, 0 ); diff --git a/ksirc/KSTicker/speeddialogData.h b/ksirc/KSTicker/speeddialogData.h index 27b6c27a..31dd21da 100644 --- a/ksirc/KSTicker/speeddialogData.h +++ b/ksirc/KSTicker/speeddialogData.h @@ -1,6 +1,6 @@ /********************************************************************** - --- Qt Architect generated file --- + --- TQt Architect generated file --- File: speeddialogData.h Last generated: Sun Dec 21 09:13:46 1997 @@ -17,15 +17,16 @@ #include <tqslider.h> #include <tqlcdnumber.h> -class speeddialogData : public QDialog +class speeddialogData : public TQDialog { Q_OBJECT + TQ_OBJECT public: speeddialogData ( - TQWidget* parent = NULL, + TQWidget* tqparent = NULL, const char* name = NULL ); |