void ActivityRunner::prep() { if (!m_activities) { m_activities = new KActivities::Controller(this); connect(m_activities, SIGNAL(serviceStatusChanged(KActivities::Consumer::ServiceStatus)), this, SLOT(serviceStatusChanged(KActivities::Consumer::ServiceStatus))); serviceStatusChanged(m_activities->serviceStatus()); } }
void KActivitiesProxy::start() { // qDebug() << "Running the KAMD proxy" << thread() << QCoreApplication::instance()->thread(); m_activities = new KActivities::Controller(this); connect(m_activities, &KActivities::Consumer::serviceStatusChanged, this, &KActivitiesProxy::serviceStatusChanged); connect(m_activities, &KActivities::Consumer::activitiesChanged, this, &KActivitiesProxy::activitiesChanged); connect(m_activities, &KActivities::Consumer::currentActivityChanged, this, &KActivitiesProxy::currentActivityChanged); emit activitiesChanged(m_activities->activities()); emit currentActivityChanged(m_activities->currentActivity()); emit serviceStatusChanged(m_activities->serviceStatus()); }
ActivityRunner::ActivityRunner(QObject *parent, const QVariantList &args) : Plasma::AbstractRunner(parent, args), m_activities(0), m_keywordi18n(i18nc("KRunner keyword", "activity")), m_keyword("activity"), m_enabled(false) { setObjectName(QLatin1String("Activities")); setIgnoredTypes(Plasma::RunnerContext::Directory | Plasma::RunnerContext::File | Plasma::RunnerContext::NetworkLocation | Plasma::RunnerContext::Help); connect(this, SIGNAL(prepare()), this, SLOT(prep())); connect(this, SIGNAL(teardown()), this, SLOT(down())); serviceStatusChanged(KActivities::Consumer::FullFunctionality); }