Fix disabling contents when there is not subwindow selected
This commit is contained in:
1 parent
645a94bcdf
commit
204a07cb93
5 files changed
+24
-12
No files matched your search
@@ -107,11 +107,6 @@ DialogSubWindowSelector::DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWi
|
||||
connect( m_pushButtonRemoveAll, SIGNAL( clicked() ), this, SLOT( removeAllSubWindow() ) );
|
||||
QMetaObject::connectSlotsByName( this );
|
||||
|
||||
// SubWindowHandle* activeSubWindow = qobject_cast<SubWindowHandle *>( m_pcMainWindowMdiArea->activeSubWindow() );
|
||||
// if( activeSubWindow->getCategory() == SubWindowHandle::VIDEO_SUBWINDOW )
|
||||
// {
|
||||
// m_pcSelectedWindowListNames.append( activeSubWindow->getWindowName() );
|
||||
// }
|
||||
updateSubWindowList();
|
||||
}
|
||||
|
||||
|
||||
+12
-5
@@ -64,18 +64,18 @@ Void QualityHandle::createActions()
|
||||
m_arrayActions.resize( TOTAL_ACT );
|
||||
m_arrayActions[SELECT_REF_ACT] = new QAction( "Select Reference", this );
|
||||
connect( m_arrayActions[SELECT_REF_ACT], SIGNAL( triggered() ), this, SLOT( slotSelectReference() ) );
|
||||
m_arrayActions[CREATE_PLOT] = new QAction( "CREATE_PLOT", this );
|
||||
connect( m_arrayActions[CREATE_PLOT], SIGNAL( triggered() ), this, SLOT( slotCreatePlot() ) );
|
||||
m_arrayActions[PLOT_QUALITY] = new QAction( "CREATE_PLOT", this );
|
||||
connect( m_arrayActions[PLOT_QUALITY], SIGNAL( triggered() ), this, SLOT( slotCreatePlot() ) );
|
||||
}
|
||||
|
||||
QMenu* QualityHandle::createMenu()
|
||||
{
|
||||
m_pcMenuQuality = new QMenu( "Quality", this );
|
||||
QMenu* metricsSubMenu = m_pcMenuQuality->addMenu( "Quality Metrics" );
|
||||
metricsSubMenu->addActions( m_actionGroupQualityMetric->actions() );
|
||||
m_pcSubMenuQualityMetrics = m_pcMenuQuality->addMenu( "Quality Metrics" );
|
||||
m_pcSubMenuQualityMetrics->addActions( m_actionGroupQualityMetric->actions() );
|
||||
m_pcMenuQuality->addAction( m_arrayActions[SELECT_REF_ACT] );
|
||||
m_pcMenuQuality->addSeparator();
|
||||
//m_pcMenuQuality->addAction( m_arrayActions[CREATE_PLOT] );
|
||||
//m_pcMenuQuality->addAction( m_arrayActions[PLOT_QUALITY] );
|
||||
return m_pcMenuQuality;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,14 @@ QDockWidget* QualityHandle::createDock()
|
||||
|
||||
Void QualityHandle::updateMenus()
|
||||
{
|
||||
VideoSubWindow* pcSubWindow = qobject_cast<VideoSubWindow *>( m_pcMainWindowManager->activeSubWindow() );
|
||||
Bool hasSubWindow = pcSubWindow ? true : false;
|
||||
|
||||
m_pcSubMenuQualityMetrics->setEnabled( hasSubWindow );
|
||||
m_arrayActions[SELECT_REF_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[PLOT_QUALITY]->setEnabled( hasSubWindow );
|
||||
|
||||
m_pcQualityHandleSideBar->updateSideBar( hasSubWindow );
|
||||
}
|
||||
|
||||
Void QualityHandle::readSettings()
|
||||
|
||||
+2
-1
@@ -64,7 +64,7 @@ private:
|
||||
enum
|
||||
{
|
||||
SELECT_REF_ACT,
|
||||
CREATE_PLOT,
|
||||
PLOT_QUALITY,
|
||||
TOTAL_ACT,
|
||||
};
|
||||
QVector<QAction*> m_arrayActions;
|
||||
@@ -73,6 +73,7 @@ private:
|
||||
Int m_iQualityMetricIdx;
|
||||
|
||||
QMenu* m_pcMenuQuality;
|
||||
QMenu* m_pcSubMenuQualityMetrics;
|
||||
|
||||
QDockWidget* m_pcQualityHandleDock;
|
||||
QualityMeasurementSidebar* m_pcQualityHandleSideBar;
|
||||
|
||||
@@ -48,7 +48,7 @@ QualityMeasurementSidebar::QualityMeasurementSidebar( QWidget* parent, PlaYUVerS
|
||||
RecLabel->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
|
||||
|
||||
m_comboBoxMetric = new QComboBox;
|
||||
for( UInt i=0; i<PlaYUVerFrame::supportedQualityMetricsList().size();i++ )
|
||||
for( UInt i = 0; i < PlaYUVerFrame::supportedQualityMetricsList().size(); i++ )
|
||||
{
|
||||
m_comboBoxMetric->insertItem( i, PlaYUVerFrame::supportedQualityMetricsList()[i].c_str() );
|
||||
}
|
||||
@@ -120,6 +120,13 @@ QSize QualityMeasurementSidebar::sizeHint() const
|
||||
return currSize;
|
||||
}
|
||||
|
||||
Void QualityMeasurementSidebar::updateSideBar( Bool hasSubWindow )
|
||||
{
|
||||
if( !hasSubWindow )
|
||||
m_comboBoxRef->clear();
|
||||
setEnabled( hasSubWindow );
|
||||
}
|
||||
|
||||
Void QualityMeasurementSidebar::updateSubWindowList()
|
||||
{
|
||||
QString currSubWindowName;
|
||||
|
||||
@@ -52,6 +52,8 @@ public:
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
Void updateSideBar( Bool hasSubWindow );
|
||||
|
||||
Void updateSubWindowList();
|
||||
Void updateCurrentWindow( VideoSubWindow * );
|
||||
Void updateSidebarData();
|
||||
|
||||
Reference in new issue
Block a user