home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / arts / kvideowidget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.2 KB  |  83 lines

  1. /*
  2.    This file is part of KDE/aRts (Noatun) - xine integration
  3.    Copyright (C) 2002 Ewald Snel <ewald@rambo.its.tudelft.nl>
  4.    Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com>
  5.  
  6.    This library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Lesser General Public
  8.    License version 2 as published by the Free Software Foundation.
  9. */
  10.  
  11. #ifndef ARTSKDE_KVIDEOWIDGET_H
  12. #define ARTSKDE_KVIDEOWIDGET_H
  13.  
  14. #include <qevent.h>
  15. #include <qimage.h>
  16. #include <qwidget.h>
  17. #include <kmedia2.h>
  18. #include <kxmlguiclient.h>
  19.  
  20.  
  21. class KDE_ARTS_EXPORT KVideoWidget : public QWidget, virtual public KXMLGUIClient
  22. {
  23. Q_OBJECT
  24.  
  25. public:
  26.     KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
  27.     KVideoWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
  28.     virtual ~KVideoWidget();
  29.  
  30.     void embed( Arts::VideoPlayObject vpo );
  31.     static QImage snapshot( Arts::VideoPlayObject vpo );
  32.  
  33.     bool isEmbedded();
  34.     bool isFullscreen();
  35.     bool isHalfSize();
  36.     bool isNormalSize();
  37.     bool isDoubleSize();
  38.  
  39.     QSize sizeHint() const;
  40.  
  41.     virtual int heightForWidth ( int w ) const;
  42.  
  43. protected:
  44.     virtual void mousePressEvent( QMouseEvent *event );
  45.     virtual void mouseDoubleClickEvent( QMouseEvent *event);
  46.     virtual void resizeEvent( QResizeEvent *event );
  47.     virtual bool x11Event( XEvent *event );
  48.  
  49. public slots:
  50.     void setFullscreen();
  51.     void setWindowed();
  52.     void setHalfSize();
  53.     void setNormalSize();
  54.     void setDoubleSize();
  55.  
  56.     void resizeNotify( int width, int height );
  57.  
  58. protected slots:
  59.     void fullscreenActivated();
  60.     void halfSizeActivated();
  61.     void normalSizeActivated();
  62.     void doubleSizeActivated();
  63.  
  64. signals:
  65.     void adaptSize( int width, int height );
  66.     void mouseButtonPressed( int type, const QPoint &, int state );
  67.     void mouseButtonDoubleClick( const QPoint &, int state );
  68.     /**
  69.      * @deprecated
  70.      * use mouseButtonPressed( int type, const QPoint & ) instead.
  71.      */
  72.     void rightButtonPressed( const QPoint & );
  73.  
  74. private:
  75.     void init(void);
  76.     QWidget *fullscreenWidget;
  77.     int videoWidth;
  78.     int videoHeight;
  79.     Arts::VideoPlayObject poVideo;
  80. };
  81.  
  82. #endif
  83.