summaryrefslogtreecommitdiffstats
path: root/arts/kde/kvideowidget.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /arts/kde/kvideowidget.h
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/kde/kvideowidget.h')
-rw-r--r--arts/kde/kvideowidget.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/arts/kde/kvideowidget.h b/arts/kde/kvideowidget.h
new file mode 100644
index 000000000..f314267ca
--- /dev/null
+++ b/arts/kde/kvideowidget.h
@@ -0,0 +1,82 @@
+/*
+ This file is part of KDE/aRts (Noatun) - xine integration
+ Copyright (C) 2002 Ewald Snel <ewald@rambo.its.tudelft.nl>
+ Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License version 2 as published by the Free Software Foundation.
+*/
+
+#ifndef ARTSKDE_KVIDEOWIDGET_H
+#define ARTSKDE_KVIDEOWIDGET_H
+
+#include <qevent.h>
+#include <qimage.h>
+#include <qwidget.h>
+#include <kmedia2.h>
+#include <kxmlguiclient.h>
+
+
+class KDE_ARTS_EXPORT KVideoWidget : public QWidget, virtual public KXMLGUIClient
+{
+Q_OBJECT
+
+public:
+ KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KVideoWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ virtual ~KVideoWidget();
+
+ void embed( Arts::VideoPlayObject vpo );
+ static QImage snapshot( Arts::VideoPlayObject vpo );
+
+ bool isEmbedded();
+ bool isFullscreen();
+ bool isHalfSize();
+ bool isNormalSize();
+ bool isDoubleSize();
+
+ QSize sizeHint() const;
+
+ virtual int heightForWidth ( int w ) const;
+
+protected:
+ virtual void mousePressEvent( QMouseEvent *event );
+ virtual void mouseDoubleClickEvent( QMouseEvent *event);
+ virtual void resizeEvent( QResizeEvent *event );
+ virtual bool x11Event( XEvent *event );
+
+public slots:
+ void setFullscreen();
+ void setWindowed();
+ void setHalfSize();
+ void setNormalSize();
+ void setDoubleSize();
+
+ void resizeNotify( int width, int height );
+
+protected slots:
+ void fullscreenActivated();
+ void halfSizeActivated();
+ void normalSizeActivated();
+ void doubleSizeActivated();
+
+signals:
+ void adaptSize( int width, int height );
+ void mouseButtonPressed( int type, const QPoint &, int state );
+ void mouseButtonDoubleClick( const QPoint &, int state );
+ /**
+ * @deprecated
+ * use mouseButtonPressed( int type, const QPoint & ) instead.
+ */
+ void rightButtonPressed( const QPoint & );
+
+private:
+ void init(void);
+ QWidget *fullscreenWidget;
+ int videoWidth;
+ int videoHeight;
+ Arts::VideoPlayObject poVideo;
+};
+
+#endif