コード例 #1
0
void PeopleInfoManager::changeIsOnline(bool isOnline)
{
	Q_ASSERT_X(getIsLoggedOn(), "PeopleInfoManager::changeIsOnline", "Not logged on but changes isOnline");

	this->isOnline = isOnline;

	emit isOnlineChanged();
}
コード例 #2
0
ファイル: contact.cpp プロジェクト: klpx/jam
void Jam::Contact::update(const gloox::RosterItem *item)
{
    j_jid = item->jid().data();
    j_name = item->jid().data();
    j_online = item->online();

    emit nameChanged();
    emit isOnlineChanged();
}
コード例 #3
0
ファイル: qspotifysession.cpp プロジェクト: 2K3O/libQtSpotify
QSpotifySession::QSpotifySession()
    : QObject(0)
    , m_timerID(0)
    , m_sp_session(nullptr)
    , m_connectionStatus(LoggedOut)
    , m_connectionError(Ok)
    , m_connectionRules(AllowSyncOverWifi | AllowNetworkIfRoaming)
    , m_streamingQuality(Unknown)
    , m_syncQuality(Unknown)
    , m_syncOverMobile(false)
    , m_user(nullptr)
    , m_pending_connectionRequest(false)
    , m_isLoggedIn(false)
    , m_explicitLogout(false)
    , m_aboutToQuit(false)
    , m_offlineMode(false)
    , m_forcedOfflineMode(false)
    , m_ignoreNextConnectionError(false)
    , m_playQueue(new QSpotifyPlayQueue(this))
    , m_currentTrack(nullptr)
    , m_isPlaying(false)
    , m_currentTrackPosition(0)
    , m_currentTrackPlayedDuration(0)
    , m_previousTrackRemaining(0)
    , m_shuffle(false)
    , m_repeat(false)
    , m_repeatOne(false)
    , m_volumeNormalize(true)
    , m_trackChangedAutomatically(false)
{
    m_networkingStatus = new ubuntu::connectivity::NetworkingStatus(this);
    connect(m_networkingStatus, SIGNAL(statusChanged(Status)), this, SLOT(onOnlineChanged()));
    connect(m_networkingStatus, SIGNAL(statusChanged(Status)), this, SIGNAL(isOnlineChanged()));
    connect(m_networkingStatus, SIGNAL(limitationsChanged()), this, SLOT(configurationChanged()));
    
    QCoreApplication::setOrganizationName("CuteSpotify");
    QCoreApplication::setOrganizationDomain("com.mikeasoft.cutespotify");
    QCoreApplication::setApplicationName("CuteSpotify");

    connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(initiateQuit()));

    m_audioThread = new QThread();
    g_audioWorker = new QSpotifyAudioThreadWorker();
    g_audioWorker->moveToThread(m_audioThread);
    connect(m_audioThread, SIGNAL(finished()), g_audioWorker, SLOT(deleteLater()));
    connect(m_audioThread, SIGNAL(finished()), m_audioThread, SLOT(deleteLater()));
    m_audioThread->start(QThread::HighestPriority);

//    QCoreApplication::instance()->installEventFilter(this);
}