Logo Search packages:      
Sourcecode: kcmpureftpd version File versions  Download package

void KPureftpdScript::save (  ) 

Save configuration according to the widgets states and values

Definition at line 1377 of file kcmpureftpdscript.cpp.

References config, script, slotTabChanged(), and ui.

                           {
  // application options
  config->setGroup("Options");
  config->writeEntry("Debug",debug);
  config->sync();

  // save the default GUI in a fake script
  GuiData g;
  getGui(g);
  ScriptItem s;
  s.setGuiData(g);
  s.setId("dummy-unused-id");
  s.setTemplateId("dummy-unused-templateid");
  QString dir = KGlobal::dirs()->saveLocation("data","kcmpureftpdscript/");
  s.setScriptFile(dir+"guidata");
  script->save(s);

  // save the GUI modified data back in current script
  slotTabChanged(ui->tabScripts);
  // save all modified scripts
  ScriptItemIterator it;
  for (it=script->begin(); it!=script->end(); ++it) {
    if ((*it).isChanged()) {
      (void)script->save((*it));
    }
  }

  emit changed(false);
}


Generated by  Doxygen 1.6.0   Back to index