void DictCCImporterModel::importDictionaries()
{
    qDeleteAll(importedDictionaries);
    importedDictionaries.clear();
    DictCCImportWorker *workerThread = new DictCCImportWorker();
    connect(workerThread, SIGNAL(importFinished()), this, SLOT(handleImportFinished()));
    connect(workerThread, SIGNAL(statusChanged(QString)), this, SLOT(handleStatusChanged(QString)));
    connect(workerThread, SIGNAL(dictionaryFound(QString,QString)), this, SLOT(handleDictionaryFound(QString,QString)));
    working = true;
    workerThread->start();
}
	void NotificationsManager::AddCLEntry (QObject *entryObj)
	{
		connect (entryObj,
				SIGNAL (statusChanged (EntryStatus, QString)),
				this,
				SLOT (handleStatusChanged (EntryStatus, QString)));

		if (qobject_cast<IAdvancedCLEntry*> (entryObj))
		{
			connect (entryObj,
					SIGNAL (attentionDrawn (const QString&, const QString&)),
					this,
					SLOT (handleAttentionDrawn (const QString&, const QString&)));
			connect (entryObj,
					SIGNAL (locationChanged (QString)),
					this,
					SLOT (handleLocationChanged (QString)));
		}

		if (qobject_cast<IHaveContactTune*> (entryObj))
			connect (entryObj,
					SIGNAL (tuneChanged (QString)),
					this,
					SLOT (handleTuneChanged (QString)));

		if (qobject_cast<IHaveContactMood*> (entryObj))
			connect (entryObj,
					SIGNAL (moodChanged (QString)),
					this,
					SLOT (handleMoodChanged (QString)));

		if (qobject_cast<IHaveContactActivity*> (entryObj))
			connect (entryObj,
					SIGNAL (activityChanged (QString)),
					this,
					SLOT (handleActivityChanged (QString)));

		const auto entry = qobject_cast<ICLEntry*> (entryObj);
		const auto status = entry->GetStatus ();
		if (status.State_ != SOffline)
			HandleStatusChanged (entry, status, entry->Variants ().value (0));
	}
Esempio n. 3
0
MFPlayerControl::MFPlayerControl(MFPlayerSession *session)
    : QMediaPlayerControl(session)
    , m_state(QMediaPlayer::StoppedState)
    , m_videoAvailable(false)
    , m_audioAvailable(false)
    , m_duration(-1)
    , m_seekable(false)
    , m_session(session)
{
    QObject::connect(m_session, SIGNAL(statusChanged()), this, SLOT(handleStatusChanged()));
    QObject::connect(m_session, SIGNAL(videoAvailable()), this, SLOT(handleVideoAvailable()));
    QObject::connect(m_session, SIGNAL(audioAvailable()), this, SLOT(handleAudioAvailable()));
    QObject::connect(m_session, SIGNAL(durationUpdate(qint64)), this, SLOT(handleDurationUpdate(qint64)));
    QObject::connect(m_session, SIGNAL(seekableUpdate(bool)), this, SLOT(handleSeekableUpdate(bool)));
    QObject::connect(m_session, SIGNAL(error(QMediaPlayer::Error, QString, bool)), this, SLOT(handleError(QMediaPlayer::Error, QString, bool)));
    QObject::connect(m_session, SIGNAL(positionChanged(qint64)), this, SIGNAL(positionChanged(qint64)));
    QObject::connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
    QObject::connect(m_session, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));
    QObject::connect(m_session, SIGNAL(playbackRateChanged(qreal)), this, SIGNAL(playbackRateChanged(qreal)));
    QObject::connect(m_session, SIGNAL(bufferStatusChanged(int)), this, SIGNAL(bufferStatusChanged(int)));
}