Exemple #1
0
void TheWayToAmarillo()
{
	if( ShowMe() )
	{
		GoThere();
		GoHere();
		DevelopmentContinues();
		GoForkYourself();
		IrrelevantChange();
	}
	Feature25();
	BugFixForR1Beta();
	AnotherIrrelevantChange();
}
Exemple #2
0
//-----------------------------------------------------------------------------
//! 
//-----------------------------------------------------------------------------
tNASBar::tNASBar( tFusionClientAgent& fusionClientAgent, quint8 sourceId, QWidget* pParent )
: tPanel( pParent )
, m_pSourceIcon( 0 )
, m_pSourceName( 0 )
, m_pStatusIcon( 0 )
, m_pTicker( 0 )
, m_pNotice( 0 )
, m_pTimeRemaining( 0 )
, m_pRepeatIcon( 0 )
, m_pShuffleIcon( 0 )
, m_pVolumeWidget( 0 )
, m_pVolumeAction( 0 )
, m_pMuteAction( 0 )
, m_pPowerAction( 0 )
, m_pSelectAudioServerAction( 0 )
, m_pAudioSourceAction( 0 )
, m_pVirtualHeadAction( 0 )
, m_pZoneSetupAction( 0 )
, m_pOptionsAction( 0 )
, m_pVideoOptionsAction( 0 )
, m_pBluetoothDevicesAction( 0 )
, m_pMixerActions( 0 )
, m_pSettingsMenuAction( 0 )
, m_pOpenDialog( 0 )
, m_pPopupWidget( 0 )
, m_MySourceId( sourceId )
, m_MyZoneId( 0 ) // TODO A: Make this a zone ID
, m_pDummyAction( 0 )
, m_FlashTimerID( -1 )
, m_FlashTime( false )
, m_FlashOn( false )
, m_ButtonPressed( false )
, m_PressedPosition( eCP_None )
, m_FusionClientAgent( fusionClientAgent )
{
    // Should not access the NAS from this constructor
    TRACE_FUNCTION;

    setObjectName( QString( "NasBar%1" ).arg( sourceId ) );

    m_ShowSettingsMenu = false;
    setFocusPolicy( Qt::StrongFocus );

    setAutoFillBackground( true );

    // Setup colours please.
    Connect( tSystemSettings::Instance(), SIGNAL( NightModeChanged(bool, bool) ), this, SLOT( UpdateColors() ));
    Connect( tUiSettings::Instance(), SIGNAL( NightModeTextColorChanged(eNightModeTextColor) ), this, SLOT( UpdateColors() ));   
    tNASBar::UpdateColors();

    setHeight( AudioBarHeight( this ) );

    // Clear the dialog/menu pointers
    m_pMenu = 0;
    m_pVolumeAction = 0;
    m_pMuteAction = 0;
    m_pAudioSourceAction = 0; // Audio sources to choose from
    m_pVirtualHeadAction = 0;
    m_pZoneSetupAction = 0;
    m_pDummyAction = 0;
    m_pPowerAction = 0;
    // use a transparent placeholder for all icons to maintain the size and location of all widgets in the layout
    QPixmap trans28( tPath::ResourceFile( "audio/trans28.png" ) );

    m_pSourceIcon = new QLabel();
    m_pSourceIcon->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
    m_pSourceIcon->setPixmap( trans28 );
    m_pSourceIcon->resize( sizeHint() );

    m_pSourceName = new QLabel();
    m_pSourceName->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
    
    m_pVertSep1 = new QFrame();
    m_pVertSep1->setFrameShape( QFrame::VLine );
    m_pVertSep1->setMaximumHeight( 24 );

    m_pStatusIcon = new QLabel();
    m_pStatusIcon->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
    m_pStatusIcon->hide();

    // only widget i want hidden since the ticker will grow into its unused space.
    m_pTimeRemaining = new QLabel();
    m_pTimeRemaining->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
    m_pTimeRemaining->hide();

    m_pVertSep2 = new QFrame();
    m_pVertSep2->setFrameShape( QFrame::VLine );
    m_pVertSep2->setMaximumHeight( 24 );

    m_pRepeatIcon = new QLabel();
    m_pRepeatIcon->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
    m_pRepeatIcon->setPixmap( trans28 );
    m_pRepeatIcon->resize( sizeHint() );

    m_pShuffleIcon = new QLabel();
    m_pShuffleIcon->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
    m_pShuffleIcon->setPixmap( trans28 );
    m_pShuffleIcon->resize( sizeHint() );

    m_pVolumeWidget = new tVolumeWidget( true, m_FusionClientAgent.IsMuted(), this );
    m_pVolumeWidget->SetRange( m_FusionClientAgent.MinVolumeLevel(), m_FusionClientAgent.MaxVolumeLevel() );
    m_pVolumeWidget->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
    m_pVolumeWidget->resize( 60, ( AudioBarHeight( this ) / 3 ) );

    m_pTicker = new tTicker( this );

    m_pNotice = new tNoticeManager( this );
    m_pNotice->hide();
    Connect( m_pNotice, SIGNAL( ShowMe() ), this, SLOT( NoticeOnTop() ) );
    Connect( m_pNotice, SIGNAL( AllClear() ), this, SLOT( NoticeAllClear() ) );

    QGridLayout* pLayout = new QGridLayout();
    pLayout->setContentsMargins( 4, 0, 4, 0 );
    pLayout->setSpacing( 6 );
    setLayout( pLayout );

    m_pLayout = pLayout;

    pLayout->addWidget( m_pSourceIcon, 0, 0 );
    pLayout->addWidget( m_pSourceName, 0, 1 );
    pLayout->addWidget( m_pVertSep1, 0, 2 );
    pLayout->addWidget( m_pStatusIcon, 0, 3 );
    pLayout->addWidget( m_pTicker, 0, 4 );
    pLayout->addWidget( m_pNotice, 0, 4 );
    m_TimeRemainingColumn = 5;
    pLayout->addWidget( m_pTimeRemaining, 0, m_TimeRemainingColumn );
    pLayout->addWidget( m_pVertSep2, 0, 6 );
    pLayout->addWidget( m_pRepeatIcon, 0, 7 );
    pLayout->addWidget( m_pShuffleIcon, 0, 8 );
    pLayout->addWidget( m_pVolumeWidget, 0, 9 );

    m_MySourceString = m_FusionClientAgent.GetSourceName( m_MySourceId );
}