summaryrefslogtreecommitdiffstats
path: root/kmid/kmidclient.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /kmid/kmidclient.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmid/kmidclient.cpp')
-rw-r--r--kmid/kmidclient.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kmid/kmidclient.cpp b/kmid/kmidclient.cpp
index 94467098..74234bac 100644
--- a/kmid/kmidclient.cpp
+++ b/kmid/kmidclient.cpp
@@ -65,8 +65,8 @@
//#define TEMPHACK
-kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name)
- : DCOPObject("KMidIface"), TQWidget(parent,name)
+kmidClient::kmidClient(TQWidget *tqparent, KActionCollection *ac, const char *name)
+ : DCOPObject("KMidIface"), TQWidget(tqparent,name)
{
actionCollection=ac;
KConfig *cfg=kapp->config();
@@ -90,13 +90,13 @@ kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name
// currentsl=slman->getCollection(activecollection);
itsme=0;
m_kMid.pid=0;
- timebar = new TQSlider(0,240000,30000,60000,TQSlider::Horizontal, this);
+ timebar = new TQSlider(0,240000,30000,60000,Qt::Horizontal, this);
timebar->setSteps(30000,60000);
timebar->setValue(0);
connect (timebar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotSeek(int)));
timetags = new QSliderTime(timebar,this);
- timetags->setMinimumSize(timetags->sizeHint());
+ timetags->setMinimumSize(timetags->tqsizeHint());
qlabelTempo= new TQLabel(i18n("Tempo:"), this,"tempolabel",
TQLabel::NoFrame);
@@ -108,7 +108,7 @@ kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name
tempoLCD->setRange(3,999);
tempoLCD->setDefaultValue(120);
tempoLCD->setUserSetDefaultValue(true);
- tempoLCD->setMinimumSize(tempoLCD->sizeHint());
+ tempoLCD->setMinimumSize(tempoLCD->tqsizeHint());
connect(tempoLCD,TQT_SIGNAL(valueChanged(double)),this,TQT_SLOT(slotSetTempo(double)));
comboSongs = new TQComboBox(FALSE, this,"Songs");
@@ -125,7 +125,7 @@ kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name
rhythmview->setMaximumHeight(7);
rhythmview->setMinimumHeight(7);
- volumebar = new TQSlider(0,200,10,100,TQSlider::Vertical, this );
+ volumebar = new TQSlider(0,200,10,100,Qt::Vertical, this );
volumebar->setSteps(10,20);
volumebar->setValue(100);
volumebar->setTickmarks(TQSlider::NoMarks);
@@ -147,7 +147,7 @@ kmidClient::kmidClient(TQWidget *parent, KActionCollection *ac, const char *name
TQString samplefile =
KGlobal::dirs()->findAllResources("appdata", "fm/*.o3").last();
- samplefile.truncate(samplefile.findRev('/'));
+ samplefile.truncate(samplefile.tqfindRev('/'));
FMOut::setFMPatchesDirectory(TQFile::encodeName(samplefile));
m_kMid.pctlsmID=shmget(IPC_PRIVATE,sizeof(PlayerController),0666 | IPC_CREAT );
@@ -290,10 +290,10 @@ int kmidClient::openFile(const char *filename)
switch (r)
{
case (-1) : errormsg =
- i18n("The file %1 does not exist or cannot be opened.").arg(filename);
+ i18n("The file %1 does not exist or cannot be opened.").tqarg(filename);
break;
case (-2) : errormsg =
- i18n("The file %1 is not a MIDI file.").arg(filename);break;
+ i18n("The file %1 is not a MIDI file.").tqarg(filename);break;
case (-3) : errormsg =
i18n("Ticks per quarter note is negative. Please send this file to larrosa@kde.org");break;
case (-4) : errormsg =
@@ -301,7 +301,7 @@ int kmidClient::openFile(const char *filename)
case (-5) : errormsg =
i18n("This file is corrupted or not well built.");break;
case (-6) : errormsg =
- i18n("%1 is not a regular file.").arg(filename);break;
+ i18n("%1 is not a regular file.").tqarg(filename);break;
default : errormsg = i18n("Unknown error message");break;
}
KMessageBox::error(this, errormsg);
@@ -310,10 +310,10 @@ int kmidClient::openFile(const char *filename)
midifile_opened=0L;
timebar->setRange(0,240000);
timebar->setValue(0);
- timetags->repaint(TRUE);
+ timetags->tqrepaint(TRUE);
kdispt->ClearEv();
- kdispt->repaint(TRUE);
- topLevelWidget()->setCaption("KMid");
+ kdispt->tqrepaint(TRUE);
+ tqtopLevelWidget()->setCaption("KMid");
return -1;
}
@@ -327,7 +327,7 @@ int kmidClient::openFile(const char *filename)
// noteArray=player->parseNotes();
noteArray=player->noteArray();
timebar->setRange(0,(int)(player->information()->millisecsTotal));
- timetags->repaint(TRUE);
+ timetags->tqrepaint(TRUE);
kdispt->ClearEv();
spev=player->specialEvents();
while (spev)
@@ -343,7 +343,7 @@ int kmidClient::openFile(const char *filename)
kdispt->CursorToHome();
// kdispt->updateScrollBars();
emit mustRechooseTextEvent();
- kdispt->repaint(TRUE);
+ kdispt->tqrepaint(TRUE);
tempoLCD->display(tempoToMetronomeTempo(m_kMid.pctl->tempo));
currentTempo=tempoLCD->getValue();
tempoLCD->setDefaultValue(tempoToMetronomeTempo(m_kMid.pctl->tempo)*m_kMid.pctl->ratioTempo);
@@ -353,7 +353,7 @@ int kmidClient::openFile(const char *filename)
char *capt=new char[strlen(fn)+20];
sprintf(capt,"KMid - %s",fn);
delete fn;
- topLevelWidget()->setCaption(capt);
+ tqtopLevelWidget()->setCaption(capt);
delete capt;
timebar->setValue(0);
@@ -1125,11 +1125,11 @@ void kmidClient::processSpecialEvent()
}
-void kmidClient::repaintText(int type)
+void kmidClient::tqrepaintText(int type)
{
kdispt->ChangeTypeOfTextEvents(type);
typeoftextevents=type;
- kdispt->repaint(TRUE);
+ kdispt->tqrepaint(TRUE);
}
int kmidClient::ChooseTypeOfTextEvents(void)
@@ -1265,12 +1265,12 @@ void kmidClient::slotSelectSong(int i)
player->removeSong();
timebar->setRange(0,240000);
timebar->setValue(0);
- timetags->repaint(TRUE);
+ timetags->tqrepaint(TRUE);
kdispt->ClearEv();
- kdispt->repaint(TRUE);
+ kdispt->tqrepaint(TRUE);
comboSongs->clear();
- comboSongs->repaint(TRUE);
- topLevelWidget()->setCaption("KMid");
+ comboSongs->tqrepaint(TRUE);
+ tqtopLevelWidget()->setCaption("KMid");
return;
}
@@ -1374,7 +1374,7 @@ void kmidClient::visibleChannelView(int i)
}
channelView->show();
connect(channelView,TQT_SIGNAL(signalToKMidClient(int *)),this,TQT_SLOT(communicationFromChannelView(int *)));
- connect(kapp,TQT_SIGNAL(shutDown()),parentWidget(),TQT_SLOT(shuttingDown()));
+ connect(kapp,TQT_SIGNAL(shutDown()),tqparentWidget(),TQT_SLOT(shuttingDown()));
}
else if ((channelView!=NULL)&&(i==0))
@@ -1487,7 +1487,7 @@ void kmidClient::slotSetTempo(double value)
timebar->setRange(0,(int)(player->information()->millisecsTotal));
timebar->setValue(pausedatmillisec);
- timetags->repaint(TRUE);
+ timetags->tqrepaint(TRUE);
kdispt->ClearEv(false);
@@ -1522,9 +1522,9 @@ void kmidClient::downloadFinished(KIO::Job *)
kapp->exit_loop();
}
-TQSize kmidClient::sizeHint() const
+TQSize kmidClient::tqsizeHint() const
{
- TQSize sh = TQWidget::sizeHint();
+ TQSize sh = TQWidget::tqsizeHint();
return sh.expandedTo(TQSize(560,420));
}
@@ -1599,7 +1599,7 @@ void kmidClient::setPlayListMode(int i)
void kmidClient::slotSelectEncoding(int i)
{
if (i == 0)
- kdispt->setLyricsEncoding(TQString::null); // Default
+ kdispt->setLyricsEncoding(TQString()); // Default
else
kdispt->setLyricsEncoding(KGlobal::charsets()->encodingForName(comboEncodings->text(i)));
}