fix problems with windows categories
This commit is contained in:
1 parent
40008b22f7
commit
f1d65d112d
6 files changed
+28
-17
No files matched your search
+13
-9
@@ -23,21 +23,21 @@
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "ModulesHandle.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "VideoHandle.h"
|
||||
#include "PlaYUVerModuleFactory.h"
|
||||
#include "DialogSubWindowSelector.h"
|
||||
#include "SubWindowHandle.h"
|
||||
#include "VideoSubWindow.h"
|
||||
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
ModulesHandle::ModulesHandle( QWidget* parent, PlaYUVerSubWindowHandle *windowManager ) :
|
||||
ModulesHandle::ModulesHandle( QWidget* parent, PlaYUVerSubWindowHandle *windowManager, VideoHandle *moduleVideo ) :
|
||||
QWidget( parent ),
|
||||
m_pcParent( parent ),
|
||||
m_pcMainWindowManager( windowManager )
|
||||
m_pcMainWindowManager( windowManager ),
|
||||
m_appModuleVideo( moduleVideo )
|
||||
{
|
||||
setParent( m_pcParent );
|
||||
}
|
||||
@@ -304,12 +304,16 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
||||
{
|
||||
if( ( pcCurrModuleIf->m_pcModule->m_uiModuleRequirements & MODULE_REQUIRES_NEW_WINDOW ) || bShowModulesNewWindow )
|
||||
{
|
||||
pcModuleSubWindow = new VideoSubWindow( this, true );
|
||||
pcModuleSubWindow = new VideoSubWindow( VideoSubWindow::MODULE_SUBWINDOW, this );
|
||||
pcModuleSubWindow->setWindowShortName( windowName );
|
||||
pcModuleSubWindow->setWindowName( windowName );
|
||||
|
||||
connect( pcModuleSubWindow, SIGNAL( updateStatusBar( const QString& ) ), m_pcParent, SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( pcModuleSubWindow, SIGNAL( zoomChanged() ), m_pcParent, SLOT( updateZoomFactorSBox() ) );
|
||||
connect( pcModuleSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo, SLOT( updateSelectionArea( QRect ) ) );
|
||||
connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo, SLOT( zoomToFactorAll( double, QPoint ) ) );
|
||||
connect( pcModuleSubWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo, SLOT( moveAllScrollBars( const QPoint ) ) );
|
||||
|
||||
connect( pcModuleSubWindow, SIGNAL( updateStatusBar( const QString& ) ), this, SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), this, SLOT( updateZoomFactorSBox() ) );
|
||||
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow;
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow->enableModule( pcCurrModuleIf, true );
|
||||
|
||||
+3
-1
@@ -42,6 +42,7 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class VideoHandle;
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class PlaYUVerAppModuleIf;
|
||||
class SubWindowHandle;
|
||||
@@ -50,7 +51,7 @@ class ModulesHandle: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ModulesHandle( QWidget*, PlaYUVerSubWindowHandle* );
|
||||
ModulesHandle( QWidget*, PlaYUVerSubWindowHandle*, VideoHandle* );
|
||||
~ModulesHandle();
|
||||
|
||||
Void createActions();
|
||||
@@ -70,6 +71,7 @@ public:
|
||||
private:
|
||||
QWidget* m_pcParent;
|
||||
PlaYUVerSubWindowHandle* m_pcMainWindowManager;
|
||||
VideoHandle* m_appModuleVideo;
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -223,7 +223,7 @@ QList<SubWindowHandle*> PlaYUVerSubWindowHandle::findSubWindow( const UInt uiCat
|
||||
QList<SubWindowHandle*> subWindowList = findSubWindow();
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
if( subWindowList.at( i )->getCategory() == uiCategory )
|
||||
if( subWindowList.at( i )->getCategory() & uiCategory )
|
||||
apcSubWindowList.append( subWindowList.at( i ) );
|
||||
}
|
||||
return apcSubWindowList;
|
||||
|
||||
@@ -71,13 +71,13 @@ Int findPlaYUVerStreamInfo( PlaYUVerStreamInfoVector array, QString filename )
|
||||
return -1;
|
||||
}
|
||||
|
||||
VideoSubWindow::VideoSubWindow( QWidget * parent, Bool isModule ) :
|
||||
SubWindowHandle( parent, SubWindowHandle::VIDEO_SUBWINDOW ),
|
||||
VideoSubWindow::VideoSubWindow( enum VideoSubWindowCategories category, QWidget * parent ) :
|
||||
SubWindowHandle( parent, SubWindowHandle::VIDEO_SUBWINDOW | category ),
|
||||
m_pCurrStream( NULL ),
|
||||
m_pcCurrFrame( NULL ),
|
||||
m_pcReferenceSubWindow( NULL ),
|
||||
m_bIsPlaying( false ),
|
||||
m_bIsModule( isModule )
|
||||
m_bIsModule( category == MODULE_SUBWINDOW )
|
||||
{
|
||||
setVisible( false );
|
||||
|
||||
|
||||
@@ -91,7 +91,12 @@ private:
|
||||
Void scaleView( const QSize & size , QPoint center = QPoint() );
|
||||
|
||||
public:
|
||||
VideoSubWindow( QWidget * parent = 0, Bool isModule = false );
|
||||
enum VideoSubWindowCategories
|
||||
{
|
||||
VIDEO_STREAM_SUBWINDOW = 2,
|
||||
MODULE_SUBWINDOW = 4,
|
||||
};
|
||||
VideoSubWindow( enum VideoSubWindowCategories category, QWidget * parent = 0 );
|
||||
~VideoSubWindow();
|
||||
|
||||
Bool loadFile( QString cFilename, Bool bForceDialog = false );
|
||||
|
||||
+2
-2
@@ -50,7 +50,7 @@ plaYUVerApp::plaYUVerApp()
|
||||
|
||||
m_appModuleVideo = new VideoHandle( this, m_pcWindowHandle );
|
||||
m_appModuleQuality = new QualityHandle( this, m_pcWindowHandle );
|
||||
m_appModuleExtensions = new ModulesHandle( this, m_pcWindowHandle );
|
||||
m_appModuleExtensions = new ModulesHandle( this, m_pcWindowHandle, m_appModuleVideo );
|
||||
|
||||
createActions();
|
||||
createToolBars();
|
||||
@@ -155,7 +155,7 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
m_pcWindowHandle->setActiveSubWindow( videoSubWindow );
|
||||
return;
|
||||
}
|
||||
videoSubWindow = new VideoSubWindow; //createSubWindow();
|
||||
videoSubWindow = new VideoSubWindow( VideoSubWindow::VIDEO_STREAM_SUBWINDOW ); //createSubWindow();
|
||||
SubWindowHandle *subWindow = videoSubWindow;
|
||||
if( !pStreamInfo )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user