[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/phonon
From:       Marco Gulino <marco.gulino () gmail ! com>
Date:       2009-04-23 10:00:49
Message-ID: 1240480849.655423.25046.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 958021 by gulino:

videowidgetinterface (the right way)

 M  +5 -0      phonon/phonondefs.h  
 M  +5 -4      phonon/videowidget.cpp  
 M  +12 -5     phonon/videowidgetinterface.h  
 M  +1 -1      xine/CMakeLists.txt  
 M  +2 -2      xine/videowidget.h  


--- trunk/kdesupport/phonon/phonon/phonondefs.h #958020:958021
@@ -29,6 +29,11 @@
 QT_BEGIN_HEADER
 QT_BEGIN_NAMESPACE
 
+#ifdef PHONON_BACKEND_VERSION_4_4
+# ifndef PHONON_BACKEND_VERSION_4_3
+#  define PHONON_BACKEND_VERSION_4_3
+# endif
+#endif
 #ifdef PHONON_BACKEND_VERSION_4_3
 # ifndef PHONON_BACKEND_VERSION_4_2
 #  define PHONON_BACKEND_VERSION_4_2
--- trunk/kdesupport/phonon/phonon/videowidget.cpp #958020:958021
@@ -28,8 +28,10 @@
 #include "phononnamespace_p.h"
 
 #include <QtGui/QAction>
-#include <iostream>
-#define PHONON_INTERFACENAME VideoWidgetInterface
+#define IFACES2 VideoWidgetInterface44
+#define IFACES1 IFACES2
+#define IFACES0 VideoWidgetInterface43, IFACES1
+#define PHONON_INTERFACENAME IFACES0
 
 QT_BEGIN_NAMESPACE
 
@@ -102,8 +104,7 @@
 
 
 QImage VideoWidget::snapshot() const {
-    Iface<VideoWidgetInterface4> iface((VideoWidgetPrivate*) (k_ptr));
-    std::cerr << "interface: " << iface << "\n";
+    Iface<VideoWidgetInterface44> iface((VideoWidgetPrivate*) (k_ptr));
     if(iface) return iface->snapshot();
     return QImage(); // TODO not implemented in VideoInterface
 }
--- trunk/kdesupport/phonon/phonon/videowidgetinterface.h #958020:958021
@@ -32,10 +32,10 @@
 
 namespace Phonon
 {
-class VideoWidgetInterface
+class VideoWidgetInterface43
 {
     public:
-        virtual ~VideoWidgetInterface() {}
+        virtual ~VideoWidgetInterface43() {}
 
         virtual Phonon::VideoWidget::AspectRatio aspectRatio() const = 0;
         virtual void setAspectRatio(Phonon::VideoWidget::AspectRatio) = 0;
@@ -54,15 +54,22 @@
 //X        virtual bool createOverlay(QWidget *widget, int type) = 0;
 };
 
-class VideoWidgetInterface4 : public VideoWidgetInterface
+class VideoWidgetInterface44 : public VideoWidgetInterface43
 {
     public:
         virtual QImage snapshot() const = 0;
 };
 }
 
-Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface, \
                "VideoWidgetInterface3.phonon.kde.org")
-Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface4, \
"VideoWidgetInterface4.phonon.kde.org") +#ifdef PHONON_BACKEND_VERSION_4_4
+namespace Phonon { typedef VideoWidgetInterface44 VideoWidgetInterface; }
+Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface, \
"VideoWidgetInterface44.phonon.kde.org") \
+Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface43,   \
"VideoWidgetInterface.phonon.kde.org") +#else
+namespace Phonon { typedef VideoWidgetInterface43 VideoWidgetInterface; }
+Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface44,   \
"VideoWidgetInterface44.phonon.kde.org") \
+Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface, \
"VideoWidgetInterface.phonon.kde.org") +#endif
 
 #endif //QT_NO_PHONON_VIDEO
 
--- trunk/kdesupport/phonon/xine/CMakeLists.txt #958020:958021
@@ -101,7 +101,7 @@
 
     configure_file(config-xine-widget.h.cmake \
${CMAKE_CURRENT_BINARY_DIR}/config-xine-widget.h )  
-    add_definitions(-DPHONON_BACKEND_VERSION_4_2)
+    add_definitions(-DPHONON_BACKEND_VERSION_4_4)
     automoc4_add_library(phonon_xine MODULE ${phonon_xine_SRCS})
     set_target_properties(phonon_xine PROPERTIES PREFIX "")
     target_link_libraries(phonon_xine ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} \
                ${PHONON_LIBS} ${XINE_LIBRARY})
--- trunk/kdesupport/phonon/xine/videowidget.h #958020:958021
@@ -92,10 +92,10 @@
         bool m_isValid;
 };
 
-class VideoWidget : public QWidget, public Phonon::VideoWidgetInterface4, public \
Phonon::Xine::SinkNode, public Phonon::Experimental::SnapshotInterface +class \
VideoWidget : public QWidget, public Phonon::VideoWidgetInterface, public \
Phonon::Xine::SinkNode, public Phonon::Experimental::SnapshotInterface  {
     Q_OBJECT
-    Q_INTERFACES(Phonon::VideoWidgetInterface Phonon::VideoWidgetInterface4 \
Phonon::Xine::SinkNode Phonon::Experimental::SnapshotInterface) +    Q_INTERFACES( \
Phonon::VideoWidgetInterface Phonon::Xine::SinkNode \
Phonon::Experimental::SnapshotInterface)  public:
         VideoWidget(QWidget *parent = 0);
         ~VideoWidget();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic