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