summaryrefslogtreecommitdiffstats
path: root/kaudiocreator/kaudiocreator.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 /kaudiocreator/kaudiocreator.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 'kaudiocreator/kaudiocreator.cpp')
-rw-r--r--kaudiocreator/kaudiocreator.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kaudiocreator/kaudiocreator.cpp b/kaudiocreator/kaudiocreator.cpp
index 6ac77beb..946b57dc 100644
--- a/kaudiocreator/kaudiocreator.cpp
+++ b/kaudiocreator/kaudiocreator.cpp
@@ -49,32 +49,32 @@
/**
* Constructor. Connect all of the object and the job control.
*/
-KAudioCreator::KAudioCreator( TQWidget* parent, const char* name) :
- KMainWindow(parent, name)
+KAudioCreator::KAudioCreator( TQWidget* tqparent, const char* name) :
+ KMainWindow(tqparent, name)
{
janusWidget = new KJanusWidget(this, name, KJanusWidget::Tabbed);
setCentralWidget(janusWidget);
- TQVBox *frame = janusWidget->addVBoxPage(i18n("&CD Tracks"), TQString::null, SmallIcon("cdaudio_unmount", 32));
+ TQVBox *frame = janusWidget->addVBoxPage(i18n("&CD Tracks"), TQString(), SmallIcon("cdaudio_unmount", 32));
tracks = new TracksImp(frame, "Tracks");
- ripper = new Ripper ( frame, "Rip" );
- encoder = new Encoder( frame, "Encoder" );
+ ripper = new Ripper ( TQT_TQOBJECT(frame), "Rip" );
+ encoder = new Encoder( TQT_TQOBJECT(frame), "Encoder" );
- frame = janusWidget->addVBoxPage( i18n("&Jobs"), TQString::null, SmallIcon( "run", 32 ) );
+ frame = janusWidget->addVBoxPage( i18n("&Jobs"), TQString(), SmallIcon( "run", 32 ) );
jobQue = new JobQueImp( frame, "Que" );
resize(500, 440);
- /*KAction *eject = */new KAction( i18n("&Eject CD"), 0, tracks,
+ /*KAction *eject = */new KAction( i18n("&Eject CD"), 0, TQT_TQOBJECT(tracks),
TQT_SLOT( eject() ), actionCollection(), "eject" );
- (void)new KAction( i18n("&Configure KAudioCreator..."), 0, this,
+ (void)new KAction( i18n("&Configure KAudioCreator..."), 0, TQT_TQOBJECT(this),
TQT_SLOT( showSettings() ), actionCollection(), "configure_kaudiocreator" );
- KAction *selectAll = new KAction( i18n( "Select &All Tracks"), 0, tracks,
+ KAction *selectAll = new KAction( i18n( "Select &All Tracks"), 0, TQT_TQOBJECT(tracks),
TQT_SLOT( selectAllTracks() ), actionCollection(), "select_all" ) ;
- KAction *deselectAll = new KAction( i18n( "Deselect &All Tracks"), 0, tracks,
+ KAction *deselectAll = new KAction( i18n( "Deselect &All Tracks"), 0, TQT_TQOBJECT(tracks),
TQT_SLOT( deselectAllTracks() ), actionCollection(), "deselect_all" );
selectAll->setEnabled( false );
deselectAll->setEnabled( false );
@@ -82,56 +82,56 @@ KAudioCreator::KAudioCreator( TQWidget* parent, const char* name) :
KActionMenu *actActionMenu = new KActionMenu( i18n("Rip &Selection"), "rip", actionCollection(), "rip" );
actActionMenu->setDelayed(true); //needed for checking "all accounts"
actActionMenu->setEnabled( false );
- connect( actActionMenu, TQT_SIGNAL( activated() ), tracks, TQT_SLOT( startSession() ) );
+ connect( actActionMenu, TQT_SIGNAL( activated() ), TQT_TQOBJECT(tracks), TQT_SLOT( startSession() ) );
ripMenu = actActionMenu->popupMenu();
- connect( ripMenu, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotRipSelection(int)) );
- connect( ripMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( getRipMenu()) );
+ connect( ripMenu, TQT_SIGNAL( activated(int) ), TQT_TQOBJECT(this), TQT_SLOT( slotRipSelection(int)) );
+ connect( ripMenu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( getRipMenu()) );
- KAction *rip = new KAction( i18n( "Rip &Selection" ), 0, tracks,
+ KAction *rip = new KAction( i18n( "Rip &Selection" ), 0, TQT_TQOBJECT(tracks),
TQT_SLOT( startSession() ), actionCollection(), "rip_selected" );
rip->setEnabled( false );
- connect( jobQue, TQT_SIGNAL( removeJob(int) ), this, TQT_SLOT( updateStatus() ) );
- connect( jobQue, TQT_SIGNAL( removeJob(int) ), ripper, TQT_SLOT( removeJob(int) ) );
- connect( jobQue, TQT_SIGNAL( removeJob(int) ), encoder, TQT_SLOT( removeJob(int)) );
+ connect( jobQue, TQT_SIGNAL( removeJob(int) ), TQT_TQOBJECT(this), TQT_SLOT( updatetqStatus() ) );
+ connect( jobQue, TQT_SIGNAL( removeJob(int) ), TQT_TQOBJECT(ripper), TQT_SLOT( removeJob(int) ) );
+ connect( jobQue, TQT_SIGNAL( removeJob(int) ), TQT_TQOBJECT(encoder), TQT_SLOT( removeJob(int)) );
- connect( ripper, TQT_SIGNAL( updateProgress(int, int) ) , jobQue, TQT_SLOT( updateProgress(int,int) ) );
- connect( ripper, TQT_SIGNAL( addJob(Job*, const TQString &) ), jobQue, TQT_SLOT( addJob(Job*, const TQString &)) );
- connect( ripper, TQT_SIGNAL( eject(const TQString &) ) , tracks, TQT_SLOT( ejectDevice(const TQString &)) );
- connect( ripper, TQT_SIGNAL( encodeWav(Job *) ) , encoder, TQT_SLOT( encodeWav(Job *)) );
- connect( ripper, TQT_SIGNAL( jobsChanged() ) , this, TQT_SLOT( updateStatus() ) );
+ connect( ripper, TQT_SIGNAL( updateProgress(int, int) ), TQT_TQOBJECT(jobQue), TQT_SLOT( updateProgress(int,int) ) );
+ connect( ripper, TQT_SIGNAL( addJob(Job*, const TQString &) ), TQT_TQOBJECT(jobQue), TQT_SLOT( addJob(Job*, const TQString &)) );
+ connect( ripper, TQT_SIGNAL( eject(const TQString &) ) , TQT_TQOBJECT(tracks), TQT_SLOT( ejectDevice(const TQString &)) );
+ connect( ripper, TQT_SIGNAL( encodeWav(Job *) ) , TQT_TQOBJECT(encoder), TQT_SLOT( encodeWav(Job *)) );
+ connect( ripper, TQT_SIGNAL( jobsChanged() ) , TQT_TQOBJECT(this), TQT_SLOT( updatetqStatus() ) );
- connect( encoder, TQT_SIGNAL( updateProgress(int, int) ) , jobQue, TQT_SLOT( updateProgress(int,int)) );
- connect( encoder, TQT_SIGNAL( addJob(Job*, const TQString&)), jobQue, TQT_SLOT( addJob(Job*, const TQString &)) );
- connect( encoder, TQT_SIGNAL( jobsChanged() ) , this, TQT_SLOT( updateStatus() ) );
+ connect( encoder, TQT_SIGNAL( updateProgress(int, int) ) , TQT_TQOBJECT(jobQue), TQT_SLOT( updateProgress(int,int)) );
+ connect( encoder, TQT_SIGNAL( addJob(Job*, const TQString&)), TQT_TQOBJECT(jobQue), TQT_SLOT( addJob(Job*, const TQString &)) );
+ connect( encoder, TQT_SIGNAL( jobsChanged() ) , TQT_TQOBJECT(this), TQT_SLOT( updatetqStatus() ) );
- connect( tracks, TQT_SIGNAL( hasCD(bool) ) , this, TQT_SLOT( hasCD(bool) ) );
- connect( tracks, TQT_SIGNAL( ripTrack(Job *) ), ripper, TQT_SLOT( ripTrack(Job *)) );
+ connect( tracks, TQT_SIGNAL( hasCD(bool) ) , TQT_TQOBJECT(this), TQT_SLOT( hasCD(bool) ) );
+ connect( tracks, TQT_SIGNAL( ripTrack(Job *) ), TQT_TQOBJECT(ripper), TQT_SLOT( ripTrack(Job *)) );
connect( tracks, TQT_SIGNAL( hasTracks(bool) ), rip, TQT_SLOT( setEnabled(bool)) );
connect( tracks, TQT_SIGNAL( hasTracks(bool) ), actActionMenu, TQT_SLOT( setEnabled(bool)) );
connect( tracks, TQT_SIGNAL( hasTracks(bool) ), deselectAll, TQT_SLOT( setEnabled(bool)) );
connect( tracks, TQT_SIGNAL( hasTracks(bool) ), selectAll, TQT_SLOT( setEnabled(bool)) );
- (void)new KAction(i18n("Remove &Completed Jobs"), 0, jobQue,
+ (void)new KAction(i18n("Remove &Completed Jobs"), 0, TQT_TQOBJECT(jobQue),
TQT_SLOT(clearDoneJobs()), actionCollection(), "clear_done_jobs" );
- KAction *edit = new KAction(i18n("&Edit Album..."), 0, tracks,
+ KAction *edit = new KAction(i18n("&Edit Album..."), 0, TQT_TQOBJECT(tracks),
TQT_SLOT(editInformation()), actionCollection(), "edit_cd");
connect(tracks, TQT_SIGNAL(hasCD(bool)), edit, TQT_SLOT(setEnabled(bool)));
edit->setEnabled( false );
- (void)new KAction(i18n("Encode &File..."), 0, this,
+ (void)new KAction(i18n("Encode &File..."), 0, TQT_TQOBJECT(this),
TQT_SLOT(encodeFile()), actionCollection(), "encode_file");
- KAction *cddb = new KAction(i18n("&CDDB Lookup"), 0, tracks,
+ KAction *cddb = new KAction(i18n("&CDDB Lookup"), 0, TQT_TQOBJECT(tracks),
TQT_SLOT(performCDDB()), actionCollection(), "cddb_now");
connect(tracks, TQT_SIGNAL(hasCD(bool)), cddb, TQT_SLOT(setEnabled(bool)));
cddb->setEnabled( false );
- KStdAction::configureNotifications(this, TQT_SLOT(configureNotifications()),
+ KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(configureNotifications()),
actionCollection());
- KStdAction::quit( this, TQT_SLOT(close()), actionCollection(), "quit" );
+ KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "quit" );
// Init statusbar
statusBar()->insertItem(i18n("No Audio CD detected"), 0 );
@@ -153,10 +153,10 @@ void KAudioCreator::getRipMenu(){
ripMenu->clear();
int i=0;
- TQString currentGroup = TQString("Encoder_%1").arg(i);
+ TQString currentGroup = TQString("Encoder_%1").tqarg(i);
while(EncoderPrefs::hasPrefs(currentGroup)){
ripMenu->insertItem(EncoderPrefs::prefs(currentGroup)->encoderName(), i);
- currentGroup = TQString("Encoder_%1").arg(++i);
+ currentGroup = TQString("Encoder_%1").tqarg(++i);
}
}
@@ -170,28 +170,28 @@ void KAudioCreator::hasCD(bool cd){
statusBar()->changeItem(i18n("No Audio CD detected"), 0 );
}
-void KAudioCreator::updateStatus() {
+void KAudioCreator::updatetqStatus() {
TQString status = i18n("Idle.");
- TQString rippingStatus;
- TQString encodingStatus;
+ TQString rippingtqStatus;
+ TQString encodingtqStatus;
int activeRippingJobs = ripper->activeJobCount();
int pendingRippingJobs = ripper->pendingJobCount();
int activeEncodingJobs = encoder->activeJobCount();
int pendingEncodingJobs = encoder->pendingJobCount();
if ( activeRippingJobs ) {
- rippingStatus = i18n("Ripping (%1 active, %2 queued)").arg( activeRippingJobs ).arg( pendingRippingJobs );
- status = rippingStatus;
+ rippingtqStatus = i18n("Ripping (%1 active, %2 queued)").tqarg( activeRippingJobs ).tqarg( pendingRippingJobs );
+ status = rippingtqStatus;
}
if ( activeEncodingJobs ) {
- encodingStatus = i18n("Encoding (%1 active, %2 queued)").arg( activeEncodingJobs ).arg( pendingEncodingJobs );
+ encodingtqStatus = i18n("Encoding (%1 active, %2 queued)").tqarg( activeEncodingJobs ).tqarg( pendingEncodingJobs );
if ( activeRippingJobs ) {
status.append(" : ");
- status.append( encodingStatus );
+ status.append( encodingtqStatus );
}
else {
- status = encodingStatus;
+ status = encodingtqStatus;
}
}
@@ -229,14 +229,14 @@ void KAudioCreator::showSettings(){
SettingsDialog *dialog = new SettingsDialog(this, "settings", Prefs::self());
connect(dialog, TQT_SIGNAL(settingsChanged()), ripper, TQT_SLOT(loadSettings()));
- connect(dialog, TQT_SIGNAL(settingsChanged()), encoder, TQT_SLOT(loadSettings()));
- connect(dialog, TQT_SIGNAL(settingsChanged()), tracks, TQT_SLOT(loadSettings()));
- connect(dialog->encoderConfigImp, TQT_SIGNAL(encoderUpdated()), encoder, TQT_SLOT(loadSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(encoder), TQT_SLOT(loadSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(tracks), TQT_SLOT(loadSettings()));
+ connect(dialog->encoderConfigImp, TQT_SIGNAL(encoderUpdated()), TQT_TQOBJECT(encoder), TQT_SLOT(loadSettings()));
dialog->show();
}
-SettingsDialog::SettingsDialog(TQWidget *parent, const char *name,KConfigSkeleton *config)
- : KConfigDialog(parent, name, config),
+SettingsDialog::SettingsDialog(TQWidget *tqparent, const char *name,KConfigSkeleton *config)
+ : KConfigDialog(tqparent, name, config),
cddb(0), cddbChanged(false)
{
addPage(new General(0, "General"), i18n("General"), "package_settings",
@@ -253,7 +253,7 @@ SettingsDialog::SettingsDialog(TQWidget *parent, const char *name,KConfigSkeleto
{
cddb->load();
addPage(cddb, i18n("CDDB"), "cdaudio_mount", i18n("CDDB Configuration"), false);
- connect(cddb, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(slotCddbChanged(bool)));
+ connect(cddb, TQT_SIGNAL(changed(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotCddbChanged(bool)));
}
}
RipConfig *rip = new RipConfig(0, "Ripper");