void ImportExportGadgetWidget::exportConfiguration(const QString& fileName)
{
    bool doGeneral = ui->checkBoxGeneral->isChecked();
    bool doAllGadgets = ui->checkBoxAllGadgets->isChecked();
    bool doPlugins = ui->checkBoxPlugins->isChecked();

    QSettings::Format format = XmlConfig::XmlSettingsFormat;
    QSettings qs(fileName, format);

    if (doGeneral) {
        Core::ICore::instance()->saveMainSettings(&qs);
    }
    if (doAllGadgets) {
        Core::ICore::instance()->uavGadgetInstanceManager()->saveSettings(&qs);
    }
    if ( doPlugins ) {
        foreach ( Core::IConfigurablePlugin *plugin, getConfigurables()) {
            Core::ICore::instance()->saveSettings(plugin,&qs);
        }
    }
Example #2
0
void InputDevice::configure() {
    configure(getConfigurables());
}