Add a slider on the bottom of the subwindow
This commit is contained in:
1 parent
72bca42693
commit
0bb3e132e8
2 files changed
+24
-5
No files matched your search
@@ -31,21 +31,38 @@ namespace plaYUVer
|
|||||||
SubWindowHandle::SubWindowHandle( QWidget * parent ) :
|
SubWindowHandle::SubWindowHandle( QWidget * parent ) :
|
||||||
QMdiSubWindow( parent )
|
QMdiSubWindow( parent )
|
||||||
{
|
{
|
||||||
setParent( parent );
|
|
||||||
|
|
||||||
|
setParent( parent );
|
||||||
setAttribute( Qt::WA_DeleteOnClose );
|
setAttribute( Qt::WA_DeleteOnClose );
|
||||||
setBackgroundRole( QPalette::Light );
|
setBackgroundRole( QPalette::Light );
|
||||||
|
|
||||||
// Create a new scroll area inside the sub-window
|
// Create a new scroll area inside the sub-window
|
||||||
m_cScrollArea = new QScrollArea( this );
|
m_cScrollArea = new QScrollArea;
|
||||||
setWidget( m_cScrollArea );
|
|
||||||
|
|
||||||
// Create a new interface to show images
|
// Create a new interface to show images
|
||||||
m_cViewArea = new ViewArea( m_cScrollArea );
|
m_cViewArea = new ViewArea;
|
||||||
|
|
||||||
// Define the cViewArea as the widget inside the scroll area
|
// Define the cViewArea as the widget inside the scroll area
|
||||||
m_cScrollArea->setWidget( m_cViewArea );
|
m_cScrollArea->setWidget( m_cViewArea );
|
||||||
|
|
||||||
|
// Create Layout for the playing config
|
||||||
|
QHBoxLayout *pcHeadLayout = new QHBoxLayout;
|
||||||
|
pcHeadLayout->setObjectName( QStringLiteral( "HeadLayout" ) );
|
||||||
|
m_pcFrameSlider = new QSlider(this);
|
||||||
|
QSpacerItem * headerSpacer0 = new QSpacerItem( 30, 2, QSizePolicy::Fixed, QSizePolicy::Minimum );
|
||||||
|
m_pcFrameSlider->setObjectName( QStringLiteral( "FrameSlider" ) );
|
||||||
|
m_pcFrameSlider->setOrientation( Qt::Horizontal );
|
||||||
|
m_pcFrameSlider->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
|
||||||
|
QSpacerItem * headerSpacer1 = new QSpacerItem( 30, 2, QSizePolicy::Fixed, QSizePolicy::Minimum );
|
||||||
|
pcHeadLayout->addSpacerItem( headerSpacer0 );
|
||||||
|
pcHeadLayout->addWidget( m_pcFrameSlider, 5 );
|
||||||
|
pcHeadLayout->addSpacerItem( headerSpacer1 );
|
||||||
|
|
||||||
|
//setWidget( m_cScrollArea );
|
||||||
|
QLayout *pcMainLayout = layout();
|
||||||
|
pcMainLayout->addWidget( m_cScrollArea );
|
||||||
|
pcMainLayout->addItem( pcHeadLayout );
|
||||||
|
|
||||||
m_cWindowName = QString( " " );
|
m_cWindowName = QString( " " );
|
||||||
m_dScaleFactor = 1;
|
m_dScaleFactor = 1;
|
||||||
|
|
||||||
@@ -93,7 +110,7 @@ bool SubWindowHandle::loadFile( const QString &fileName )
|
|||||||
|
|
||||||
normalSize();
|
normalSize();
|
||||||
|
|
||||||
m_cWindowName = QString("ola");
|
m_cWindowName = QString( "ola" );
|
||||||
m_cWindowName = m_currStream.getStreamInformationString();
|
m_cWindowName = m_currStream.getStreamInformationString();
|
||||||
|
|
||||||
m_cCurrFileName = fileName;
|
m_cCurrFileName = fileName;
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ private:
|
|||||||
QScrollArea* m_cScrollArea;
|
QScrollArea* m_cScrollArea;
|
||||||
ViewArea* m_cViewArea;
|
ViewArea* m_cViewArea;
|
||||||
|
|
||||||
|
QSlider* m_pcFrameSlider;
|
||||||
|
|
||||||
InputStream m_currStream;
|
InputStream m_currStream;
|
||||||
|
|
||||||
QString m_cWindowName;
|
QString m_cWindowName;
|
||||||
|
|||||||
Reference in new issue
Block a user