summaryrefslogtreecommitdiffstats
path: root/src/kmplayerappsource.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:54:13 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:54:13 +0000
commit092be7678b67552cb3161fe162242bf8d3aeed2f (patch)
treebe0693f45b101252c370e40f6e84da2cd7a52f75 /src/kmplayerappsource.h
downloadkmplayer-092be7678b67552cb3161fe162242bf8d3aeed2f.tar.gz
kmplayer-092be7678b67552cb3161fe162242bf8d3aeed2f.zip
Added old abandoned KDE3 version of kmplayer
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmplayer@1091557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kmplayerappsource.h')
-rw-r--r--src/kmplayerappsource.h205
1 files changed, 205 insertions, 0 deletions
diff --git a/src/kmplayerappsource.h b/src/kmplayerappsource.h
new file mode 100644
index 0000000..86378f3
--- /dev/null
+++ b/src/kmplayerappsource.h
@@ -0,0 +1,205 @@
+/***************************************************************************
+ kmplayersource.h - description
+ -------------------
+ begin : Sat Mar 24 16:14:51 CET 2003
+ copyright : (C) 2003 by Koos Vriezen
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KMPLAYERAPPSOURCE_H
+#define KMPLAYERAPPSOURCE_H
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <qframe.h>
+
+#include <kurl.h>
+
+#include "kmplayersource.h"
+#include "kmplayerconfig.h"
+
+
+class KMPlayerApp;
+class KURLRequester;
+class QPopupMenu;
+class QMenuItem;
+class QCheckBox;
+class QLineEdit;
+class TVInput;
+class TVChannel;
+
+/*
+ * Base class for sources having a sub menu in the application
+ */
+class KMPLAYER_NO_EXPORT KMPlayerMenuSource : public KMPlayer::Source {
+ Q_OBJECT
+public:
+ KMPlayerMenuSource (const QString & n, KMPlayerApp * app, QPopupMenu * m, const char * src);
+ virtual ~KMPlayerMenuSource ();
+protected:
+ void menuItemClicked (QPopupMenu * menu, int id);
+ QPopupMenu * m_menu;
+ KMPlayerApp * m_app;
+};
+
+/*
+ * Preference page for DVD
+ */
+class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageDVD : public QFrame {
+ Q_OBJECT
+public:
+ KMPlayerPrefSourcePageDVD (QWidget * parent);
+ ~KMPlayerPrefSourcePageDVD () {}
+
+ QCheckBox * autoPlayDVD;
+ KURLRequester * dvddevice;
+};
+
+/*
+ * Source from DVD
+ */
+class KMPLAYER_NO_EXPORT KMPlayerDVDSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage {
+ Q_OBJECT
+public:
+ KMPlayerDVDSource (KMPlayerApp * app, QPopupMenu * m);
+ virtual ~KMPlayerDVDSource ();
+ virtual bool processOutput (const QString & line);
+ virtual QString filterOptions ();
+ virtual void setIdentified (bool b = true);
+ virtual QString prettyName ();
+ virtual void write (KConfig *);
+ virtual void read (KConfig *);
+ virtual void sync (bool);
+ virtual void prefLocation (QString & item, QString & icon, QString & tab);
+ virtual QFrame * prefPage (QWidget * parent);
+public slots:
+ virtual void activate ();
+ virtual void deactivate ();
+
+ void titleMenuClicked (int id);
+ void subtitleMenuClicked (int id);
+ void languageMenuClicked (int id);
+ void chapterMenuClicked (int id);
+private:
+ void buildArguments ();
+ void play ();
+ QPopupMenu * m_dvdtitlemenu;
+ QPopupMenu * m_dvdchaptermenu;
+ QPopupMenu * m_dvdlanguagemenu;
+ QPopupMenu * m_dvdsubtitlemenu;
+ KMPlayer::NodePtr disks;
+ KMPlayerPrefSourcePageDVD * m_configpage;
+ int m_current_title;
+ bool m_start_play;
+};
+
+
+/*
+ * Source from DVDNav
+ */
+class KMPLAYER_NO_EXPORT KMPlayerDVDNavSource : public KMPlayerMenuSource {
+ Q_OBJECT
+public:
+ KMPlayerDVDNavSource (KMPlayerApp * app, QPopupMenu * m);
+ virtual ~KMPlayerDVDNavSource ();
+ virtual QString prettyName ();
+public slots:
+ virtual void activate ();
+ virtual void deactivate ();
+ virtual void play ();
+
+ void finished ();
+ void navMenuClicked (int id);
+};
+
+
+/*
+ * Preference page for VCD
+ */
+class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageVCD : public QFrame {
+ Q_OBJECT
+public:
+ KMPlayerPrefSourcePageVCD (QWidget * parent);
+ ~KMPlayerPrefSourcePageVCD () {}
+ KURLRequester * vcddevice;
+ QCheckBox *autoPlayVCD;
+};
+
+
+/*
+ * Source from VCD
+ */
+class KMPLAYER_NO_EXPORT KMPlayerVCDSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage {
+ Q_OBJECT
+public:
+ KMPlayerVCDSource (KMPlayerApp * app, QPopupMenu * m);
+ virtual ~KMPlayerVCDSource ();
+ virtual bool processOutput (const QString & line);
+ virtual void setIdentified (bool b = true);
+ virtual QString prettyName ();
+ virtual void write (KConfig *);
+ virtual void read (KConfig *);
+ virtual void sync (bool);
+ virtual void prefLocation (QString & item, QString & icon, QString & tab);
+ virtual QFrame * prefPage (QWidget * parent);
+public slots:
+ virtual void activate ();
+ virtual void deactivate ();
+private:
+ void buildArguments ();
+ KMPlayerPrefSourcePageVCD * m_configpage;
+ bool m_start_play;
+};
+
+
+/*
+ * Source from AudoCD
+ */
+class KMPLAYER_NO_EXPORT KMPlayerAudioCDSource : public KMPlayerMenuSource {
+ Q_OBJECT
+public:
+ KMPlayerAudioCDSource (KMPlayerApp * app, QPopupMenu * m);
+ virtual ~KMPlayerAudioCDSource ();
+ virtual bool processOutput (const QString & line);
+ virtual void setIdentified (bool b = true);
+ virtual QString prettyName ();
+public slots:
+ virtual void activate ();
+ virtual void deactivate ();
+private:
+ void buildArguments ();
+};
+
+
+/*
+ * Source from stdin (for the backends, not kmplayer)
+ */
+class KMPLAYER_NO_EXPORT KMPlayerPipeSource : public KMPlayer::Source {
+ Q_OBJECT
+public:
+ KMPlayerPipeSource (KMPlayerApp * app);
+ virtual ~KMPlayerPipeSource ();
+ virtual bool hasLength ();
+ virtual bool isSeekable ();
+ void setCommand (const QString & cmd);
+ virtual QString prettyName ();
+public slots:
+ virtual void activate ();
+ virtual void deactivate ();
+private:
+ KMPlayerApp * m_app;
+};
+
+#endif // KMPLAYERAPPSOURCE_H