コード例 #1
0
ファイル: someMessageClient.cpp プロジェクト: Somefive/GoBang
someMessageClient::someMessageClient(QObject *parent):
    someMessageCommunicator(parent)
{
    isServer = false;
    socket = new QTcpSocket(this);
    connect(socket,SIGNAL(connected()),this,SIGNAL(ConnectionEstablished()));
}
コード例 #2
0
ファイル: mainwindow.cpp プロジェクト: Sevick/RadioNet
void MainWindow::StartPlayback() {
    if (isPlaying) {
        StopPlayback();
    }

    qDebug()<<"Starting playback";
    if (currentRadio) {
        pbPlay->setText("Stop");

        if (!dConnectionProgress) {
            dConnectionProgress=new ConnectionProgress(currentRadio->GetTitle(),this);
            connect(this,SIGNAL(ConnectionProgressUpdate(int)),dConnectionProgress,SLOT(OnConnectionProgressUpdate(int)));
            connect(this,SIGNAL(ConnectionEstablished()),dConnectionProgress,SLOT(OnConnectionEstablished()));
            connect(this,SIGNAL(ConnectionFailed()),dConnectionProgress,SLOT(OnConnectionFailed()));
        }

        currentRadioURL=0;
        dConnectionProgress->ChangeURL(currentRadio->GetURL(0));
        dConnectionProgress->setTitle(currentRadio->GetTitle());
        StartURL(currentRadio->GetURL(0));

        QApplication::setOverrideCursor(Qt::WaitCursor);
        int tResult=dConnectionProgress->exec();
        QApplication::restoreOverrideCursor();
        delete dConnectionProgress;
        dConnectionProgress=NULL;

        if (tResult==QDialog::Rejected) {
            qDebug()<<"Connection aborted";
        }
    }
コード例 #3
0
ファイル: scomm.cpp プロジェクト: prestocore/browser
CommState SComm::SignalConnectionEstablished()
{
    if(is_connected)
	    return parent ? parent->SignalConnectionEstablished() : COMM_LOADING;
	is_connected = TRUE;
	return ConnectionEstablished();
}
コード例 #4
0
ファイル: tSiriusController.cpp プロジェクト: dulton/53_hero
//-----------------------------------------------------------------------------
//! 
//-----------------------------------------------------------------------------
tSiriusController::tSiriusController( tFusionClientAgent& rFusionClientAgent, tSiriusConnector& rSiriusConnector, QWidget* pParent  )
    : QObject( pParent )
    , m_rFusionClientAgent( rFusionClientAgent )
    , m_rSiriusConnector( rSiriusConnector )
    , m_VolumeControlType( eVCT_NativelyControlled )
    , m_pNotice( 0 )
    , m_pSelectFromAllAction( 0 )
    , m_pSelectFromFavoritesAction( 0 )
    , m_pAllChannelStatusAction( 0 )
    , m_pCategoryAction( 0 )
    , m_pChannelsSubMenuAction( 0 )
    , m_pOptionsAction( 0 )
    , m_pLockCodeAction( 0 )
    , m_pLockChannelAction( 0 )
    , m_pDetachSirius( 0 )
    , m_pSelectCategoryDialog( 0 )
    , m_pCategoryTable( 0 )
    , m_ChannelId( 0 )
    , m_pFavoriteChannels( 0 )
    , m_pChannelsDialog( 0 )
    , m_pChannelsTable( 0 )
    , m_pAllChannelStatusDialog( 0 )
    , m_pAllChannelStatusTable( 0 )
    , m_LockOpened( false )
    , m_UnlockDialogShowing( false )
{

    setObjectName( "Sirius Controller" );

    m_VolumeControlType = VolumeControlType();

    // If using NAS to control the Sirius volume (as opposed to changing
    // the volume of the weather module's sirius radio directory), then max
    // out the volume of the Sirius radio and ensure that it is unmuted.
    // Because the SDK used to interface with the weather module might not be
    // ready in time, set a timer to keep trying.
    if ( m_VolumeControlType == eVCT_AudioServerControlled )
    {
        m_rSiriusConnector.SetToNonNativeVolumeControlMode();
    }

    // Make the connections
    Connect( &m_rSiriusConnector, SIGNAL( ConnectionLost() ), this, SIGNAL( ConnectionLost() ) );
    Connect( &m_rSiriusConnector, SIGNAL( ConnectionEstablished() ), this, SIGNAL( ConnectionMade() ) );

    Connect( &m_rSiriusConnector, SIGNAL( CurrentChannelChanged( int, int, const QString&, const QString& ) ), 
        this, SLOT( SetChannel( int, int, const QString&, const QString& ) ) );

    Connect( &m_rSiriusConnector, SIGNAL( CurrentSongChanged( const QString&, const QString&, const QString& ) ), 
            this, SLOT( SetArtistSongComposer( const QString&, const QString&, const QString& ) ) );
    
    // SDKThread SIGNAL to SIGNAL pass throughs.
    Connect( &m_rSiriusConnector, SIGNAL( SignalStrengthChanged( int ) ), this, SIGNAL( SignalStrengthChanged( int ) ) );

    
    // All status messages for Sirius are handled by the tNoticeManager.
    // @todo [Glenn 30.09.13] We need a way of being informed by the tNoticeManager
    // that its messages/status has change. It was designed to be tightly coupled to 
    // GUI objects, so we'll have to make it more generic by emitting a MessageChanged signal
    // which this object can listen to.
    m_pNotice = new tNoticeManager( NULL );
    // Wire the notices to the source
    /*
    Connect( &m_rSiriusConnector, SIGNAL( SignalLost() ), m_pNotice, SLOT(NoticeSignalLost()) );
    Connect( &m_rSiriusConnector, SIGNAL( SignalRestored() ), m_pNotice, SLOT(NoticeSignalRestored()) );
    Connect( &m_rSiriusConnector, SIGNAL( AntennaDisconnected() ), m_pNotice, SLOT(NoticeAntennaDisconnected()) );
    Connect( &m_rSiriusConnector, SIGNAL( AntennaRestored() ), m_pNotice, SLOT(NoticeAntennaRestored()) );
    Connect( &m_rSiriusConnector, SIGNAL( GCIInProgress(int) ), m_pNotice, SLOT(NoticeGCIInProgress(int)) );
    Connect( &m_rSiriusConnector, SIGNAL( GCIDone() ), m_pNotice, SLOT(NoticeGCIDone()) );
    Connect( &m_rSiriusConnector, SIGNAL( PSVUpdated() ), m_pNotice, SLOT(NoticePSVUpdated()) );
    */

    CreateSiriusActions();
}