Example #1
0
void OSDWidget::refresh()
{
    if ( isVisible() )
    {
        //we need to update the buffer
        renderOSDText( m_currentText );
    }
    else m_dirty = true;                          //ensure we are re-rendered before we are shown
}
Example #2
0
void OSDWidget::show() {
	if ( m_dirty ) renderOSDText( m_currentText );

	QWidget::show();

	if ( m_duration ) //duration 0 -> stay forever
	{
		timer.start( m_duration, TRUE ); //calls hide()
		timerMin.start( 150 ); //calls minReached()
	}
}
Example #3
0
void OSDWidget::minReached() //SLOT
{
	if ( !textBuffer.isEmpty() ) {
		renderOSDText( textBuffer.front() );
		textBuffer.pop_front();

		if( m_duration )
			//timerMin is still running
			timer.start( m_duration, TRUE );
	} else timerMin.stop();
}
Example #4
0
void OSDWidget::show()
{
    // Don't show the OSD widget when the desktop is locked
    if ( isKDesktopLockRunning() == Locked )
    {
        minReached();                             // don't queue the message
        return;
    }

    if ( m_dirty ) renderOSDText( m_currentText );

    QWidget::show();

    if ( m_duration )                             //duration 0 -> stay forever
    {
        timer.start( m_duration, true );          //calls hide()
        timerMin.start( 150 );                    //calls minReached()
    }
}