diff options
Diffstat (limited to 'src/kmplayertvsource.cpp')
-rw-r--r-- | src/kmplayertvsource.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/kmplayertvsource.cpp b/src/kmplayertvsource.cpp index 0bf1644..2faf123 100644 --- a/src/kmplayertvsource.cpp +++ b/src/kmplayertvsource.cpp @@ -135,7 +135,7 @@ KDE_NO_CDTOR_EXPORT TVDevicePage::TVDevicePage (TQWidget *parent, KMPlayer::Node layout->addLayout (buttonlayout); } -KDE_NO_EXPORT void TVDevicePage::slotDelete () { +TDE_NO_EXPORT void TVDevicePage::slotDelete () { if (KMessageBox::warningYesNo (this, i18n ("You are about to remove this device from the Source menu.\nContinue?"), i18n ("Confirm")) == KMessageBox::Yes) emit deleted (this); } @@ -170,7 +170,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageTV::KMPlayerPrefSourcePageTV (TQWidget notebook->insertTab (general, i18n ("General")); } -KDE_NO_EXPORT void KMPlayerPrefSourcePageTV::showEvent (TQShowEvent *) { +TDE_NO_EXPORT void KMPlayerPrefSourcePageTV::showEvent (TQShowEvent *) { m_tvsource->readXML (); } @@ -181,7 +181,7 @@ KDE_NO_CDTOR_EXPORT TVNode::TVNode (KMPlayer::NodePtr &d, const TQString & s, co editable = true; } -KDE_NO_EXPORT void TVNode::setNodeName (const TQString & nn) { +TDE_NO_EXPORT void TVNode::setNodeName (const TQString & nn) { pretty_name = nn; setAttribute (KMPlayer::StringPool::attr_name, nn); } @@ -196,7 +196,7 @@ KDE_NO_CDTOR_EXPORT TVChannel::TVChannel (KMPlayer::NodePtr & d, const TQString KDE_NO_CDTOR_EXPORT TVChannel::TVChannel (KMPlayer::NodePtr & d) : TVNode (d, TQString ("tv://"), "channel", id_node_tv_channel) { } -KDE_NO_EXPORT void TVChannel::closed () { +TDE_NO_EXPORT void TVChannel::closed () { pretty_name = getAttribute (KMPlayer::StringPool::attr_name); } @@ -211,7 +211,7 @@ TVInput::TVInput (KMPlayer::NodePtr & d, const TQString & n, int id) KDE_NO_CDTOR_EXPORT TVInput::TVInput (KMPlayer::NodePtr & d) : TVNode (d, TQString ("tv://"), "input", id_node_tv_input) { } -KDE_NO_EXPORT KMPlayer::NodePtr TVInput::childFromTag (const TQString & tag) { +TDE_NO_EXPORT KMPlayer::NodePtr TVInput::childFromTag (const TQString & tag) { // kdDebug () << nodeName () << " childFromTag " << tag << endl; if (tag == TQString::fromLatin1 ("channel")) { return new TVChannel (m_doc); @@ -219,11 +219,11 @@ KDE_NO_EXPORT KMPlayer::NodePtr TVInput::childFromTag (const TQString & tag) { return 0L; } -KDE_NO_EXPORT void TVInput::closed () { +TDE_NO_EXPORT void TVInput::closed () { //pretty_name = getAttribute (KMPlayer::StringPool::attr_name); } -KDE_NO_EXPORT void TVInput::setNodeName (const TQString & name) { +TDE_NO_EXPORT void TVInput::setNodeName (const TQString & name) { Node * p = parentNode ().ptr (); TQString nm (name); if (p && p->id == id_node_tv_device) { @@ -250,27 +250,27 @@ KDE_NO_CDTOR_EXPORT TVDevice::~TVDevice () { device_page->deleteLater (); } -KDE_NO_EXPORT KMPlayer::NodePtr TVDevice::childFromTag (const TQString & tag) { +TDE_NO_EXPORT KMPlayer::NodePtr TVDevice::childFromTag (const TQString & tag) { // kdDebug () << nodeName () << " childFromTag " << tag << endl; if (tag == TQString::fromLatin1 ("input")) return new TVInput (m_doc); return 0L; } -KDE_NO_EXPORT void TVDevice::closed () { +TDE_NO_EXPORT void TVDevice::closed () { updateNodeName (); } -KDE_NO_EXPORT void TVDevice::childDone (KMPlayer::NodePtr) { +TDE_NO_EXPORT void TVDevice::childDone (KMPlayer::NodePtr) { finish (); } -KDE_NO_EXPORT void TVDevice::setNodeName (const TQString & name) { +TDE_NO_EXPORT void TVDevice::setNodeName (const TQString & name) { TVNode::setNodeName (name); updateNodeName (); } -KDE_NO_EXPORT void TVDevice::updateNodeName () { +TDE_NO_EXPORT void TVDevice::updateNodeName () { pretty_name = getAttribute (KMPlayer::StringPool::attr_name); src = getAttribute ("path"); for (KMPlayer::NodePtr c = firstChild (); c; c = c->nextSibling ()) @@ -281,7 +281,7 @@ KDE_NO_EXPORT void TVDevice::updateNodeName () { } } -KDE_NO_EXPORT void TVDevice::updateDevicePage () { +TDE_NO_EXPORT void TVDevice::updateDevicePage () { if (!device_page) return; pretty_name = device_page->name->text (); @@ -321,18 +321,18 @@ TVDocument::TVDocument (KMPlayerTVSource * source) pretty_name = i18n ("Television"); } -KDE_NO_EXPORT KMPlayer::NodePtr TVDocument::childFromTag (const TQString & tag) { +TDE_NO_EXPORT KMPlayer::NodePtr TVDocument::childFromTag (const TQString & tag) { // kdDebug () << nodeName () << " childFromTag " << tag << endl; if (tag == TQString::fromLatin1 ("device")) return new TVDevice (m_doc); return FileDocument::childFromTag (tag); } -KDE_NO_EXPORT void TVDocument::childDone (KMPlayer::NodePtr) { +TDE_NO_EXPORT void TVDocument::childDone (KMPlayer::NodePtr) { finish (); } -KDE_NO_EXPORT void TVDocument::defer () { +TDE_NO_EXPORT void TVDocument::defer () { if (!resolved) { resolved = true; readFromFile (locateLocal ("data", "kmplayer/tv.xml")); @@ -354,7 +354,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerTVSource::KMPlayerTVSource (KMPlayerApp * a, TQPopup KDE_NO_CDTOR_EXPORT KMPlayerTVSource::~KMPlayerTVSource () { } -KDE_NO_EXPORT void KMPlayerTVSource::activate () { +TDE_NO_EXPORT void KMPlayerTVSource::activate () { m_identified = true; if (m_player->settings ()->showbroadcastbutton) m_app->view()->controlPanel()->broadcastButton ()->show (); @@ -386,13 +386,13 @@ KDE_NO_EXPORT void KMPlayerTVSource::activate () { * ffmpeg -vd /dev/video0 -r 25 -s 768x576 -f rawvideo - |mplayer -nocache -ao arts -rawvideo on:w=768:h=576:fps=25 -quiet - */ -KDE_NO_EXPORT void KMPlayerTVSource::deactivate () { +TDE_NO_EXPORT void KMPlayerTVSource::deactivate () { if (m_player->view () && !m_app->view ()->controlPanel()->broadcastButton ()->isOn ()) m_app->view ()->controlPanel()->broadcastButton ()->hide (); reset (); } -KDE_NO_EXPORT void KMPlayerTVSource::buildMenu () { +TDE_NO_EXPORT void KMPlayerTVSource::buildMenu () { m_menu->clear (); int counter = 0; for (KMPlayer::NodePtr dp = m_document->firstChild (); dp; dp = dp->nextSibling ()) @@ -400,7 +400,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::buildMenu () { m_menu->insertItem (KMPlayer::convertNode <TVDevice> (dp)->pretty_name, this, TQ_SLOT (menuClicked (int)), 0, counter++); } -KDE_NO_EXPORT void KMPlayerTVSource::menuAboutToShow () { +TDE_NO_EXPORT void KMPlayerTVSource::menuAboutToShow () { readXML (); } @@ -426,11 +426,11 @@ void KMPlayerTVSource::jump (KMPlayer::NodePtr e) { } } -KDE_NO_EXPORT KMPlayer::NodePtr KMPlayerTVSource::root () { +TDE_NO_EXPORT KMPlayer::NodePtr KMPlayerTVSource::root () { return m_cur_tvinput; } -KDE_NO_EXPORT void KMPlayerTVSource::buildArguments () { +TDE_NO_EXPORT void KMPlayerTVSource::buildArguments () { TVChannel * channel = 0L; TVInput * input = 0L; KMPlayer::NodePtr elm = m_current; @@ -483,7 +483,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::buildArguments () { m_recordcmd.sprintf ("-tv on:%s:driver=%s:%s:width=%d:height=%d", m_audiodevice.isEmpty () ? "noaudio" : (TQString ("forceaudio:adevice=") + m_audiodevice).ascii(), tvdriver.ascii (), command.ascii (), width (), height ()); } -KDE_NO_EXPORT void KMPlayerTVSource::playCurrent () { +TDE_NO_EXPORT void KMPlayerTVSource::playCurrent () { buildArguments (); if (m_app->broadcasting ()) TQTimer::singleShot (0, m_app->broadcastConfig (), TQ_SLOT (startFeed ())); @@ -491,7 +491,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::playCurrent () { KMPlayer::Source::playCurrent (); } -KDE_NO_EXPORT void KMPlayerTVSource::menuClicked (int id) { +TDE_NO_EXPORT void KMPlayerTVSource::menuClicked (int id) { KMPlayer::NodePtr elm = m_document->firstChild (); for (; id > 0; --id, elm = elm->nextSibling ()) ; @@ -501,28 +501,28 @@ KDE_NO_EXPORT void KMPlayerTVSource::menuClicked (int id) { m_player->setSource (this); } -KDE_NO_EXPORT TQString KMPlayerTVSource::filterOptions () { +TDE_NO_EXPORT TQString KMPlayerTVSource::filterOptions () { if (! m_player->settings ()->disableppauto) return KMPlayer::Source::filterOptions (); return TQString ("-vf pp=lb"); } -KDE_NO_EXPORT bool KMPlayerTVSource::hasLength () { +TDE_NO_EXPORT bool KMPlayerTVSource::hasLength () { return false; } -KDE_NO_EXPORT bool KMPlayerTVSource::isSeekable () { +TDE_NO_EXPORT bool KMPlayerTVSource::isSeekable () { return true; } -KDE_NO_EXPORT TQString KMPlayerTVSource::prettyName () { +TDE_NO_EXPORT TQString KMPlayerTVSource::prettyName () { TQString name (i18n ("TV")); //if (m_tvsource) // name += ' ' + m_tvsource->title; return name; } -KDE_NO_EXPORT void KMPlayerTVSource::write (TDEConfig * m_config) { +TDE_NO_EXPORT void KMPlayerTVSource::write (TDEConfig * m_config) { if (!config_read) return; m_config->setGroup (strTV); m_config->writeEntry (strTVDriver, tvdriver); @@ -531,7 +531,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::write (TDEConfig * m_config) { kdDebug () << "KMPlayerTVSource::write XML" << endl; } -KDE_NO_EXPORT void KMPlayerTVSource::readXML () { +TDE_NO_EXPORT void KMPlayerTVSource::readXML () { if (config_read) return; config_read = true; kdDebug () << "KMPlayerTVSource::readXML" << endl; @@ -541,12 +541,12 @@ KDE_NO_EXPORT void KMPlayerTVSource::readXML () { sync (false); } -KDE_NO_EXPORT void KMPlayerTVSource::read (TDEConfig * m_config) { +TDE_NO_EXPORT void KMPlayerTVSource::read (TDEConfig * m_config) { m_config->setGroup (strTV); tvdriver = m_config->readEntry (strTVDriver, "v4l"); } -KDE_NO_EXPORT void KMPlayerTVSource::sync (bool fromUI) { +TDE_NO_EXPORT void KMPlayerTVSource::sync (bool fromUI) { if (!m_configpage) return; if (m_document && m_document->hasChildNodes ()) m_app->showBroadcastConfig (); @@ -565,13 +565,13 @@ KDE_NO_EXPORT void KMPlayerTVSource::sync (bool fromUI) { } } -KDE_NO_EXPORT void KMPlayerTVSource::prefLocation (TQString & item, TQString & icon, TQString & tab) { +TDE_NO_EXPORT void KMPlayerTVSource::prefLocation (TQString & item, TQString & icon, TQString & tab) { item = i18n ("Source"); icon = TQString ("text-x-src"); tab = i18n ("TV"); } -KDE_NO_EXPORT TQFrame * KMPlayerTVSource::prefPage (TQWidget * parent) { +TDE_NO_EXPORT TQFrame * KMPlayerTVSource::prefPage (TQWidget * parent) { if (!m_configpage) { m_configpage = new KMPlayerPrefSourcePageTV (parent, this); scanner = new TVDeviceScannerSource (this); @@ -588,7 +588,7 @@ static bool hasTVDevice (KMPlayer::NodePtr doc, const TQString & devstr) { return false; } -KDE_NO_EXPORT void KMPlayerTVSource::slotScan () { +TDE_NO_EXPORT void KMPlayerTVSource::slotScan () { TQString devstr = m_configpage->device->lineEdit()->text (); if (!hasTVDevice(m_document, devstr)) { scanner->scan (devstr, m_configpage->driver->text()); @@ -599,7 +599,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::slotScan () { i18n ("Error")); } -KDE_NO_EXPORT void KMPlayerTVSource::slotScanFinished (TVDevice * tvdevice) { +TDE_NO_EXPORT void KMPlayerTVSource::slotScanFinished (TVDevice * tvdevice) { disconnect (scanner, TQ_SIGNAL (scanFinished (TVDevice *)), this, TQ_SLOT (slotScanFinished (TVDevice *))); if (tvdevice) { @@ -609,7 +609,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::slotScanFinished (TVDevice * tvdevice) { KMessageBox::error(m_configpage,i18n("No device found."),i18n("Error")); } -KDE_NO_EXPORT void KMPlayerTVSource::addTVDevicePage(TVDevice *dev, bool show) { +TDE_NO_EXPORT void KMPlayerTVSource::addTVDevicePage(TVDevice *dev, bool show) { if (dev->device_page) dev->device_page->deleteLater (); dev->device_page = new TVDevicePage (m_configpage->notebook, dev); @@ -620,7 +620,7 @@ KDE_NO_EXPORT void KMPlayerTVSource::addTVDevicePage(TVDevice *dev, bool show) { m_configpage->notebook->setCurrentPage (m_configpage->notebook->count ()-1); } -KDE_NO_EXPORT void KMPlayerTVSource::slotDeviceDeleted (TVDevicePage *devpage) { +TDE_NO_EXPORT void KMPlayerTVSource::slotDeviceDeleted (TVDevicePage *devpage) { m_document->removeChild (devpage->device_doc); m_configpage->notebook->setCurrentPage (0); } @@ -631,10 +631,10 @@ KDE_NO_CDTOR_EXPORT TVDeviceScannerSource::TVDeviceScannerSource (KMPlayerTVSour : KMPlayer::Source (i18n ("TVScanner"), src->player (), "tvscanner"), m_tvsource (src), m_tvdevice (0L) { } -KDE_NO_EXPORT void TVDeviceScannerSource::init () { +TDE_NO_EXPORT void TVDeviceScannerSource::init () { } -KDE_NO_EXPORT bool TVDeviceScannerSource::processOutput (const TQString & line) { +TDE_NO_EXPORT bool TVDeviceScannerSource::processOutput (const TQString & line) { if (m_nameRegExp.search (line) > -1) { m_tvdevice->pretty_name = m_nameRegExp.cap (1); m_tvdevice->setAttribute(KMPlayer::StringPool::attr_name,m_tvdevice->pretty_name); @@ -661,19 +661,19 @@ KDE_NO_EXPORT bool TVDeviceScannerSource::processOutput (const TQString & line) return true; } -KDE_NO_EXPORT TQString TVDeviceScannerSource::filterOptions () { +TDE_NO_EXPORT TQString TVDeviceScannerSource::filterOptions () { return TQString (""); } -KDE_NO_EXPORT bool TVDeviceScannerSource::hasLength () { +TDE_NO_EXPORT bool TVDeviceScannerSource::hasLength () { return false; } -KDE_NO_EXPORT bool TVDeviceScannerSource::isSeekable () { +TDE_NO_EXPORT bool TVDeviceScannerSource::isSeekable () { return false; } -KDE_NO_EXPORT bool TVDeviceScannerSource::scan (const TQString & dev, const TQString & dri) { +TDE_NO_EXPORT bool TVDeviceScannerSource::scan (const TQString & dev, const TQString & dri) { if (m_tvdevice) return false; setURL (KURL ("tv://")); @@ -689,13 +689,13 @@ KDE_NO_EXPORT bool TVDeviceScannerSource::scan (const TQString & dev, const TQSt return true; } -KDE_NO_EXPORT void TVDeviceScannerSource::activate () { +TDE_NO_EXPORT void TVDeviceScannerSource::activate () { m_nameRegExp.setPattern ("Selected device:\\s*([^\\s].*)"); m_sizesRegExp.setPattern ("Supported sizes:\\s*([0-9]+)x([0-9]+) => ([0-9]+)x([0-9]+)"); m_inputRegExp.setPattern ("\\s*([0-9]+):\\s*([^:]+):[^\\(]*\\(tuner:([01]),\\s*norm:([^\\)]+)\\)"); } -KDE_NO_EXPORT void TVDeviceScannerSource::deactivate () { +TDE_NO_EXPORT void TVDeviceScannerSource::deactivate () { kdDebug () << "TVDeviceScannerSource::deactivate" << endl; if (m_tvdevice) { if (m_tvdevice->parentNode ()) @@ -705,7 +705,7 @@ KDE_NO_EXPORT void TVDeviceScannerSource::deactivate () { } } -KDE_NO_EXPORT void TVDeviceScannerSource::play () { +TDE_NO_EXPORT void TVDeviceScannerSource::play () { if (!m_tvdevice) return; TQString args; @@ -718,7 +718,7 @@ KDE_NO_EXPORT void TVDeviceScannerSource::play () { deactivate (); } -KDE_NO_EXPORT void TVDeviceScannerSource::stateChange (KMPlayer::Process * p, KMPlayer::Process::State os, KMPlayer::Process::State ns) { +TDE_NO_EXPORT void TVDeviceScannerSource::stateChange (KMPlayer::Process * p, KMPlayer::Process::State os, KMPlayer::Process::State ns) { if (m_tvdevice && // can be deactivated ns == KMPlayer::Process::Ready && os > KMPlayer::Process::Ready) { TVDevice * dev = 0L; |