From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- juk/juk.cpp | 96 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'juk/juk.cpp') diff --git a/juk/juk.cpp b/juk/juk.cpp index a3e0988c..35c08dff 100644 --- a/juk/juk.cpp +++ b/juk/juk.cpp @@ -43,7 +43,7 @@ using namespace ActionCollection; // public members //////////////////////////////////////////////////////////////////////////////// -JuK::JuK(QWidget *parent, const char *name) : +JuK::JuK(TQWidget *parent, const char *name) : KMainWindow(parent, name, WDestructiveClose), m_player(PlayerManager::instance()), m_shuttingDown(false) @@ -60,7 +60,7 @@ JuK::JuK(QWidget *parent, const char *name) : setupActions(); setupLayout(); - if(QApplication::reverseLayout()) + if(TQApplication::reverseLayout()) setupGUI(ToolBar | Save | Create, "jukui-rtl.rc"); else setupGUI(ToolBar | Save | Create); @@ -71,8 +71,8 @@ JuK::JuK(QWidget *parent, const char *name) : createDirs(); SplashScreen::finishedLoading(); - QTimer::singleShot(0, CollectionList::instance(), SLOT(slotCheckCache())); - QTimer::singleShot(0, this, SLOT(slotProcessArgs())); + TQTimer::singleShot(0, CollectionList::instance(), TQT_SLOT(slotCheckCache())); + TQTimer::singleShot(0, this, TQT_SLOT(slotProcessArgs())); m_sliderAction->slotUpdateOrientation(); } @@ -99,8 +99,8 @@ void JuK::setupLayout() setCentralWidget(m_splitter); m_statusLabel = new StatusLabel(m_splitter->playlist(), statusBar()); - connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()), - m_statusLabel, SLOT(updateData())); + connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()), + m_statusLabel, TQT_SLOT(updateData())); statusBar()->addWidget(m_statusLabel, 1); PlayerManager::instance()->setStatusLabel(m_statusLabel); @@ -112,15 +112,15 @@ void JuK::setupActions() { ActionCollection::actions()->setWidget(this); - KStdAction::quit(this, SLOT(slotQuit()), actions()); - KStdAction::undo(this, SLOT(slotUndo()), actions()); - KStdAction::cut(kapp, SLOT(cut()), actions()); - KStdAction::copy(kapp, SLOT(copy()), actions()); - KStdAction::paste(kapp, SLOT(paste()), actions()); - KStdAction::clear(kapp, SLOT(clear()), actions()); - KStdAction::selectAll(kapp, SLOT(selectAll()), actions()); + KStdAction::quit(this, TQT_SLOT(slotQuit()), actions()); + KStdAction::undo(this, TQT_SLOT(slotUndo()), actions()); + KStdAction::cut(kapp, TQT_SLOT(cut()), actions()); + KStdAction::copy(kapp, TQT_SLOT(copy()), actions()); + KStdAction::paste(kapp, TQT_SLOT(paste()), actions()); + KStdAction::clear(kapp, TQT_SLOT(clear()), actions()); + KStdAction::selectAll(kapp, TQT_SLOT(selectAll()), actions()); - new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, SLOT(clear()), actions(), "removeFromPlaylist"); + new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, TQT_SLOT(clear()), actions(), "removeFromPlaylist"); KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", actions(), "actionMenu"); actionMenu->setDelayed(false); @@ -135,15 +135,15 @@ void JuK::setupActions() ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, actions(), "albumRandomPlay"); ka->setExclusiveGroup("randomPlayGroup"); - connect(ka, SIGNAL(toggled(bool)), SLOT(slotCheckAlbumNextAction(bool))); + connect(ka, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckAlbumNextAction(bool))); actionMenu->insert(ka); - new KAction(i18n("&Play"), "player_play", 0, m_player, SLOT(play()), actions(), "play"); - new KAction(i18n("P&ause"), "player_pause", 0, m_player, SLOT(pause()), actions(), "pause"); - new KAction(i18n("&Stop"), "player_stop", 0, m_player, SLOT(stop()), actions(), "stop"); + new KAction(i18n("&Play"), "player_play", 0, m_player, TQT_SLOT(play()), actions(), "play"); + new KAction(i18n("P&ause"), "player_pause", 0, m_player, TQT_SLOT(pause()), actions(), "pause"); + new KAction(i18n("&Stop"), "player_stop", 0, m_player, TQT_SLOT(stop()), actions(), "stop"); - new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, SLOT(back()), actions(), "back"); - new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, SLOT(forward()), actions(), "forward"); + new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, TQT_SLOT(back()), actions(), "back"); + new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, TQT_SLOT(forward()), actions(), "forward"); new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), actions(), "loopPlaylist"); KToggleAction *resizeColumnAction = new KToggleAction(i18n("&Resize Playlist Columns Manually"), @@ -152,12 +152,12 @@ void JuK::setupActions() // the following are not visible by default - new KAction(i18n("Mute"), "mute", 0, m_player, SLOT(mute()), actions(), "mute"); - new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, SLOT(volumeUp()), actions(), "volumeUp"); - new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, SLOT(volumeDown()), actions(), "volumeDown"); - new KAction(i18n("Play / Pause"), "playPause", 0, m_player, SLOT(playPause()), actions(), "playPause"); - new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, SLOT(seekForward()), actions(), "seekForward"); - new KAction(i18n("Seek Back"), "seekBack", 0, m_player, SLOT(seekBack()), actions(), "seekBack"); + new KAction(i18n("Mute"), "mute", 0, m_player, TQT_SLOT(mute()), actions(), "mute"); + new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, TQT_SLOT(volumeUp()), actions(), "volumeUp"); + new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, TQT_SLOT(volumeDown()), actions(), "volumeDown"); + new KAction(i18n("Play / Pause"), "playPause", 0, m_player, TQT_SLOT(playPause()), actions(), "playPause"); + new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, TQT_SLOT(seekForward()), actions(), "seekForward"); + new KAction(i18n("Seek Back"), "seekBack", 0, m_player, TQT_SLOT(seekBack()), actions(), "seekBack"); ////////////////////////////////////////////////// // settings menu @@ -179,8 +179,8 @@ void JuK::setupActions() new KToggleAction(i18n("Save &Play Queue on Exit"), KShortcut(), this, 0, actions(), "saveUpcomingTracks"); - connect(m_toggleSystemTrayAction, SIGNAL(toggled(bool)), - this, SLOT(slotToggleSystemTray(bool))); + connect(m_toggleSystemTrayAction, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleSystemTray(bool))); m_outputSelectAction = PlayerManager::playerSelectAction(actions()); @@ -188,13 +188,13 @@ void JuK::setupActions() if(m_outputSelectAction) m_outputSelectAction->setCurrentItem(0); - new KAction(i18n("&Tag Guesser..."), 0, 0, this, SLOT(slotConfigureTagGuesser()), + new KAction(i18n("&Tag Guesser..."), 0, 0, this, TQT_SLOT(slotConfigureTagGuesser()), actions(), "tagGuesserConfig"); - new KAction(i18n("&File Renamer..."), 0, 0, this, SLOT(slotConfigureFileRenamer()), + new KAction(i18n("&File Renamer..."), 0, 0, this, TQT_SLOT(slotConfigureFileRenamer()), actions(), "fileRenamerConfig"); - KStdAction::keyBindings(this, SLOT(slotEditKeys()), actions()); + KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actions()); ////////////////////////////////////////////////// // just in the toolbar @@ -213,7 +213,7 @@ void JuK::setupSystemTray() m_toggleDockOnCloseAction->setEnabled(true); m_togglePopupsAction->setEnabled(true); - connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotAboutToQuit())); + connect(m_systemTray, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotAboutToQuit())); } else { m_systemTray = 0; @@ -226,18 +226,18 @@ void JuK::setupGlobalAccels() { m_accel = new KGlobalAccel(this); - KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), SLOT(activate())); - KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), SLOT(activate())); - KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), SLOT(activate())); - KeyDialog::insert(m_accel, "Back", i18n("Back"), action("back"), SLOT(activate())); - KeyDialog::insert(m_accel, "Forward", i18n("Forward"), action("forward"), SLOT(activate())); - KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), action("seekBack"), SLOT(activate())); - KeyDialog::insert(m_accel, "SeekForward", i18n("Seek Forward"), action("seekForward"), SLOT(activate())); - KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), SLOT(activate())); - KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), SLOT(activate())); - KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), SLOT(activate())); - KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, SLOT(slotShowHide())); - KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), SLOT(activate())); + KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Back", i18n("Back"), action("back"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Forward", i18n("Forward"), action("forward"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), action("seekBack"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "SeekForward", i18n("Seek Forward"), action("seekForward"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), TQT_SLOT(activate())); + KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, TQT_SLOT(slotShowHide())); + KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), TQT_SLOT(activate())); m_accel->setConfigGroup("Shortcuts"); m_accel->readSettings(); @@ -247,7 +247,7 @@ void JuK::setupGlobalAccels() void JuK::slotProcessArgs() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QStringList files; + TQStringList files; for(int i = 0; i < args->count(); i++) files.append(args->arg(i)); @@ -257,7 +257,7 @@ void JuK::slotProcessArgs() void JuK::createDirs() { - QDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/')); + TQDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/')); if (!dir.exists("covers", false)) dir.mkdir("covers", false); dir.cd("covers"); @@ -265,7 +265,7 @@ void JuK::createDirs() dir.mkdir("large", false); } -void JuK::keyPressEvent(QKeyEvent *e) +void JuK::keyPressEvent(TQKeyEvent *e) { if (e->key() >= Qt::Key_Back && e->key() <= Qt::Key_MediaLast) e->accept(); @@ -299,7 +299,7 @@ void JuK::readConfig() ActionCollection::action("disableRandomPlay")->setChecked(true); - QString randomPlayMode = playerConfig.readEntry("RandomPlay", "Disabled"); + TQString randomPlayMode = playerConfig.readEntry("RandomPlay", "Disabled"); if(randomPlayMode == "true" || randomPlayMode == "Normal") m_randomPlayAction->setChecked(true); else if(randomPlayMode == "AlbumRandomPlay") -- cgit v1.2.1