Fix wrong label in configure dialog and complete the save of the last window mode

This commit is contained in:
jfmcarreira committed 2015-04-09 17:08:41 +01:00
1 parent dae6ab4156
commit 148981528d
5 files changed
+37 -22

No files matched your search

+6 -8
View File
@@ -174,20 +174,18 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
pixelGridLayout->addItem( new QSpacerItem( 10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 1 );
pixelGridLayout->addWidget( m_comboBoxPixelFormat, 1, 2 );
/*
* Frame rate format
*/
QHBoxLayout* bitsPerPelLayout = new QHBoxLayout();
QLabel* bitsPerPelLabel = new QLabel();
bitsPerPelLabel->setFont( menusFont );
bitsPerPelLabel->setText( "Frame Rate" );
bitsPerPelLabel->setFont( normalFont );
bitsPerPelLabel->setText( "Pixel bit depth" );
m_spinBoxBits = new QSpinBox();
m_spinBoxBits->setFont( normalFont );
m_spinBoxBits->setMinimumWidth( 30 );
m_spinBoxBits->setRange( 0, 16 );
m_spinBoxBits->setValue( 8 );
bitsPerPelLayout->addWidget( bitsPerPelLabel );
bitsPerPelLayout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
bitsPerPelLayout->addWidget( m_spinBoxBits );
pixelGridLayout->addWidget( bitsPerPelLabel, 2, 0 );
pixelGridLayout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ), 2, 1 );
pixelGridLayout->addWidget( m_spinBoxBits, 2, 2 );
/*
* Frame rate format
+2
View File
@@ -929,6 +929,7 @@ Void plaYUVerApp::readSettings()
m_appModuleVideo->readSettings();
m_appModuleQuality->readSettings();
m_appModuleExtensions->readSettings();
m_pcWindowHandle->readSettings();
}
Void plaYUVerApp::writeSettings()
@@ -947,6 +948,7 @@ Void plaYUVerApp::writeSettings()
m_appModuleVideo->writeSettings();
m_appModuleQuality->writeSettings();
m_appModuleExtensions->writeSettings();
m_pcWindowHandle->writeSettings();
}
} // NAMESPACE
+24 -14
View File
@@ -59,14 +59,15 @@ private:
PlaYUVerSubWindowHandle::PlaYUVerSubWindowHandle( QWidget *parent ) :
QWidget( parent )
{
m_iWindowMode = 0;
//setWindowMode( NormalSubWindows );
setWindowMode( MdiWSubWindows );
m_iWindowMode = -1;
m_pcWindowManagerLayout = NULL;
m_pcMdiArea = NULL;
m_pcActiveWindow = NULL;
m_apcSubWindowList.clear();
m_apcMdiSubWindowList.clear();
//setWindowMode( NormalSubWindows );
setWindowMode( MdiWSubWindows );
}
Void PlaYUVerSubWindowHandle::resetWindowMode()
@@ -95,6 +96,7 @@ Void PlaYUVerSubWindowHandle::resetWindowMode()
delete m_pcMdiArea;
if( m_pcWindowManagerLayout )
delete m_pcWindowManagerLayout;
}
}
@@ -349,25 +351,25 @@ Void PlaYUVerSubWindowHandle::createActions()
m_arrayActions.resize( TOTAL_ACT );
// ------------ Tools ------------
QActionGroup* actionGroupWindowMode = new QActionGroup( this );
actionGroupWindowMode->setExclusive( true );
m_actionGroupWindowMode = new QActionGroup( this );
m_actionGroupWindowMode->setExclusive( true );
m_mapperWindowMode = new QSignalMapper( this );
connect( m_mapperWindowMode, SIGNAL( mapped(int) ), this, SLOT( setWindowMode(int) ) );
m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT] = new QAction( tr( "&Detached SubWindows" ), this );
m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT]->setCheckable( true );
actionGroupWindowMode->addAction( m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT] );
m_actionGroupWindowMode->addAction( m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT] );
connect( m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT], SIGNAL( triggered() ), m_mapperWindowMode, SLOT( map() ) );
m_mapperWindowMode->setMapping( m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT], ViewArea::NavigationTool );
m_mapperWindowMode->setMapping( m_arrayActions[NORMAL_SUBWINDOW_MODE_ACT], NormalSubWindows );
m_arrayActions[MDI_SUBWINDOW_MODE_ACT] = new QAction( "&MDI SubWindows", this );
m_arrayActions[MDI_SUBWINDOW_MODE_ACT]->setCheckable( true );
actionGroupWindowMode->addAction( m_arrayActions[MDI_SUBWINDOW_MODE_ACT] );
m_actionGroupWindowMode->addAction( m_arrayActions[MDI_SUBWINDOW_MODE_ACT] );
connect( m_arrayActions[MDI_SUBWINDOW_MODE_ACT], SIGNAL( triggered() ), m_mapperWindowMode, SLOT( map() ) );
m_mapperWindowMode->setMapping( m_arrayActions[MDI_SUBWINDOW_MODE_ACT], ViewArea::NormalSelectionTool );
m_mapperWindowMode->setMapping( m_arrayActions[MDI_SUBWINDOW_MODE_ACT], MdiWSubWindows );
actionGroupWindowMode->actions().at( m_iWindowMode )->setChecked( true );
m_actionGroupWindowMode->actions().at( m_iWindowMode )->setChecked( true );
m_arrayActions[CLOSE_ACT] = new QAction( tr( "&Close" ), this );
m_arrayActions[CLOSE_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogCloseButton ) );
@@ -472,12 +474,20 @@ Void PlaYUVerSubWindowHandle::updateMenu()
Void PlaYUVerSubWindowHandle::readSettings()
{
QSettings appSettings;
m_cMdiModeWindowPosition = appSettings.value( "SubWindowManager/LastMdiPosition", QPoint( 200, 200 ) ).toPoint();
m_cMdiModeWindowSize = appSettings.value( "SubWindowManager/LastMdiSize", QSize( 500, 400 ) ).toSize();
Int iWindowMode = appSettings.value( "SubWindowManager/SubWindowMode", MdiWSubWindows ).toInt();
setWindowMode( iWindowMode );
m_actionGroupWindowMode->actions().at( iWindowMode )->setChecked( true );
}
Void PlaYUVerSubWindowHandle::writeSettings()
{
QSettings appSettings;
appSettings.setValue( "SubWindowManager/LastMdiPosition", m_cMdiModeWindowPosition );
appSettings.setValue( "SubWindowManager/LastMdiSize", m_cMdiModeWindowSize );
appSettings.setValue( "SubWindowManager/SubWindowMode", m_iWindowMode );
}
} // NAMESPACE
+1
View File
@@ -95,6 +95,7 @@ private:
};
QVector<QAction*> m_arrayActions;
QSignalMapper* m_mapperWindowMode;
QActionGroup* m_actionGroupWindowMode;
QSignalMapper* m_mapperWindow;
QMenu* m_pcMenuWindow;