summaryrefslogtreecommitdiffstats
path: root/kmid/channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmid/channel.cpp')
-rw-r--r--kmid/channel.cpp44
1 files changed, 22 insertions, 22 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;
}