Merge branch 'devel' of https://github.com/pixlra/playuver into devel
This commit is contained in:
commit
c6126d7f7e
3 files changed
+16
-1
No files matched your search
@@ -53,6 +53,12 @@ StreamPropertiesSideBar::StreamPropertiesSideBar( QWidget* parent ) :
|
||||
|
||||
// ----------------- GUI definition -----------------
|
||||
|
||||
QLabel *streamNameLabel = new QLabel( tr( "Name:" ) );
|
||||
streamNameLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||
labelNameValue = new QLabel;
|
||||
labelNameValue->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
|
||||
labelNameValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||
|
||||
QLabel *formatLabel = new QLabel( tr( "File Format:" ) );
|
||||
formatLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||
labelFormatValue = new QLabel;
|
||||
@@ -83,6 +89,9 @@ StreamPropertiesSideBar::StreamPropertiesSideBar( QWidget* parent ) :
|
||||
|
||||
QGridLayout *propertiesLayout = new QGridLayout;
|
||||
Int layout_line = 0;
|
||||
// propertiesLayout->addWidget( streamNameLabel, layout_line, 0 );
|
||||
// propertiesLayout->addWidget( labelNameValue, layout_line, 1 );
|
||||
// layout_line++;
|
||||
propertiesLayout->addWidget( formatLabel, layout_line, 0 );
|
||||
propertiesLayout->addWidget( labelFormatValue, layout_line, 1 );
|
||||
layout_line++;
|
||||
@@ -126,6 +135,7 @@ QSize StreamPropertiesSideBar::sizeHint() const
|
||||
Void StreamPropertiesSideBar::setData( PlaYUVerStream* pcStream )
|
||||
{
|
||||
// Clear information.
|
||||
labelNameValue->clear();
|
||||
labelFormatValue->clear();
|
||||
labelCodecValue->clear();
|
||||
labelDurationValueTime->clear();
|
||||
@@ -143,11 +153,13 @@ Void StreamPropertiesSideBar::setData( PlaYUVerStream* pcStream )
|
||||
m_pcStream = pcStream;
|
||||
setEnabled( true );
|
||||
|
||||
QString value;
|
||||
|
||||
labelNameValue->setText( QFileInfo( m_pcStream->getFileName() ).fileName() );
|
||||
labelFormatValue->setText( m_pcStream->getFormatName() );
|
||||
labelCodecValue->setText( m_pcStream->getCodecName() );
|
||||
Int duration[3];
|
||||
m_pcStream->getDuration( duration );
|
||||
QString value;
|
||||
value = QString( tr( "%1h:%2m:%3s" ) ).arg( duration[0] ).arg( duration[1] ).arg( duration[2] );
|
||||
labelDurationValueTime->setText( value );
|
||||
value = QString( tr( "%1 frms" ) ).arg( m_pcStream->getFrameNum() );
|
||||
|
||||
@@ -55,6 +55,7 @@ private:
|
||||
PlaYUVerStream* m_pcStream;
|
||||
|
||||
Bool m_bIsVisible;
|
||||
QLabel* labelNameValue;
|
||||
QLabel* labelFormatValue;
|
||||
QLabel* labelCodecValue;
|
||||
QLabel* labelDurationValueTime;
|
||||
|
||||
@@ -53,6 +53,7 @@ plaYUVerApp::plaYUVerApp()
|
||||
setCentralWidget( mdiArea );
|
||||
//mdiArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||
//mdiArea->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
|
||||
mdiArea->setActivationOrder( QMdiArea::ActivationHistoryOrder );
|
||||
|
||||
connect( mdiArea, SIGNAL( subWindowActivated(QMdiSubWindow*) ), this, SLOT( chageSubWindowSelection() ) );
|
||||
|
||||
@@ -878,6 +879,7 @@ Void plaYUVerApp::chageSubWindowSelection()
|
||||
if( activeSubWindow() )
|
||||
{
|
||||
m_pcCurrentSubWindow = new_window;
|
||||
setWindowTitle( QApplication::applicationName() + " - " + m_pcCurrentSubWindow->getWindowName() );
|
||||
if( !plaYUVerApp::findSubWindow( mdiArea, m_pcCurrentSubWindow->getRefSubWindow() ) )
|
||||
{
|
||||
m_pcCurrentSubWindow->setRefSubWindow( NULL );
|
||||
|
||||
Reference in new issue
Block a user