src/3rdparty/phonon/mmf/ancestormovemonitor.cpp
changeset 19 fcece45ef507
parent 3 41300fa6a67c
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
    16 
    16 
    17 */
    17 */
    18 
    18 
    19 #include "ancestormovemonitor.h"
    19 #include "ancestormovemonitor.h"
    20 #include "utils.h"
    20 #include "utils.h"
    21 #include "videooutput.h"
    21 
       
    22 #include "videooutput_dsa.h"
    22 
    23 
    23 #include <QCoreApplication>
    24 #include <QCoreApplication>
    24 
    25 
    25 QT_BEGIN_NAMESPACE
    26 QT_BEGIN_NAMESPACE
    26 
    27 
    57 
    58 
    58 //-----------------------------------------------------------------------------
    59 //-----------------------------------------------------------------------------
    59 // Public functions
    60 // Public functions
    60 //-----------------------------------------------------------------------------
    61 //-----------------------------------------------------------------------------
    61 
    62 
    62 void AncestorMoveMonitor::registerTarget(VideoOutput *target)
    63 void AncestorMoveMonitor::registerTarget(DsaVideoOutput *target)
    63 {
    64 {
    64     TRACE_CONTEXT(AncestorMoveMonitor::registerTarget, EVideoInternal);
    65     TRACE_CONTEXT(AncestorMoveMonitor::registerTarget, EVideoInternal);
    65     TRACE_ENTRY("target 0x%08x", target);
    66     TRACE_ENTRY("target 0x%08x", target);
    66 
    67 
    67     // First un-register the target, in case this is being called as a result
    68     // First un-register the target, in case this is being called as a result
    91     dump();
    92     dump();
    92 
    93 
    93     TRACE_EXIT_0();
    94     TRACE_EXIT_0();
    94 }
    95 }
    95 
    96 
    96 void AncestorMoveMonitor::unRegisterTarget(VideoOutput *target)
    97 void AncestorMoveMonitor::unRegisterTarget(DsaVideoOutput *target)
    97 {
    98 {
    98     TRACE_CONTEXT(AncestorMoveMonitor::unRegisterTarget, EVideoInternal);
    99     TRACE_CONTEXT(AncestorMoveMonitor::unRegisterTarget, EVideoInternal);
    99     TRACE_ENTRY("target 0x%08x", target);
   100     TRACE_ENTRY("target 0x%08x", target);
   100 
   101 
   101     Hash::iterator it = m_hash.begin();
   102     Hash::iterator it = m_hash.begin();
   124         //TRACE_ENTRY("watched 0x%08x event.type %d", watched, event->type());
   125         //TRACE_ENTRY("watched 0x%08x event.type %d", watched, event->type());
   125 
   126 
   126         const Hash::const_iterator it = m_hash.find(watched);
   127         const Hash::const_iterator it = m_hash.find(watched);
   127         if(it != m_hash.end()) {
   128         if(it != m_hash.end()) {
   128             const TargetList& targetList = it.value();
   129             const TargetList& targetList = it.value();
   129             VideoOutput* target = 0;
   130             DsaVideoOutput* target = 0;
   130             foreach(target, targetList) {
   131             foreach(target, targetList) {
   131                 switch (event->type()) {
   132                 switch (event->type()) {
   132 
   133 
   133                 case QEvent::Move:
   134                 case QEvent::Move:
   134                     // Notify the target that its ancestor has moved
   135                     // Notify the target that its ancestor has moved
   164     for(Hash::const_iterator it = m_hash.begin();
   165     for(Hash::const_iterator it = m_hash.begin();
   165         it != m_hash.end(); ++it) {
   166         it != m_hash.end(); ++it) {
   166         const QObject *ancestor = it.key();
   167         const QObject *ancestor = it.key();
   167         TRACE("ancestor 0x%08x", ancestor);
   168         TRACE("ancestor 0x%08x", ancestor);
   168         const TargetList& targetList = it.value();
   169         const TargetList& targetList = it.value();
   169         VideoOutput* target = 0;
   170         DsaVideoOutput* target = 0;
   170         foreach(target, targetList) {
   171         foreach(target, targetList) {
   171             TRACE("    target 0x%08x", target);
   172             TRACE("    target 0x%08x", target);
   172         }
   173         }
   173     }
   174     }
   174 #endif
   175 #endif
   175 }
   176 }
   176 
   177 
   177 
       
   178 
       
   179 QT_END_NAMESPACE
   178 QT_END_NAMESPACE
   180 
   179