diff options
Diffstat (limited to 'src/kmplayerpartbase.cpp')
-rw-r--r-- | src/kmplayerpartbase.cpp | 192 |
1 files changed, 96 insertions, 96 deletions
diff --git a/src/kmplayerpartbase.cpp b/src/kmplayerpartbase.cpp index 96b9f99..f12427a 100644 --- a/src/kmplayerpartbase.cpp +++ b/src/kmplayerpartbase.cpp @@ -172,14 +172,14 @@ void PartBase::init (TDEActionCollection * action_collection) { #ifdef HAVE_NSPR m_players ["npp"] = new NpPlayer (this, m_settings, m_service); #endif - connect(m_settings, TQT_SIGNAL(configChanged()), this, TQT_SLOT(settingsChanged())); + connect(m_settings, TQ_SIGNAL(configChanged()), this, TQ_SLOT(settingsChanged())); m_settings->readConfig (); m_settings->applyColorSetting (false); m_bookmark_menu = new KBookmarkMenu (m_bookmark_manager, m_bookmark_owner, m_view->controlPanel ()->bookmarkMenu (), action_collection, true, true); - connect (m_view, TQT_SIGNAL (urlDropped (const KURL::List &)), this, TQT_SLOT (openURL (const KURL::List &))); + connect (m_view, TQ_SIGNAL (urlDropped (const KURL::List &)), this, TQ_SLOT (openURL (const KURL::List &))); connectPlaylist (m_view->playList ()); connectInfoPanel (m_view->infoPanel ()); - new TDEAction (i18n ("Edit playlist &item"), 0, 0, m_view->playList (), TQT_SLOT (editCurrent ()), action_collection, "edit_playlist_item"); + new TDEAction (i18n ("Edit playlist &item"), 0, 0, m_view->playList (), TQ_SLOT (editCurrent ()), action_collection, "edit_playlist_item"); } void PartBase::connectPanel (ControlPanel * panel) { @@ -188,58 +188,58 @@ void PartBase::connectPanel (ControlPanel * panel) { panel->hueSlider ()->setValue (m_settings->hue); panel->saturationSlider ()->setValue (m_settings->saturation); panel->volumeBar ()->setValue (m_settings->volume); - connect (panel->button (ControlPanel::button_playlist), TQT_SIGNAL (clicked ()), this, TQT_SLOT (showPlayListWindow ())); - connect (panel->button (ControlPanel::button_back), TQT_SIGNAL (clicked ()), this, TQT_SLOT (back ())); - connect (panel->button (ControlPanel::button_play), TQT_SIGNAL (clicked ()), this, TQT_SLOT (play ())); - connect (panel->button (ControlPanel::button_forward), TQT_SIGNAL (clicked ()), this, TQT_SLOT (forward ())); - connect (panel->button (ControlPanel::button_pause), TQT_SIGNAL (clicked ()), this, TQT_SLOT (pause ())); - connect (panel->button (ControlPanel::button_stop), TQT_SIGNAL (clicked ()), this, TQT_SLOT (stop ())); - connect (panel->button (ControlPanel::button_record), TQT_SIGNAL (clicked()), this, TQT_SLOT (record())); - connect (panel->volumeBar (), TQT_SIGNAL (volumeChanged (int)), this, TQT_SLOT (volumeChanged (int))); - connect (panel->positionSlider (), TQT_SIGNAL (valueChanged (int)), this, TQT_SLOT (positionValueChanged (int))); - connect (panel->positionSlider (), TQT_SIGNAL (sliderPressed()), this, TQT_SLOT (posSliderPressed())); - connect (panel->positionSlider (), TQT_SIGNAL (sliderReleased()), this, TQT_SLOT (posSliderReleased())); - connect (this, TQT_SIGNAL (positioned (int, int)), panel, TQT_SLOT (setPlayingProgress (int, int))); - connect (this, TQT_SIGNAL (loading(int)), panel, TQT_SLOT(setLoadingProgress(int))); - connect (panel->contrastSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (contrastValueChanged(int))); - connect (panel->brightnessSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (brightnessValueChanged(int))); - connect (panel->hueSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (hueValueChanged(int))); - connect (panel->saturationSlider (), TQT_SIGNAL (valueChanged(int)), this, TQT_SLOT (saturationValueChanged(int))); - connect (this, TQT_SIGNAL (languagesUpdated(const TQStringList &, const TQStringList &)), panel, TQT_SLOT (setLanguages (const TQStringList &, const TQStringList &))); - connect (panel->audioMenu (), TQT_SIGNAL (activated (int)), this, TQT_SLOT (audioSelected (int))); - connect (panel->subtitleMenu (), TQT_SIGNAL (activated (int)), this, TQT_SLOT (subtitleSelected (int))); - connect (this, TQT_SIGNAL (audioIsSelected (int)), panel, TQT_SLOT (selectAudioLanguage (int))); - connect (this, TQT_SIGNAL (subtitleIsSelected (int)), panel, TQT_SLOT (selectSubtitle (int))); - panel->popupMenu()->connectItem (ControlPanel::menu_fullscreen, this, TQT_SLOT (fullScreen ())); + connect (panel->button (ControlPanel::button_playlist), TQ_SIGNAL (clicked ()), this, TQ_SLOT (showPlayListWindow ())); + connect (panel->button (ControlPanel::button_back), TQ_SIGNAL (clicked ()), this, TQ_SLOT (back ())); + connect (panel->button (ControlPanel::button_play), TQ_SIGNAL (clicked ()), this, TQ_SLOT (play ())); + connect (panel->button (ControlPanel::button_forward), TQ_SIGNAL (clicked ()), this, TQ_SLOT (forward ())); + connect (panel->button (ControlPanel::button_pause), TQ_SIGNAL (clicked ()), this, TQ_SLOT (pause ())); + connect (panel->button (ControlPanel::button_stop), TQ_SIGNAL (clicked ()), this, TQ_SLOT (stop ())); + connect (panel->button (ControlPanel::button_record), TQ_SIGNAL (clicked()), this, TQ_SLOT (record())); + connect (panel->volumeBar (), TQ_SIGNAL (volumeChanged (int)), this, TQ_SLOT (volumeChanged (int))); + connect (panel->positionSlider (), TQ_SIGNAL (valueChanged (int)), this, TQ_SLOT (positionValueChanged (int))); + connect (panel->positionSlider (), TQ_SIGNAL (sliderPressed()), this, TQ_SLOT (posSliderPressed())); + connect (panel->positionSlider (), TQ_SIGNAL (sliderReleased()), this, TQ_SLOT (posSliderReleased())); + connect (this, TQ_SIGNAL (positioned (int, int)), panel, TQ_SLOT (setPlayingProgress (int, int))); + connect (this, TQ_SIGNAL (loading(int)), panel, TQ_SLOT(setLoadingProgress(int))); + connect (panel->contrastSlider (), TQ_SIGNAL (valueChanged(int)), this, TQ_SLOT (contrastValueChanged(int))); + connect (panel->brightnessSlider (), TQ_SIGNAL (valueChanged(int)), this, TQ_SLOT (brightnessValueChanged(int))); + connect (panel->hueSlider (), TQ_SIGNAL (valueChanged(int)), this, TQ_SLOT (hueValueChanged(int))); + connect (panel->saturationSlider (), TQ_SIGNAL (valueChanged(int)), this, TQ_SLOT (saturationValueChanged(int))); + connect (this, TQ_SIGNAL (languagesUpdated(const TQStringList &, const TQStringList &)), panel, TQ_SLOT (setLanguages (const TQStringList &, const TQStringList &))); + connect (panel->audioMenu (), TQ_SIGNAL (activated (int)), this, TQ_SLOT (audioSelected (int))); + connect (panel->subtitleMenu (), TQ_SIGNAL (activated (int)), this, TQ_SLOT (subtitleSelected (int))); + connect (this, TQ_SIGNAL (audioIsSelected (int)), panel, TQ_SLOT (selectAudioLanguage (int))); + connect (this, TQ_SIGNAL (subtitleIsSelected (int)), panel, TQ_SLOT (selectSubtitle (int))); + panel->popupMenu()->connectItem (ControlPanel::menu_fullscreen, this, TQ_SLOT (fullScreen ())); panel->popupMenu ()->connectItem (ControlPanel::menu_config, - this, TQT_SLOT (showConfigDialog ())); + this, TQ_SLOT (showConfigDialog ())); panel->popupMenu ()->connectItem (ControlPanel::menu_video, - m_view, TQT_SLOT(toggleVideoConsoleWindow())); + m_view, TQ_SLOT(toggleVideoConsoleWindow())); panel->popupMenu ()->connectItem (ControlPanel::menu_playlist, - m_view, TQT_SLOT (toggleShowPlaylist ())); + m_view, TQ_SLOT (toggleShowPlaylist ())); panel->popupMenu ()->connectItem (ControlPanel::menu_minimal, - this, TQT_SLOT (minimalMode ())); - connect (this, TQT_SIGNAL (statusUpdated (const TQString &)), - panel->view (), TQT_SLOT (setStatusMessage (const TQString &))); - //connect (panel (), TQT_SIGNAL (clicked ()), m_settings, TQT_SLOT (show ())); + this, TQ_SLOT (minimalMode ())); + connect (this, TQ_SIGNAL (statusUpdated (const TQString &)), + panel->view (), TQ_SLOT (setStatusMessage (const TQString &))); + //connect (panel (), TQ_SIGNAL (clicked ()), m_settings, TQ_SLOT (show ())); } void PartBase::connectPlaylist (PlayListView * playlist) { - connect (playlist, TQT_SIGNAL (addBookMark (const TQString &, const TQString &)), - this, TQT_SLOT (addBookMark (const TQString &, const TQString &))); - connect (playlist, TQT_SIGNAL (executed (TQListViewItem *)), - this, TQT_SLOT (playListItemExecuted (TQListViewItem *))); - connect (playlist, TQT_SIGNAL (clicked (TQListViewItem *)), - this, TQT_SLOT (playListItemClicked (TQListViewItem *))); - connect (this, TQT_SIGNAL (treeChanged (int, NodePtr, NodePtr, bool, bool)), - playlist, TQT_SLOT (updateTree (int, NodePtr, NodePtr, bool, bool))); - connect (this, TQT_SIGNAL (treeUpdated ()), - playlist, TQT_SLOT (triggerUpdate ())); + connect (playlist, TQ_SIGNAL (addBookMark (const TQString &, const TQString &)), + this, TQ_SLOT (addBookMark (const TQString &, const TQString &))); + connect (playlist, TQ_SIGNAL (executed (TQListViewItem *)), + this, TQ_SLOT (playListItemExecuted (TQListViewItem *))); + connect (playlist, TQ_SIGNAL (clicked (TQListViewItem *)), + this, TQ_SLOT (playListItemClicked (TQListViewItem *))); + connect (this, TQ_SIGNAL (treeChanged (int, NodePtr, NodePtr, bool, bool)), + playlist, TQ_SLOT (updateTree (int, NodePtr, NodePtr, bool, bool))); + connect (this, TQ_SIGNAL (treeUpdated ()), + playlist, TQ_SLOT (triggerUpdate ())); } void PartBase::connectInfoPanel (InfoWindow * infopanel) { - connect (this, TQT_SIGNAL (infoUpdated (const TQString &)), - infopanel->view (), TQT_SLOT (setInfoMessage (const TQString &))); + connect (this, TQ_SIGNAL (infoUpdated (const TQString &)), + infopanel->view (), TQ_SLOT (setInfoMessage (const TQString &))); } PartBase::~PartBase () { @@ -398,7 +398,7 @@ void PartBase::updatePlayerMenu (ControlPanel * panel) { for (ProcessMap::const_iterator i = m_players.begin(); i != e; ++i) { Process * p = i.data (); if (p->supports (m_source->name ())) { - menu->insertItem (p->menuName (), this, TQT_SLOT (slotPlayerMenu (int)), 0, id++); + menu->insertItem (p->menuName (), this, TQ_SLOT (slotPlayerMenu (int)), 0, id++); if (i.data() == m_process) menu->setItemChecked (id-1, true); } @@ -407,20 +407,20 @@ void PartBase::updatePlayerMenu (ControlPanel * panel) { void PartBase::connectSource (Source * old_source, Source * source) { if (old_source) { - disconnect (old_source, TQT_SIGNAL(endOfPlayItems ()), this, TQT_SLOT(stop ())); - disconnect (old_source, TQT_SIGNAL (dimensionsChanged ()), - this, TQT_SLOT (sourceHasChangedAspects ())); - disconnect (old_source, TQT_SIGNAL (startPlaying ()), - this, TQT_SLOT (playingStarted ())); - disconnect (old_source, TQT_SIGNAL (stopPlaying ()), - this, TQT_SLOT (playingStopped ())); + disconnect (old_source, TQ_SIGNAL(endOfPlayItems ()), this, TQ_SLOT(stop ())); + disconnect (old_source, TQ_SIGNAL (dimensionsChanged ()), + this, TQ_SLOT (sourceHasChangedAspects ())); + disconnect (old_source, TQ_SIGNAL (startPlaying ()), + this, TQ_SLOT (playingStarted ())); + disconnect (old_source, TQ_SIGNAL (stopPlaying ()), + this, TQ_SLOT (playingStopped ())); } if (source) { - connect (source, TQT_SIGNAL (endOfPlayItems ()), this, TQT_SLOT (stop ())); - connect (source, TQT_SIGNAL (dimensionsChanged ()), - this, TQT_SLOT (sourceHasChangedAspects ())); - connect (source, TQT_SIGNAL (startPlaying()), this, TQT_SLOT(playingStarted())); - connect (source, TQT_SIGNAL (stopPlaying ()), this, TQT_SLOT(playingStopped())); + connect (source, TQ_SIGNAL (endOfPlayItems ()), this, TQ_SLOT (stop ())); + connect (source, TQ_SIGNAL (dimensionsChanged ()), + this, TQ_SLOT (sourceHasChangedAspects ())); + connect (source, TQ_SIGNAL (startPlaying()), this, TQ_SLOT(playingStarted())); + connect (source, TQ_SIGNAL (stopPlaying ()), this, TQ_SLOT(playingStopped())); } } @@ -433,12 +433,12 @@ void PartBase::setSource (Source * _source) { m_view->reset (); emit infoUpdated (TQString ()); } - disconnect (m_source, TQT_SIGNAL (startRecording ()), - this, TQT_SLOT (recordingStarted ())); - disconnect (this, TQT_SIGNAL (audioIsSelected (int)), - m_source, TQT_SLOT (setAudioLang (int))); - disconnect (this, TQT_SIGNAL (subtitleIsSelected (int)), - m_source, TQT_SLOT (setSubtitle (int))); + disconnect (m_source, TQ_SIGNAL (startRecording ()), + this, TQ_SLOT (recordingStarted ())); + disconnect (this, TQ_SIGNAL (audioIsSelected (int)), + m_source, TQ_SLOT (setAudioLang (int))); + disconnect (this, TQ_SIGNAL (subtitleIsSelected (int)), + m_source, TQ_SLOT (setSubtitle (int))); } if (m_view) { if (m_auto_controls) @@ -452,18 +452,18 @@ void PartBase::setSource (Source * _source) { m_source = _source; connectSource (old_source, m_source); m_process->setSource (m_source); - connect (m_source, TQT_SIGNAL(startRecording()), this,TQT_SLOT(recordingStarted())); - connect (this, TQT_SIGNAL (audioIsSelected (int)), - m_source, TQT_SLOT (setAudioLang (int))); - connect (this, TQT_SIGNAL (subtitleIsSelected (int)), - m_source, TQT_SLOT (setSubtitle (int))); + connect (m_source, TQ_SIGNAL(startRecording()), this,TQ_SLOT(recordingStarted())); + connect (this, TQ_SIGNAL (audioIsSelected (int)), + m_source, TQ_SLOT (setAudioLang (int))); + connect (this, TQ_SIGNAL (subtitleIsSelected (int)), + m_source, TQ_SLOT (setSubtitle (int))); m_source->init (); m_source->setIdentified (false); if (m_view && m_view->viewer ()) { updatePlayerMenu (m_view->controlPanel ()); m_view->viewer ()->setAspect (0.0); } - if (m_source) TQTimer::singleShot (0, m_source, TQT_SLOT (activate ())); + if (m_source) TQTimer::singleShot (0, m_source, TQ_SLOT (activate ())); updateTree (true, true); emit sourceChanged (old_source, m_source); } @@ -1104,7 +1104,7 @@ bool Source::requestPlayURL (NodePtr mrl) { else m_back_request = mrl; m_player->updateTree (); - TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQ_SLOT (playCurrent ())); } m_player->setProcess (mrl->mrl ()); return true; @@ -1144,7 +1144,7 @@ void Source::stateElementChanged (Node * elm, Node::State os, Node::State ns) { //a SMIL movies stopped by SMIL events rather than movie just ending m_player->process ()->stop (); if (m_player->view ()) // move away the video widget - TQTimer::singleShot (0, m_player->view (), TQT_SLOT (updateLayout ())); + TQTimer::singleShot (0, m_player->view (), TQ_SLOT (updateLayout ())); } else if ((ns == Node::state_deferred || (os == Node::state_deferred && ns > Node::state_deferred)) && elm == m_document) { @@ -1204,7 +1204,7 @@ void Source::insertURL (NodePtr node, const TQString & mrl, const TQString & tit void Source::play () { m_player->updateTree (); - TQTimer::singleShot (0, m_player, TQT_SLOT (play ())); + TQTimer::singleShot (0, m_player, TQ_SLOT (play ())); //printTree (m_document); } @@ -1229,7 +1229,7 @@ void Source::backward () { else if (m_current) { m_document->reset (); m_current = e; - TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQ_SLOT (playCurrent ())); } return; } @@ -1260,7 +1260,7 @@ void Source::jump (NodePtr e) { if (m_current) m_document->reset (); m_current = e; - TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQ_SLOT (playCurrent ())); } } else m_player->updateTree (); @@ -1450,7 +1450,7 @@ void Source::stateChange(Process *p, Process::State olds, Process::State news) { (!mrl || mrl->view_mode != Mrl::WindowMode)) static_cast<View*>(m_player->view())->viewArea()->repaint(); } else - TQTimer::singleShot (0, this, TQT_SLOT (playCurrent ())); + TQTimer::singleShot (0, this, TQ_SLOT (playCurrent ())); } else if (news == Process::Buffering) { if (p->mrl ()->mrl ()->view_mode != Mrl::SingleMode) p->mrl ()->defer (); // paused the SMIL @@ -1853,14 +1853,14 @@ bool URLSource::resolveURL (NodePtr m) { job->addMetaData ("PropagateHttpHeader", "true"); job->addMetaData ("errorPage", "false"); m_resolve_info = new ResolveInfo (m, job, m_resolve_info); - connect (m_resolve_info->job, TQT_SIGNAL(data(TDEIO::Job*,const TQByteArray&)), - this, TQT_SLOT (kioData (TDEIO::Job *, const TQByteArray &))); - //connect( m_job, TQT_SIGNAL(connected(TDEIO::Job*)), - // this, TQT_SLOT(slotConnected(TDEIO::Job*))); - connect(m_resolve_info->job, TQT_SIGNAL(mimetype(TDEIO::Job*,const TQString&)), - this, TQT_SLOT (kioMimetype (TDEIO::Job *, const TQString &))); - connect (m_resolve_info->job, TQT_SIGNAL (result (TDEIO::Job *)), - this, TQT_SLOT (kioResult (TDEIO::Job *))); + connect (m_resolve_info->job, TQ_SIGNAL(data(TDEIO::Job*,const TQByteArray&)), + this, TQ_SLOT (kioData (TDEIO::Job *, const TQByteArray &))); + //connect( m_job, TQ_SIGNAL(connected(TDEIO::Job*)), + // this, TQ_SLOT(slotConnected(TDEIO::Job*))); + connect(m_resolve_info->job, TQ_SIGNAL(mimetype(TDEIO::Job*,const TQString&)), + this, TQ_SLOT (kioMimetype (TDEIO::Job *, const TQString &))); + connect (m_resolve_info->job, TQ_SIGNAL (result (TDEIO::Job *)), + this, TQ_SLOT (kioResult (TDEIO::Job *))); static_cast <View *> (m_player->view ())->controlPanel ()->setPlaying (true); m_player->updateStatus (i18n ("Connecting")); m_player->setLoaded (0); @@ -1945,16 +1945,16 @@ KDE_NO_EXPORT bool RemoteObjectPrivate::download (const TQString & str) { if (memory_cache->preserve (str)) { //kdDebug () << "downloading " << str << endl; job = TDEIO::get (kurl, false, false); - connect (job, TQT_SIGNAL (data (TDEIO::Job *, const TQByteArray &)), - this, TQT_SLOT (slotData (TDEIO::Job *, const TQByteArray &))); - connect (job, TQT_SIGNAL (result (TDEIO::Job *)), - this, TQT_SLOT (slotResult (TDEIO::Job *))); - connect (job, TQT_SIGNAL (mimetype (TDEIO::Job *, const TQString &)), - this, TQT_SLOT (slotMimetype (TDEIO::Job *, const TQString &))); + connect (job, TQ_SIGNAL (data (TDEIO::Job *, const TQByteArray &)), + this, TQ_SLOT (slotData (TDEIO::Job *, const TQByteArray &))); + connect (job, TQ_SIGNAL (result (TDEIO::Job *)), + this, TQ_SLOT (slotResult (TDEIO::Job *))); + connect (job, TQ_SIGNAL (mimetype (TDEIO::Job *, const TQString &)), + this, TQ_SLOT (slotMimetype (TDEIO::Job *, const TQString &))); } else { //kdDebug () << "download preserved " << str << endl; - connect (memory_cache, TQT_SIGNAL (preserveRemoved (const TQString &)), - this, TQT_SLOT (cachePreserveRemoved (const TQString &))); + connect (memory_cache, TQ_SIGNAL (preserveRemoved (const TQString &)), + this, TQ_SLOT (cachePreserveRemoved (const TQString &))); preserve_wait = true; } return false; @@ -1966,8 +1966,8 @@ KDE_NO_EXPORT void RemoteObjectPrivate::clear () { job = 0L; memory_cache->unpreserve (url); } else if (preserve_wait) { - disconnect (memory_cache, TQT_SIGNAL (preserveRemoved (const TQString &)), - this, TQT_SLOT (cachePreserveRemoved (const TQString &))); + disconnect (memory_cache, TQ_SIGNAL (preserveRemoved (const TQString &)), + this, TQ_SLOT (cachePreserveRemoved (const TQString &))); preserve_wait = false; } } @@ -1985,8 +1985,8 @@ KDE_NO_EXPORT void RemoteObjectPrivate::cachePreserveRemoved (const TQString & str) { if (str == url && !memory_cache->isPreserved (str)) { preserve_wait = false; - disconnect (memory_cache, TQT_SIGNAL (preserveRemoved (const TQString &)), - this, TQT_SLOT (cachePreserveRemoved (const TQString &))); + disconnect (memory_cache, TQ_SIGNAL (preserveRemoved (const TQString &)), + this, TQ_SLOT (cachePreserveRemoved (const TQString &))); download (str); } } |