rendered paste bodyIndex: ui/videowidget_p.h
===================================================================
--- ui/videowidget_p.h (révision 633659)
+++ ui/videowidget_p.h (copie de travail)
@@ -121,6 +121,8 @@
: layout( parent )
, fullScreenWidget( 0 )
, aspectRatio( VideoWidget::AspectRatioAuto )
+ , xZoomPercent( 100 )
+ , yZoomPercent( 100 )
{
layout.setMargin( 0 );
cursorTimer.setInterval(1000); // 1s timeout until the cursor disappears
@@ -131,6 +133,7 @@
QAction* fullScreenAction;
FullScreenVideoWidget* fullScreenWidget;
VideoWidget::AspectRatio aspectRatio;
+ int xZoomPercent, yZoomPercent;
QTimer cursorTimer;
};
} // namespace Phonon
Index: ui/videowidget.cpp
===================================================================
--- ui/videowidget.cpp (révision 633659)
+++ ui/videowidget.cpp (copie de travail)
@@ -97,6 +97,12 @@
PHONON_GETTER( Phonon::VideoWidget::AspectRatio, aspectRatio, d->aspectRatio )
PHONON_SETTER( setAspectRatio, aspectRatio, Phonon::VideoWidget::AspectRatio )
+PHONON_GETTER( int, zoomX, d->xZoomPercent )
+PHONON_SETTER( setZoomX, xZoomPercent, int )
+
+PHONON_GETTER( int, zoomY, d->yZoomPercent )
+PHONON_SETTER( setZoomY, yZoomPercent, int )
+
void VideoWidget::setFullScreen( bool newFullScreen )
{
kDebug( 602 ) << k_funcinfo << newFullScreen << endl;
Index: ui/videowidget.h
===================================================================
--- ui/videowidget.h (révision 633659)
+++ ui/videowidget.h (copie de travail)
@@ -65,6 +65,8 @@
* \see AspectRatio
*/
Q_PROPERTY( AspectRatio aspectRatio READ aspectRatio WRITE setAspectRatio )
+ Q_PROPERTY( int xZoomPercent READ zoomX WRITE setZoomX )
+ Q_PROPERTY( int yZoomPercent READ zoomY WRITE setZoomY )
public:
/**
* Defines the width:height to be used for the video.
@@ -108,6 +110,15 @@
AspectRatio aspectRatio() const;
void setAspectRatio( AspectRatio );
+
+ /**
+ * Zoom in/out the image.
+ * Reset with setzoomX(100);
+ */
+ void setZoomX( int );
+ void setZoomY( int );
+ int zoomX() const;
+ int zoomY() const;
public Q_SLOTS:
void setFullScreen( bool fullscreen );