diff options
author | Timothy Pearson <[email protected]> | 2013-01-24 13:21:05 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-24 13:21:05 -0600 |
commit | a34aeb25a3006e5a708ec955159226e8b197dc27 (patch) | |
tree | b28fca30332cff7880bce1e4d3f708d4fd212402 | |
parent | 1366d753b98b2e33452ed46656bff8764e879862 (diff) | |
download | kmplayer-a34aeb25a3006e5a708ec955159226e8b197dc27.tar.gz kmplayer-a34aeb25a3006e5a708ec955159226e8b197dc27.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/kmplayer.h | 2 | ||||
-rw-r--r-- | src/kmplayer_koffice_part.h | 2 | ||||
-rw-r--r-- | src/kmplayerapp.cpp | 30 | ||||
-rw-r--r-- | src/kmplayerbroadcast.cpp | 34 | ||||
-rw-r--r-- | src/kmplayerbroadcast.h | 6 | ||||
-rw-r--r-- | src/kmplayerconfig.cpp | 14 | ||||
-rw-r--r-- | src/kmplayercontrolpanel.cpp | 18 | ||||
-rw-r--r-- | src/kmplayerpartbase.cpp | 4 | ||||
-rw-r--r-- | src/kmplayerprocess.cpp | 142 | ||||
-rw-r--r-- | src/kmplayerprocess.h | 26 | ||||
-rw-r--r-- | src/kmplayervdr.cpp | 2 | ||||
-rw-r--r-- | src/kmplayerview.cpp | 12 | ||||
-rw-r--r-- | src/playlistview.cpp | 24 | ||||
-rw-r--r-- | src/pref.cpp | 10 |
15 files changed, 164 insertions, 164 deletions
@@ -627,7 +627,7 @@ Changes since version 0.6 - fix some memory leaks - fix ratio settings when setting a new URL from the configure dialog - make loop non default (MPlayer bug workaround) -- drop quoteURL, use KProcess:quote +- drop quoteURL, use TDEProcess:quote - add VCD menu - --enable-final fix - gcc-2.95.x compile fix diff --git a/src/kmplayer.h b/src/kmplayer.h index 4e8fb15..404a6d1 100644 --- a/src/kmplayer.h +++ b/src/kmplayer.h @@ -36,7 +36,7 @@ static const int id_status_timer = 2; class TQPopupMenu; class TQMenuItem; class TQListViewItem; -class KProcess; +class TDEProcess; class KMPlayerBroadcastConfig; class KMPlayerFFServerConfig; class KSystemTray; diff --git a/src/kmplayer_koffice_part.h b/src/kmplayer_koffice_part.h index 0520d50..ec71061 100644 --- a/src/kmplayer_koffice_part.h +++ b/src/kmplayer_koffice_part.h @@ -37,7 +37,7 @@ #include "kmplayersource.h" -class KProcess; +class TDEProcess; class TDEAboutData; class KMPlayer; class TDEInstance; diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp index 9bc2c05..0b7ccde 100644 --- a/src/kmplayerapp.cpp +++ b/src/kmplayerapp.cpp @@ -585,7 +585,7 @@ KDE_NO_EXPORT void KMPlayerApp::initActions () { new KAction (i18n ("&Open VCD"), TQString ("cdrom_mount"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openVCD ()), ac, "openvcd"); new KAction (i18n ("&Open Audio CD"), TQString ("cdrom_mount"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openAudioCD ()), ac, "openaudiocd"); new KAction (i18n ("&Open Pipe..."), TQString ("pipe"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT(openPipe ()), ac, "source_pipe"); - //KGlobal::iconLoader ()->loadIconSet (TQString ("tv"), KIcon::Small, 0,true) + //TDEGlobal::iconLoader ()->loadIconSet (TQString ("tv"), KIcon::Small, 0,true) new KAction (i18n ("&Connect"), TQString ("connect_established"), KShortcut (), TQT_TQOBJECT(this), TQT_SLOT (openVDR ()), ac, "vdr_connect"); editVolumeInc = new KAction (i18n ("Increase Volume"), TQString ("player_volume"), KShortcut (), m_player, TQT_SLOT (increaseVolume ()), ac, "edit_volume_up"); editVolumeDec = new KAction (i18n ("Decrease Volume"), TQString ("player_volume"), KShortcut (), m_player, TQT_SLOT(decreaseVolume ()), ac, "edit_volume_down"); @@ -642,7 +642,7 @@ KDE_NO_EXPORT void KMPlayerApp::initMenu () { menuBar ()->insertItem (i18n ("&Bookmarks"), bookmarkmenu, -1, 2); m_sourcemenu = menuBar ()->findItem (menuBar ()->idAt (0)); m_sourcemenu->setText (i18n ("S&ource")); - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("dvd_mount"), KIcon::Small, 0, true), i18n ("&DVD"), m_dvdmenu, -1, 5); + m_sourcemenu->popup ()->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("dvd_mount"), KIcon::Small, 0, true), i18n ("&DVD"), m_dvdmenu, -1, 5); m_dvdmenu->clear (); #ifdef HAVE_XINE m_dvdnavmenu->clear (); @@ -652,11 +652,11 @@ KDE_NO_EXPORT void KMPlayerApp::initMenu () { #else m_dvdmenu->insertItem (i18n ("&Open DVD"), TQT_TQOBJECT(this), TQT_SLOT(openDVD ()), 0,-1, 1); #endif - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("V&CD"), m_vcdmenu, -1, 6); + m_sourcemenu->popup ()->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("V&CD"), m_vcdmenu, -1, 6); m_vcdmenu->clear (); - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("tv"), KIcon::Small, 0, true), i18n ("&TV"), m_tvmenu, -1, 8); + m_sourcemenu->popup ()->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("tv"), KIcon::Small, 0, true), i18n ("&TV"), m_tvmenu, -1, 8); m_vcdmenu->insertItem (i18n ("&Open VCD"), TQT_TQOBJECT(this), TQT_SLOT(openVCD ()), 0,-1, 1); - m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("&Audio CD"), m_audiocdmenu, -1, 7); + m_sourcemenu->popup ()->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("cdrom_mount"), KIcon::Small, 0, true), i18n ("&Audio CD"), m_audiocdmenu, -1, 7); m_audiocdmenu->insertItem (i18n ("&Open Audio CD"), TQT_TQOBJECT(this), TQT_SLOT(openAudioCD ()), 0,-1, 1); } @@ -705,10 +705,10 @@ KDE_NO_EXPORT void KMPlayerApp::initView () { TQT_TQOBJECT(this), TQT_SLOT (playListItemMoved ())); connect (m_view->playList(), TQT_SIGNAL (prepareMenu (KMPlayer::PlayListItem *, TQPopupMenu *)), TQT_TQOBJECT(this), TQT_SLOT (preparePlaylistMenu (KMPlayer::PlayListItem *, TQPopupMenu *))); m_dropmenu = new TQPopupMenu (m_view->playList ()); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("&Add to list"), TQT_TQOBJECT(this), TQT_SLOT (menuDropInList ())); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("folder_grey"), KIcon::Small, 0, true), i18n ("Add in new &Group"), TQT_TQOBJECT(this), TQT_SLOT (menuDropInGroup ())); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("editcopy"), KIcon::Small, 0, true), i18n ("&Copy here"), TQT_TQOBJECT(this), TQT_SLOT (menuCopyDrop ())); - m_dropmenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete"), TQT_TQOBJECT(this), TQT_SLOT (menuDeleteNode ())); + m_dropmenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("&Add to list"), TQT_TQOBJECT(this), TQT_SLOT (menuDropInList ())); + m_dropmenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("folder_grey"), KIcon::Small, 0, true), i18n ("Add in new &Group"), TQT_TQOBJECT(this), TQT_SLOT (menuDropInGroup ())); + m_dropmenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("editcopy"), KIcon::Small, 0, true), i18n ("&Copy here"), TQT_TQOBJECT(this), TQT_SLOT (menuCopyDrop ())); + m_dropmenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete"), TQT_TQOBJECT(this), TQT_SLOT (menuDeleteNode ())); /*TQPopupMenu * viewmenu = new TQPopupMenu; viewmenu->insertItem (i18n ("Full Screen"), TQT_TQOBJECT(this), TQT_SLOT(fullScreen ()), TQKeySequence ("CTRL + Key_F")); @@ -937,7 +937,7 @@ KDE_NO_EXPORT void IntroSource::activate () { "<seq begin='reg1.activateEvent'/>" "</excl>" "</body></smil>" - ).arg (locate ("data", "kmplayer/noise.gif")).arg (KGlobal::iconLoader()->iconPath (TQString::fromLatin1 ("kmplayer"), -64)); + ).arg (locate ("data", "kmplayer/noise.gif")).arg (TDEGlobal::iconLoader()->iconPath (TQString::fromLatin1 ("kmplayer"), -64)); TQTextStream ts (smil.utf8 (), IO_ReadOnly); KMPlayer::readXML (m_document, ts, TQString (), false); } @@ -1287,7 +1287,7 @@ KDE_NO_EXPORT void ExitSource::activate () { //"<animate target='reg1' attribute='background-color' calcMode='discrete' values='#FFFFFF;#E4E4E4;#CCCCCC;#B4B4B4;#9E9E9E;#8A8A8A;#777777;#656565;#555555;#464646;#393939;#2D2D2D;#222222;#191919;#111111;#0B0B0B;#060606;#020202;#000000;#000000' dur='0.6'/>" "<img src='%2' id='img1' region='image' dur='0.4' fit='hidden' transOut='pw'/>" "</par>" - "</body></smil>").arg (KGlobal::iconLoader()->iconPath (TQString::fromLatin1 ("kmplayer"), -64)); + "</body></smil>").arg (TDEGlobal::iconLoader()->iconPath (TQString::fromLatin1 ("kmplayer"), -64)); TQTextStream ts (smil.utf8 (), IO_ReadOnly); KMPlayer::readXML (m_document, ts, TQString (), false); } @@ -1669,12 +1669,12 @@ KDE_NO_EXPORT void KMPlayerApp::preparePlaylistMenu (KMPlayer::PlayListItem * it pm->insertSeparator (); manip_node = item->node; if (ri->flags & KMPlayer::PlayListView::Deleteable) - pm->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete item"), TQT_TQOBJECT(this), TQT_SLOT (menuDeleteNode ())); + pm->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("editdelete"), KIcon::Small, 0, true), i18n ("&Delete item"), TQT_TQOBJECT(this), TQT_SLOT (menuDeleteNode ())); if (ri->flags & KMPlayer::PlayListView::Moveable) { if (manip_node->previousSibling ()) - pm->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("up"), KIcon::Small, 0, true), i18n ("&Move up"), TQT_TQOBJECT(this), TQT_SLOT (menuMoveUpNode ())); + pm->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("up"), KIcon::Small, 0, true), i18n ("&Move up"), TQT_TQOBJECT(this), TQT_SLOT (menuMoveUpNode ())); if (manip_node->nextSibling ()) - pm->insertItem (KGlobal::iconLoader()->loadIconSet (TQString ("down"), KIcon::Small, 0, true), i18n ("Move &down"), TQT_TQOBJECT(this), TQT_SLOT (menuMoveDownNode ())); + pm->insertItem (TDEGlobal::iconLoader()->loadIconSet (TQString ("down"), KIcon::Small, 0, true), i18n ("Move &down"), TQT_TQOBJECT(this), TQT_SLOT (menuMoveDownNode ())); } } } @@ -1706,7 +1706,7 @@ KDE_NO_EXPORT void KMPlayerApp::configChanged () { viewKeepRatio->setChecked (m_player->settings ()->sizeratio); if (m_player->settings ()->docksystray && !m_systray) { m_systray = new KSystemTray (this); - m_systray->setPixmap (KGlobal::iconLoader ()->loadIcon (TQString ("kmplayer"), KIcon::NoGroup, 22)); + m_systray->setPixmap (TDEGlobal::iconLoader ()->loadIcon (TQString ("kmplayer"), KIcon::NoGroup, 22)); m_systray->show (); } else if (!m_player->settings ()->docksystray && m_systray) { delete m_systray; diff --git a/src/kmplayerbroadcast.cpp b/src/kmplayerbroadcast.cpp index 4723c26..197d7e5 100644 --- a/src/kmplayerbroadcast.cpp +++ b/src/kmplayerbroadcast.cpp @@ -374,24 +374,24 @@ KDE_NO_EXPORT void KMPlayerPrefBroadcastFormatPage::slotDelete () { //----------------------------------------------------------------------------- -static bool stopProcess (KProcess * process, const char * cmd = 0L) { +static bool stopProcess (TDEProcess * process, const char * cmd = 0L) { if (!process || !process->isRunning ()) return true; do { if (cmd) process->writeStdin (cmd, strlen (cmd)); - KProcessController::theKProcessController->waitForProcessExit (1); + TDEProcessController::theTDEProcessController->waitForProcessExit (1); if (!process->isRunning ()) break; process->kill (SIGINT); - KProcessController::theKProcessController->waitForProcessExit (3); + TDEProcessController::theTDEProcessController->waitForProcessExit (3); if (!process->isRunning ()) break; process->kill (SIGTERM); - KProcessController::theKProcessController->waitForProcessExit (1); + TDEProcessController::theTDEProcessController->waitForProcessExit (1); if (!process->isRunning ()) break; process->kill (SIGKILL); - KProcessController::theKProcessController->waitForProcessExit (1); + TDEProcessController::theTDEProcessController->waitForProcessExit (1); if (process->isRunning ()) { return false; // give up } @@ -486,10 +486,10 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startServer () { return; } m_configpage->setCursor (TQCursor (TQt::WaitCursor)); - m_ffserver_process = new KProcess; + m_ffserver_process = new TDEProcess; m_ffserver_process->setUseShell (true); - connect (m_ffserver_process, TQT_SIGNAL (processExited (KProcess *)), - this, TQT_SLOT (processStopped (KProcess *))); + connect (m_ffserver_process, TQT_SIGNAL (processExited (TDEProcess *)), + this, TQT_SLOT (processStopped (TDEProcess *))); TQString conffile = locateLocal ("data", "kmplayer/ffserver.conf"); const char * noaudio = m_player->source ()->audioDevice ().isEmpty () ? "NoAudio" : ""; FFServerSetting ffs; @@ -512,9 +512,9 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startServer () { *m_ffserver_process << "ffserver -f " << conffile; m_ffserver_out.truncate (0); connect (m_ffserver_process, - TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); - m_ffserver_process->start (KProcess::NotifyOnExit, KProcess::Stderr); + TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); + m_ffserver_process->start (TDEProcess::NotifyOnExit, TDEProcess::Stderr); if (m_ffserver_process->isRunning ()) { m_configpage->startbutton->setText (i18n ("Stop")); m_configpage->serverled->setState (KLed::On); @@ -531,7 +531,7 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::stopServer () { KMessageBox::error (m_configpage, i18n ("Failed to end ffserver process."), i18n ("Error")); } -KDE_NO_EXPORT void KMPlayerBroadcastConfig::processOutput (KProcess * p, char * s, int) { +KDE_NO_EXPORT void KMPlayerBroadcastConfig::processOutput (TDEProcess * p, char * s, int) { if (p == m_ffserver_process) m_ffserver_out += TQString (s); } @@ -548,8 +548,8 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::startFeed () { KMessageBox::error (m_configpage, i18n ("Failed to start ffserver.\n") + m_ffserver_out, i18n ("Error")); goto bail_out; } - disconnect (m_ffserver_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); + disconnect (m_ffserver_process, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); if (m_ffmpeg_process) m_ffmpeg_process->stop (); delete m_ffmpeg_process; @@ -582,15 +582,15 @@ KDE_NO_EXPORT void KMPlayerBroadcastConfig::stateChange (KMPlayer::Process::Stat kdDebug () << "ffmpeg process stopped " << m_endserver << endl; if (m_endserver && !stopProcess (m_ffserver_process)) { disconnect (m_ffserver_process, - TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); + TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); KMessageBox::error (m_configpage, i18n ("Failed to end ffserver process."), i18n ("Error")); processStopped (0L); } } } -KDE_NO_EXPORT void KMPlayerBroadcastConfig::processStopped (KProcess *) { +KDE_NO_EXPORT void KMPlayerBroadcastConfig::processStopped (TDEProcess *) { kdDebug () << "ffserver process stopped" << endl; if (m_configpage) { m_configpage->serverled->setState (KLed::Off); diff --git a/src/kmplayerbroadcast.h b/src/kmplayerbroadcast.h index eff7bf5..d3c5cd2 100644 --- a/src/kmplayerbroadcast.h +++ b/src/kmplayerbroadcast.h @@ -176,8 +176,8 @@ signals: void broadcastStarted (); void broadcastStopped (); private slots: - void processOutput (KProcess *, char *, int); - void processStopped (KProcess * process); + void processOutput (TDEProcess *, char *, int); + void processStopped (TDEProcess * process); void startServer (); void startFeed (); void stateChange (KMPlayer::Process::State, KMPlayer::Process::State); @@ -187,7 +187,7 @@ private: KMPlayerFFServerConfig * m_ffserverconfig; TQGuardedPtr <KMPlayerPrefBroadcastFormatPage> m_configpage; KMPlayer::FFMpeg * m_ffmpeg_process; - KProcess * m_ffserver_process; + TDEProcess * m_ffserver_process; bool m_endserver; TQString m_ffserver_out; TQString m_ffserver_url; diff --git a/src/kmplayerconfig.cpp b/src/kmplayerconfig.cpp index 64b6bcd..3337585 100644 --- a/src/kmplayerconfig.cpp +++ b/src/kmplayerconfig.cpp @@ -89,14 +89,14 @@ KDE_NO_CDTOR_EXPORT Settings::Settings (PartBase * player, KConfig * config) videodrivers = _vds; colors [ColorSetting::playlist_background].title = i18n ("Playlist background"); colors [ColorSetting::playlist_background].option = "PlaylistBackground"; - colors [ColorSetting::playlist_background].color = KGlobalSettings::baseColor (); + colors [ColorSetting::playlist_background].color = TDEGlobalSettings::baseColor (); colors [ColorSetting::playlist_foreground].title = i18n ("Playlist foreground"); colors [ColorSetting::playlist_foreground].option = "PlaylistForeground"; - colors [ColorSetting::playlist_foreground].color = KGlobalSettings::textColor(); + colors [ColorSetting::playlist_foreground].color = TDEGlobalSettings::textColor(); colors [ColorSetting::console_background].title =i18n("Console background"); colors [ColorSetting::playlist_active].title = i18n("Playlist active item"); colors [ColorSetting::playlist_active].option = "PlaylistActive"; - colors [ColorSetting::playlist_active].color = KGlobalSettings::linkColor(); + colors [ColorSetting::playlist_active].color = TDEGlobalSettings::linkColor(); colors [ColorSetting::console_background].option = "ConsoleBackground"; colors [ColorSetting::console_background].color = TQColor (0, 0, 0); colors [ColorSetting::console_foreground].title = i18n ("Console foreground"); @@ -110,17 +110,17 @@ KDE_NO_CDTOR_EXPORT Settings::Settings (PartBase * player, KConfig * config) colors [ColorSetting::area_background].color = TQColor (0, 0, 0); colors [ColorSetting::infowindow_background].title = i18n ("Info window background"); colors [ColorSetting::infowindow_background].option ="InfoWindowBackground"; - colors [ColorSetting::infowindow_background].color = KGlobalSettings::baseColor (); + colors [ColorSetting::infowindow_background].color = TDEGlobalSettings::baseColor (); colors [ColorSetting::infowindow_foreground].title = i18n ("Info window foreground"); colors [ColorSetting::infowindow_foreground].option ="InfoWindowForeground"; - colors [ColorSetting::infowindow_foreground].color = KGlobalSettings::textColor(); + colors [ColorSetting::infowindow_foreground].color = TDEGlobalSettings::textColor(); fonts [FontSetting::playlist].title = i18n ("Playlist"); fonts [FontSetting::playlist].option = "PlaylistFont"; - fonts [FontSetting::playlist].font = KGlobalSettings::generalFont(); + fonts [FontSetting::playlist].font = TDEGlobalSettings::generalFont(); fonts [FontSetting::playlist].font.setItalic (true); fonts [FontSetting::infowindow].title = i18n ("Info window"); fonts [FontSetting::infowindow].option = "InfoWindowFont"; - fonts [FontSetting::infowindow].font = KGlobalSettings::generalFont(); + fonts [FontSetting::infowindow].font = TDEGlobalSettings::generalFont(); } KDE_NO_CDTOR_EXPORT Settings::~Settings () { diff --git a/src/kmplayercontrolpanel.cpp b/src/kmplayercontrolpanel.cpp index 73f4756..9ebda28 100644 --- a/src/kmplayercontrolpanel.cpp +++ b/src/kmplayercontrolpanel.cpp @@ -383,11 +383,11 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * parent, View * view) m_popupMenu->insertItem (i18n ("&Play with"), m_playerMenu, menu_player); m_bookmarkMenu = new KMPlayerPopupMenu (this); m_popupMenu->insertItem (i18n("&Bookmarks"), m_bookmarkMenu, menu_bookmark); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole"), menu_video); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("Play&list"), menu_playlist); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("empty"), KIcon::Small, 0, true), i18n ("Minimal mode"), menu_minimal); + m_popupMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole"), menu_video); + m_popupMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("player_playlist"), KIcon::Small, 0, true), i18n ("Play&list"), menu_playlist); + m_popupMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("empty"), KIcon::Small, 0, true), i18n ("Minimal mode"), menu_minimal); m_popupMenu->setAccel (TQKeySequence (TQt::Key_M), menu_minimal); - m_popupMenu->insertItem (KGlobal::iconLoader()->loadIconSet (TQString ("window_fullscreen"), KIcon::Small, 0, true), i18n ("&Full Screen"), menu_fullscreen); + m_popupMenu->insertItem (TDEGlobal::iconLoader()->loadIconSet (TQString ("window_fullscreen"), KIcon::Small, 0, true), i18n ("&Full Screen"), menu_fullscreen); m_popupMenu->setAccel (TQKeySequence (TQt::Key_F), menu_fullscreen); m_zoomMenu = new KMPlayerPopupMenu (this); m_zoomMenu->insertItem (i18n ("50%"), menu_zoom50); @@ -395,14 +395,14 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * parent, View * view) m_zoomMenu->insertItem (i18n ("150%"), menu_zoom150); m_zoomMenu->insertItem (i18n ("200%"), menu_zoom200); m_zoomMenu->insertItem (i18n ("300%"), menu_zoom300); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("viewmag"), KIcon::Small, 0, false), i18n ("&Zoom"), m_zoomMenu, menu_zoom); + m_popupMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("viewmag"), KIcon::Small, 0, false), i18n ("&Zoom"), m_zoomMenu, menu_zoom); m_popupMenu->insertSeparator (); m_colorMenu = new KMPlayerPopupMenu (this); m_languageMenu = new KMPlayerPopupMenu (this); m_audioMenu = new KMPlayerPopupMenu (this); m_subtitleMenu = new KMPlayerPopupMenu (this); - m_languageMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("mime-sound"), KIcon::Small, 0, true), i18n ("&Audio languages"), m_audioMenu); - m_languageMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("view_text"), KIcon::Small, 0, true), i18n ("&Subtitles"), m_subtitleMenu); + m_languageMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("mime-sound"), KIcon::Small, 0, true), i18n ("&Audio languages"), m_audioMenu); + m_languageMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("view_text"), KIcon::Small, 0, true), i18n ("&Subtitles"), m_subtitleMenu); TQLabel * label = new TQLabel (i18n ("Contrast:"), m_colorMenu); m_colorMenu->insertItem (label); m_contrastSlider = new TQSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); @@ -419,9 +419,9 @@ KDE_NO_CDTOR_EXPORT ControlPanel::ControlPanel(TQWidget * parent, View * view) m_colorMenu->insertItem (label); m_saturationSlider = new TQSlider (-100, 100, 10, 0, Qt::Horizontal, m_colorMenu); m_colorMenu->insertItem (m_saturationSlider); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("colorize"), KIcon::Small, 0, true), i18n ("Co&lors"), m_colorMenu); + m_popupMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("colorize"), KIcon::Small, 0, true), i18n ("Co&lors"), m_colorMenu); m_popupMenu->insertSeparator (); - m_popupMenu->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("configure"), KIcon::Small, 0, true), i18n ("&Configure KMPlayer..."), menu_config); + m_popupMenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("configure"), KIcon::Small, 0, true), i18n ("&Configure KMPlayer..."), menu_config); setAutoControls (true); connect (m_buttons [button_config], TQT_SIGNAL (clicked ()), this, TQT_SLOT (buttonClicked ())); diff --git a/src/kmplayerpartbase.cpp b/src/kmplayerpartbase.cpp index 4f0349a..a4fa5d4 100644 --- a/src/kmplayerpartbase.cpp +++ b/src/kmplayerpartbase.cpp @@ -137,9 +137,9 @@ PartBase::PartBase (TQWidget * wparent, const char *wname, TQString localbmfile = locateLocal ("data", "kmplayer/bookmarks.xml"); if (localbmfile != bmfile) { kdDebug () << "cp " << bmfile << " " << localbmfile << endl; - KProcess p; + TDEProcess p; p << "/bin/cp" << TQString(TQFile::encodeName (bmfile)) << TQString(TQFile::encodeName (localbmfile)); - p.start (KProcess::Block); + p.start (TDEProcess::Block); } m_bookmark_manager = new BookmarkManager (localbmfile); m_bookmark_owner = new BookmarkOwner (this); diff --git a/src/kmplayerprocess.cpp b/src/kmplayerprocess.cpp index 13b3309..ff230a9 100644 --- a/src/kmplayerprocess.cpp +++ b/src/kmplayerprocess.cpp @@ -99,7 +99,7 @@ TQString Process::menuName () const { void Process::initProcess (Viewer * viewer) { m_viewer = viewer; delete m_process; - m_process = new KProcess; + m_process = new TDEProcess; m_process->setUseShell (true); m_process->setEnvironment (TQString::fromLatin1 ("SESSION_MANAGER"), TQString::fromLatin1 ("")); if (m_source) m_source->setPosition (0); @@ -171,11 +171,11 @@ bool Process::quit () { signal(SIGTERM, oldhandler); } else m_process->kill (SIGTERM); - KProcessController::theKProcessController->waitForProcessExit (1); + TDEProcessController::theTDEProcessController->waitForProcessExit (1); if (!m_process->isRunning ()) break; m_process->kill (SIGKILL); - KProcessController::theKProcessController->waitForProcessExit (1); + TDEProcessController::theTDEProcessController->waitForProcessExit (1); if (m_process->isRunning ()) { KMessageBox::error (viewer (), i18n ("Failed to end player process."), i18n ("Error")); } @@ -267,7 +267,7 @@ static bool proxyForURL (const KURL& url, TQString& proxy) { KDE_NO_CDTOR_EXPORT MPlayerBase::MPlayerBase (TQObject * parent, Settings * settings, const char * n) : Process (parent, settings, n), m_use_slave (true) { - m_process = new KProcess; + m_process = new TDEProcess; } KDE_NO_CDTOR_EXPORT MPlayerBase::~MPlayerBase () { @@ -281,10 +281,10 @@ KDE_NO_EXPORT void MPlayerBase::initProcess (Viewer * viewer) { if (KProtocolManager::useProxy () && proxyForURL (url, proxy_url)) m_process->setEnvironment("http_proxy", proxy_url); } - connect (m_process, TQT_SIGNAL (wroteStdin (KProcess *)), - this, TQT_SLOT (dataWritten (KProcess *))); - connect (m_process, TQT_SIGNAL (processExited (KProcess *)), - this, TQT_SLOT (processStopped (KProcess *))); + connect (m_process, TQT_SIGNAL (wroteStdin (TDEProcess *)), + this, TQT_SLOT (dataWritten (TDEProcess *))); + connect (m_process, TQT_SIGNAL (processExited (TDEProcess *)), + this, TQT_SLOT (processStopped (TDEProcess *))); } KDE_NO_EXPORT bool MPlayerBase::sendCommand (const TQString & cmd) { @@ -309,8 +309,8 @@ KDE_NO_EXPORT bool MPlayerBase::stop () { KDE_NO_EXPORT bool MPlayerBase::quit () { if (playing ()) { stop (); - disconnect (m_process, TQT_SIGNAL (processExited (KProcess *)), - this, TQT_SLOT (processStopped (KProcess *))); + disconnect (m_process, TQT_SIGNAL (processExited (TDEProcess *)), + this, TQT_SLOT (processStopped (TDEProcess *))); if (!m_use_slave) { void (*oldhandler)(int) = signal(SIGTERM, SIG_IGN); ::kill (-1 * ::getpid (), SIGTERM); @@ -322,7 +322,7 @@ KDE_NO_EXPORT bool MPlayerBase::quit () { TQTime t; t.start (); do { - KProcessController::theKProcessController->waitForProcessExit (2); + TDEProcessController::theTDEProcessController->waitForProcessExit (2); } while (t.elapsed () < 2000 && m_process->isRunning ()); #endif if (m_process->isRunning ()) @@ -333,7 +333,7 @@ KDE_NO_EXPORT bool MPlayerBase::quit () { return Process::quit (); } -KDE_NO_EXPORT void MPlayerBase::dataWritten (KProcess *) { +KDE_NO_EXPORT void MPlayerBase::dataWritten (TDEProcess *) { if (!commands.size ()) return; kdDebug() << "eval done " << commands.last () << endl; commands.pop_back (); @@ -342,7 +342,7 @@ KDE_NO_EXPORT void MPlayerBase::dataWritten (KProcess *) { commands.last ().length ()); } -KDE_NO_EXPORT void MPlayerBase::processStopped (KProcess *) { +KDE_NO_EXPORT void MPlayerBase::processStopped (TDEProcess *) { kdDebug() << "process stopped" << endl; commands.clear (); setState (Ready); @@ -424,7 +424,7 @@ KDE_NO_EXPORT bool MPlayer::deMediafiedPlay () { m_url = TQString ("cdda://") + m_url.mid (6); } if (url.protocol () != TQString ("stdin")) - args += KProcess::quote (TQString (TQFile::encodeName (m_url))); + args += TDEProcess::quote (TQString (TQFile::encodeName (m_url))); } m_tmpURL.truncate (0); if (!m_source->identified () && !m_settings->mplayerpost090) { @@ -441,7 +441,7 @@ KDE_NO_EXPORT bool MPlayer::deMediafiedPlay () { const KURL & sub_url (m_source->subUrl ()); if (!sub_url.isEmpty ()) { TQString myurl (sub_url.isLocalFile () ? getPath (sub_url) : sub_url.url ()); - args += KProcess::quote (TQString (TQFile::encodeName (myurl))); + args += TDEProcess::quote (TQString (TQFile::encodeName (myurl))); } } } @@ -523,10 +523,10 @@ KDE_NO_EXPORT bool MPlayer::brightness (int val, bool /*absolute*/) { bool MPlayer::run (const char * args, const char * pipe) { //m_view->consoleOutput ()->clear (); m_process_output = TQString (); - connect (m_process, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); m_use_slave = !(pipe && pipe[0]); if (!m_use_slave) { fprintf (stderr, "%s | ", pipe); @@ -601,7 +601,7 @@ bool MPlayer::run (const char * args, const char * pipe) { if (!plops.isNull ()) { TQStringList sl = TQStringList::split (TQChar (' '), plops); for (int i = 0; i < sl.size (); ++i) { - TQString plop = KProcess::quote (sl[i]); + TQString plop = TDEProcess::quote (sl[i]); fprintf (stderr, " %s", plop.ascii ()); *m_process << " " << plop; } @@ -618,7 +618,7 @@ bool MPlayer::run (const char * args, const char * pipe) { for ( it = m_process->args().begin(); it != end; ++it ){ sMPArgs += (*it); } - m_process->start (KProcess::NotifyOnExit, KProcess::All); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::All); old_volume = viewer ()->view ()->controlPanel ()->volumeBar ()->value (); @@ -641,18 +641,18 @@ KDE_NO_EXPORT bool MPlayer::grabPicture (const KURL & url, int pos) { args += "-vo jpeg:outdir="; else args += "-vo jpeg -jpeg outdir="; - args += KProcess::quote (outdir); + args += TDEProcess::quote (outdir); args += TQString (" -frames 1 -nosound -quiet "); if (pos > 0) args += TQString ("-ss %1 ").arg (pos); - args += KProcess::quote (TQString (TQFile::encodeName (myurl))); + args += TDEProcess::quote (TQString (TQFile::encodeName (myurl))); *m_process << args; kdDebug () << args << endl; - m_process->start (KProcess::NotifyOnExit, KProcess::NoCommunication); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::NoCommunication); return m_process->isRunning (); } -KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { +KDE_NO_EXPORT void MPlayer::processOutput (TDEProcess *, char * str, int slen) { if (!viewer () || slen <= 0) return; View * v = viewer ()->view (); @@ -809,7 +809,7 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) { } while (slen > 0); } -KDE_NO_EXPORT void MPlayer::processStopped (KProcess * p) { +KDE_NO_EXPORT void MPlayer::processStopped (TDEProcess * p) { if (p && !m_grabfile.isEmpty ()) { emit grabReady (m_grabfile); m_grabfile.truncate (0); @@ -1026,12 +1026,12 @@ bool MEncoder::deMediafiedPlay () { else if (!post090 && myurl.startsWith (TQString ("dvd://"))) args += myurl.replace (0, 6, TQString (" -dvd ")); else - args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl))); + args += ' ' + TDEProcess::quote (TQString (TQFile::encodeName (myurl))); } - TQString outurl = KProcess::quote (TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); + TQString outurl = TDEProcess::quote (TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); kdDebug () << args << " -o " << outurl << endl; *m_process << args << " -o " << outurl; - m_process->start (KProcess::NotifyOnExit, KProcess::NoCommunication); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::NoCommunication); success = m_process->isRunning (); if (success) setState (Playing); @@ -1088,12 +1088,12 @@ bool MPlayerDumpstream::deMediafiedPlay () { else if (!post090 && myurl.startsWith (TQString ("dvd://"))) args += myurl.replace (0, 6, TQString (" -dvd ")); else - args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl))); + args += ' ' + TDEProcess::quote (TQString (TQFile::encodeName (myurl))); } - TQString outurl = KProcess::quote (TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); + TQString outurl = TDEProcess::quote (TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ()))); kdDebug () << args << " -dumpstream -dumpfile " << outurl << endl; *m_process << args << " -dumpstream -dumpfile " << outurl; - m_process->start (KProcess::NotifyOnExit, KProcess::NoCommunication); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::NoCommunication); success = m_process->isRunning (); if (success) setState (Playing); @@ -1349,7 +1349,7 @@ bool CallbackProcess::quit () { TQTime t; t.start (); do { - KProcessController::theKProcessController->waitForProcessExit (2); + TDEProcessController::theTDEProcessController->waitForProcessExit (2); } while (t.elapsed () < 1000 && m_process->isRunning ()); #endif } @@ -1427,20 +1427,20 @@ TQString CallbackProcess::dcopName () { void CallbackProcess::initProcess (Viewer * viewer) { Process::initProcess (viewer); - connect (m_process, TQT_SIGNAL (processExited (KProcess *)), - this, TQT_SLOT (processStopped (KProcess *))); - connect (m_process, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (processExited (TDEProcess *)), + this, TQT_SLOT (processStopped (TDEProcess *))); + connect (m_process, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); } -KDE_NO_EXPORT void CallbackProcess::processOutput (KProcess *, char * str, int slen) { +KDE_NO_EXPORT void CallbackProcess::processOutput (TDEProcess *, char * str, int slen) { if (viewer () && slen > 0) viewer ()->view ()->addText (TQString::fromLocal8Bit (str, slen)); } -KDE_NO_EXPORT void CallbackProcess::processStopped (KProcess *) { +KDE_NO_EXPORT void CallbackProcess::processStopped (TDEProcess *) { if (m_source) ((PlayListNotify *) m_source)->setInfoMessage (TQString ()); delete m_backend; @@ -1694,7 +1694,7 @@ KDE_NO_CDTOR_EXPORT Xine::~Xine () {} bool Xine::ready (Viewer * viewer) { initProcess (viewer); viewer->changeProtocol (QXEmbed::XPLAIN); - TQString xine_config = KProcess::quote (TQString (TQFile::encodeName (locateLocal ("data", "kmplayer/") + TQString ("xine_config")))); + TQString xine_config = TDEProcess::quote (TQString (TQFile::encodeName (locateLocal ("data", "kmplayer/") + TQString ("xine_config")))); m_request_seek = -1; if (m_source && !m_source->pipeCmd ().isEmpty ()) { fprintf (stderr, "%s | ", m_source->pipeCmd ().ascii ()); @@ -1738,13 +1738,13 @@ bool Xine::ready (Viewer * viewer) { *m_process << " -vd " << m_source->videoDevice (); } if (!m_recordurl.isEmpty ()) { - TQString rf = KProcess::quote ( + TQString rf = TDEProcess::quote ( TQString (TQFile::encodeName (getPath (m_recordurl)))); fprintf (stderr, " -rec %s", rf.ascii ()); *m_process << " -rec " << rf; } fprintf (stderr, "\n"); - m_process->start (KProcess::NotifyOnExit, KProcess::All); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::All); return m_process->isRunning (); } @@ -1798,7 +1798,7 @@ KDE_NO_EXPORT bool GStreamer::ready (Viewer * viewer) { *m_process << " -vcd-device " << m_settings->vcddevice; } fprintf (stderr, "\n"); - m_process->start (KProcess::NotifyOnExit, KProcess::All); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::All); return m_process->isRunning (); } @@ -1822,8 +1822,8 @@ KDE_NO_EXPORT void FFMpeg::init () { bool FFMpeg::deMediafiedPlay () { initProcess (viewer ()); KURL url (m_url); - connect (m_process, TQT_SIGNAL (processExited (KProcess *)), - this, TQT_SLOT (processStopped (KProcess *))); + connect (m_process, TQT_SIGNAL (processExited (TDEProcess *)), + this, TQT_SLOT (processStopped (TDEProcess *))); TQString outurl = TQString (TQFile::encodeName (m_recordurl.isLocalFile () ? getPath (m_recordurl) : m_recordurl.url ())); if (m_recordurl.isLocalFile ()) TQFile (outurl).remove (); @@ -1838,30 +1838,30 @@ bool FFMpeg::deMediafiedPlay () { cmd += TQString (" -ad ") + m_source->audioDevice (); else cmd += TQString (" -an"); - KProcess process; + TDEProcess process; process.setUseShell (true); if (!m_source->videoNorm ().isEmpty ()) { process << "v4lctl -c " << m_source->videoDevice () << " setnorm " << m_source->videoNorm (); kdDebug () << "v4lctl -c " << m_source->videoDevice () << " setnorm " << m_source->videoNorm () << endl; - process.start (KProcess::Block); + process.start (TDEProcess::Block); cmd += TQString (" -tvstd ") + m_source->videoNorm (); } if (m_source->frequency () > 0) { process.clearArguments(); process << "v4lctl -c " << m_source->videoDevice () << " setfreq " << TQString::number (m_source->frequency ()); kdDebug () << "v4lctl -c " << m_source->videoDevice () << " setfreq " << m_source->frequency () << endl; - process.start (KProcess::Block); + process.start (TDEProcess::Block); } } else { - cmd += TQString ("-i ") + KProcess::quote (TQString (TQFile::encodeName (url.isLocalFile () ? getPath (url) : url.url ()))); + cmd += TQString ("-i ") + TDEProcess::quote (TQString (TQFile::encodeName (url.isLocalFile () ? getPath (url) : url.url ()))); } cmd += TQChar (' ') + m_settings->ffmpegarguments; - cmd += TQChar (' ') + KProcess::quote (TQString (TQFile::encodeName (outurl))); + cmd += TQChar (' ') + TDEProcess::quote (TQString (TQFile::encodeName (outurl))); fprintf (stderr, "%s\n", (const char *) cmd.local8Bit ()); *m_process << cmd; // FIXME if (m_player->source () == source) // ugly // m_player->stop (); - m_process->start (KProcess::NotifyOnExit, KProcess::All); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::All); if (m_process->isRunning ()) setState (Playing); return m_process->isRunning (); @@ -1881,12 +1881,12 @@ KDE_NO_EXPORT bool FFMpeg::quit () { TQTime t; t.start (); do { - KProcessController::theKProcessController->waitForProcessExit (2); + TDEProcessController::theTDEProcessController->waitForProcessExit (2); } while (t.elapsed () < 2000 && m_process->isRunning ()); return Process::quit (); } -KDE_NO_EXPORT void FFMpeg::processStopped (KProcess *) { +KDE_NO_EXPORT void FFMpeg::processStopped (TDEProcess *) { setState (NotRunning); } @@ -2116,14 +2116,14 @@ KDE_NO_EXPORT void NpPlayer::init () { KDE_NO_EXPORT void NpPlayer::initProcess (Viewer * viewer) { Process::initProcess (viewer); - connect (m_process, TQT_SIGNAL (processExited (KProcess *)), - this, TQT_SLOT (processStopped (KProcess *))); - connect (m_process, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)), - this, TQT_SLOT (processOutput (KProcess *, char *, int))); - connect (m_process, TQT_SIGNAL (wroteStdin (KProcess *)), - this, TQT_SLOT (wroteStdin (KProcess *))); + connect (m_process, TQT_SIGNAL (processExited (TDEProcess *)), + this, TQT_SLOT (processStopped (TDEProcess *))); + connect (m_process, TQT_SIGNAL (receivedStdout (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (receivedStderr (TDEProcess *, char *, int)), + this, TQT_SLOT (processOutput (TDEProcess *, char *, int))); + connect (m_process, TQT_SIGNAL (wroteStdin (TDEProcess *)), + this, TQT_SLOT (wroteStdin (TDEProcess *))); if (!dbus_static) dbus_static = dbus_static_deleter.setObject (new DBusStatic ()); if (iface.isEmpty ()) { @@ -2263,7 +2263,7 @@ KDE_NO_EXPORT bool NpPlayer::ready (Viewer * viewer) { cmd += TQString::number (viewer->winId ()); fprintf (stderr, "%s\n", cmd.local8Bit ().data ()); *m_process << cmd; - m_process->start (KProcess::NotifyOnExit, KProcess::All); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::All); return m_process->isRunning (); } @@ -2392,19 +2392,19 @@ KDE_NO_EXPORT bool NpPlayer::quit () { TQTime t; t.start (); do { - KProcessController::theKProcessController->waitForProcessExit (2); + TDEProcessController::theTDEProcessController->waitForProcessExit (2); } while (t.elapsed () < 2000 && m_process->isRunning ()); return Process::quit (); } return true; } -KDE_NO_EXPORT void NpPlayer::processOutput (KProcess *, char * str, int slen) { +KDE_NO_EXPORT void NpPlayer::processOutput (TDEProcess *, char * str, int slen) { if (viewer () && slen > 0) viewer ()->view ()->addText (TQString::fromLocal8Bit (str, slen)); } -KDE_NO_EXPORT void NpPlayer::processStopped (KProcess *) { +KDE_NO_EXPORT void NpPlayer::processStopped (TDEProcess *) { terminateJobs (); if (m_source) ((PlayListNotify *) m_source)->setInfoMessage (TQString ()); @@ -2520,7 +2520,7 @@ KDE_NO_EXPORT void NpPlayer::processStreams () { } } -KDE_NO_EXPORT void NpPlayer::wroteStdin (KProcess *) { +KDE_NO_EXPORT void NpPlayer::wroteStdin (TDEProcess *) { write_in_progress = false; if (playing ()) processStreams (); @@ -2555,9 +2555,9 @@ KDE_NO_EXPORT void NpPlayer::setStarted (const TQString &) {} KDE_NO_EXPORT bool NpPlayer::stop () { return false; } KDE_NO_EXPORT bool NpPlayer::quit () { return false; } KDE_NO_EXPORT bool NpPlayer::ready (Viewer *) { return false; } -KDE_NO_EXPORT void NpPlayer::processOutput (KProcess *, char *, int) {} -KDE_NO_EXPORT void NpPlayer::processStopped (KProcess *) {} -KDE_NO_EXPORT void NpPlayer::wroteStdin (KProcess *) {} +KDE_NO_EXPORT void NpPlayer::processOutput (TDEProcess *, char *, int) {} +KDE_NO_EXPORT void NpPlayer::processStopped (TDEProcess *) {} +KDE_NO_EXPORT void NpPlayer::wroteStdin (TDEProcess *) {} KDE_NO_EXPORT void NpPlayer::streamStateChanged () {} KDE_NO_EXPORT void NpPlayer::streamRedirected (TQ_UINT32, const KURL &) {} KDE_NO_EXPORT void NpPlayer::terminateJobs () {} diff --git a/src/kmplayerprocess.h b/src/kmplayerprocess.h index 7bc03c5..2a34d87 100644 --- a/src/kmplayerprocess.h +++ b/src/kmplayerprocess.h @@ -35,7 +35,7 @@ #include "kmplayersource.h" class TQWidget; -class KProcess; +class TDEProcess; namespace KIO { class Job; @@ -68,7 +68,7 @@ public: virtual void setAudioLang (int, const TQString &); virtual void setSubtitle (int, const TQString &); bool playing () const; - KDE_NO_EXPORT KProcess * process () const { return m_process; } + KDE_NO_EXPORT TDEProcess * process () const { return m_process; } KDE_NO_EXPORT Source * source () const { return m_source; } virtual WId widget (); Viewer * viewer () const; @@ -106,7 +106,7 @@ protected: NodePtrW m_mrl; State m_state; State m_old_state; - KProcess * m_process; + TDEProcess * m_process; KIO::Job * m_job; TQString m_url; int m_request_seek; @@ -133,9 +133,9 @@ protected: TQStringList commands; bool m_use_slave : 1; protected slots: - virtual void processStopped (KProcess *); + virtual void processStopped (TDEProcess *); private slots: - void dataWritten (KProcess *); + void dataWritten (TDEProcess *); }; class MPlayerPreferencesPage; @@ -170,9 +170,9 @@ public slots: MPlayerPreferencesPage * configPage () const { return m_configpage; } bool ready (Viewer *); protected slots: - void processStopped (KProcess *); + void processStopped (TDEProcess *); private slots: - void processOutput (KProcess *, char *, int); + void processOutput (TDEProcess *, char *, int); private: TQString m_process_output; TQString m_grabfile; @@ -309,8 +309,8 @@ public slots: signals: void configReceived (); protected slots: - void processStopped (KProcess *); - void processOutput (KProcess *, char *, int); + void processStopped (TDEProcess *); + void processOutput (TDEProcess *, char *, int); protected: Callback * m_callback; Backend_stub * m_backend; @@ -414,7 +414,7 @@ public slots: virtual bool stop (); virtual bool quit (); private slots: - void processStopped (KProcess *); + void processStopped (TDEProcess *); }; /* @@ -484,9 +484,9 @@ public slots: public slots: bool ready (Viewer *); private slots: - void processOutput (KProcess *, char *, int); - void processStopped (KProcess *); - void wroteStdin (KProcess *); + void processOutput (TDEProcess *, char *, int); + void processStopped (TDEProcess *); + void wroteStdin (TDEProcess *); void streamStateChanged (); void streamRedirected (TQ_UINT32, const KURL &); protected: diff --git a/src/kmplayervdr.cpp b/src/kmplayervdr.cpp index 0b19afb..bf61f8e 100644 --- a/src/kmplayervdr.cpp +++ b/src/kmplayervdr.cpp @@ -773,7 +773,7 @@ KDE_NO_EXPORT bool XVideo::ready (KMPlayer::Viewer * v) { } fprintf (stderr, "%s\n", cmd.latin1 ()); *m_process << cmd; - m_process->start (KProcess::NotifyOnExit, KProcess::All); + m_process->start (TDEProcess::NotifyOnExit, TDEProcess::All); return m_process->isRunning (); } diff --git a/src/kmplayerview.cpp b/src/kmplayerview.cpp index 61b5dfa..2c265e4 100644 --- a/src/kmplayerview.cpp +++ b/src/kmplayerview.cpp @@ -177,14 +177,14 @@ KDE_NO_EXPORT void View::init (KActionCollection * action_collection) { TQPalette pal (TQColor (64, 64,64), TQColor (32, 32, 32)); TQVBoxLayout * viewbox = new TQVBoxLayout (this, 0, 0); m_dockarea = new KDockArea (this, "kde_kmplayer_dock_area"); - m_dock_video = new KDockWidget (m_dockarea->manager (), 0, KGlobal::iconLoader ()->loadIcon (TQString ("kmplayer"), KIcon::Small), m_dockarea); + m_dock_video = new KDockWidget (m_dockarea->manager (), 0, TDEGlobal::iconLoader ()->loadIcon (TQString ("kmplayer"), KIcon::Small), m_dockarea); m_dock_video->setEraseColor (TQColor (0, 0, 255)); m_dock_video->setDockSite (KDockWidget::DockLeft | KDockWidget::DockBottom | KDockWidget::DockRight | KDockWidget::DockTop); m_dock_video->setEnableDocking(KDockWidget::DockNone); m_view_area = new ViewArea (m_dock_video, this); m_dock_video->setWidget (m_view_area); m_dockarea->setMainDockWidget (m_dock_video); - m_dock_playlist = m_dockarea->createDockWidget (i18n ("Play List"), KGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small)); + m_dock_playlist = m_dockarea->createDockWidget (i18n ("Play List"), TDEGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small)); m_playlist = new PlayListView (m_dock_playlist, this, action_collection); m_dock_playlist->setWidget (m_playlist); viewbox->addWidget (m_dockarea); @@ -204,13 +204,13 @@ KDE_NO_EXPORT void View::init (KActionCollection * action_collection) { m_multiedit = new TextEdit (m_widgetstack, this); m_multiedit->setTextFormat (TQt::PlainText); - TQFont fnt = KGlobalSettings::fixedFont (); + TQFont fnt = TDEGlobalSettings::fixedFont (); m_multiedit->setFont (fnt); m_widgettypes[WT_Console] = m_multiedit; m_widgettypes[WT_Picture] = new KMPlayerPictureWidget (m_widgetstack, this); - m_dock_infopanel = m_dockarea->createDockWidget ("infopanel", KGlobal::iconLoader ()->loadIcon (TQString ("info"), KIcon::Small)); + m_dock_infopanel = m_dockarea->createDockWidget ("infopanel", TDEGlobal::iconLoader ()->loadIcon (TQString ("info"), KIcon::Small)); m_infopanel = new InfoWindow (m_dock_infopanel, this); m_dock_infopanel->setWidget (m_infopanel); @@ -394,9 +394,9 @@ void View::toggleVideoConsoleWindow () { WidgetType wt = WT_Console; if (m_widgetstack->visibleWidget () == m_widgettypes[WT_Console]) { wt = WT_Video; - m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, KGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole")); + m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, TDEGlobal::iconLoader ()->loadIconSet (TQString ("konsole"), KIcon::Small, 0, true), i18n ("Con&sole")); } else - m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, KGlobal::iconLoader ()->loadIconSet (TQString ("video"), KIcon::Small, 0, true), i18n ("V&ideo")); + m_control_panel->popupMenu ()->changeItem (ControlPanel::menu_video, TDEGlobal::iconLoader ()->loadIconSet (TQString ("video"), KIcon::Small, 0, true), i18n ("V&ideo")); showWidget (wt); emit windowVideoConsoleToggled (int (wt)); } diff --git a/src/playlistview.cpp b/src/playlistview.cpp index bc7368a..2eae2ae 100644 --- a/src/playlistview.cpp +++ b/src/playlistview.cpp @@ -125,15 +125,15 @@ KDE_NO_CDTOR_EXPORT PlayListView::PlayListView (TQWidget * parent, View * view, setPaletteBackgroundColor (TQColor (0, 0, 0)); setPaletteForegroundColor (TQColor (0xB2, 0xB2, 0xB2)); m_itemmenu = new TQPopupMenu (this); - folder_pix = KGlobal::iconLoader ()->loadIcon (TQString ("folder"), KIcon::Small); - auxiliary_pix = KGlobal::iconLoader ()->loadIcon (TQString ("folder_grey"), KIcon::Small); - video_pix = KGlobal::iconLoader ()->loadIcon (TQString ("video"), KIcon::Small); - info_pix = KGlobal::iconLoader ()->loadIcon (TQString ("messagebox_info"), KIcon::Small); - img_pix = KGlobal::iconLoader ()->loadIcon (TQString ("colorize"), KIcon::Small); - unknown_pix = KGlobal::iconLoader ()->loadIcon (TQString ("unknown"), KIcon::Small); - menu_pix = KGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small); - config_pix = KGlobal::iconLoader ()->loadIcon (TQString ("configure"), KIcon::Small); - url_pix = KGlobal::iconLoader ()->loadIcon (TQString ("www"), KIcon::Small); + folder_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("folder"), KIcon::Small); + auxiliary_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("folder_grey"), KIcon::Small); + video_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("video"), KIcon::Small); + info_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("messagebox_info"), KIcon::Small); + img_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("colorize"), KIcon::Small); + unknown_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("unknown"), KIcon::Small); + menu_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small); + config_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("configure"), KIcon::Small); + url_pix = TDEGlobal::iconLoader ()->loadIcon (TQString ("www"), KIcon::Small); m_find = KStdAction::find (TQT_TQOBJECT(this), TQT_SLOT (slotFind ()), ac, "find"); m_find_next = KStdAction::findNext (TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()), ac, "next"); m_find_next->setEnabled (false); @@ -157,7 +157,7 @@ int PlayListView::addTree (NodePtr root, const TQString & source, const TQString ritem->source = source; ritem->icon = icon; ritem->setPixmap (0, !ritem->icon.isEmpty () - ? KGlobal::iconLoader ()->loadIcon (ritem->icon, KIcon::Small) + ? TDEGlobal::iconLoader ()->loadIcon (ritem->icon, KIcon::Small) : url_pix); updateTree (ritem, 0L, false); return last_id; @@ -350,7 +350,7 @@ KDE_NO_EXPORT void PlayListView::contextMenuItem (TQListViewItem * vi, const TQP m_find_next->unplug (m_itemmenu); m_itemmenu->clear (); } - m_itemmenu->insertItem (KGlobal::iconLoader ()->loadIconSet + m_itemmenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("editcopy"), KIcon::Small, 0, true), i18n ("&Copy to Clipboard"), this, TQT_SLOT (copyToClipboard ()), 0, 0); @@ -358,7 +358,7 @@ KDE_NO_EXPORT void PlayListView::contextMenuItem (TQListViewItem * vi, const TQP (item->node && (item->node->isPlayable () || item->node->isDocument ()) && item->node->mrl ()->bookmarkable)) - m_itemmenu->insertItem (KGlobal::iconLoader ()->loadIconSet + m_itemmenu->insertItem (TDEGlobal::iconLoader ()->loadIconSet (TQString ("bookmark_add"), KIcon::Small, 0, true), i18n ("&Add Bookmark"), this, TQT_SLOT (addBookMark ()), 0, 1); diff --git a/src/pref.cpp b/src/pref.cpp index 6440ab1..a274a28 100644 --- a/src/pref.cpp +++ b/src/pref.cpp @@ -71,7 +71,7 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti TQStringList hierarchy; // typo? :) TQVBoxLayout *vlay; - frame = addPage(i18n("General Options"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("kmplayer"), KIcon::NoGroup, 32)); + frame = addPage(i18n("General Options"), TQString(), TDEGlobal::iconLoader()->loadIcon (TQString ("kmplayer"), KIcon::NoGroup, 32)); vlay = new TQVBoxLayout(frame, marginHint(), spacingHint()); tab = new TQTabWidget (frame); vlay->addWidget (tab); @@ -84,7 +84,7 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti tab->insertTab (m_GeneralPageOutput, i18n("Output")); entries.insert (i18n("General Options"), tab); - frame = addPage (i18n ("Source"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("source"), KIcon::NoGroup, 32)); + frame = addPage (i18n ("Source"), TQString(), TDEGlobal::iconLoader()->loadIcon (TQString ("source"), KIcon::NoGroup, 32)); vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); tab = new TQTabWidget (frame); vlay->addWidget (tab); @@ -92,7 +92,7 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti tab->insertTab (m_SourcePageURL, i18n ("URL")); entries.insert (i18n("Source"), tab); - frame = addPage (i18n ("Recording"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("video"), KIcon::NoGroup, 32)); + frame = addPage (i18n ("Recording"), TQString(), TDEGlobal::iconLoader()->loadIcon (TQString ("video"), KIcon::NoGroup, 32)); vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); tab = new TQTabWidget (frame); vlay->addWidget (tab); @@ -120,7 +120,7 @@ KDE_NO_CDTOR_EXPORT Preferences::Preferences(PartBase * player, Settings * setti tab->setCurrentPage (0); entries.insert (i18n("Recording"), tab); - frame = addPage (i18n ("Output Plugins"), TQString(), KGlobal::iconLoader()->loadIcon (TQString ("image"), KIcon::NoGroup, 32)); + frame = addPage (i18n ("Output Plugins"), TQString(), TDEGlobal::iconLoader()->loadIcon (TQString ("image"), KIcon::NoGroup, 32)); vlay = new TQVBoxLayout(frame, marginHint(), spacingHint()); tab = new TQTabWidget (frame); vlay->addWidget (tab); @@ -160,7 +160,7 @@ KDE_NO_EXPORT void Preferences::addPrefPage (PreferencesPage * page) { return; TQMap<TQString, TQTabWidget *>::iterator en_it = entries.find (item); if (en_it == entries.end ()) { - frame = addPage (item, TQString(), KGlobal::iconLoader()->loadIcon ((icon), KIcon::NoGroup, 32)); + frame = addPage (item, TQString(), TDEGlobal::iconLoader()->loadIcon ((icon), KIcon::NoGroup, 32)); vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); tab = new TQTabWidget (frame); vlay->addWidget (tab); |