summaryrefslogtreecommitdiffstats
path: root/kaffeine/src/input/dvbclient/cdwidget.h
blob: 5594e6854c3eb24f4ccd346373d3a05ecbcbbeb1 (plain)
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
/*
 * cdwidget.h
 *
 * Copyright (C) 2005 Christophe Thommeret <hftom@free.fr>
 *
 * 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.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef CDWIDGET_H
#define CDWIDGET_H

#include <tqlistbox.h>
#include <tqpixmap.h>
#include <tqptrlist.h>
#include <tqvbox.h>
#include <tqsplitter.h>

#include <tdeconfig.h>

#include "cddump.h"
#include "cdlisten.h"
#include "cdcleaner.h"
#include "kaffeineinput.h"



class CdWidget : public KaffeineInput
{
	Q_OBJECT
  

public:

	CdWidget( const TQString &ad, int port, int info, const TQString &tspath, TQWidget *parent, TQObject *objParent, const char *name );
	~CdWidget();
	void setParam( const TQString &ad, int port, int info, const TQString &tspath );
	void enableLive( bool b );
	void playNumChannel( int num );
	void next();
	void previous();

	// Reimplemented from KaffeineInput
	TQWidget *wantPlayerWindow();
	TQWidget *inputMainWidget();
	bool nextTrack( MRL& );
	bool previousTrack( MRL& );
	bool currentTrack( MRL& );
	bool trackNumber( int, MRL& );
	bool playbackFinished( MRL& );
	void getTargets( TQStringList &uiNames, TQStringList &iconNames, TQStringList &targetNames );
	void togglePanel();
	bool execTarget( const TQString& );
	void saveConfig();
	//***************************************

	TQListBox *channelsLb;
	TQVBox *mainWidget;
	TQVBox *playerBox;

public slots:

	void playLastChannel();
	void stopLive();
	void pauseLiveTV();

private:
	void loadConfig( TDEConfig* config );
	void saveConfig( TDEConfig* config );

	TQSplitter *split;
	CdDump *dump;
	CdListen *listen;
	TQString cdAddress;
	int cdPort;
	int cdInfo;
	TQString cdShiftDir;
	TQPixmap tvPix, raPix;
	TQPtrList<CdChannel> chan;
	TQString fifoName;
	TQString timeShiftFileName;
	CdCleaner *cleaner;
	int lastChannel;

private slots:

	void updateList( const TQString &list );
	void channelSelected( const TQString &name );

signals:

	void dvbOpen(const TQString&, const TQString&, int);
	void dvbStop();
	void setTimeShiftFilename( const TQString& );
};

#endif /* CDWIDGET_H */