MultiplexedService::MultiplexedService(Multiplexer *multiplexer, QObject *parent) : Plasma::Service(parent) { setObjectName(Multiplexer::sourceName + QLatin1String(" controller")); setName("mpris2"); setDestination(Multiplexer::sourceName); connect(multiplexer, SIGNAL(activePlayerChanged(PlayerContainer*)), this, SLOT(activePlayerChanged(PlayerContainer*))); activePlayerChanged(multiplexer->activePlayer()); }
void XbmcremoteApplet::init() { Plasma::Containment * c = containment(); /* When applet is not in panel the tooltip always appears when hovering any point of the popup's area, which is annoying. */ if (c && (c->containmentType() == Plasma::Containment::PanelContainment || c->containmentType() == Plasma::Containment::CustomPanelContainment)) { Plasma::ToolTipManager::self()->registerWidget(this); m_panelContainment = true; } else { m_panelContainment = false; } //kDebug(); m_popup = new DeclarativePopup(this); // TODO: config // connect(d->m_popup, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving())); // TODO: context options // QAction* action = new QAction(i18nc("CheckBox to enable or disable networking completely", "Enable networking"), this); // action->setToolTip(i18nc("@info:tooltip tooltip for the 'Enable networking' checkbox", "Enable or disable the networking system")); // action->setCheckable(true); // action->setChecked(NetworkManager::isNetworkingEnabled()); // connect(action, SIGNAL(triggered(bool)), d->m_popup, SLOT(networkingEnabledToggled(bool))); // connect(NetworkManager::notifier(), SIGNAL(networkingEnabledChanged(bool)), // action, SLOT(setChecked(bool))); // d->actions.append(action); setGraphicsWidget(m_popup); connect(Xbmc::instance(), SIGNAL(connectedChanged(bool)), SLOT(connectedChanged(bool))); connect(Xbmc::instance(), SIGNAL(activePlayerChanged()), SLOT(activePlayerChanged())); }