Add white fill when window is busy
This commit is contained in:
1 parent
fe05c30b22
commit
c6acb0ac0b
4 files changed
+42
-1
No files matched your search
@@ -425,6 +425,14 @@ Bool ModulesHandle::applyModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf, Bool isP
|
||||
{
|
||||
Bool bRet = false;
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
if( pcCurrModuleIf->m_pcDisplaySubWindow )
|
||||
{
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow->setFillWindow( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
pcCurrModuleIf->m_pcSubWindow[0]->setFillWindow( true );
|
||||
}
|
||||
if( !( isPlaying && ( pcCurrModuleIf->m_pcModule->m_uiModuleRequirements & MODULE_REQUIRES_SKIP_WHILE_PLAY ) ) )
|
||||
{
|
||||
#ifdef PLAYUVER_THREADED_MODULES
|
||||
@@ -535,11 +543,13 @@ Void ModulesHandle::showModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
||||
if( pcCurrModuleIf->m_pcDisplaySubWindow )
|
||||
{
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow->setCurrFrame( pcCurrModuleIf->m_pcProcessedFrame );
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow->setFillWindow( false );
|
||||
pcCurrModuleIf->m_pcDisplaySubWindow->clearWindowBusy();
|
||||
}
|
||||
else
|
||||
{
|
||||
pcCurrModuleIf->m_pcSubWindow[0]->setCurrFrame( pcCurrModuleIf->m_pcProcessedFrame );
|
||||
pcCurrModuleIf->m_pcSubWindow[0]->setFillWindow( false );
|
||||
pcCurrModuleIf->m_pcSubWindow[0]->clearWindowBusy();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -116,6 +116,7 @@ Void PlaYUVerSubWindowHandle::resetWindowMode()
|
||||
m_apcMdiSubWindowList.clear();
|
||||
if( m_pcMdiArea )
|
||||
delete m_pcMdiArea;
|
||||
m_pcMdiArea = NULL;
|
||||
if( m_pcWindowManagerLayout )
|
||||
delete m_pcWindowManagerLayout;
|
||||
|
||||
|
||||
+27
-1
@@ -93,13 +93,17 @@ class VideoInformation: public QWidget
|
||||
private:
|
||||
QList<QStaticText> m_cTopLeftTextList;
|
||||
QFont m_cTopLeftTextFont;
|
||||
QFont m_cCenterTextFont;
|
||||
Bool m_bBusyWindow;
|
||||
public:
|
||||
VideoInformation( QWidget *parent ) :
|
||||
QWidget( parent )
|
||||
QWidget( parent ),
|
||||
m_bBusyWindow( false )
|
||||
{
|
||||
setPalette( Qt::transparent );
|
||||
setAttribute( Qt::WA_TransparentForMouseEvents );
|
||||
m_cTopLeftTextFont.setPointSize( 8 );
|
||||
m_cCenterTextFont.setPointSize( 12 );
|
||||
}
|
||||
Void setInformationTopLeft( const QStringList& textLines )
|
||||
{
|
||||
@@ -109,6 +113,10 @@ public:
|
||||
m_cTopLeftTextList.append( textLines.at( i ) );
|
||||
}
|
||||
}
|
||||
Void setBusyWindow( Bool bFlag )
|
||||
{
|
||||
m_bBusyWindow = bFlag;
|
||||
}
|
||||
protected:
|
||||
void paintEvent( QPaintEvent *event )
|
||||
{
|
||||
@@ -123,6 +131,12 @@ protected:
|
||||
topLeftCorner += QPoint( 0, 15 );
|
||||
}
|
||||
}
|
||||
if( m_bBusyWindow )
|
||||
{
|
||||
painter.setFont( m_cCenterTextFont );
|
||||
painter.drawText( rect(), Qt::AlignHCenter | Qt::AlignVCenter, QStringLiteral( "Refreshing..." ) );
|
||||
painter.fillRect( rect(), QBrush( QColor::fromRgb( 255, 255, 255, 50 ), Qt::SolidPattern ) );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -165,6 +179,10 @@ VideoSubWindow::VideoSubWindow( enum VideoSubWindowCategories category, QWidget
|
||||
|
||||
m_apcCurrentModule.clear();
|
||||
|
||||
m_pcUpdateTimer = new QTimer();
|
||||
m_pcUpdateTimer->setInterval( 800 );
|
||||
connect( m_pcUpdateTimer, SIGNAL( timeout() ), this, SLOT( updateWindowOnTimeout() ) );
|
||||
|
||||
//! Add video information
|
||||
m_pcVideoInfo = new VideoInformation( this );
|
||||
}
|
||||
@@ -493,6 +511,10 @@ Void VideoSubWindow::associateModule( PlaYUVerAppModuleIf* pcModule )
|
||||
m_apcCurrentModule.append( pcModule );
|
||||
}
|
||||
|
||||
Void VideoSubWindow::setFillWindow( Bool bFlag )
|
||||
{
|
||||
m_pcVideoInfo->setBusyWindow( bFlag );
|
||||
}
|
||||
Void VideoSubWindow::setCurrFrame( PlaYUVerFrame* pcCurrFrame )
|
||||
{
|
||||
// if( m_pcCurrFrame )
|
||||
@@ -871,6 +893,10 @@ QSize VideoSubWindow::sizeHint( const QSize & maxSize ) const
|
||||
return isize;
|
||||
}
|
||||
|
||||
Void VideoSubWindow::updateWindowOnTimeout()
|
||||
{
|
||||
m_pcVideoInfo->update();
|
||||
}
|
||||
Void VideoSubWindow::resizeEvent( QResizeEvent* event )
|
||||
{
|
||||
m_pcVideoInfo->resize( event->size() );
|
||||
|
||||
@@ -95,6 +95,7 @@ private:
|
||||
|
||||
Bool m_bIsPlaying;
|
||||
|
||||
QTimer* m_pcUpdateTimer;
|
||||
/**
|
||||
* Threads variables
|
||||
* QtConcurrent
|
||||
@@ -257,11 +258,14 @@ public:
|
||||
m_bWindowBusy = false;
|
||||
}
|
||||
|
||||
Void setFillWindow( Bool bFlag );
|
||||
|
||||
protected:
|
||||
Void resizeEvent( QResizeEvent* event );
|
||||
//void closeEvent( QCloseEvent *event );
|
||||
|
||||
public Q_SLOTS:
|
||||
void updateWindowOnTimeout();
|
||||
void adjustScrollBarByScale( double scale, QPoint center );
|
||||
void adjustScrollBarByOffset( QPoint Offset );
|
||||
void updateCurScrollValues();
|
||||
|
||||
Reference in new issue
Block a user