|
|
|
@ -79,8 +79,8 @@ static TQString getPath (const KURL & url) {
|
|
|
|
|
return p;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Process::Process (TQObject * tqparent, Settings * settings, const char * n)
|
|
|
|
|
: TQObject (tqparent, n), m_source (0L), m_settings (settings),
|
|
|
|
|
Process::Process (TQObject * parent, Settings * settings, const char * n)
|
|
|
|
|
: TQObject (parent, n), m_source (0L), m_settings (settings),
|
|
|
|
|
m_state (NotRunning), m_old_state (NotRunning), m_process (0L), m_job(0L),
|
|
|
|
|
m_supported_sources (default_supported), m_viewer (0L) {}
|
|
|
|
|
|
|
|
|
@ -265,8 +265,8 @@ static bool proxyForURL (const KURL& url, TQString& proxy) {
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MPlayerBase::MPlayerBase (TQObject * tqparent, Settings * settings, const char * n)
|
|
|
|
|
: Process (tqparent, settings, n), m_use_slave (true) {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -354,8 +354,8 @@ static const char * mplayer_supports [] = {
|
|
|
|
|
"dvdsource", "exitsource", "hrefsource", "introsource", "pipesource", "tvscanner", "tvsource", "urlsource", "vcdsource", "audiocdsource", 0L
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MPlayer::MPlayer (TQObject * tqparent, Settings * settings)
|
|
|
|
|
: MPlayerBase (tqparent, settings, "mplayer"),
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MPlayer::MPlayer (TQObject * parent, Settings * settings)
|
|
|
|
|
: MPlayerBase (parent, settings, "mplayer"),
|
|
|
|
|
m_widget (0L),
|
|
|
|
|
m_configpage (new MPlayerPreferencesPage (this)),
|
|
|
|
|
aid (-1), sid (-1),
|
|
|
|
@ -365,7 +365,7 @@ KDE_NO_CDTOR_EXPORT MPlayer::MPlayer (TQObject * tqparent, Settings * settings)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MPlayer::~MPlayer () {
|
|
|
|
|
if (m_widget && !m_widget->tqparent ())
|
|
|
|
|
if (m_widget && !m_widget->parent ())
|
|
|
|
|
delete m_widget;
|
|
|
|
|
delete m_configpage;
|
|
|
|
|
}
|
|
|
|
@ -886,14 +886,14 @@ namespace KMPlayer {
|
|
|
|
|
|
|
|
|
|
class KMPLAYER_NO_EXPORT MPlayerPreferencesFrame : public TQFrame {
|
|
|
|
|
public:
|
|
|
|
|
MPlayerPreferencesFrame (TQWidget * tqparent);
|
|
|
|
|
MPlayerPreferencesFrame (TQWidget * parent);
|
|
|
|
|
TQTable * table;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MPlayerPreferencesFrame::MPlayerPreferencesFrame (TQWidget * tqparent)
|
|
|
|
|
: TQFrame (tqparent) {
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MPlayerPreferencesFrame::MPlayerPreferencesFrame (TQWidget * parent)
|
|
|
|
|
: TQFrame (parent) {
|
|
|
|
|
TQVBoxLayout * tqlayout = new TQVBoxLayout (this);
|
|
|
|
|
table = new TQTable (int (MPlayerPreferencesPage::pat_last)+non_patterns, 2, this);
|
|
|
|
|
table->verticalHeader ()->hide ();
|
|
|
|
@ -978,8 +978,8 @@ KDE_NO_EXPORT void MPlayerPreferencesPage::prefLocation (TQString & item, TQStri
|
|
|
|
|
tab = i18n ("MPlayer");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT TQFrame * MPlayerPreferencesPage::prefPage (TQWidget * tqparent) {
|
|
|
|
|
m_configframe = new MPlayerPreferencesFrame (tqparent);
|
|
|
|
|
KDE_NO_EXPORT TQFrame * MPlayerPreferencesPage::prefPage (TQWidget * parent) {
|
|
|
|
|
m_configframe = new MPlayerPreferencesFrame (parent);
|
|
|
|
|
return m_configframe;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -989,8 +989,8 @@ static const char * mencoder_supports [] = {
|
|
|
|
|
"dvdsource", "pipesource", "tvscanner", "tvsource", "urlsource", "vcdsource", "audiocdsource", 0L
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MEncoder::MEncoder (TQObject * tqparent, Settings * settings)
|
|
|
|
|
: MPlayerBase (tqparent, settings, "mencoder") {
|
|
|
|
|
KDE_NO_CDTOR_EXPORT MEncoder::MEncoder (TQObject * parent, Settings * settings)
|
|
|
|
|
: MPlayerBase (parent, settings, "mencoder") {
|
|
|
|
|
m_supported_sources = mencoder_supports;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1054,8 +1054,8 @@ static const char * mplayerdump_supports [] = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT
|
|
|
|
|
MPlayerDumpstream::MPlayerDumpstream (TQObject * tqparent, Settings * settings)
|
|
|
|
|
: MPlayerBase (tqparent, settings, "mplayerdumpstream") {
|
|
|
|
|
MPlayerDumpstream::MPlayerDumpstream (TQObject * parent, Settings * settings)
|
|
|
|
|
: MPlayerBase (parent, settings, "mplayerdumpstream") {
|
|
|
|
|
m_supported_sources = mplayerdump_supports;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1178,8 +1178,8 @@ void Callback::toggleFullScreen () {
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
CallbackProcess::CallbackProcess (TQObject * tqparent, Settings * settings, const char * n, const TQString & menuname)
|
|
|
|
|
: Process (tqparent, settings, n),
|
|
|
|
|
CallbackProcess::CallbackProcess (TQObject * parent, Settings * settings, const char * n, const TQString & menuname)
|
|
|
|
|
: Process (parent, settings, n),
|
|
|
|
|
m_callback (new Callback (this)),
|
|
|
|
|
m_backend (0L),
|
|
|
|
|
m_menuname (menuname),
|
|
|
|
@ -1501,22 +1501,22 @@ NodePtr SomeNode::childFromTag (const TQString & t) {
|
|
|
|
|
return new SomeNode (m_doc, t);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQWidget * TypeNode::createWidget (TQWidget * tqparent) {
|
|
|
|
|
TQWidget * TypeNode::createWidget (TQWidget * parent) {
|
|
|
|
|
TQString type_attr = getAttribute (StringPool::attr_type);
|
|
|
|
|
const char * ctype = type_attr.ascii ();
|
|
|
|
|
TQString value = getAttribute (StringPool::attr_value);
|
|
|
|
|
if (!strcmp (ctype, "range")) {
|
|
|
|
|
w = new TQSlider (getAttribute (TQString ("START")).toInt (),
|
|
|
|
|
getAttribute (StringPool::attr_end).toInt (),
|
|
|
|
|
1, value.toInt (), Qt::Horizontal, tqparent);
|
|
|
|
|
1, value.toInt (), Qt::Horizontal, parent);
|
|
|
|
|
} else if (!strcmp (ctype, "num") || !strcmp (ctype, "string")) {
|
|
|
|
|
w = new TQLineEdit (value, tqparent);
|
|
|
|
|
w = new TQLineEdit (value, parent);
|
|
|
|
|
} else if (!strcmp (ctype, "bool")) {
|
|
|
|
|
TQCheckBox * checkbox = new TQCheckBox (tqparent);
|
|
|
|
|
TQCheckBox * checkbox = new TQCheckBox (parent);
|
|
|
|
|
checkbox->setChecked (value.toInt ());
|
|
|
|
|
w = checkbox;
|
|
|
|
|
} else if (!strcmp (ctype, "enum")) {
|
|
|
|
|
TQComboBox * combo = new TQComboBox (tqparent);
|
|
|
|
|
TQComboBox * combo = new TQComboBox (parent);
|
|
|
|
|
for (NodePtr e = firstChild (); e; e = e->nextSibling ())
|
|
|
|
|
if (e->isElementNode () && !strcmp (e->nodeName (), "item"))
|
|
|
|
|
combo->insertItem (convertNode <Element> (e)->getAttribute (StringPool::attr_value));
|
|
|
|
@ -1558,7 +1558,7 @@ namespace KMPlayer {
|
|
|
|
|
|
|
|
|
|
class KMPLAYER_NO_EXPORT XMLPreferencesFrame : public TQFrame {
|
|
|
|
|
public:
|
|
|
|
|
XMLPreferencesFrame (TQWidget * tqparent, CallbackProcess *);
|
|
|
|
|
XMLPreferencesFrame (TQWidget * parent, CallbackProcess *);
|
|
|
|
|
KDE_NO_CDTOR_EXPORT ~XMLPreferencesFrame () {}
|
|
|
|
|
TQTable * table;
|
|
|
|
|
protected:
|
|
|
|
@ -1570,8 +1570,8 @@ private:
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT XMLPreferencesFrame::XMLPreferencesFrame
|
|
|
|
|
(TQWidget * tqparent, CallbackProcess * p)
|
|
|
|
|
: TQFrame (tqparent), m_process (p){
|
|
|
|
|
(TQWidget * parent, CallbackProcess * p)
|
|
|
|
|
: TQFrame (parent), m_process (p){
|
|
|
|
|
TQVBoxLayout * tqlayout = new TQVBoxLayout (this);
|
|
|
|
|
table = new TQTable (this);
|
|
|
|
|
tqlayout->addWidget (table);
|
|
|
|
@ -1669,8 +1669,8 @@ KDE_NO_EXPORT void XMLPreferencesPage::prefLocation (TQString & item, TQString &
|
|
|
|
|
tab = m_process->menuName ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KDE_NO_EXPORT TQFrame * XMLPreferencesPage::prefPage (TQWidget * tqparent) {
|
|
|
|
|
m_configframe = new XMLPreferencesFrame (tqparent, m_process);
|
|
|
|
|
KDE_NO_EXPORT TQFrame * XMLPreferencesPage::prefPage (TQWidget * parent) {
|
|
|
|
|
m_configframe = new XMLPreferencesFrame (parent, m_process);
|
|
|
|
|
return m_configframe;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1681,8 +1681,8 @@ static const char * xine_supported [] = {
|
|
|
|
|
"tvsource", "urlsource", "vcdsource", "audiocdsource", 0L
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT Xine::Xine (TQObject * tqparent, Settings * settings)
|
|
|
|
|
: CallbackProcess (tqparent, settings, "xine", i18n ("&Xine")) {
|
|
|
|
|
KDE_NO_CDTOR_EXPORT Xine::Xine (TQObject * parent, Settings * settings)
|
|
|
|
|
: CallbackProcess (parent, settings, "xine", i18n ("&Xine")) {
|
|
|
|
|
#ifdef HAVE_XINE
|
|
|
|
|
m_supported_sources = xine_supported;
|
|
|
|
|
m_settings->addPage (m_configpage);
|
|
|
|
@ -1757,8 +1757,8 @@ static const char * gst_supported [] = {
|
|
|
|
|
"exitsource", "introsource", "urlsource", "vcdsource", "audiocdsource", 0L
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT GStreamer::GStreamer (TQObject * tqparent, Settings * settings)
|
|
|
|
|
: CallbackProcess (tqparent, settings, "gstreamer", i18n ("&GStreamer")) {
|
|
|
|
|
KDE_NO_CDTOR_EXPORT GStreamer::GStreamer (TQObject * parent, Settings * settings)
|
|
|
|
|
: CallbackProcess (parent, settings, "gstreamer", i18n ("&GStreamer")) {
|
|
|
|
|
#ifdef HAVE_GSTREAMER
|
|
|
|
|
m_supported_sources = gst_supported;
|
|
|
|
|
#endif
|
|
|
|
@ -1808,8 +1808,8 @@ static const char * ffmpeg_supports [] = {
|
|
|
|
|
"tvsource", "urlsource", 0L
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
FFMpeg::FFMpeg (TQObject * tqparent, Settings * settings)
|
|
|
|
|
: Process (tqparent, settings, "ffmpeg") {
|
|
|
|
|
FFMpeg::FFMpeg (TQObject * parent, Settings * settings)
|
|
|
|
|
: Process (parent, settings, "ffmpeg") {
|
|
|
|
|
m_supported_sources = ffmpeg_supports;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2017,7 +2017,7 @@ KDE_NO_CDTOR_EXPORT NpStream::~NpStream () {
|
|
|
|
|
KDE_NO_EXPORT void NpStream::open () {
|
|
|
|
|
kdDebug () << "NpStream " << stream_id << " open " << url.url () << endl;
|
|
|
|
|
if (url.url().startsWith ("javascript:")) {
|
|
|
|
|
NpPlayer *npp = static_cast <NpPlayer *> (tqparent ());
|
|
|
|
|
NpPlayer *npp = static_cast <NpPlayer *> (parent ());
|
|
|
|
|
TQString result = npp->evaluateScript (url.url().mid (11));
|
|
|
|
|
if (!result.isEmpty ()) {
|
|
|
|
|
TQCString cr = result.local8Bit ();
|
|
|
|
@ -2089,8 +2089,8 @@ static const char * npplayer_supports [] = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT
|
|
|
|
|
NpPlayer::NpPlayer (TQObject * tqparent, Settings * settings, const TQString & srv)
|
|
|
|
|
: Process (tqparent, settings, "npp"),
|
|
|
|
|
NpPlayer::NpPlayer (TQObject * parent, Settings * settings, const TQString & srv)
|
|
|
|
|
: Process (parent, settings, "npp"),
|
|
|
|
|
service (srv),
|
|
|
|
|
write_in_progress (false) {
|
|
|
|
|
m_supported_sources = npplayer_supports;
|
|
|
|
@ -2544,8 +2544,8 @@ void NpStream::slotMimetype (KIO::Job *, const TQString &) {}
|
|
|
|
|
void NpStream::slotTotalSize (KIO::Job *, KIO::filesize_t) {}
|
|
|
|
|
|
|
|
|
|
KDE_NO_CDTOR_EXPORT
|
|
|
|
|
NpPlayer::NpPlayer (TQObject * tqparent, Settings * settings, const TQString &)
|
|
|
|
|
: Process (tqparent, settings, "npp") {}
|
|
|
|
|
NpPlayer::NpPlayer (TQObject * parent, Settings * settings, const TQString &)
|
|
|
|
|
: Process (parent, settings, "npp") {}
|
|
|
|
|
KDE_NO_CDTOR_EXPORT NpPlayer::~NpPlayer () {}
|
|
|
|
|
KDE_NO_EXPORT void NpPlayer::init () {}
|
|
|
|
|
KDE_NO_EXPORT bool NpPlayer::deMediafiedPlay () { return false; }
|
|
|
|
|