void KoColorConversionSystem::insertColorSpace(const KoColorSpaceFactory* csf) { dbgPigment << "Inserting color space " << csf->name() << " (" << csf->id() << ") Model: " << csf->colorModelId() << " Depth: " << csf->colorDepthId() << " into the CCS"; QList<const KoColorProfile*> profiles = KoColorSpaceRegistry::instance()->profilesFor(csf); QString modelId = csf->colorModelId().id(); QString depthId = csf->colorDepthId().id(); if (profiles.isEmpty()) { // There is no profile for this CS, create a node without profile name if the color engine isn't icc-based if (csf->colorSpaceEngine() != "icc") { Node* n = nodeFor(modelId, depthId, ""); n->init(csf); } else { dbgPigment << "Cannot add node for " << csf->name() << ", since there are no profiles available"; } } else { // Initialise the nodes foreach(const KoColorProfile* profile, profiles) { Node* n = nodeFor(modelId, depthId, profile->name()); n->init(csf); if (!csf->colorSpaceEngine().isEmpty()) { KoColorSpaceEngine* engine = KoColorSpaceEngineRegistry::instance()->get(csf->colorSpaceEngine()); Q_ASSERT(engine); NodeKey engineKey(engine->id(), engine->id(), engine->id()); Node* engineNode = 0; if (d->graph.contains(engineKey)) { engineNode = d->graph[engineKey]; } else { engineNode = insertEngine(engine); } connectToEngine(n, engineNode); } } }
void Hdd::configChanged() { KConfigGroup cg = config(); QStringList sources = cg.readEntry("uuids", mounted()); setSources(sources); setInterval(cg.readEntry("interval", 2) * 60 * 1000); connectToEngine(); }
void HWInfo::init() { KGlobal::locale()->insertCatalog("plasma_applet_system-monitor"); setTitle(i18n("Hardware Info")); setEngine(dataEngine("soliddevice")); setSources(); connectToEngine(); }
void PlasmaMuleApplet::init() { m_debugChannel = KDebug::registerArea ("plasmamule-applet", #ifdef __DEBUG__ true #else false #endif ); connectToEngine(); }
void Luna::init() { configChanged(); m_theme = new Plasma::Svg(this); m_theme->setImagePath("widgets/luna"); m_theme->setContainsMultipleImages(true); if (!m_theme->isValid()) { setFailedToLaunch(true, i18n("The luna SVG file was not found")); return; } Plasma::ToolTipManager::self()->registerWidget(this); connectToEngine(); }
void Clock::clockConfigChanged() { KConfigGroup cg = config(); m_showSecondHand = cg.readEntry("showSecondHand", false); m_showTimezoneString = cg.readEntry("showTimezoneString", false); m_showingTimezone = m_showTimezoneString; m_fancyHands = cg.readEntry("fancyHands", false); setCurrentTimezone(cg.readEntry("timezone", localTimezone())); if (m_showSecondHand) { //We don't need to cache the applet if it update every seconds setCacheMode(QGraphicsItem::NoCache); } else { setCacheMode(QGraphicsItem::DeviceCoordinateCache); } connectToEngine(); invalidateCache(); }
void Clock::clockConfigAccepted() { KConfigGroup cg = config(); m_showTimezoneString = ui.showTimezoneStringCheckBox->isChecked(); m_showingTimezone = m_showTimezoneString || shouldDisplayTimezone(); m_showSecondHand = ui.showSecondHandCheckBox->isChecked(); if (m_showSecondHand) { //We don't need to cache the applet if it update every seconds setCacheMode(QGraphicsItem::NoCache); } else { setCacheMode(QGraphicsItem::DeviceCoordinateCache); } cg.writeEntry("showSecondHand", m_showSecondHand); cg.writeEntry("showTimezoneString", m_showTimezoneString); update(); dataEngine("time")->disconnectSource(currentTimezone(), this); connectToEngine(); constraintsEvent(Plasma::AllConstraints); emit configNeedsSaving(); }