void KRandRModule::load( bool useDefaults ) { if (!isValid()) return; // Don't load screen configurations: // It will be correct already if they wanted to retain their settings over KDE restarts, // and if it isn't correct they have changed a) their X configuration, b) the screen // with another program, or c) their hardware. KConfig config("kcmrandrrc", true); config.setReadDefaults( useDefaults ); m_oldApply = loadDisplay(config, false); m_oldSyncTrayApp = syncTrayApp(config); m_applyOnStartup->setChecked(m_oldApply); m_syncTrayApp->setChecked(m_oldSyncTrayApp); emit changed( useDefaults ); }
void ossimQtVceComponentDialogController::loadViews() { std::vector<ossimString> typeList; ossimObjectFactoryRegistry::instance()->getTypeNameList(typeList); ossim_uint32 idx = 0; loadDisplay(); loadImageHandler(); QIconView* currentView=0; ossimString pixmapName; for(idx = 0; idx < typeList.size(); ++idx) { ossimRefPtr<ossimObject> obj = ossimObjectFactoryRegistry::instance()->createObject(typeList[idx]); if(obj.valid()) { currentView = 0; if(obj->canCastTo("ossimImageHandler")) { // left blank on purpose } else if(obj->canCastTo("ossimFusionCombiner")) { pixmapName = "tilecascade"; currentView = theWindow->theFusionComponentView; } else if(obj->canCastTo("ossimImageCombiner")) { pixmapName = "tilecascade"; currentView = theWindow->theCombinerComponentView; } else if(obj->canCastTo("ossimImageFileWriter")) { currentView = theWindow->theExporterComponentView; pixmapName = "datastore"; } else if(obj->canCastTo("ossimMetadataFileWriter")) { currentView = theWindow->theMetaDataExporterComponentView; pixmapName = "datastore"; } else if(obj->canCastTo("ossimImageSourceFilter")) { pixmapName = ""; // we don't have one yet for this type currentView = theWindow->theFilterComponentView; } else if(obj->canCastTo("ossimProcessInterface")) { currentView = theWindow->theProcessComponentView; pixmapName = "";// we don't have one yet for this type } if(currentView) { ossimQtVceComponentView::ossimQtVceComponentIcon* item = new ossimQtVceComponentView::ossimQtVceComponentIcon(currentView); item->setPixmap(QPixmap::fromMimeSource(pixmapName.c_str())); item->setHiddenText(typeList[idx].c_str()); ossimString tempString = typeList[idx]; tempString = tempString.substitute("ossim", ""); tempString = tempString.substitute("imglnk", ""); item->setText(tempString.c_str()); currentView->insertItem(item); } } } }