1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
/***************************************************************************
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 <tqframe.h>
#include <kurl.h>
#include "kmplayersource.h"
#include "kmplayerconfig.h"
class KMPlayerApp;
class KURLRequester;
class TQPopupMenu;
class TQMenuItem;
class TQCheckBox;
class TQLineEdit;
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
TQ_OBJECT
public:
KMPlayerMenuSource (const TQString & n, KMPlayerApp * app, TQPopupMenu * m, const char * src);
virtual ~KMPlayerMenuSource ();
protected:
void menuItemClicked (TQPopupMenu * menu, int id);
TQPopupMenu * m_menu;
KMPlayerApp * m_app;
};
/*
* Preference page for DVD
*/
class KMPLAYER_NO_EXPORT KMPlayerPrefSourcePageDVD : public TQFrame {
Q_OBJECT
TQ_OBJECT
public:
KMPlayerPrefSourcePageDVD (TQWidget * tqparent);
~KMPlayerPrefSourcePageDVD () {}
TQCheckBox * autoPlayDVD;
KURLRequester * dvddevice;
};
/*
* Source from DVD
*/
class KMPLAYER_NO_EXPORT KMPlayerDVDSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage {
Q_OBJECT
TQ_OBJECT
public:
KMPlayerDVDSource (KMPlayerApp * app, TQPopupMenu * m);
virtual ~KMPlayerDVDSource ();
virtual bool processOutput (const TQString & line);
virtual TQString filterOptions ();
virtual void setIdentified (bool b = true);
virtual TQString prettyName ();
virtual void write (KConfig *);
virtual void read (KConfig *);
virtual void sync (bool);
virtual void prefLocation (TQString & item, TQString & icon, TQString & tab);
virtual TQFrame * prefPage (TQWidget * tqparent);
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 ();
TQPopupMenu * m_dvdtitlemenu;
TQPopupMenu * m_dvdchaptermenu;
TQPopupMenu * m_dvdlanguagemenu;
TQPopupMenu * 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
TQ_OBJECT
public:
KMPlayerDVDNavSource (KMPlayerApp * app, TQPopupMenu * m);
virtual ~KMPlayerDVDNavSource ();
virtual TQString 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 TQFrame {
Q_OBJECT
TQ_OBJECT
public:
KMPlayerPrefSourcePageVCD (TQWidget * tqparent);
~KMPlayerPrefSourcePageVCD () {}
KURLRequester * vcddevice;
TQCheckBox *autoPlayVCD;
};
/*
* Source from VCD
*/
class KMPLAYER_NO_EXPORT KMPlayerVCDSource : public KMPlayerMenuSource, public KMPlayer::PreferencesPage {
Q_OBJECT
TQ_OBJECT
public:
KMPlayerVCDSource (KMPlayerApp * app, TQPopupMenu * m);
virtual ~KMPlayerVCDSource ();
virtual bool processOutput (const TQString & line);
virtual void setIdentified (bool b = true);
virtual TQString prettyName ();
virtual void write (KConfig *);
virtual void read (KConfig *);
virtual void sync (bool);
virtual void prefLocation (TQString & item, TQString & icon, TQString & tab);
virtual TQFrame * prefPage (TQWidget * tqparent);
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
TQ_OBJECT
public:
KMPlayerAudioCDSource (KMPlayerApp * app, TQPopupMenu * m);
virtual ~KMPlayerAudioCDSource ();
virtual bool processOutput (const TQString & line);
virtual void setIdentified (bool b = true);
virtual TQString 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
TQ_OBJECT
public:
KMPlayerPipeSource (KMPlayerApp * app);
virtual ~KMPlayerPipeSource ();
virtual bool hasLength ();
virtual bool isSeekable ();
void setCommand (const TQString & cmd);
virtual TQString prettyName ();
public slots:
virtual void activate ();
virtual void deactivate ();
private:
KMPlayerApp * m_app;
};
#endif // KMPLAYERAPPSOURCE_H
|