mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-19 04:02:09 +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->setText(_params[plugin].value(params.at(i)).toString());
|
||||
l->addRow(params.at(i) + ":", le);
|
||||
connect(le, &QLineEdit::editingFinished, this,
|
||||
&PluginParameters::saveParameters);
|
||||
}
|
||||
|
||||
deleteLayout(layout());
|
||||
@ -52,6 +50,12 @@ void PluginParameters::setPlugin(const QString &plugin)
|
||||
_plugin = plugin;
|
||||
}
|
||||
|
||||
const QMap<QString, QVariantMap> &PluginParameters::parameters()
|
||||
{
|
||||
saveParameters();
|
||||
return _params;
|
||||
}
|
||||
|
||||
void PluginParameters::saveParameters()
|
||||
{
|
||||
QVariantMap &map(_params[_plugin]);
|
||||
|
@ -12,15 +12,14 @@ public:
|
||||
PluginParameters(const QString &plugin,
|
||||
const QMap<QString, QVariantMap> ¶ms, QWidget *parent = 0);
|
||||
|
||||
const QMap<QString, QVariantMap> ¶meters() const {return _params;}
|
||||
const QMap<QString, QVariantMap> ¶meters();
|
||||
|
||||
public slots:
|
||||
void setPlugin(const QString &plugin);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void saveParameters();
|
||||
|
||||
private:
|
||||
QMap<QString, QVariantMap> _params;
|
||||
QString _plugin;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user