diff options
Diffstat (limited to 'kmid')
33 files changed, 533 insertions, 533 deletions
diff --git a/kmid/channel.cpp b/kmid/channel.cpp index 7e48dc03..7d077dd7 100644 --- a/kmid/channel.cpp +++ b/kmid/channel.cpp @@ -25,8 +25,8 @@ #include <stdio.h> #include <stdlib.h> -#include <qpainter.h> -#include <qcombobox.h> +#include <tqpainter.h> +#include <tqcombobox.h> #include <kglobal.h> #include <kinstance.h> @@ -39,39 +39,39 @@ #include "instrname.h" #include <kiconloader.h> -KMidChannel::KMidChannel(int chn,QWidget *parent) : QWidget (parent) +KMidChannel::KMidChannel(int chn,TQWidget *parent) : TQWidget (parent) { channel=chn; replay=TRUE; int i; for (i=0;i<128;i++) pressed[i]=0; - keyboard = QPixmap(locate("appdata","icons/keyboard.xpm")); - penB = new QPen (black); - penW = new QPen (white); - penT = new QPen (colorGroup().background()); + keyboard = TQPixmap(locate("appdata","icons/keyboard.xpm")); + penB = new TQPen (black); + penW = new TQPen (white); + penT = new TQPen (colorGroup().background()); KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); - QFont *qtextfontdefault=new QFont("lucida",18,QFont::Bold,TRUE); - qcvfont=new QFont(kcfg->readFontEntry("ChannelViewFont",qtextfontdefault)); + TQFont *qtextfontdefault=new TQFont("lucida",18,TQFont::Bold,TRUE); + qcvfont=new TQFont(kcfg->readFontEntry("ChannelViewFont",qtextfontdefault)); delete qtextfontdefault; - instrumentCombo = new QComboBox(FALSE,this,"instr"); + instrumentCombo = new TQComboBox(FALSE,this,"instr"); instrumentCombo->setGeometry(160,2,200,20); for (i=0;i<128;i++) instrumentCombo->insertItem(i18n(instrumentName[i]),i); - connect(instrumentCombo,SIGNAL(activated(int)),this,SLOT(pgmChanged(int))); + connect(instrumentCombo,TQT_SIGNAL(activated(int)),this,TQT_SLOT(pgmChanged(int))); forcepgm=new KMidButton(this,"forcepgm"); forcepgm->setGeometry(135,4,16,16); forcepgm->setToggleButton(TRUE); - button1 = QPixmap(locate("appdata","icons/button1.xpm")); - button2 = QPixmap(locate("appdata","icons/button2.xpm")); + button1 = TQPixmap(locate("appdata","icons/button1.xpm")); + button2 = TQPixmap(locate("appdata","icons/button2.xpm")); forcepgm->setPixmaps(button1,button2); forcepgm->show(); - connect(forcepgm,SIGNAL(toggled(bool)),this,SLOT(changeForcedState(bool))); + connect(forcepgm,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(changeForcedState(bool))); } @@ -82,12 +82,12 @@ KMidChannel::~KMidChannel() delete penT; } -void KMidChannel::paintEvent( QPaintEvent * ) +void KMidChannel::paintEvent( TQPaintEvent * ) { - QPainter *qpaint=new QPainter(this); + TQPainter *qpaint=new TQPainter(this); - QString tmp = i18n("Channel %1").arg(channel); + TQString tmp = i18n("Channel %1").arg(channel); qpaint->setFont(*qcvfont); qpaint->setPen(*penB); qpaint->drawText(2,20,tmp); @@ -100,7 +100,7 @@ void KMidChannel::paintEvent( QPaintEvent * ) delete qpaint; } -void KMidChannel::drawKeyboard(QPainter *qpaint) +void KMidChannel::drawKeyboard(TQPainter *qpaint) { int x=1; for (int i=0;(i<12) && (x<width());i++,x+=63) @@ -116,13 +116,13 @@ void KMidChannel::drawKeyboard(QPainter *qpaint) } -void KMidChannel::drawPressedKeys(QPainter *qpaint) +void KMidChannel::drawPressedKeys(TQPainter *qpaint) { for (int i=0;i<128;i++) if (pressed[i]) drawKey(qpaint,i); } -void KMidChannel::drawKey(QPainter *qpaint,int key) +void KMidChannel::drawKey(TQPainter *qpaint,int key) { int octave=key/12; int note=key%12; @@ -149,7 +149,7 @@ void KMidChannel::drawKey(QPainter *qpaint,int key) void KMidChannel::noteOn(int key) { pressed[key]=1; - QPainter *qpaint=new QPainter(this); + TQPainter *qpaint=new TQPainter(this); drawKey(qpaint,key); delete qpaint; } @@ -157,7 +157,7 @@ void KMidChannel::noteOn(int key) void KMidChannel::noteOff(int key) { pressed[key]=0; - QPainter *qpaint=new QPainter(this); + TQPainter *qpaint=new TQPainter(this); drawKey(qpaint,key); delete qpaint; } diff --git a/kmid/channel.h b/kmid/channel.h index eaeb3241..c86e91a1 100644 --- a/kmid/channel.h +++ b/kmid/channel.h @@ -24,8 +24,8 @@ #ifndef KMIDCHANNEL_H #define KMIDCHANNEL_H -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> #define CHANNELHEIGHT 71 #define KEYBOARDY CHANNELHEIGHT-46 @@ -47,40 +47,40 @@ private: // changing the force state protected: - QPixmap keyboard; - QPixmap button1; - QPixmap button2; + TQPixmap keyboard; + TQPixmap button1; + TQPixmap button2; - QComboBox *instrumentCombo; + TQComboBox *instrumentCombo; KMidButton *forcepgm; - QFont *qcvfont; + TQFont *qcvfont; - QPen *penB; // Black - QPen *penW; // White - QPen *penT; // "Transparent" for Background + TQPen *penB; // Black + TQPen *penW; // White + TQPen *penT; // "Transparent" for Background - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); public: - KMidChannel(int i,QWidget *Parent); + KMidChannel(int i,TQWidget *Parent); virtual ~KMidChannel(); - void drawKeyboard(QPainter *qpaint); - void drawPressedKeys(QPainter *qpaint); - void drawKey(QPainter *qpaint,int key); - - virtual void drawDo (QPainter *qpaint,int x,int p) = 0; - virtual void drawDo__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawRe (QPainter *qpaint,int x,int p) = 0; - virtual void drawRe__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawMi (QPainter *qpaint,int x,int p) = 0; - virtual void drawFa (QPainter *qpaint,int x,int p) = 0; - virtual void drawFa__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawSol (QPainter *qpaint,int x,int p) = 0; - virtual void drawSol__(QPainter *qpaint,int x,int p) = 0; - virtual void drawLa (QPainter *qpaint,int x,int p) = 0; - virtual void drawLa__ (QPainter *qpaint,int x,int p) = 0; - virtual void drawSi (QPainter *qpaint,int x,int p) = 0; + void drawKeyboard(TQPainter *qpaint); + void drawPressedKeys(TQPainter *qpaint); + void drawKey(TQPainter *qpaint,int key); + + virtual void drawDo (TQPainter *qpaint,int x,int p) = 0; + virtual void drawDo__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawRe (TQPainter *qpaint,int x,int p) = 0; + virtual void drawRe__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawMi (TQPainter *qpaint,int x,int p) = 0; + virtual void drawFa (TQPainter *qpaint,int x,int p) = 0; + virtual void drawFa__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawSol (TQPainter *qpaint,int x,int p) = 0; + virtual void drawSol__(TQPainter *qpaint,int x,int p) = 0; + virtual void drawLa (TQPainter *qpaint,int x,int p) = 0; + virtual void drawLa__ (TQPainter *qpaint,int x,int p) = 0; + virtual void drawSi (TQPainter *qpaint,int x,int p) = 0; void noteOn(int key); void noteOff(int key); diff --git a/kmid/channel3d.cpp b/kmid/channel3d.cpp index afa0e638..d3bef7fd 100644 --- a/kmid/channel3d.cpp +++ b/kmid/channel3d.cpp @@ -23,13 +23,13 @@ ***************************************************************************/ #include "channel3d.h" -#include <qpainter.h> +#include <tqpainter.h> -KMidChannel3D::KMidChannel3D (int chn,QWidget *parent) : KMidChannel(chn,parent) +KMidChannel3D::KMidChannel3D (int chn,TQWidget *parent) : KMidChannel(chn,parent) { } -void KMidChannel3D::drawDo(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawDo(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x,KEYBOARDY+43,x+6,KEYBOARDY+43); @@ -39,7 +39,7 @@ void KMidChannel3D::drawDo(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+7,KEYBOARDY+28,x+7,KEYBOARDY+42); } -void KMidChannel3D::drawDo__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawDo__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+6,KEYBOARDY+2,x+6,KEYBOARDY+25); @@ -50,7 +50,7 @@ void KMidChannel3D::drawDo__(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+10,KEYBOARDY+27); } -void KMidChannel3D::drawRe(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawRe(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+9,KEYBOARDY+43,x+15,KEYBOARDY+43); @@ -60,7 +60,7 @@ void KMidChannel3D::drawRe(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+16,KEYBOARDY+28,x+16,KEYBOARDY+42); } -void KMidChannel3D::drawRe__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawRe__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+15,KEYBOARDY+2,x+15,KEYBOARDY+25); @@ -70,7 +70,7 @@ void KMidChannel3D::drawRe__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+20,KEYBOARDY+1,x+20,KEYBOARDY+27); qpaint->drawPoint(x+19,KEYBOARDY+27); } -void KMidChannel3D::drawMi(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawMi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+18,KEYBOARDY+43,x+24,KEYBOARDY+43); @@ -80,7 +80,7 @@ void KMidChannel3D::drawMi(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+25,KEYBOARDY+1,x+25,KEYBOARDY+42); } -void KMidChannel3D::drawFa(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawFa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+27,KEYBOARDY+43,x+33,KEYBOARDY+43); @@ -90,7 +90,7 @@ void KMidChannel3D::drawFa(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+34,KEYBOARDY+28,x+34,KEYBOARDY+42); } -void KMidChannel3D::drawFa__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawFa__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+33,KEYBOARDY+2,x+33,KEYBOARDY+25); @@ -99,7 +99,7 @@ void KMidChannel3D::drawFa__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+38,KEYBOARDY+1,x+38,KEYBOARDY+27); qpaint->drawPoint(x+37,KEYBOARDY+27); } -void KMidChannel3D::drawSol(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawSol(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+36,KEYBOARDY+43,x+42,KEYBOARDY+43); @@ -109,7 +109,7 @@ void KMidChannel3D::drawSol(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+43,KEYBOARDY+28,x+43,KEYBOARDY+42); } -void KMidChannel3D::drawSol__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawSol__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+42,KEYBOARDY+2,x+42,KEYBOARDY+25); @@ -118,7 +118,7 @@ void KMidChannel3D::drawSol__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+47,KEYBOARDY+1,x+47,KEYBOARDY+27); qpaint->drawPoint(x+46,KEYBOARDY+27); } -void KMidChannel3D::drawLa(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawLa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+45,KEYBOARDY+43,x+51,KEYBOARDY+43); @@ -128,7 +128,7 @@ void KMidChannel3D::drawLa(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+52,KEYBOARDY+28,x+52,KEYBOARDY+42); } -void KMidChannel3D::drawLa__(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawLa__(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penB):(*penW)); qpaint->drawLine(x+51,KEYBOARDY+2,x+51,KEYBOARDY+25); @@ -137,7 +137,7 @@ void KMidChannel3D::drawLa__(QPainter *qpaint,int x,int p) qpaint->drawLine(x+56,KEYBOARDY+1,x+56,KEYBOARDY+27); qpaint->drawPoint(x+55,KEYBOARDY+27); } -void KMidChannel3D::drawSi(QPainter *qpaint,int x,int p) +void KMidChannel3D::drawSi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penW):(*penB)); qpaint->drawLine(x+54,KEYBOARDY+43,x+60,KEYBOARDY+43); diff --git a/kmid/channel3d.h b/kmid/channel3d.h index 2ef069ac..a8c81da0 100644 --- a/kmid/channel3d.h +++ b/kmid/channel3d.h @@ -30,21 +30,21 @@ class KMidChannel3D : public KMidChannel { public: - KMidChannel3D(int chn,QWidget *parent); - - - virtual void drawDo (QPainter *qpaint,int x,int p); - virtual void drawDo__ (QPainter *qpaint,int x,int p); - virtual void drawRe (QPainter *qpaint,int x,int p); - virtual void drawRe__ (QPainter *qpaint,int x,int p); - virtual void drawMi (QPainter *qpaint,int x,int p); - virtual void drawFa (QPainter *qpaint,int x,int p); - virtual void drawFa__ (QPainter *qpaint,int x,int p); - virtual void drawSol (QPainter *qpaint,int x,int p); - virtual void drawSol__(QPainter *qpaint,int x,int p); - virtual void drawLa (QPainter *qpaint,int x,int p); - virtual void drawLa__ (QPainter *qpaint,int x,int p); - virtual void drawSi (QPainter *qpaint,int x,int p); + KMidChannel3D(int chn,TQWidget *parent); + + + virtual void drawDo (TQPainter *qpaint,int x,int p); + virtual void drawDo__ (TQPainter *qpaint,int x,int p); + virtual void drawRe (TQPainter *qpaint,int x,int p); + virtual void drawRe__ (TQPainter *qpaint,int x,int p); + virtual void drawMi (TQPainter *qpaint,int x,int p); + virtual void drawFa (TQPainter *qpaint,int x,int p); + virtual void drawFa__ (TQPainter *qpaint,int x,int p); + virtual void drawSol (TQPainter *qpaint,int x,int p); + virtual void drawSol__(TQPainter *qpaint,int x,int p); + virtual void drawLa (TQPainter *qpaint,int x,int p); + virtual void drawLa__ (TQPainter *qpaint,int x,int p); + virtual void drawSi (TQPainter *qpaint,int x,int p); }; diff --git a/kmid/channel4d.cpp b/kmid/channel4d.cpp index c6ffb8b4..4f47c3ae 100644 --- a/kmid/channel4d.cpp +++ b/kmid/channel4d.cpp @@ -23,18 +23,18 @@ ***************************************************************************/ #include "channel4d.h" -#include <qpainter.h> +#include <tqpainter.h> -KMidChannel4D::KMidChannel4D (int chn,QWidget *parent) : KMidChannel(chn,parent) +KMidChannel4D::KMidChannel4D (int chn,TQWidget *parent) : KMidChannel(chn,parent) { - brushR = new QBrush (red); - brushW = new QBrush (white); - brushB = new QBrush (black); - penR = new QPen (red); + brushR = new TQBrush (red); + brushW = new TQBrush (white); + brushB = new TQBrush (black); + penR = new TQPen (red); } -void KMidChannel4D::drawDo(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawDo(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); @@ -51,7 +51,7 @@ void KMidChannel4D::drawDo(QPainter *qpaint,int x,int p) qpaint->setPen(p?(*penR):(*penW)); qpaint->drawPoint(x+5,KEYBOARDY+27); } -void KMidChannel4D::drawDo__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawDo__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+6,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -68,7 +68,7 @@ void KMidChannel4D::drawDo__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawRe(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawRe(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+9,KEYBOARDY+43,x+15,KEYBOARDY+43); @@ -86,7 +86,7 @@ void KMidChannel4D::drawRe(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawRe__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawRe__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+15,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -103,7 +103,7 @@ void KMidChannel4D::drawRe__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawMi(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawMi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+18,KEYBOARDY+43,x+24,KEYBOARDY+43); @@ -119,7 +119,7 @@ void KMidChannel4D::drawMi(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+20,KEYBOARDY+27); } -void KMidChannel4D::drawFa(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawFa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+27,KEYBOARDY+43,x+33,KEYBOARDY+43); @@ -135,7 +135,7 @@ void KMidChannel4D::drawFa(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+32,KEYBOARDY+27); } -void KMidChannel4D::drawFa__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawFa__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+33,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); if (!p) @@ -150,7 +150,7 @@ void KMidChannel4D::drawFa__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawSol(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawSol(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+36,KEYBOARDY+43,x+42,KEYBOARDY+43); @@ -168,7 +168,7 @@ void KMidChannel4D::drawSol(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawSol__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawSol__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+42,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -184,7 +184,7 @@ void KMidChannel4D::drawSol__(QPainter *qpaint,int x,int p) } -void KMidChannel4D::drawLa(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawLa(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+45,KEYBOARDY+43,x+51,KEYBOARDY+43); @@ -200,7 +200,7 @@ void KMidChannel4D::drawLa(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+47,KEYBOARDY+27); qpaint->drawPoint(x+50,KEYBOARDY+27); } -void KMidChannel4D::drawLa__(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawLa__(TQPainter *qpaint,int x,int p) { qpaint->fillRect(x+51,KEYBOARDY+1,5,26,((p)?*brushR:*brushB)); @@ -215,7 +215,7 @@ void KMidChannel4D::drawLa__(QPainter *qpaint,int x,int p) qpaint->drawPoint(x+55,KEYBOARDY+27); } -void KMidChannel4D::drawSi(QPainter *qpaint,int x,int p) +void KMidChannel4D::drawSi(TQPainter *qpaint,int x,int p) { qpaint->setPen(p?(*penR):(*penB)); qpaint->drawLine(x+54,KEYBOARDY+43,x+60,KEYBOARDY+43); diff --git a/kmid/channel4d.h b/kmid/channel4d.h index 501682e5..e6326f4a 100644 --- a/kmid/channel4d.h +++ b/kmid/channel4d.h @@ -30,27 +30,27 @@ class KMidChannel4D : public KMidChannel { private: - QBrush *brushR; - QBrush *brushW; - QBrush *brushB; - QPen *penR; + TQBrush *brushR; + TQBrush *brushW; + TQBrush *brushB; + TQPen *penR; public: - KMidChannel4D(int chn,QWidget *parent); - - - virtual void drawDo (QPainter *qpaint,int x,int p); - virtual void drawDo__ (QPainter *qpaint,int x,int p); - virtual void drawRe (QPainter *qpaint,int x,int p); - virtual void drawRe__ (QPainter *qpaint,int x,int p); - virtual void drawMi (QPainter *qpaint,int x,int p); - virtual void drawFa (QPainter *qpaint,int x,int p); - virtual void drawFa__ (QPainter *qpaint,int x,int p); - virtual void drawSol (QPainter *qpaint,int x,int p); - virtual void drawSol__(QPainter *qpaint,int x,int p); - virtual void drawLa (QPainter *qpaint,int x,int p); - virtual void drawLa__ (QPainter *qpaint,int x,int p); - virtual void drawSi (QPainter *qpaint,int x,int p); + KMidChannel4D(int chn,TQWidget *parent); + + + virtual void drawDo (TQPainter *qpaint,int x,int p); + virtual void drawDo__ (TQPainter *qpaint,int x,int p); + virtual void drawRe (TQPainter *qpaint,int x,int p); + virtual void drawRe__ (TQPainter *qpaint,int x,int p); + virtual void drawMi (TQPainter *qpaint,int x,int p); + virtual void drawFa (TQPainter *qpaint,int x,int p); + virtual void drawFa__ (TQPainter *qpaint,int x,int p); + virtual void drawSol (TQPainter *qpaint,int x,int p); + virtual void drawSol__(TQPainter *qpaint,int x,int p); + virtual void drawLa (TQPainter *qpaint,int x,int p); + virtual void drawLa__ (TQPainter *qpaint,int x,int p); + virtual void drawSi (TQPainter *qpaint,int x,int p); }; diff --git a/kmid/channelcfgdlg.cpp b/kmid/channelcfgdlg.cpp index 8ed5ee66..db320a28 100644 --- a/kmid/channelcfgdlg.cpp +++ b/kmid/channelcfgdlg.cpp @@ -1,6 +1,6 @@ -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include <kdialogbase.h> #include <kapplication.h> @@ -9,25 +9,25 @@ #include "channelview.h" #include "channelcfgdlg.h" #include "version.h" -#include <qlayout.h> -#include <qvbuttongroup.h> +#include <tqlayout.h> +#include <tqvbuttongroup.h> -ChannelViewConfigDialog::ChannelViewConfigDialog(QWidget *parent,const char *name) : KDialogBase(parent,name,TRUE,i18n("Configure Channel View"),Ok|Cancel, Ok) +ChannelViewConfigDialog::ChannelViewConfigDialog(TQWidget *parent,const char *name) : KDialogBase(parent,name,TRUE,i18n("Configure Channel View"),Ok|Cancel, Ok) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); - qbg = new QVButtonGroup(i18n("Choose Look Mode"),page,"qbg"); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); + qbg = new TQVButtonGroup(i18n("Choose Look Mode"),page,"qbg"); - rb0=new QRadioButton(i18n("3D look"),qbg,"3d"); - rb1=new QRadioButton(i18n("3D - filled"),qbg,"4d"); + rb0=new TQRadioButton(i18n("3D look"),qbg,"3d"); + rb1=new TQRadioButton(i18n("3D - filled"),qbg,"4d"); qbg->setExclusive(TRUE); topLayout->addWidget( qbg ); ((ChannelView::lookMode()==0)?rb0:rb1)->setChecked(TRUE); - connect (qbg, SIGNAL(pressed(int)),this,SLOT(modeselected(int))); + connect (qbg, TQT_SIGNAL(pressed(int)),this,TQT_SLOT(modeselected(int))); } void ChannelViewConfigDialog::modeselected(int idx) diff --git a/kmid/channelcfgdlg.h b/kmid/channelcfgdlg.h index 37952924..ed088dd2 100644 --- a/kmid/channelcfgdlg.h +++ b/kmid/channelcfgdlg.h @@ -34,12 +34,12 @@ class ChannelViewConfigDialog : public KDialogBase public: - ChannelViewConfigDialog(QWidget *parent,const char *name); + ChannelViewConfigDialog(TQWidget *parent,const char *name); private: - QVButtonGroup *qbg; - QRadioButton *rb0; - QRadioButton *rb1; + TQVButtonGroup *qbg; + TQRadioButton *rb0; + TQRadioButton *rb1; public slots: void modeselected(int idx); diff --git a/kmid/channelview.cpp b/kmid/channelview.cpp index 805d4b9a..a349691a 100644 --- a/kmid/channelview.cpp +++ b/kmid/channelview.cpp @@ -40,12 +40,12 @@ ChannelView::ChannelView(void) : KMainWindow(0, "ChannelView") Channel[i]=new KMidChannel3D(i+1,this); else Channel[i]=new KMidChannel4D(i+1,this); - connect(Channel[i],SIGNAL(signalToKMidClient(int *)),this,SLOT(slottokmidclient(int *))); + connect(Channel[i],TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(slottokmidclient(int *))); Channel[i]->setGeometry(5,5+i*CHANNELHEIGHT,width()-20,CHANNELHEIGHT); Channel[i]->show(); } - scrollbar=new QScrollBar(1,16,1,1,1,QScrollBar::Vertical,this,"Channelscrollbar"); - connect(scrollbar,SIGNAL(valueChanged(int)),this,SLOT(ScrollChn(int))); + scrollbar=new TQScrollBar(1,16,1,1,1,TQScrollBar::Vertical,this,"Channelscrollbar"); + connect(scrollbar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(ScrollChn(int))); setScrollBarRange(); } @@ -54,13 +54,13 @@ ChannelView::~ChannelView() } -void ChannelView::closeEvent(QCloseEvent *e) +void ChannelView::closeEvent(TQCloseEvent *e) { emit destroyMe(); e->accept(); } -void ChannelView::resizeEvent(QResizeEvent *) +void ChannelView::resizeEvent(TQResizeEvent *) { scrollbar->setGeometry(width()-16,0,16,height()); for (int i=0;i<16;i++) @@ -150,7 +150,7 @@ void ChannelView::lookMode(int i) else Channel[i]=new KMidChannel4D(i+1,this); - connect(Channel[i],SIGNAL(signalToKMidClient(int *)),this,SLOT(slottokmidclient(int *))); + connect(Channel[i],TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(slottokmidclient(int *))); Channel[i]->setGeometry(5,5+(i-(scrollbar->value()-1))*CHANNELHEIGHT,width()-20,CHANNELHEIGHT); Channel[i]->loadState(tmp,&pgm); Channel[i]->show(); diff --git a/kmid/channelview.h b/kmid/channelview.h index 15963a2c..3eb51302 100644 --- a/kmid/channelview.h +++ b/kmid/channelview.h @@ -26,7 +26,7 @@ #define CHANNELVIEW_H #include <kmainwindow.h> -#include <qscrollbar.h> +#include <tqscrollbar.h> #include "channel.h" @@ -37,8 +37,8 @@ private: KMidChannel *Channel[16]; int nvisiblechannels; - virtual void resizeEvent(QResizeEvent *); - virtual void closeEvent(QCloseEvent *e); + virtual void resizeEvent(TQResizeEvent *); + virtual void closeEvent(TQCloseEvent *e); public: ChannelView(void); @@ -66,7 +66,7 @@ signals: void signalToKMidClient(int *data); private: - QScrollBar *scrollbar; + TQScrollBar *scrollbar; static int lookmode; diff --git a/kmid/collectdlg.cpp b/kmid/collectdlg.cpp index 7b40d0a9..ab476bb6 100644 --- a/kmid/collectdlg.cpp +++ b/kmid/collectdlg.cpp @@ -21,9 +21,9 @@ or to Antonio Larrosa, Rio Arnoya, 10 5B, 29006 Malaga, Spain ***************************************************************************/ -#include <qpushbutton.h> -#include <qlistbox.h> -#include <qlabel.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> +#include <tqlabel.h> #include <kapplication.h> #include <kfiledialog.h> @@ -38,23 +38,23 @@ #include "songlist.h" #include "slman.h" -CollectionDialog::CollectionDialog(SLManager *slm,int selC,QWidget *parent,const char *name) : QDialog(parent,name,TRUE) +CollectionDialog::CollectionDialog(SLManager *slm,int selC,TQWidget *parent,const char *name) : TQDialog(parent,name,TRUE) { setCaption(i18n("Collections Manager")); ok=new KPushButton(KStdGuiItem::ok(),this); ok->setGeometry(140,200,100,30); -connect(ok,SIGNAL(clicked()),SLOT(accept()) ); +connect(ok,TQT_SIGNAL(clicked()),TQT_SLOT(accept()) ); cancel=new KPushButton(KStdGuiItem::cancel(),this); cancel->setGeometry(250,200,100,30); -connect(cancel,SIGNAL(clicked()),SLOT(reject()) ); +connect(cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject()) ); -label=new QLabel(i18n("Available collections:"),this); +label=new TQLabel(i18n("Available collections:"),this); label->adjustSize(); label->move(10,10); -collections=new QListBox(this,"collectionlist"); +collections=new TQListBox(this,"collectionlist"); collections->setGeometry(10,20+label->height(),340,90); -connect(collections,SIGNAL(highlighted(int)),SLOT(collectionselected(int))); -connect(collections,SIGNAL(selected(int)),SLOT(changeCollectionName(int))); +connect(collections,TQT_SIGNAL(highlighted(int)),TQT_SLOT(collectionselected(int))); +connect(collections,TQT_SIGNAL(selected(int)),TQT_SLOT(changeCollectionName(int))); slman=slm; for (int i=0;i<=slman->numberOfCollections();i++) { @@ -68,13 +68,13 @@ selectedC=selC; printf("selectedC : %d\n",selectedC); #endif -label2=new QLabel(i18n("Songs in selected collection:"),this); +label2=new TQLabel(i18n("Songs in selected collection:"),this); label2->adjustSize(); label2->move(10,collections->y()+collections->height()+10); -songs=new QListBox(this,"songlist"); +songs=new TQListBox(this,"songlist"); songs->setGeometry(10,label2->y()+label2->height()+10,340,120); -connect(songs,SIGNAL(highlighted(int)),SLOT(songselected(int))); +connect(songs,TQT_SIGNAL(highlighted(int)),TQT_SLOT(songselected(int))); currentsl=slman->getCollection(selectedC); if (slman->numberOfCollections()>0) { @@ -82,27 +82,27 @@ if (slman->numberOfCollections()>0) collections->centerCurrentItem(); }; //fillInSongList(); -newC=new QPushButton(i18n("&New..."),this); +newC=new TQPushButton(i18n("&New..."),this); newC->adjustSize(); newC->move(360,collections->y()+5); -connect(newC,SIGNAL(clicked()),SLOT(newCollection()) ); -copyC=new QPushButton(i18n("&Copy..."),this); +connect(newC,TQT_SIGNAL(clicked()),TQT_SLOT(newCollection()) ); +copyC=new TQPushButton(i18n("&Copy..."),this); copyC->adjustSize(); copyC->move(360,newC->y()+newC->height()+5); -connect(copyC,SIGNAL(clicked()),SLOT(copyCollection()) ); -deleteC=new QPushButton(i18n("Delete"),this); +connect(copyC,TQT_SIGNAL(clicked()),TQT_SLOT(copyCollection()) ); +deleteC=new TQPushButton(i18n("Delete"),this); deleteC->adjustSize(); deleteC->move(360,copyC->y()+copyC->height()+5); -connect(deleteC,SIGNAL(clicked()),SLOT(deleteCollection()) ); +connect(deleteC,TQT_SIGNAL(clicked()),TQT_SLOT(deleteCollection()) ); -addS=new QPushButton(i18n("&Add..."),this); +addS=new TQPushButton(i18n("&Add..."),this); addS->adjustSize(); addS->move(360,songs->y()+5); -connect(addS,SIGNAL(clicked()),SLOT(addSong()) ); -delS=new QPushButton(i18n("&Remove"),this); +connect(addS,TQT_SIGNAL(clicked()),TQT_SLOT(addSong()) ); +delS=new TQPushButton(i18n("&Remove"),this); delS->adjustSize(); delS->move(360,addS->y()+addS->height()+5); -connect(delS,SIGNAL(clicked()),SLOT(removeSong()) ); +connect(delS,TQT_SIGNAL(clicked()),TQT_SLOT(removeSong()) ); ok->move(ok->x(),songs->y()+songs->height()+10); cancel->move(ok->x()+ok->width()+5,ok->y()); @@ -123,7 +123,7 @@ fillInSongList(); void CollectionDialog::fillInSongList(void) { -QString qs; +TQString qs; songs->clear(); if (currentsl!=NULL) { @@ -131,7 +131,7 @@ if (currentsl!=NULL) int i=0; while (!currentsl->iteratorAtEnd()) { - qs=QString(currentsl->getIteratorName()); + qs=TQString(currentsl->getIteratorName()); //KURL::decode(qs); songs->insertItem(qs,i); currentsl->iteratorNext(); @@ -155,8 +155,8 @@ printf("Selected song: %d\n",selectedS); void CollectionDialog::newCollection() { bool ok; - QString name = KInputDialog::getText( i18n( "New Collection" ), - i18n( "Enter the name of the new collection:" ), QString::null, + TQString name = KInputDialog::getText( i18n( "New Collection" ), + i18n( "Enter the name of the new collection:" ), TQString::null, &ok, this ); if (ok) @@ -164,7 +164,7 @@ void CollectionDialog::newCollection() int i=slman->createCollection(name.ascii()); if (i==-1) { - QString s = i18n("The name '%1' is already used").arg(name); + TQString s = i18n("The name '%1' is already used").arg(name); KMessageBox::sorry(this, s); } else @@ -181,8 +181,8 @@ void CollectionDialog::copyCollection() SongList *src=currentsl; int i; bool ok; - QString name = KInputDialog::getText( i18n( "Copy Collection" ), - i18n( "Enter the name of the copy collection:" ), QString::null, + TQString name = KInputDialog::getText( i18n( "Copy Collection" ), + i18n( "Enter the name of the copy collection:" ), TQString::null, &ok, this ); if (ok) @@ -190,7 +190,7 @@ int i; i=slman->createCollection(name.ascii()); if (i==-1) { - QString s = i18n("The name '%1' is already used").arg(name); + TQString s = i18n("The name '%1' is already used").arg(name); KMessageBox::sorry(this, s); } else @@ -224,15 +224,15 @@ void CollectionDialog::changeCollectionName(int idx) if (idx==0) return; bool ok; - QString name = KInputDialog::getText( i18n( "Change Collection Name" ), - i18n( "Enter the name of the selected collection:" ), QString::null, + TQString name = KInputDialog::getText( i18n( "Change Collection Name" ), + i18n( "Enter the name of the selected collection:" ), TQString::null, &ok, this ); if (ok) { if (slman->getCollection(name.ascii())!=NULL) { - QString s = i18n("The name '%1' is already used").arg(name); + TQString s = i18n("The name '%1' is already used").arg(name); KMessageBox::sorry(this, s); } else @@ -248,7 +248,7 @@ void CollectionDialog::addSong(const KURL &url) if (currentsl==NULL) return; if( url.isEmpty()) return; - int id=currentsl->AddSong(QFile::encodeName(url.path())); + int id=currentsl->AddSong(TQFile::encodeName(url.path())); if (id==-1) { @@ -280,7 +280,7 @@ songs->removeItem(selectedS); songs->setCurrentItem(i); } -void CollectionDialog::resizeEvent(QResizeEvent *) +void CollectionDialog::resizeEvent(TQResizeEvent *) { int maxw=newC->width(); if (copyC->width()>maxw) maxw=copyC->width(); diff --git a/kmid/collectdlg.h b/kmid/collectdlg.h index 057e2e50..6283f4eb 100644 --- a/kmid/collectdlg.h +++ b/kmid/collectdlg.h @@ -24,7 +24,7 @@ #ifndef _collectdlg_h_ #define _collectdlg_h_ -#include <qdialog.h> +#include <tqdialog.h> #include "songlist.h" #include "slman.h" @@ -42,13 +42,13 @@ private: protected: - virtual void resizeEvent(QResizeEvent *qre); + virtual void resizeEvent(TQResizeEvent *qre); void fillInSongList(void); //clear the songs list and insert in it // the songs in currentsl void addSong(const KURL &); public: - CollectionDialog(SLManager *slm,int selc,QWidget *parent,const char *name); + CollectionDialog(SLManager *slm,int selc,TQWidget *parent,const char *name); public slots: void collectionselected(int idx); @@ -61,17 +61,17 @@ public slots: void removeSong(); private: -QLabel *label; -QLabel *label2; +TQLabel *label; +TQLabel *label2; KPushButton *ok; KPushButton *cancel; -QListBox *collections; -QListBox *songs; -QPushButton *newC; -QPushButton *copyC; -QPushButton *deleteC; -QPushButton *addS; -QPushButton *delS; +TQListBox *collections; +TQListBox *songs; +TQPushButton *newC; +TQPushButton *copyC; +TQPushButton *deleteC; +TQPushButton *addS; +TQPushButton *delS; public: diff --git a/kmid/kdisptext.cpp b/kmid/kdisptext.cpp index 7d160c2f..cc1eb4d3 100644 --- a/kmid/kdisptext.cpp +++ b/kmid/kdisptext.cpp @@ -22,11 +22,11 @@ ***************************************************************************/ #include "kdisptext.h" -#include <qpainter.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qrect.h> -#include <qtextcodec.h> +#include <tqpainter.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqrect.h> +#include <tqtextcodec.h> #include <kconfig.h> #include <kglobal.h> @@ -40,7 +40,7 @@ //#define DRAW_BOUNDING_RECTS -KDisplayText::KDisplayText(QWidget *parent,const char *name) : QScrollView(parent,name) +KDisplayText::KDisplayText(TQWidget *parent,const char *name) : TQScrollView(parent,name) { first_line_[0]=first_line_[1]=NULL; linked_list_[0]=linked_list_[1]=NULL; @@ -54,15 +54,15 @@ KDisplayText::KDisplayText(QWidget *parent,const char *name) : QScrollView(paren nlines=0; lyrics_codec=KGlobal::locale()->codecForEncoding(); - viewport()->setBackgroundColor(QColor (110,110,110)); + viewport()->setBackgroundColor(TQColor (110,110,110)); // setBackgroundMode(NoBackground); KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); typeoftextevents=kcfg->readNumEntry("TypeOfTextEvents",1); - QFont *qtextfontdefault=new QFont(KGlobalSettings::fixedFont().family(),22); - qtextfont=new QFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); + TQFont *qtextfontdefault=new TQFont(KGlobalSettings::fixedFont().family(),22); + qtextfont=new TQFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); delete qtextfontdefault; - qfmetr=new QFontMetrics(*qtextfont); + qfmetr=new TQFontMetrics(*qtextfont); nvisiblelines=height()/qfmetr->lineSpacing(); autoscrollv=0; } @@ -261,7 +261,7 @@ while (t!=NULL) return start; } -void KDisplayText::drawContents(QPainter *p, int /*clipx*/, int clipy, int /*clipw*/, int cliph) +void KDisplayText::drawContents(TQPainter *p, int /*clipx*/, int clipy, int /*clipw*/, int cliph) { p->setFont(*qtextfont); if (linked_list==NULL) return; @@ -320,9 +320,9 @@ void KDisplayText::drawContents(QPainter *p, int /*clipx*/, int clipy, int /*cli } -void KDisplayText::resizeEvent(QResizeEvent *e) +void KDisplayText::resizeEvent(TQResizeEvent *e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); nvisiblelines=visibleHeight()/qfmetr->lineSpacing(); if ( (nlines>nvisiblelines) || (nvisiblelines==0) ) resizeContents(maxX[(typeoftextevents==1)?0:1],maxY[(typeoftextevents==1)?0:1]); @@ -492,7 +492,7 @@ void KDisplayText::gotomsec(ulong i) } } -QFont *KDisplayText::getFont(void) +TQFont *KDisplayText::getFont(void) { return qtextfont; } @@ -501,11 +501,11 @@ void KDisplayText::fontChanged(void) { KConfig *kcfg=KGlobal::instance()->config(); kcfg->setGroup("KMid"); - QFont *qtextfontdefault=new QFont(*qtextfont); + TQFont *qtextfontdefault=new TQFont(*qtextfont); delete qtextfont; - qtextfont=new QFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); + qtextfont=new TQFont(kcfg->readFontEntry("KaraokeFont",qtextfontdefault)); delete qtextfontdefault; - qfmetr=new QFontMetrics(*qtextfont); + qfmetr=new TQFontMetrics(*qtextfont); calculatePositions(); nvisiblelines=height()/qfmetr->lineSpacing(); viewport()->repaint(TRUE); @@ -587,7 +587,7 @@ void KDisplayText::saveLyrics(FILE *fh) } } -void KDisplayText::timerEvent(QTimerEvent *e) +void KDisplayText::timerEvent(TQTimerEvent *e) { int dy; if (autoscrollv>0) @@ -619,13 +619,13 @@ void KDisplayText::timerEvent(QTimerEvent *e) } -void KDisplayText::setLyricsEncoding(const QString &enc) +void KDisplayText::setLyricsEncoding(const TQString &enc) { - QTextCodec *newcodec; + TQTextCodec *newcodec; if (enc.isEmpty()) newcodec=KGlobal::locale()->codecForEncoding(); else - newcodec=QTextCodec::codecForName(enc.latin1()); + newcodec=TQTextCodec::codecForName(enc.latin1()); if (newcodec!=lyrics_codec) { diff --git a/kmid/kdisptext.h b/kmid/kdisptext.h index 7cc1d620..6470b904 100644 --- a/kmid/kdisptext.h +++ b/kmid/kdisptext.h @@ -24,15 +24,15 @@ #ifndef _kdisptext_h_ #define _kdisptext_h_ -#include <qwidget.h> -#include <qscrollview.h> +#include <tqwidget.h> +#include <tqscrollview.h> #include <libkmid/player.h> struct kdispt_ev { SpecialEvent *spev; int xpos; - class QRect r; + class TQRect r; kdispt_ev *next; }; @@ -48,14 +48,14 @@ class QFont; class QFontMetrics; class QScrollBar; -class KDisplayText : public QScrollView +class KDisplayText : public TQScrollView { Q_OBJECT private: - QTextCodec *lyrics_codec; + TQTextCodec *lyrics_codec; - QFontMetrics *qfmetr; - QFont *qtextfont; + TQFontMetrics *qfmetr; + TQFont *qtextfont; int typeoftextevents; @@ -78,7 +78,7 @@ private: void RemoveLinkedList(void); int IsLineFeed(char c,int type=0); - virtual void drawContents(QPainter *qpaint,int clipx,int clipy,int clipw,int cliph); + virtual void drawContents(TQPainter *qpaint,int clipx,int clipy,int clipw,int cliph); kdispt_line * searchYOffset(int y, kdispt_line *start); @@ -87,11 +87,11 @@ private: int autoscrollv; protected: - virtual void resizeEvent(QResizeEvent *qre); - virtual void timerEvent(QTimerEvent *e); + virtual void resizeEvent(TQResizeEvent *qre); + virtual void timerEvent(TQTimerEvent *e); public: - KDisplayText(QWidget *parent,const char *name); + KDisplayText(TQWidget *parent,const char *name); virtual ~KDisplayText(); void ClearEv(bool totally=true); @@ -105,14 +105,14 @@ public: void PaintIn(int type); void gotomsec(ulong i); - QFont *getFont(void); + TQFont *getFont(void); void fontChanged(void); void saveLyrics(FILE *fh); - void setLyricsEncoding(const QString &enc); + void setLyricsEncoding(const TQString &enc); -// QSize sizeHint(); +// TQSize sizeHint(); public slots: void ScrollDown(); diff --git a/kmid/klcdnumber.cpp b/kmid/klcdnumber.cpp index f06b9dd0..014188cc 100644 --- a/kmid/klcdnumber.cpp +++ b/kmid/klcdnumber.cpp @@ -22,14 +22,14 @@ ***************************************************************************/ #include "klcdnumber.h" -#include <qpainter.h> +#include <tqpainter.h> #include <stdio.h> #include "ktrianglebutton.h" #define BUTTONWIDTH 9 -KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) - : QWidget(parent,name) +KLCDNumber::KLCDNumber(int _numDigits,TQWidget *parent,const char *name) + : TQWidget(parent,name) { initDigits(); setUserChangeValue=false; @@ -38,7 +38,7 @@ KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) minValue=0; maxValue=1000; oldvalue=-1; - // setPalette( QPalette (QColor(0,0,0))); + // setPalette( TQPalette (TQColor(0,0,0))); upBtn=NULL; downBtn=NULL; setUserDefaultValue=false; @@ -47,8 +47,8 @@ KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) setLCDColor(100,255,100); } -KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,const char *name) - : QWidget(parent,name) +KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,TQWidget *parent,const char *name) + : TQWidget(parent,name) { initDigits(); setUserChangeValue=_setUserChangeValue; @@ -57,8 +57,8 @@ KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,c minValue=0; maxValue=1000; oldvalue=-1; -// setBackgroundColor(QColor(0,0,0)); -// setPalette( QPalette (QColor(0,0,0))); +// setBackgroundColor(TQColor(0,0,0)); +// setPalette( TQPalette (TQColor(0,0,0))); upBtn=NULL; downBtn=NULL; setUserDefaultValue=false; @@ -71,10 +71,10 @@ KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,c downBtn=new KTriangleButton(KTriangleButton::Left,this,"Down"); upBtn->setGeometry(width()-BUTTONWIDTH,0,BUTTONWIDTH,height()); downBtn->setGeometry(0,0,BUTTONWIDTH,height()); - connect(upBtn,SIGNAL(clicked()),this,SLOT(increaseValue())); - connect(downBtn,SIGNAL(clicked()),this,SLOT(decreaseValue())); - connect(upBtn,SIGNAL(clickedQuickly()),this,SLOT(increaseValueFast())); - connect(downBtn,SIGNAL(clickedQuickly()),this,SLOT(decreaseValueFast())); + connect(upBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(increaseValue())); + connect(downBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(decreaseValue())); + connect(upBtn,TQT_SIGNAL(clickedQuickly()),this,TQT_SLOT(increaseValueFast())); + connect(downBtn,TQT_SIGNAL(clickedQuickly()),this,TQT_SLOT(decreaseValueFast())); }; } @@ -93,7 +93,7 @@ Digit[9] = digit(true,true,true,true,false,true,true); Digit[10] = digit(false,false,false,false,false,false,false); } -void KLCDNumber::resizeEvent ( QResizeEvent *) +void KLCDNumber::resizeEvent ( TQResizeEvent *) { if (setUserChangeValue) { @@ -102,7 +102,7 @@ void KLCDNumber::resizeEvent ( QResizeEvent *) } } -void KLCDNumber::drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d) +void KLCDNumber::drawVerticalBar(TQPainter *qpaint,int x,int y,int w,int h,int d) { /* If d is 0 it means that it is a bar on the left and if 1 it is on the right */ /* @@ -133,7 +133,7 @@ void KLCDNumber::drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d) } } -void KLCDNumber::drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d) +void KLCDNumber::drawHorizBar(TQPainter *qpaint,int x,int y,int w,int h,int d) { // 0 is upper, 1 is bottom and 2 is the middle bar. x++; @@ -170,7 +170,7 @@ void KLCDNumber::drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d) } -void KLCDNumber::drawDigit(QPainter *qpaint,int x,int y,int w,int h,digit d) +void KLCDNumber::drawDigit(TQPainter *qpaint,int x,int y,int w,int h,digit d) { if (d.nw) drawVerticalBar(qpaint,x,y,w/5,h/2,0); if (d.ne) drawVerticalBar(qpaint,x+w*4/5,y,w/5,h/2,1); @@ -206,13 +206,13 @@ void KLCDNumber::display (int v) } -void KLCDNumber::paintEvent ( QPaintEvent * ) +void KLCDNumber::paintEvent ( TQPaintEvent * ) { - QPainter qpaint(this); + TQPainter qpaint(this); qpaint.fillRect(0,0,width(),height(),backgcolor); qpaint.setPen(LCDcolor); - QString numStr; + TQString numStr; numStr.setNum((int) value); numStr = numStr.rightJustify( numDigits, ' ', true); @@ -285,19 +285,19 @@ void KLCDNumber::increaseValueFast() display( value+1 ); } -void KLCDNumber::mouseDoubleClickEvent (QMouseEvent *) +void KLCDNumber::mouseDoubleClickEvent (TQMouseEvent *) { doubleclicked=true; defaultValueClicked(); } -void KLCDNumber::mousePressEvent (QMouseEvent *e) +void KLCDNumber::mousePressEvent (TQMouseEvent *e) { startTimer(200); - QWidget::mousePressEvent(e); + TQWidget::mousePressEvent(e); } -void KLCDNumber::timerEvent(QTimerEvent *) +void KLCDNumber::timerEvent(TQTimerEvent *) { killTimers(); doubleclicked=false; @@ -316,13 +316,13 @@ void KLCDNumber::defaultValueClicked() void KLCDNumber::setLCDBackgroundColor(int r,int g,int b) { - backgcolor=QColor(r,g,b); + backgcolor=TQColor(r,g,b); repaint(FALSE); } void KLCDNumber::setLCDColor(int r,int g,int b) { - LCDcolor=QColor(r,g,b); + LCDcolor=TQColor(r,g,b); repaint(FALSE); } @@ -332,8 +332,8 @@ void KLCDNumber::setRange(double min, double max) maxValue=max; } -QSize KLCDNumber::sizeHint() +TQSize KLCDNumber::sizeHint() { - return QSize(83,28); + return TQSize(83,28); } #include "klcdnumber.moc" diff --git a/kmid/klcdnumber.h b/kmid/klcdnumber.h index 602ec055..99b21126 100644 --- a/kmid/klcdnumber.h +++ b/kmid/klcdnumber.h @@ -24,7 +24,7 @@ #ifndef _klcdnumber_h_ #define _klcdnumber_h_ -#include <qwidget.h> +#include <tqwidget.h> class QPainter; class KTriangleButton; @@ -83,8 +83,8 @@ public: bool setUserDefaultValue; bool doubleclicked; - QColor backgcolor; - QColor LCDcolor; + TQColor backgcolor; + TQColor LCDcolor; double value; double oldvalue; @@ -93,15 +93,15 @@ public: double minValue; double maxValue; - void drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d); - void drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d); - void drawDigit(QPainter *qpaint,int x,int y,int w,int h,digit d); + void drawVerticalBar(TQPainter *qpaint,int x,int y,int w,int h,int d); + void drawHorizBar(TQPainter *qpaint,int x,int y,int w,int h,int d); + void drawDigit(TQPainter *qpaint,int x,int y,int w,int h,digit d); void initDigits(void); public: - KLCDNumber(int _numDigits,QWidget *parent,const char *name); - KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,const char *name); + KLCDNumber(int _numDigits,TQWidget *parent,const char *name); + KLCDNumber(bool _setUserChangeValue,int _numDigits,TQWidget *parent,const char *name); void setUserSetDefaultValue(bool _userSetDefaultValue); void setDefaultValue(double v); @@ -120,16 +120,16 @@ public: void display (int v); void display (double v); - QSize sizeHint (); -// QSizePolicy sizePolicy(); + TQSize sizeHint (); +// TQSizePolicy sizePolicy(); protected: - virtual void paintEvent ( QPaintEvent *e ); - virtual void resizeEvent ( QResizeEvent *e); - virtual void mouseDoubleClickEvent (QMouseEvent *e); - virtual void mousePressEvent (QMouseEvent *e); - virtual void timerEvent(QTimerEvent *e); + virtual void paintEvent ( TQPaintEvent *e ); + virtual void resizeEvent ( TQResizeEvent *e); + virtual void mouseDoubleClickEvent (TQMouseEvent *e); + virtual void mousePressEvent (TQMouseEvent *e); + virtual void timerEvent(TQTimerEvent *e); void defaultValueClicked(); KTriangleButton *downBtn; diff --git a/kmid/kmidIface.h b/kmid/kmidIface.h index 75f2ca72..8bba2575 100644 --- a/kmid/kmidIface.h +++ b/kmid/kmidIface.h @@ -10,7 +10,7 @@ class KMidIface : virtual public DCOPObject k_dcop: // File - virtual int openURL( const QString s )=0; + virtual int openURL( const TQString s )=0; // Song virtual void play()=0; diff --git a/kmid/kmid_part.cpp b/kmid/kmid_part.cpp index 98241ac1..39b10603 100644 --- a/kmid/kmid_part.cpp +++ b/kmid/kmid_part.cpp @@ -5,12 +5,12 @@ #include <klocale.h> #include <kaboutdata.h> #include <kaction.h> -#include <qiconset.h> +#include <tqiconset.h> #include <kparts/partmanager.h> #include "kmidclient.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdelibs_export.h> K_EXPORT_COMPONENT_FACTORY( libkmidpart, KMidFactory ) @@ -37,9 +37,9 @@ KMidFactory::~KMidFactory() s_instance = 0; } -KParts::Part *KMidFactory::createPartObject(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const char*, - const QStringList& ) +KParts::Part *KMidFactory::createPartObject(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const char*, + const TQStringList& ) { KParts::Part *obj = new KMidPart(parentWidget, widgetName, parent, name); return obj; @@ -65,34 +65,34 @@ KInstance *KMidFactory::instance() return s_instance; } - KMidPart::KMidPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name) + KMidPart::KMidPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name) : KParts::ReadOnlyPart(parent, name) { setInstance(KMidFactory::instance()); widget = new kmidClient(parentWidget, actionCollection()); widget->show(); - widget->setFocusPolicy(QWidget::ClickFocus); + widget->setFocusPolicy(TQWidget::ClickFocus); setWidget(widget); // create and connect our actions (void)new KAction(i18n("Play"), "player_play", 0, this, - SLOT(slotPlay()), actionCollection(), + TQT_SLOT(slotPlay()), actionCollection(), "play"); (void)new KAction(i18n("Stop"), "player_stop", 0, this, - SLOT(slotStop()), actionCollection(), + TQT_SLOT(slotStop()), actionCollection(), "stop"); (void)new KAction(i18n("Backward"), "2leftarrow", 0, this, - SLOT(slotBackward()), actionCollection(), + TQT_SLOT(slotBackward()), actionCollection(), "backward"); (void)new KAction(i18n("Forward"), "2rightarrow", 0, this, - SLOT(slotForward()), actionCollection(), + TQT_SLOT(slotForward()), actionCollection(), "forward"); m_extension = new KMidBrowserExtension(this); @@ -111,7 +111,7 @@ bool KMidPart::openFile() widget->openURL(m_file); widget->stop(); widget->show(); - QTimer::singleShot(2000, this, SLOT(slotPlay())); + TQTimer::singleShot(2000, this, TQT_SLOT(slotPlay())); return true; } diff --git a/kmid/kmid_part.h b/kmid/kmid_part.h index 4b02e099..5b0cbc0e 100644 --- a/kmid/kmid_part.h +++ b/kmid/kmid_part.h @@ -16,10 +16,10 @@ class KDE_EXPORT KMidFactory : public KParts::Factory KMidFactory(); virtual ~KMidFactory(); - virtual KParts::Part* createPartObject(QWidget *parentWidget, const char *widgetName, - QObject* parent = 0, const char* name = 0, - const char* classname = "QObject", - const QStringList &args = QStringList()); + virtual KParts::Part* createPartObject(TQWidget *parentWidget, const char *widgetName, + TQObject* parent = 0, const char* name = 0, + const char* classname = "TQObject", + const TQStringList &args = TQStringList()); static KInstance *instance(); @@ -32,8 +32,8 @@ class KMidPart: public KParts::ReadOnlyPart { Q_OBJECT public: - KMidPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name); + KMidPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name); virtual ~KMidPart(); diff --git a/kmid/kmidbutton.h b/kmid/kmidbutton.h index cda01f59..442b0fbd 100644 --- a/kmid/kmidbutton.h +++ b/kmid/kmidbutton.h @@ -1,13 +1,13 @@ -#include <qpushbutton.h> -#include <qpainter.h> +#include <tqpushbutton.h> +#include <tqpainter.h> class KMidButton : public QPushButton { protected: - QPixmap pixmap1,pixmap2; + TQPixmap pixmap1,pixmap2; - virtual void drawButton(QPainter *paint) + virtual void drawButton(TQPainter *paint) { if ((isOn())&&(!pixmap1.isNull())) paint->drawPixmap(0,0,pixmap1); else if ((!isOn())&&(!pixmap2.isNull())) paint->drawPixmap(0,0,pixmap2); @@ -15,7 +15,7 @@ protected: public: - KMidButton (QWidget *parent,const char *name) : QPushButton (parent,name) + KMidButton (TQWidget *parent,const char *name) : TQPushButton (parent,name) { }; @@ -23,7 +23,7 @@ public: { }; - void setPixmaps(const QPixmap& p1, const QPixmap& p2) + void setPixmaps(const TQPixmap& p1, const TQPixmap& p2) { pixmap1=p1; pixmap2=p2; diff --git a/kmid/kmidclient.cpp b/kmid/kmidclient.cpp index c9e596d7..94467098 100644 --- a/kmid/kmidclient.cpp +++ b/kmid/kmidclient.cpp @@ -29,13 +29,13 @@ #include <signal.h> // kill is declared on signal.h on bsd, not sys/signal.h #include <sys/signal.h> -#include <qkeycode.h> -#include <qfiledialog.h> -#include <qstring.h> -#include <qlabel.h> -#include <qfile.h> -#include <qcombobox.h> -#include <qlayout.h> +#include <tqkeycode.h> +#include <tqfiledialog.h> +#include <tqstring.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqcombobox.h> +#include <tqlayout.h> #include <kapplication.h> #include <kcharsets.h> @@ -65,8 +65,8 @@ //#define TEMPHACK -kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) - : DCOPObject("KMidIface"), QWidget(parent,name) +kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name) + : DCOPObject("KMidIface"), TQWidget(parent,name) { actionCollection=ac; KConfig *cfg=kapp->config(); @@ -82,24 +82,24 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) KConfig *kconf=KGlobal::instance()->config(); kconf->setGroup("KMid"); - QString tmp2 = locateLocal("appdata", "collections"); + TQString tmp2 = locateLocal("appdata", "collections"); collectionsfile=kconf->readPathEntry("CollectionsFile",tmp2); slman=new SLManager(); - slman->loadConfig(QFile::encodeName(collectionsfile)); + slman->loadConfig(TQFile::encodeName(collectionsfile)); currentsl=NULL; // currentsl=slman->getCollection(activecollection); itsme=0; m_kMid.pid=0; - timebar = new QSlider(0,240000,30000,60000,QSlider::Horizontal, this); + timebar = new TQSlider(0,240000,30000,60000,TQSlider::Horizontal, this); timebar->setSteps(30000,60000); timebar->setValue(0); - connect (timebar,SIGNAL(valueChanged(int)),this,SLOT(slotSeek(int))); + connect (timebar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotSeek(int))); timetags = new QSliderTime(timebar,this); timetags->setMinimumSize(timetags->sizeHint()); - qlabelTempo= new QLabel(i18n("Tempo:"), this,"tempolabel", - QLabel::NoFrame); + qlabelTempo= new TQLabel(i18n("Tempo:"), this,"tempolabel", + TQLabel::NoFrame); tempoLCD = new KLCDNumber( true, 3, this, "TempoLCD"); tempoLCD->setValue(120); @@ -109,14 +109,14 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) tempoLCD->setDefaultValue(120); tempoLCD->setUserSetDefaultValue(true); tempoLCD->setMinimumSize(tempoLCD->sizeHint()); - connect(tempoLCD,SIGNAL(valueChanged(double)),this,SLOT(slotSetTempo(double))); + connect(tempoLCD,TQT_SIGNAL(valueChanged(double)),this,TQT_SLOT(slotSetTempo(double))); - comboSongs = new QComboBox(FALSE, this,"Songs"); - connect (comboSongs,SIGNAL(activated(int)),this,SLOT(slotSelectSong(int))); + comboSongs = new TQComboBox(FALSE, this,"Songs"); + connect (comboSongs,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotSelectSong(int))); comboSongs->setMinimumWidth(200); - comboEncodings = new QComboBox(FALSE, this, "Encodings"); - connect (comboEncodings,SIGNAL(activated(int)),this,SLOT(slotSelectEncoding(int))); + comboEncodings = new TQComboBox(FALSE, this, "Encodings"); + connect (comboEncodings,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotSelectEncoding(int))); comboEncodings->insertItem(i18n("Default")); comboEncodings->insertStringList( KGlobal::charsets()->descriptiveEncodingNames() ); comboEncodings->setCurrentItem(0); @@ -125,12 +125,12 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) rhythmview->setMaximumHeight(7); rhythmview->setMinimumHeight(7); - volumebar = new QSlider(0,200,10,100,QSlider::Vertical, this ); + volumebar = new TQSlider(0,200,10,100,TQSlider::Vertical, this ); volumebar->setSteps(10,20); volumebar->setValue(100); - volumebar->setTickmarks(QSlider::NoMarks); + volumebar->setTickmarks(TQSlider::NoMarks); volumebar->setTickInterval(50); - connect (volumebar,SIGNAL(valueChanged(int)),this,SLOT(slotSetVolume(int))); + connect (volumebar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotSetVolume(int))); visiblevolumebar=cfg->readNumEntry("ShowVolumeBar",0); if (visiblevolumebar) volumebar->show(); @@ -140,15 +140,15 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) kdispt=new KDisplayText( this, "KaraokeWindow"); kdispt->show(); - timer4timebar=new QTimer(this); - connect (timer4timebar,SIGNAL(timeout()),this,SLOT(timebarUpdate())); - timer4events=new QTimer(this); - connect (timer4events,SIGNAL(timeout()),this,SLOT(processSpecialEvent())); + timer4timebar=new TQTimer(this); + connect (timer4timebar,TQT_SIGNAL(timeout()),this,TQT_SLOT(timebarUpdate())); + timer4events=new TQTimer(this); + connect (timer4events,TQT_SIGNAL(timeout()),this,TQT_SLOT(processSpecialEvent())); - QString samplefile = + TQString samplefile = KGlobal::dirs()->findAllResources("appdata", "fm/*.o3").last(); samplefile.truncate(samplefile.findRev('/')); - FMOut::setFMPatchesDirectory(QFile::encodeName(samplefile)); + FMOut::setFMPatchesDirectory(TQFile::encodeName(samplefile)); m_kMid.pctlsmID=shmget(IPC_PRIVATE,sizeof(PlayerController),0666 | IPC_CREAT ); if (m_kMid.pctlsmID==-1) @@ -183,7 +183,7 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) player= new MidiPlayer(midi,m_kMid.pctl); kconf->setGroup("Midimapper"); - QCString qs=QFile::encodeName(kconf->readPathEntry("Loadfile","gm.map")); + TQCString qs=TQFile::encodeName(kconf->readPathEntry("Loadfile","gm.map")); #ifdef KMidDEBUG printf("Read Config file: %s\n",qs.data()); @@ -195,11 +195,11 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) setActiveCollection(kconf->readNumEntry("ActiveCollection",0)); initializing_songs=0; - QVBoxLayout *lv=new QVBoxLayout( this ); + TQVBoxLayout *lv=new TQVBoxLayout( this ); lv->addWidget( timebar ); lv->addWidget( timetags ); lv->addSpacing(5); - QHBoxLayout *lh=new QHBoxLayout( lv ); + TQHBoxLayout *lh=new TQHBoxLayout( lv ); lh->addWidget( qlabelTempo ); lh->addWidget( tempoLCD ); lh->addWidget( comboSongs, 6 ); @@ -208,12 +208,12 @@ kmidClient::kmidClient(QWidget *parent, KActionCollection *ac, const char *name) lv->addSpacing(5); lv->addWidget( rhythmview ); lv->addSpacing(2); - QHBoxLayout *lh2=new QHBoxLayout( lv ); + TQHBoxLayout *lh2=new TQHBoxLayout( lv ); lh2->addWidget( volumebar ); lh2->addWidget( kdispt ); } -/*void kmidClient::resizeEvent(QResizeEvent *) +/*void kmidClient::resizeEvent(TQResizeEvent *) { //timebar->resize(width()-5,timebar->height()); timebar->setGeometry(5,10,width()-5,timebar->height()); @@ -286,7 +286,7 @@ int kmidClient::openFile(const char *filename) player->setGenerateBeats(true); if ((r=player->loadSong(filename))!=0) { - QString errormsg; + TQString errormsg; switch (r) { case (-1) : errormsg = @@ -360,19 +360,19 @@ int kmidClient::openFile(const char *filename) return 0; } -int kmidClient::openURL(const QString _url) +int kmidClient::openURL(const TQString _url) { KURL u(_url); if (!u.isValid()) {printf("Malformed URL\n");return -1;}; - QString filename; + TQString filename; bool deleteFile=false; if (!u.isLocalFile()) { - filename = QString("/tmp/") + u.filename(); + filename = TQString("/tmp/") + u.filename(); KIO::Job *iojob = KIO::copy( u, KURL::fromPathOrURL( filename ) ); downloaded=false; - connect( iojob, SIGNAL( result( KIO::Job *) ), this, SLOT(downloadFinished( KIO::Job * ) ) ); + connect( iojob, TQT_SIGNAL( result( KIO::Job *) ), this, TQT_SLOT(downloadFinished( KIO::Job * ) ) ); if (!downloaded) kapp->enter_loop(); @@ -384,7 +384,7 @@ int kmidClient::openURL(const QString _url) filename=u.path(); } - QCString filename_8bit = QFile::encodeName(filename); + TQCString filename_8bit = TQFile::encodeName(filename); int r=-1; if (!filename_8bit.isEmpty()) { @@ -535,7 +535,7 @@ void kmidClient::slotPlay() #endif noteArray->iteratorBegin(); - QApplication::flushX(); + TQApplication::flushX(); if ((m_kMid.pid=fork())==0) { #ifdef KMidDEBUG @@ -645,7 +645,7 @@ void kmidClient::slotSeek(int i) m_kMid.pctl->gotomsec=i; m_kMid.pctl->message|=PLAYER_SETPOS; - QApplication::flushX(); + TQApplication::flushX(); if ((m_kMid.pid=fork())==0) { #ifdef KMidDEBUG @@ -866,7 +866,7 @@ void kmidClient::slotPause() m_kMid.pctl->gotomsec=pausedatmillisec; m_kMid.pctl->message|=PLAYER_SETPOS; - QApplication::flushX(); + TQApplication::flushX(); if ((m_kMid.pid=fork())==0) { #ifdef KMidDEBUG @@ -1156,7 +1156,7 @@ void kmidClient::setSongType(int i) } -QFont * kmidClient::getFont(void) +TQFont * kmidClient::getFont(void) { return kdispt->getFont(); } @@ -1176,7 +1176,7 @@ void kmidClient::setMidiMapFilename(const char *mapfilename) MidiMapper *map=new MidiMapper(mapfilename); if (map->ok()==-1) { - QString tmp = locate("appdata", QString("maps/") + mapfilename); + TQString tmp = locate("appdata", TQString("maps/") + mapfilename); delete map; map=new MidiMapper(tmp.local8Bit()); if (map->ok()!=1) @@ -1228,7 +1228,7 @@ void kmidClient::fillInComboSongs(void) currentsl->iteratorStart(); char temp[FILENAME_MAX]; char temp2[FILENAME_MAX]; - QString qs; + TQString qs; while (!currentsl->iteratorAtEnd()) { qs=currentsl->getIteratorName(); @@ -1326,7 +1326,7 @@ void kmidClient::saveCollections(void) #ifdef KMidDEBUG printf("Saving collections in: %s\n",collectionsfile.ascii()); #endif - slman->saveConfig(QFile::encodeName(collectionsfile)); + slman->saveConfig(TQFile::encodeName(collectionsfile)); } void kmidClient::saveLyrics(FILE *fh) @@ -1373,8 +1373,8 @@ void kmidClient::visibleChannelView(int i) } } channelView->show(); - connect(channelView,SIGNAL(signalToKMidClient(int *)),this,SLOT(communicationFromChannelView(int *))); - connect(kapp,SIGNAL(shutDown()),parentWidget(),SLOT(shuttingDown())); + connect(channelView,TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(communicationFromChannelView(int *))); + connect(kapp,TQT_SIGNAL(shutDown()),parentWidget(),TQT_SLOT(shuttingDown())); } else if ((channelView!=NULL)&&(i==0)) @@ -1522,15 +1522,15 @@ void kmidClient::downloadFinished(KIO::Job *) kapp->exit_loop(); } -QSize kmidClient::sizeHint() const +TQSize kmidClient::sizeHint() const { - QSize sh = QWidget::sizeHint(); - return sh.expandedTo(QSize(560,420)); + TQSize sh = TQWidget::sizeHint(); + return sh.expandedTo(TQSize(560,420)); } -QSizePolicy kmidClient::sizePolicy() +TQSizePolicy kmidClient::sizePolicy() { - return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); } @@ -1599,7 +1599,7 @@ void kmidClient::setPlayListMode(int i) void kmidClient::slotSelectEncoding(int i) { if (i == 0) - kdispt->setLyricsEncoding(QString::null); // Default + kdispt->setLyricsEncoding(TQString::null); // Default else kdispt->setLyricsEncoding(KGlobal::charsets()->encodingForName(comboEncodings->text(i))); } diff --git a/kmid/kmidclient.h b/kmid/kmidclient.h index 70ddeb06..9444b34d 100644 --- a/kmid/kmidclient.h +++ b/kmid/kmidclient.h @@ -29,7 +29,7 @@ #include <libkmid/track.h> #include <libkmid/notearray.h> #include <libkmid/libkmid.h> -#include <qtimer.h> +#include <tqtimer.h> #include <unistd.h> #include <sys/time.h> #include <sys/types.h> @@ -52,7 +52,7 @@ class RhythmView; class ChannelView; class QString; -class kmidClient : public QWidget, virtual public KMidIface +class kmidClient : public TQWidget, virtual public KMidIface { Q_OBJECT private: @@ -65,8 +65,8 @@ private: struct kMidData m_kMid; - QTimer *timer4timebar; - QTimer *timer4events; + TQTimer *timer4timebar; + TQTimer *timer4events; ulong beginmillisec; ulong pausedatmillisec; @@ -87,7 +87,7 @@ private: SLManager *slman; int activecollection; - QString collectionsfile; + TQString collectionsfile; SongList *currentsl; int initializing_songs; int loopsong; @@ -105,7 +105,7 @@ private: int openFile(const char *filename); void allNotesOff(void); public: - kmidClient(QWidget *parent, KActionCollection *ac, const char *name=0); + kmidClient(TQWidget *parent, KActionCollection *ac, const char *name=0); ~kmidClient(); char *midiFileName(void) {return midifile_opened;}; @@ -114,14 +114,14 @@ public: int isPlaying(void) {return m_kMid.pctl->playing;}; int isPaused(void) {return (m_kMid.pctl->playing)&&(m_kMid.pctl->paused);}; - int openURL(const QString s); + int openURL(const TQString s); void repaintText(int typeoftextevents); static void kmidOutput(void); int ChooseTypeOfTextEvents(void); - QFont *getFont(void); + TQFont *getFont(void); void fontChanged(void); // The new font is already in KConfig SLManager *getSLManager(void) {return slman;}; @@ -151,7 +151,7 @@ public: void moveEventPointersTo(ulong ms); protected: -// void resizeEvent(QResizeEvent *qre); +// void resizeEvent(TQResizeEvent *qre); public slots: @@ -196,9 +196,9 @@ public: ChannelView *getChannelView(void) { return channelView; }; KDisplayText *getKDisplayText(void) { return kdispt; }; - QSizePolicy sizePolicy(); + TQSizePolicy sizePolicy(); - QComboBox *getComboSongs() { return comboSongs; }; + TQComboBox *getComboSongs() { return comboSongs; }; void play(); @@ -216,17 +216,17 @@ public: void setCurrentSong(int i); void setPlayListMode(int i); - QSize sizeHint() const; + TQSize sizeHint() const; private: - QSlider *timebar; + TQSlider *timebar; QSliderTime *timetags; - QSlider *volumebar; + TQSlider *volumebar; KLCDNumber *tempoLCD; KDisplayText *kdispt; - QLabel *qlabelTempo; - QComboBox *comboSongs; - QComboBox *comboEncodings; + TQLabel *qlabelTempo; + TQComboBox *comboSongs; + TQComboBox *comboEncodings; RhythmView *rhythmview; diff --git a/kmid/kmidframe.cpp b/kmid/kmidframe.cpp index 007f0b82..54f9d3c5 100644 --- a/kmid/kmidframe.cpp +++ b/kmid/kmidframe.cpp @@ -28,8 +28,8 @@ #include <sys/wait.h> #include <sys/stat.h> -#include <qkeycode.h> -#include <qstring.h> +#include <tqkeycode.h> +#include <tqstring.h> #include <kaccel.h> #include <kapplication.h> @@ -68,73 +68,73 @@ kmidFrame::kmidFrame(const char *name) /* kKeysAccel=new KAccel(this); kKeysAccel->insertItem(i18n("Play/Pause"),"Play/Pause", Key_Space); - kKeysAccel->connectItem("Play/Pause", this, SLOT(spacePressed())); + kKeysAccel->connectItem("Play/Pause", this, TQT_SLOT(spacePressed())); kKeysAccel->insertItem(i18n("Stop"),"Stop", Key_Backspace); - kKeysAccel->connectItem("Stop",kmidclient,SLOT(song_Stop())); + kKeysAccel->connectItem("Stop",kmidclient,TQT_SLOT(song_Stop())); kKeysAccel->insertItem(i18n("Previous Song"),"Previous Song", Key_Left); - kKeysAccel->connectItem("Previous Song",kmidclient,SLOT(song_PlayPrevSong())); + kKeysAccel->connectItem("Previous Song",kmidclient,TQT_SLOT(song_PlayPrevSong())); kKeysAccel->insertItem(i18n("Next Song"),"Next Song", Key_Right); - kKeysAccel->connectItem("Next Song",kmidclient,SLOT(song_PlayNextSong())); + kKeysAccel->connectItem("Next Song",kmidclient,TQT_SLOT(song_PlayNextSong())); kKeysAccel->insertItem(i18n("Scroll Down Karaoke"),"Scroll down karaoke",Key_Down); - kKeysAccel->connectItem("Scroll Down karaoke",kmidclient->getKDisplayText(),SLOT(ScrollDown())); + kKeysAccel->connectItem("Scroll Down karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollDown())); kKeysAccel->insertItem(i18n("Scroll Up Karaoke"),"Scroll up karaoke",Key_Up); - kKeysAccel->connectItem("Scroll Up Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollUp())); + kKeysAccel->connectItem("Scroll Up Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollUp())); kKeysAccel->insertItem(i18n("Scroll Page Down Karaoke"),"Scroll page down karaoke",Key_PageDown); - kKeysAccel->connectItem("Scroll Page Down Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollPageDown())); + kKeysAccel->connectItem("Scroll Page Down Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollPageDown())); kKeysAccel->insertItem(i18n("Scroll Page Up Karaoke"),"Scroll page up karaoke",Key_PageUp); - kKeysAccel->connectItem("Scroll Page Up Karaoke",kmidclient->getKDisplayText(),SLOT(ScrollPageUp())); + kKeysAccel->connectItem("Scroll Page Up Karaoke",kmidclient->getKDisplayText(),TQT_SLOT(ScrollPageUp())); kKeysAccel->readSettings(); */ - KStdAction::open(this, SLOT(file_Open()), actionCollection()); + KStdAction::open(this, TQT_SLOT(file_Open()), actionCollection()); (void)new KAction(i18n("&Save Lyrics..."), 0, this, - SLOT(file_SaveLyrics()), actionCollection(), "file_save_lyrics"); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + TQT_SLOT(file_SaveLyrics()), actionCollection(), "file_save_lyrics"); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); (void)new KAction(i18n("&Play"), "player_play", Qt::Key_Space, - kmidclient, SLOT(slotPlay()), actionCollection(), "song_play"); + kmidclient, TQT_SLOT(slotPlay()), actionCollection(), "song_play"); (void)new KAction(i18n("P&ause"), "player_pause", Qt::Key_P, kmidclient, - SLOT(slotPause()), actionCollection(), "song_pause"); + TQT_SLOT(slotPause()), actionCollection(), "song_pause"); (void)new KAction(i18n("&Stop"), "player_stop", Qt::Key_Backspace, - kmidclient, SLOT(slotStop()), actionCollection(), "song_stop"); + kmidclient, TQT_SLOT(slotStop()), actionCollection(), "song_stop"); (void)new KAction(i18n("P&revious Song"), "player_start", Key_Left, - kmidclient, SLOT(slotPrevSong()), actionCollection(), + kmidclient, TQT_SLOT(slotPrevSong()), actionCollection(), "song_previous"); (void)new KAction(i18n("&Next Song"), "player_end", Key_Right, - kmidclient, SLOT(slotNextSong()), actionCollection(), + kmidclient, TQT_SLOT(slotNextSong()), actionCollection(), "song_next"); - (void)new KToggleAction(i18n("&Loop"), 0, this, SLOT(song_Loop()), + (void)new KToggleAction(i18n("&Loop"), 0, this, TQT_SLOT(song_Loop()), actionCollection(), "song_loop"); (void)new KAction(i18n("Rewind"), "2leftarrow", 0, kmidclient, - SLOT(slotRewind()), actionCollection(), "song_rewind"); + TQT_SLOT(slotRewind()), actionCollection(), "song_rewind"); (void)new KAction(i18n("Forward"), "2rightarrow", 0, kmidclient, - SLOT(slotForward()), actionCollection(), "song_forward"); + TQT_SLOT(slotForward()), actionCollection(), "song_forward"); - (void)new KAction(i18n("&Organize..."), 0, this, SLOT(collect_organize()), + (void)new KAction(i18n("&Organize..."), 0, this, TQT_SLOT(collect_organize()), actionCollection(), "collect_organize"); - QStringList playmodes; + TQStringList playmodes; playmodes.append(i18n("In Order")); playmodes.append(i18n("Shuffle")); - KSelectAction *act=new KSelectAction(i18n("Play Order"), 0, /*this, SLOT(collect_PlayOrder(int)),*/ + KSelectAction *act=new KSelectAction(i18n("Play Order"), 0, /*this, TQT_SLOT(collect_PlayOrder(int)),*/ actionCollection(), "play_order"); - connect(act,SIGNAL(activated(int)),this, SLOT(collect_PlayOrder(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(collect_PlayOrder(int))); act->setItems(playmodes); (void)new KToggleAction(i18n("Auto-Add to Collection"), 0, this, - SLOT(collect_AutoAdd()), actionCollection(), "collect_autoadd"); + TQT_SLOT(collect_AutoAdd()), actionCollection(), "collect_autoadd"); playmodes.clear(); playmodes.append(i18n("&General MIDI")); playmodes.append(i18n("&MT-32")); - act=new KSelectAction(i18n("File Type"), 0,/* this, SLOT(options_FileType(int)),*/ + act=new KSelectAction(i18n("File Type"), 0,/* this, TQT_SLOT(options_FileType(int)),*/ actionCollection(), "file_type"); - connect(act,SIGNAL(activated(int)),this, SLOT(options_FileType(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(options_FileType(int))); act->setItems(playmodes); playmodes.clear(); @@ -142,35 +142,35 @@ kmidFrame::kmidFrame(const char *name) playmodes.append(i18n("&Lyric Events")); act=new KSelectAction(i18n("Display Events"), Key_T, /*this, - SLOT(options_DisplayEvents(int)),*/ actionCollection(), + TQT_SLOT(options_DisplayEvents(int)),*/ actionCollection(), "display_events"); - connect(act,SIGNAL(activated(int)),this, SLOT(options_DisplayEvents(int))); + connect(act,TQT_SIGNAL(activated(int)),this, TQT_SLOT(options_DisplayEvents(int))); act->setItems(playmodes); (void)new KToggleAction(i18n("Automatic Text Chooser"), 0, this, - SLOT(options_AutomaticText()), actionCollection(), + TQT_SLOT(options_AutomaticText()), actionCollection(), "option_automatictext"); KToggleAction* togact = new KToggleAction(i18n("Show &Volume Bar"), "volume", - 0, this, SLOT(options_ShowVolumeBar()), actionCollection(), + 0, this, TQT_SLOT(options_ShowVolumeBar()), actionCollection(), "toggle_volumebar"); togact->setCheckedState(i18n("Hide &Volume Bar")); togact = new KToggleAction(i18n("Show &Channel View"), "piano", - 0, this, SLOT(options_ShowChannelView()), actionCollection(), + 0, this, TQT_SLOT(options_ShowChannelView()), actionCollection(), "toggle_channelview"); togact->setCheckedState(i18n("Hide &Channel View")); (void)new KAction(i18n("Channel View &Options..."), 0, this, - SLOT(options_ChannelViewOptions()), actionCollection(), + TQT_SLOT(options_ChannelViewOptions()), actionCollection(), "channelview_options"); (void)new KAction(i18n("&Font Change..."), 0, this, - SLOT(options_FontChange()), actionCollection(), + TQT_SLOT(options_FontChange()), actionCollection(), "change_font"); (void)new KAction(i18n("MIDI &Setup..."), 0, this, - SLOT(options_MidiSetup()), actionCollection(), "midi_setup"); + TQT_SLOT(options_MidiSetup()), actionCollection(), "midi_setup"); setupGUI((ToolBar | Keys | StatusBar | Save | Create ), "kmidui.rc" ); @@ -212,14 +212,14 @@ kmidFrame::kmidFrame(const char *name) setAcceptDrops(true); - connect( kmidclient, SIGNAL( mustRechooseTextEvent() ), - this, SLOT( rechooseTextEvent() ) ); + connect( kmidclient, TQT_SIGNAL( mustRechooseTextEvent() ), + this, TQT_SLOT( rechooseTextEvent() ) ); - connect( kmidclient, SIGNAL( stopPause() ), - this, SLOT( song_stopPause() ) ); + connect( kmidclient, TQT_SIGNAL( stopPause() ), + this, TQT_SLOT( song_stopPause() ) ); -// connect( kmidclient, SIGNAL( channelView_Destroyed() ), -// this, SLOT( channelViewDestroyed() ) ); +// connect( kmidclient, TQT_SIGNAL( channelView_Destroyed() ), +// this, TQT_SLOT( channelViewDestroyed() ) ); KCmdLineArgs * args = KCmdLineArgs::parsedArgs(); @@ -258,7 +258,7 @@ kmidFrame::kmidFrame(const char *name) /* kKeys->addKey("Play/Pause",Key_Space); kKeys->registerWidget("KMidFrame",this); - kKeys->connectFunction("KMidFrame","Play/Pause",this,SLOT(spacePressed())); + kKeys->connectFunction("KMidFrame","Play/Pause",this,TQT_SLOT(spacePressed())); */ // kKeysAccel->writeSettings(cfg); @@ -276,7 +276,7 @@ kmidFrame::~kmidFrame() void kmidFrame::file_Open() { - KURL url = KFileDialog::getOpenURL(QString::null, "*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this); + KURL url = KFileDialog::getOpenURL(TQString::null, "*.kar *.mid *.kar.gz *.mid.gz\n*.kar *.kar.gz\n*.mid *.mid.gz\n*",this); if( url.isEmpty() ) return; @@ -329,7 +329,7 @@ void kmidFrame::options_AutomaticText() void kmidFrame::options_FontChange() { KFontDialog *kfd=new KFontDialog(this); - QFont font; + TQFont font; font=*kmidclient->getFont(); kfd->getFont(font); delete kfd; @@ -340,7 +340,7 @@ void kmidFrame::options_FontChange() kmidclient->fontChanged(); } -int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) +int kmidFrame::autoAddSongToCollection(const TQString& filename,int setactive) { int r; SLManager *slman; @@ -354,7 +354,7 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) if (setactive) slman->createTemporaryCollection(); sl=slman->getCollection(0); if (filename==NULL) sl->AddSong(kmidclient->midiFileName()); - else sl->AddSong(QFile::encodeName(filename)); + else sl->AddSong(TQFile::encodeName(filename)); } else { @@ -364,7 +364,7 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) if (sl==NULL) return 0; int id; if (filename==NULL) id=sl->AddSong(kmidclient->midiFileName()); - else id=sl->AddSong(QFile::encodeName(filename)); + else id=sl->AddSong(TQFile::encodeName(filename)); if (setactive) { sl->setActiveSong(id); @@ -373,17 +373,17 @@ int kmidFrame::autoAddSongToCollection(const QString& filename,int setactive) return r; } -void kmidFrame::urlDrop_slot(QDropEvent* e) +void kmidFrame::urlDrop_slot(TQDropEvent* e) { dropEvent(e); } -void kmidFrame::dragEnterEvent(QDragEnterEvent* e) +void kmidFrame::dragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void kmidFrame::dropEvent( QDropEvent * event ) +void kmidFrame::dropEvent( TQDropEvent * event ) { KURL::List list; KURLDrag::decode(event, list); @@ -453,7 +453,7 @@ void kmidFrame::readProperties(KConfig *cfg) if ((activecol==0)&&(wasplaying)) // It was the temporary collection, { // surely the user would like to continue // hearing the song - QString s = cfg->readPathEntry("File"); + TQString s = cfg->readPathEntry("File"); int c=autoAddSongToCollection(s,1); kmidclient->setActiveCollection(c); } @@ -472,7 +472,7 @@ void kmidFrame::options_MidiSetup() MidiConfigDialog *dlg; dlg=new MidiConfigDialog(kmidclient->devman(),NULL,"MidiDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { KConfig *cfg=kapp->config(); cfg->setGroup("KMid"); @@ -480,7 +480,7 @@ void kmidFrame::options_MidiSetup() kmidclient->setMidiDevice(MidiConfigDialog::selecteddevice); cfg->setGroup("Midimapper"); cfg->writePathEntry("LoadFile", - (MidiConfigDialog::selectedmap==NULL)? QString::null:MidiConfigDialog::selectedmap); + (MidiConfigDialog::selectedmap==NULL)? TQString::null:MidiConfigDialog::selectedmap); kmidclient->setMidiMapFilename(MidiConfigDialog::selectedmap); } delete dlg; @@ -493,7 +493,7 @@ void kmidFrame::collect_organize() int idx=kmidclient->getActiveCollection(); dlg=new CollectionDialog(slman,idx,NULL,"MidiDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { kmidclient->setSLManager(slman); kmidclient->setActiveCollection(CollectionDialog::selectedC); @@ -551,7 +551,7 @@ void kmidFrame::collect_AutoAdd() void kmidFrame::file_SaveLyrics() { - KURL url = KFileDialog::getSaveURL(QString::null,"*",this); + KURL url = KFileDialog::getSaveURL(TQString::null,"*",this); if( url.isEmpty() ) return; @@ -562,17 +562,17 @@ void kmidFrame::file_SaveLyrics() return; } - QString filename = url.path(); + TQString filename = url.path(); struct stat statbuf; - if (stat(QFile::encodeName(filename), &statbuf)!=-1) + if (stat(TQFile::encodeName(filename), &statbuf)!=-1) { - QString s = i18n("File %1 already exists\nDo you want to overwrite it?").arg(filename); - if (KMessageBox::warningYesNo(this,s,QString::null,i18n("Overwrite"),KStdGuiItem::cancel())==1) + TQString s = i18n("File %1 already exists\nDo you want to overwrite it?").arg(filename); + if (KMessageBox::warningYesNo(this,s,TQString::null,i18n("Overwrite"),KStdGuiItem::cancel())==1) return; } - FILE *fh=fopen(QFile::encodeName(filename),"wt"); + FILE *fh=fopen(TQFile::encodeName(filename),"wt"); kmidclient->saveLyrics(fh); fclose(fh); } @@ -599,7 +599,7 @@ void kmidFrame::options_ShowChannelView() } else { kmidclient->visibleChannelView(1); - connect (kmidclient->getChannelView(),SIGNAL(destroyMe()),this,SLOT(channelViewDestroyed())); + connect (kmidclient->getChannelView(),TQT_SIGNAL(destroyMe()),this,TQT_SLOT(channelViewDestroyed())); } } @@ -615,7 +615,7 @@ void kmidFrame::options_ChannelViewOptions() ChannelViewConfigDialog *dlg; dlg=new ChannelViewConfigDialog(NULL,"ChannelViewConfigDialog"); - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) { if (kmidclient->getChannelView()) kmidclient->getChannelView()->lookMode( @@ -624,7 +624,7 @@ void kmidFrame::options_ChannelViewOptions() delete dlg; } -void kmidFrame::openURL( const QString url ) +void kmidFrame::openURL( const TQString url ) { int c=autoAddSongToCollection(url,1); kmidclient->setActiveCollection(c); diff --git a/kmid/kmidframe.h b/kmid/kmidframe.h index c24cfd52..8891720d 100644 --- a/kmid/kmidframe.h +++ b/kmid/kmidframe.h @@ -29,7 +29,7 @@ #include <libkmid/midiout.h> #include <libkmid/player.h> #include <libkmid/track.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kdelibs_export.h> class KApplication; @@ -55,24 +55,24 @@ private: int donttoggle; - QPopupMenu *m_file; - QPopupMenu *m_song; - QPopupMenu *m_collections; - QPopupMenu *m_options; - QPopupMenu *m_help; + TQPopupMenu *m_file; + TQPopupMenu *m_song; + TQPopupMenu *m_collections; + TQPopupMenu *m_options; + TQPopupMenu *m_help; */ KAccel *kKeysAccel; protected: - int autoAddSongToCollection(const QString& filename=QString::null,int setactive=1); + int autoAddSongToCollection(const TQString& filename=TQString::null,int setactive=1); virtual void saveProperties(KConfig *kcfg); virtual void readProperties(KConfig *kcfg); -// virtual void closeEvent(QCloseEvent *e); +// virtual void closeEvent(TQCloseEvent *e); - void dragEnterEvent(QDragEnterEvent* e); - void dropEvent ( QDropEvent * event ); + void dragEnterEvent(TQDragEnterEvent* e); + void dropEvent ( TQDropEvent * event ); public: @@ -100,7 +100,7 @@ public slots: void spacePressed(); - virtual void openURL( const QString s ); + virtual void openURL( const TQString s ); /* virtual void play(); virtual void pause(); virtual void stop(); @@ -119,7 +119,7 @@ public slots: virtual void setCollectionPlayMode(int i); virtual void setMidiDevice(int i); */ - void urlDrop_slot(class QDropEvent *); + void urlDrop_slot(class TQDropEvent *); void rechooseTextEvent(); diff --git a/kmid/ktrianglebutton.cpp b/kmid/ktrianglebutton.cpp index a4387ee5..1b31dade 100644 --- a/kmid/ktrianglebutton.cpp +++ b/kmid/ktrianglebutton.cpp @@ -26,12 +26,12 @@ ***************************************************************************/ #include "ktrianglebutton.h" -#include <qpainter.h> -#include <qdrawutil.h> -#include <qstyle.h> +#include <tqpainter.h> +#include <tqdrawutil.h> +#include <tqstyle.h> -KTriangleButton::KTriangleButton( Direction d,QWidget *_parent, const char *name ) - : QButton( _parent , name) +KTriangleButton::KTriangleButton( Direction d,TQWidget *_parent, const char *name ) + : TQButton( _parent , name) { dir=d; raised = FALSE; @@ -42,7 +42,7 @@ KTriangleButton::~KTriangleButton() { } -void KTriangleButton::enterEvent( QEvent* ) +void KTriangleButton::enterEvent( TQEvent* ) { if ( isEnabled() ) { @@ -51,7 +51,7 @@ void KTriangleButton::enterEvent( QEvent* ) } } -void KTriangleButton::leaveEvent( QEvent * ) +void KTriangleButton::leaveEvent( TQEvent * ) { if( raised != FALSE ) { @@ -61,21 +61,21 @@ void KTriangleButton::leaveEvent( QEvent * ) } -void KTriangleButton::drawButton( QPainter *_painter ) +void KTriangleButton::drawButton( TQPainter *_painter ) { paint( _painter ); } -void KTriangleButton::drawButtonLabel( QPainter *_painter ) +void KTriangleButton::drawButtonLabel( TQPainter *_painter ) { paint( _painter ); } -void KTriangleButton::paint( QPainter *painter ) +void KTriangleButton::paint( TQPainter *painter ) { if ( isDown() || isOn() ) { - if ( style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle ) + if ( style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) qDrawWinButton( painter, 0, 0, width(), height(), colorGroup(), TRUE ); else @@ -84,7 +84,7 @@ void KTriangleButton::paint( QPainter *painter ) } else if ( raised ) { - if ( style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle ) + if ( style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle ) qDrawWinButton( painter, 0, 0, width(), height(), colorGroup(), FALSE ); else @@ -127,22 +127,22 @@ void KTriangleButton::paint( QPainter *painter ) } -void KTriangleButton::mousePressEvent(QMouseEvent *e) +void KTriangleButton::mousePressEvent(TQMouseEvent *e) { - QButton::mousePressEvent(e); + TQButton::mousePressEvent(e); usingTimer=true; startTimer(500); timeCount=0; } -void KTriangleButton::mouseReleaseEvent(QMouseEvent *e) +void KTriangleButton::mouseReleaseEvent(TQMouseEvent *e) { usingTimer=false; - QButton::mouseReleaseEvent(e); + TQButton::mouseReleaseEvent(e); } -void KTriangleButton::timerEvent(QTimerEvent *) +void KTriangleButton::timerEvent(TQTimerEvent *) { if (!usingTimer) {killTimers();return;}; if (timeCount==0) diff --git a/kmid/ktrianglebutton.h b/kmid/ktrianglebutton.h index 0ad4518d..3c951dec 100644 --- a/kmid/ktrianglebutton.h +++ b/kmid/ktrianglebutton.h @@ -28,7 +28,7 @@ #ifndef _ktrianglebutton_h_ #define _ktrianglebutton_h_ -#include <qbutton.h> +#include <tqbutton.h> class KTriangleButton : public QButton { @@ -47,16 +47,16 @@ protected: int timeCount; public: - KTriangleButton( Direction d,QWidget *_parent = 0L, const char *name = 0L ); + KTriangleButton( Direction d,TQWidget *_parent = 0L, const char *name = 0L ); ~KTriangleButton(); - virtual void leaveEvent( QEvent *_ev ); - virtual void enterEvent( QEvent *_ev ); + virtual void leaveEvent( TQEvent *_ev ); + virtual void enterEvent( TQEvent *_ev ); - virtual void drawButton( QPainter *_painter ); - virtual void drawButtonLabel( QPainter *_painter ); + virtual void drawButton( TQPainter *_painter ); + virtual void drawButtonLabel( TQPainter *_painter ); - void paint( QPainter *_painter ); + void paint( TQPainter *_painter ); signals: void clickedQuickly(); @@ -64,9 +64,9 @@ signals: protected: bool raised; - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void timerEvent(QTimerEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void timerEvent(TQTimerEvent *); }; diff --git a/kmid/main.cpp b/kmid/main.cpp index 719ecbb8..45cd1fab 100644 --- a/kmid/main.cpp +++ b/kmid/main.cpp @@ -25,8 +25,8 @@ #include <string.h> #include <signal.h> -#include <qwidget.h> -#include <qtextcodec.h> +#include <tqwidget.h> +#include <tqtextcodec.h> #include <kapplication.h> #include <klocale.h> @@ -45,7 +45,7 @@ int main(int argc, char **argv) printf("This is free software, and you are welcome to redistribute it\n"); printf("under certain conditions\n\n"); - QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale()); + TQTextCodec::setCodecForCStrings(TQTextCodec::codecForLocale()); /* struct sigaction act; act.sa_handler = SIG_DFL; @@ -71,7 +71,7 @@ int main(int argc, char **argv) app.setMainWidget ( kmidframe ); - QObject::connect(&app,SIGNAL(shutDown()),kmidframe,SLOT(shuttingDown())); + TQObject::connect(&app,TQT_SIGNAL(shutDown()),kmidframe,TQT_SLOT(shuttingDown())); if (app.isRestored()) { diff --git a/kmid/midicfgdlg.cpp b/kmid/midicfgdlg.cpp index a10144a4..855de04a 100644 --- a/kmid/midicfgdlg.cpp +++ b/kmid/midicfgdlg.cpp @@ -21,10 +21,10 @@ or to Antonio Larrosa, Rio Arnoya, 10 5B, 29006 Malaga, Spain ***************************************************************************/ -#include <qpushbutton.h> -#include <qlistbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kapplication.h> #include <kfiledialog.h> @@ -38,25 +38,25 @@ #include <kstandarddirs.h> MidiConfigDialog::MidiConfigDialog(DeviceManager *dm, - QWidget *parent,const char *name) : KDialogBase(parent,name,TRUE, + TQWidget *parent,const char *name) : KDialogBase(parent,name,TRUE, i18n("Configure MIDI Devices"), KDialogBase::Ok|KDialogBase::Cancel) { setMinimumSize(360,240); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *topLayout=new QVBoxLayout(page, 0, spacingHint()); - QLabel *label=new QLabel(i18n("Select the MIDI device you want to use:"),page); + TQVBoxLayout *topLayout=new TQVBoxLayout(page, 0, spacingHint()); + TQLabel *label=new TQLabel(i18n("Select the MIDI device you want to use:"),page); topLayout->addWidget(label); - mididevices=new QListBox(page,"midideviceslist"); + mididevices=new TQListBox(page,"midideviceslist"); topLayout->addWidget(mididevices,3); - connect(mididevices,SIGNAL(highlighted(int)),SLOT(deviceselected(int))); + connect(mididevices,TQT_SIGNAL(highlighted(int)),TQT_SLOT(deviceselected(int))); devman=dm; - QString temp; + TQString temp; for (int i=0;i<devman->midiPorts()+devman->synthDevices();i++) { if (strcmp(devman->type(i),"")!=0) - temp = QString("%1 - %2").arg(devman->name(i)).arg(devman->type(i)); + temp = TQString("%1 - %2").arg(devman->name(i)).arg(devman->type(i)); else temp = devman->name(i); @@ -65,7 +65,7 @@ MidiConfigDialog::MidiConfigDialog(DeviceManager *dm, selecteddevice=devman->defaultDevice(); mididevices->setCurrentItem(selecteddevice); - QLabel *label2=new QLabel(i18n("Use the MIDI map:"),page); + TQLabel *label2=new TQLabel(i18n("Use the MIDI map:"),page); topLayout->addWidget(label2); @@ -78,20 +78,20 @@ MidiConfigDialog::MidiConfigDialog(DeviceManager *dm, strcpy(selectedmap,devman->midiMapFilename()); } - if (selectedmap!=NULL) maplabel=new QLabel(selectedmap,page); - else maplabel=new QLabel(i18n("None"),page); + if (selectedmap!=NULL) maplabel=new TQLabel(selectedmap,page); + else maplabel=new TQLabel(i18n("None"),page); topLayout->addWidget(maplabel); - QHBoxLayout *hbox=new QHBoxLayout(topLayout); + TQHBoxLayout *hbox=new TQHBoxLayout(topLayout); hbox->addStretch(1); - mapbrowse=new QPushButton(i18n("Browse..."),page); + mapbrowse=new TQPushButton(i18n("Browse..."),page); hbox->addWidget(mapbrowse); - connect(mapbrowse,SIGNAL(clicked()),SLOT(browseMap()) ); + connect(mapbrowse,TQT_SIGNAL(clicked()),TQT_SLOT(browseMap()) ); - mapnone=new QPushButton(i18n("None"),page); + mapnone=new TQPushButton(i18n("None"),page); hbox->addWidget(mapnone); - connect(mapnone,SIGNAL(clicked()),SLOT(noMap()) ); + connect(mapnone,TQT_SIGNAL(clicked()),TQT_SLOT(noMap()) ); topLayout->addStretch(1); @@ -104,7 +104,7 @@ void MidiConfigDialog::deviceselected(int idx) void MidiConfigDialog::browseMap() { - QString path = KGlobal::dirs()->findAllResources("appdata", "maps/*.map").last(); + TQString path = KGlobal::dirs()->findAllResources("appdata", "maps/*.map").last(); path.truncate(path.findRev('/')); KURL url = KFileDialog::getOpenURL(path,"*.map",this); @@ -118,11 +118,11 @@ void MidiConfigDialog::browseMap() return; } - QString filename = url.path(); + TQString filename = url.path(); delete selectedmap; selectedmap=new char[filename.length()+1]; - strcpy(selectedmap,QFile::encodeName(filename)); + strcpy(selectedmap,TQFile::encodeName(filename)); maplabel->setText(selectedmap); } diff --git a/kmid/midicfgdlg.h b/kmid/midicfgdlg.h index 0921d608..820a67d1 100644 --- a/kmid/midicfgdlg.h +++ b/kmid/midicfgdlg.h @@ -37,7 +37,7 @@ class MidiConfigDialog : public KDialogBase public: - MidiConfigDialog(DeviceManager *dm,QWidget *parent,const char *name); + MidiConfigDialog(DeviceManager *dm,TQWidget *parent,const char *name); public slots: void deviceselected(int idx); @@ -45,10 +45,10 @@ public slots: void noMap(); private: - QLabel *maplabel; - QListBox *mididevices; - QPushButton *mapbrowse; - QPushButton *mapnone; + TQLabel *maplabel; + TQListBox *mididevices; + TQPushButton *mapbrowse; + TQPushButton *mapnone; DeviceManager *devman; diff --git a/kmid/qslidertime.cpp b/kmid/qslidertime.cpp index 20349980..09975e25 100644 --- a/kmid/qslidertime.cpp +++ b/kmid/qslidertime.cpp @@ -22,19 +22,19 @@ ***************************************************************************/ #include "qslidertime.h" -#include <qwidget.h> -#include <qpainter.h> +#include <tqwidget.h> +#include <tqpainter.h> #include <stdio.h> #define ARROW_LENGTH 13 -QSliderTime::QSliderTime( QSlider *ksl, QWidget *parent, const char *name) - : QWidget (parent,name) +QSliderTime::QSliderTime( TQSlider *ksl, TQWidget *parent, const char *name) + : TQWidget (parent,name) { kslider=ksl; -QPainter painter; -QFontMetrics qfmt(painter.font()); +TQPainter painter; +TQFontMetrics qfmt(painter.font()); fontheight=qfmt.height(); } @@ -50,9 +50,9 @@ char *QSliderTime::formatMillisecs(int ms,char *tmp) return tmp; } -void QSliderTime::paintEvent( QPaintEvent * ) +void QSliderTime::paintEvent( TQPaintEvent * ) { - QPainter painter(this); + TQPainter painter(this); // erase(); drawTimeMarks(&painter); @@ -70,12 +70,12 @@ if (t<=2000) t=2000; return t; } -void QSliderTime::drawTimeMarks(QPainter *painter) +void QSliderTime::drawTimeMarks(TQPainter *painter) { if (kslider==NULL) return; int i; int maxV = kslider->maxValue(); - QFontMetrics qfmt(painter->font()); + TQFontMetrics qfmt(painter->font()); fontheight=qfmt.height(); int ntimetags = width()/(qfmt.width("-88:88-")); int timestep; @@ -108,13 +108,13 @@ if (kslider==NULL) return; } -QSize QSliderTime::sizeHint() +TQSize QSliderTime::sizeHint() { - return QSize(10,fontheight+2); + return TQSize(10,fontheight+2); } -QSizePolicy QSliderTime::sizePolicy() +TQSizePolicy QSliderTime::sizePolicy() { - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed); + return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Fixed); } #include "qslidertime.moc" diff --git a/kmid/qslidertime.h b/kmid/qslidertime.h index 2c052720..31614b5c 100644 --- a/kmid/qslidertime.h +++ b/kmid/qslidertime.h @@ -24,7 +24,7 @@ #ifndef _kslidertime_h_ #define _kslidertime_h_ -#include <qslider.h> +#include <tqslider.h> class QWidget; @@ -33,22 +33,22 @@ class QSliderTime : public QWidget Q_OBJECT private: - QSlider *kslider; + TQSlider *kslider; int fontheight; public: - QSliderTime( QSlider *ksl, QWidget *parent = NULL, const char *name = NULL ); + QSliderTime( TQSlider *ksl, TQWidget *parent = NULL, const char *name = NULL ); int getFontHeight(void) {return fontheight;}; - QSize sizeHint(); - QSizePolicy sizePolicy(); + TQSize sizeHint(); + TQSizePolicy sizePolicy(); private: - virtual void paintEvent( QPaintEvent * ); - void drawTimeMarks(QPainter *painter); + virtual void paintEvent( TQPaintEvent * ); + void drawTimeMarks(TQPainter *painter); char *formatMillisecs(int ms,char *tmp); }; diff --git a/kmid/rhythmview.cpp b/kmid/rhythmview.cpp index 7bcfc608..0358620d 100644 --- a/kmid/rhythmview.cpp +++ b/kmid/rhythmview.cpp @@ -23,7 +23,7 @@ ***************************************************************************/ #include "rhythmview.h" -RhythmView::RhythmView (QWidget *parent, const char *name) : QWidget (parent,name) +RhythmView::RhythmView (TQWidget *parent, const char *name) : TQWidget (parent,name) { lamps=NULL; setRhythm(4,4); @@ -83,7 +83,7 @@ void RhythmView::Beat(void) } -void RhythmView::resizeEvent(QResizeEvent *) +void RhythmView::resizeEvent(TQResizeEvent *) { int w=width()/num; int x=0; @@ -95,14 +95,14 @@ void RhythmView::resizeEvent(QResizeEvent *) } } -QSize RhythmView::sizeHint() +TQSize RhythmView::sizeHint() { - return QSize(10,10); + return TQSize(10,10); } -QSizePolicy RhythmView::sizePolicy() +TQSizePolicy RhythmView::sizePolicy() { -// return QWidget::sizePolicy(); - return QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); +// return TQWidget::sizePolicy(); + return TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum); } diff --git a/kmid/rhythmview.h b/kmid/rhythmview.h index 96cbed55..c157e9d8 100644 --- a/kmid/rhythmview.h +++ b/kmid/rhythmview.h @@ -24,7 +24,7 @@ #ifndef _rhythmview_h_ #define _rhythmview_h_ -#include <qwidget.h> +#include <tqwidget.h> #include <kled.h> class RhythmView : public QWidget @@ -34,7 +34,7 @@ class RhythmView : public QWidget KLed **lamps; public: - RhythmView (QWidget *parent, const char *name); + RhythmView (TQWidget *parent, const char *name); ~RhythmView(); void setRhythm(int numerator,int denominator); @@ -43,11 +43,11 @@ public: void Beat(void); // Just increase the beat - QSize sizeHint(); - QSizePolicy sizePolicy(); + TQSize sizeHint(); + TQSizePolicy sizePolicy(); private: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); }; |