mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 09:05:14 +01:00
Fixed plugin parameters saving
This commit is contained in:
parent
1e3132c9b3
commit
3e0fb14a75
@ -42,8 +42,6 @@ void PluginParameters::setPlugin(const QString &plugin)
|
|||||||
le->setObjectName(params.at(i));
|
le->setObjectName(params.at(i));
|
||||||
le->setText(_params[plugin].value(params.at(i)).toString());
|
le->setText(_params[plugin].value(params.at(i)).toString());
|
||||||
l->addRow(params.at(i) + ":", le);
|
l->addRow(params.at(i) + ":", le);
|
||||||
connect(le, &QLineEdit::editingFinished, this,
|
|
||||||
&PluginParameters::saveParameters);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteLayout(layout());
|
deleteLayout(layout());
|
||||||
@ -52,6 +50,12 @@ void PluginParameters::setPlugin(const QString &plugin)
|
|||||||
_plugin = plugin;
|
_plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QMap<QString, QVariantMap> &PluginParameters::parameters()
|
||||||
|
{
|
||||||
|
saveParameters();
|
||||||
|
return _params;
|
||||||
|
}
|
||||||
|
|
||||||
void PluginParameters::saveParameters()
|
void PluginParameters::saveParameters()
|
||||||
{
|
{
|
||||||
QVariantMap &map(_params[_plugin]);
|
QVariantMap &map(_params[_plugin]);
|
||||||
|
@ -12,15 +12,14 @@ public:
|
|||||||
PluginParameters(const QString &plugin,
|
PluginParameters(const QString &plugin,
|
||||||
const QMap<QString, QVariantMap> ¶ms, QWidget *parent = 0);
|
const QMap<QString, QVariantMap> ¶ms, QWidget *parent = 0);
|
||||||
|
|
||||||
const QMap<QString, QVariantMap> ¶meters() const {return _params;}
|
const QMap<QString, QVariantMap> ¶meters();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setPlugin(const QString &plugin);
|
void setPlugin(const QString &plugin);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void saveParameters();
|
void saveParameters();
|
||||||
|
|
||||||
private:
|
|
||||||
QMap<QString, QVariantMap> _params;
|
QMap<QString, QVariantMap> _params;
|
||||||
QString _plugin;
|
QString _plugin;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user