Пример #1
0
tScanningDialogWidget::tScanningDialogWidget( QWidget* pParent )
    : tDialogWidget( QString(), QString(), pParent )
    , m_pSpinner( 0 )
    , m_pLabel( 0 )
    , m_Status( tFusionClient::eBluetoothPairingStatus_NotConnectedOrDisconnect )
    , m_Discovering( false )
{
    m_pSpinner = new tWaitingSpinner( this );
    m_pSpinner->start();
    m_pSpinner->hide();
    m_pSpinner->setInnerRadius( contentsRect().height()/2 );
    m_pSpinner->setLineLength( contentsRect().height()/2 );
    m_pSpinner->setColor( palette().color( QPalette::Disabled, QPalette::Text ) );

    // Create a horizontal layout to hold the image label on the left and text labels on the right
    QHBoxLayout* pLayout = new QHBoxLayout;
    pLayout->setContentsMargins( 0, 0, 0, 0 );
    pLayout->setSpacing ( 10 );
    pLayout->addWidget( m_pSpinner );
    pLayout->setAlignment( Qt::AlignLeft );

    m_pLabel = new QLabel( this );
    pLayout->addWidget( m_pLabel );

    setLayout( pLayout );

    Connect( this, SIGNAL( Triggered() ), this, SLOT( OnClicked() ) );

    updateSpinner();
}
Пример #2
0
void BusyIndicator::setForegroundColor( const QColor& color )
{
    if ( m_foregroundColor == color )
        return;
    m_foregroundColor = color;
    updateSpinner();
    emit foregroundColorChanged();
}
Пример #3
0
void BusyIndicator::setOuterRadius( const qreal& outerRadius )
{
    if ( qFuzzyCompare( m_outerRadius, outerRadius ) )
        return;
    m_outerRadius = outerRadius;
    updateSpinner();
    emit outerRadiusChanged();
}
Пример #4
0
void BusyIndicator::setInnerRadius( const qreal& innerRadius )
{
    if ( qFuzzyCompare( m_innerRadius, innerRadius ) )
        return;
    m_innerRadius = innerRadius;
    updateSpinner();
    emit innerRadiusChanged();
}
Пример #5
0
BusyIndicator::BusyIndicator( QDeclarativeItem* parent )
    : QDeclarativeItem( parent ),
      m_innerRadius( 0.8 ),
      m_outerRadius( 1.0 ),
      m_backgroundColor( 177, 210, 143, 70 ),
      m_foregroundColor( 119, 183, 83, 255 ),
      m_actualInnerRadius( 90.0 ),
      m_actualOuterRadius( 100.0 ),
      m_cacheKey()
{
    setFlag( QGraphicsItem::ItemHasNoContents, false );
    setWidth( 60.0 );
    setHeight( 60.0 );
 
    updateSpinner();
 
    connect( this, SIGNAL( widthChanged() ), SLOT( updateSpinner() ) );
    connect( this, SIGNAL( heightChanged() ), SLOT( updateSpinner() ) );
}
Пример #6
0
//-----------------------------------------------------------------------
//
//-----------------------------------------------------------------------
void tScanningDialogWidget::OnBluetoothDiscoveringChanged( bool discovering )
{
    m_Discovering = discovering;
    updateSpinner();
}
Пример #7
0
//-----------------------------------------------------------------------
//
//-----------------------------------------------------------------------
void tScanningDialogWidget::OnBluetoothPairingStatusChanged( tFusionClient::eBluetoothPairingStatus status )
{
    m_Status = status;
    updateSpinner();
}
void SidebarPrivate::onResultsViewRunningChanged(bool running)
{
    updateSpinner();
}