00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef ARTSKDE_KVIDEOWIDGET_H
00012
#define ARTSKDE_KVIDEOWIDGET_H
00013
00014
#include <qevent.h>
00015
#include <qimage.h>
00016
#include <qwidget.h>
00017
#include <kmedia2.h>
00018
#include <kxmlguiclient.h>
00019
00020
00021
class KDE_ARTS_EXPORT KVideoWidget :
public QWidget,
virtual public KXMLGUIClient
00022 {
00023 Q_OBJECT
00024
00025
public:
00026 KVideoWidget(
KXMLGUIClient *clientParent,
QWidget *parent = 0,
const char *name = 0, WFlags f = 0 );
00027 KVideoWidget(
QWidget *parent = 0,
const char *name = 0, WFlags f = 0 );
00028
virtual ~KVideoWidget();
00029
00030
void embed( Arts::VideoPlayObject vpo );
00031
static QImage snapshot( Arts::VideoPlayObject vpo );
00032
00033
bool isEmbedded();
00034
bool isFullscreen();
00035
bool isHalfSize();
00036
bool isNormalSize();
00037
bool isDoubleSize();
00038
00039
QSize sizeHint() const;
00040
00041 virtual
int heightForWidth (
int w ) const;
00042
00043 protected:
00044 virtual
void mousePressEvent(
QMouseEvent *event );
00045 virtual
void mouseDoubleClickEvent(
QMouseEvent *event);
00046 virtual
void resizeEvent(
QResizeEvent *event );
00047 virtual
bool x11Event( XEvent *event );
00048
00049 public slots:
00050
void setFullscreen();
00051
void setWindowed();
00052
void setHalfSize();
00053
void setNormalSize();
00054
void setDoubleSize();
00055
00056
void resizeNotify(
int width,
int height );
00057
00058 protected slots:
00059
void fullscreenActivated();
00060
void halfSizeActivated();
00061
void normalSizeActivated();
00062
void doubleSizeActivated();
00063
00064 signals:
00065
void adaptSize(
int width,
int height );
00066
void mouseButtonPressed(
int type, const
QPoint &,
int state );
00067
void mouseButtonDoubleClick( const QPoint &,
int state );
00072
void rightButtonPressed( const QPoint & );
00073
00074 private:
00075
void init(
void);
00076
QWidget *fullscreenWidget;
00077
int videoWidth;
00078
int videoHeight;
00079 Arts::VideoPlayObject poVideo;
00080 };
00081
00082 #endif