summaryrefslogtreecommitdiffstats
path: root/noatun/library/noatun/video.h
blob: bed8f8ac35d3d4c375beb40a17af71e7c1e3987f (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
#ifndef NOATUN__VIDEO_H
#define NOATUN__VIDEO_H

#include <kvideowidget.h>
#include <arts/kmedia2.h>

class TQPopupMenu;

/**
 * a widget that contains the video being played
 **/
class VideoFrame : public KVideoWidget
{
Q_OBJECT
  TQ_OBJECT
	struct Private;
	VideoFrame::Private *d;
	
	static TQPtrList<VideoFrame> frames;
	static VideoFrame *whose;

public:
	VideoFrame(KXMLGUIClient *clientParent, TQWidget *parent=0, const char *name=0, WFlags f=0);
	VideoFrame(TQWidget *parent = 0, const char *name=0, WFlags f=0);
	~VideoFrame();
	
	/**
	 * which one has the video (or will have it next, if no video is playing)
	 **/
	static VideoFrame *playing();
	
	TQPopupMenu *popupMenu(TQWidget *parent);
	TQPopupMenu *popupMenu() { return popupMenu(this); }
	
public slots:
	/**
	 * only one VideoFrame can be playing a video, make this the one
	 **/
	void give();

private slots:
	void stopped();
	void changed();
	
signals:
	/**
	 * signaled when video is playing in here, when
	 * (width*height) != 0
	 **/
	void acquired();
	/**
	 * signaled when video is no longer playing
	 * here, when (width*heoght) == 0
	 */
	void lost();
};



#endif