Minor changes in the ModulesHandle interface without functionality changes
This commit is contained in:
1 parent
f5ece2ff31
commit
0ccf12a7b3
3 files changed
+18
-16
No files matched your search
@@ -41,14 +41,15 @@ Void ModulesHandle::ModulesList( Bool bCreate )
|
||||
|
||||
}
|
||||
|
||||
ModulesHandle::ModulesHandle( QWidget * parent )
|
||||
ModulesHandle::ModulesHandle( QWidget * parent, QMdiArea *mdiArea ) :
|
||||
QObject( parent ),
|
||||
m_pcParent( parent ),
|
||||
m_pcMdiArea( mdiArea ),
|
||||
m_uiModulesCount( 0 ),
|
||||
m_uiModuleSelected( -1 )
|
||||
{
|
||||
m_pcParent = parent;
|
||||
|
||||
// configure class
|
||||
setParent( m_pcParent );
|
||||
m_uiModulesCount = 0;
|
||||
m_uiModuleSelected = -1;
|
||||
ModulesList( true );
|
||||
}
|
||||
|
||||
@@ -67,9 +68,10 @@ void ModulesHandle::selectModule( int index )
|
||||
m_uiModuleSelected = index;
|
||||
}
|
||||
|
||||
SubWindowHandle* ModulesHandle::toggleSelectedModuleIf( SubWindowHandle* pcSubWindow )
|
||||
SubWindowHandle* ModulesHandle::toggleSelectedModuleIf()
|
||||
{
|
||||
Bool bShowModulesNewWindow = m_arrayActions[FORCE_NEW_WINDOW_ACT]->isChecked();
|
||||
SubWindowHandle* pcSubWindow = qobject_cast<SubWindowHandle *>( m_pcMdiArea->activeSubWindow() );
|
||||
SubWindowHandle* interfaceChild = NULL;
|
||||
PlaYUVerModuleIf* currModuleIf = NULL;
|
||||
|
||||
|
||||
@@ -48,18 +48,19 @@ class ModulesHandle: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ModulesHandle( QWidget * parent = 0 );
|
||||
ModulesHandle( QWidget * parent = 0, QMdiArea *mdiArea = 0 );
|
||||
~ModulesHandle();
|
||||
|
||||
QMenu* createMenus( QMenuBar *MainAppMenuBar );
|
||||
Void updateMenus( Bool hasSubWindow );
|
||||
SubWindowHandle* toggleSelectedModuleIf( SubWindowHandle* pcSubWindow );
|
||||
SubWindowHandle* toggleSelectedModuleIf();
|
||||
|
||||
private:
|
||||
QWidget *m_pcParent;
|
||||
|
||||
QMdiArea *m_pcMdiArea;
|
||||
UInt m_uiModulesCount;
|
||||
Int m_uiModuleSelected;
|
||||
|
||||
QMenu* m_pcModulesMenu;
|
||||
QList<QMenu*> m_pcModulesSubMenuList;
|
||||
QList<PlaYUVerModuleIf*> m_pcPlaYUVerModules;
|
||||
@@ -68,7 +69,7 @@ private:
|
||||
|
||||
enum MODULES_ACTION_LIST
|
||||
{
|
||||
FORCE_NEW_WINDOW_ACT=0,
|
||||
FORCE_NEW_WINDOW_ACT = 0,
|
||||
DISABLE_ALL_ACT,
|
||||
MODULES_TOTAL_ACT
|
||||
};
|
||||
@@ -78,7 +79,6 @@ private:
|
||||
Void ModulesList( Bool bCreate );
|
||||
Void destroyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf );
|
||||
|
||||
|
||||
private Q_SLOTS:
|
||||
void selectModule( int index );
|
||||
void destroyAllModulesIf();
|
||||
|
||||
@@ -54,7 +54,7 @@ plaYUVerApp::plaYUVerApp()
|
||||
mapperWindow = new QSignalMapper( this );
|
||||
connect( mapperWindow, SIGNAL( mapped(QWidget*) ), this, SLOT( setActiveSubWindow(QWidget*) ) );
|
||||
|
||||
m_pcModulesHandle = new ModulesHandle( this );
|
||||
m_pcModulesHandle = new ModulesHandle( this, mdiArea );
|
||||
|
||||
createActions();
|
||||
createToolBars();
|
||||
@@ -230,7 +230,7 @@ void plaYUVerApp::closeAll()
|
||||
|
||||
void plaYUVerApp::selectModule( QAction *curr_action )
|
||||
{
|
||||
SubWindowHandle *interfaceChild = m_pcModulesHandle->toggleSelectedModuleIf( m_pcCurrentSubWindow );
|
||||
SubWindowHandle *interfaceChild = m_pcModulesHandle->toggleSelectedModuleIf();
|
||||
if( interfaceChild )
|
||||
{
|
||||
mdiArea->addSubWindow( interfaceChild );
|
||||
@@ -303,7 +303,7 @@ UInt plaYUVerApp::getMaxFrameNumber()
|
||||
UInt maxFrames = INT_MAX;
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
currFrames = m_acPlayingSubWindows.at( i )->getInputStream()->getFrameNum();
|
||||
currFrames = m_acPlayingSubWindows.at( i )->getInputStream()->getFrameNum();
|
||||
if( currFrames < maxFrames )
|
||||
maxFrames = currFrames;
|
||||
}
|
||||
@@ -540,9 +540,9 @@ void plaYUVerApp::videoSelectionButtonEvent()
|
||||
{
|
||||
DialogSubWindowSelector dialogWindowsSelection( this, mdiArea );
|
||||
QStringList cWindowListNames;
|
||||
for(Int i=0; i<m_acPlayingSubWindows.size();i++)
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
cWindowListNames.append( m_acPlayingSubWindows.at(i)->getWindowName() );
|
||||
cWindowListNames.append( m_acPlayingSubWindows.at( i )->getWindowName() );
|
||||
dialogWindowsSelection.setSubWindowList( cWindowListNames );
|
||||
}
|
||||
if( dialogWindowsSelection.exec() == QDialog::Accepted )
|
||||
|
||||
Reference in new issue
Block a user