27 : m_lastInput(), m_previousDirectory(
""), m_algorithmsGroup(settingsGroup), m_dirKey(
"LastDirectory") {
49 m_lastInput[algName][
property.first] =
property.second;
101 QListIterator<QString> algNames(storage.childGroups());
104 while (algNames.hasNext()) {
106 QString group = algNames.next();
107 const_cast<QSettings &
>(storage).beginGroup(group);
108 QListIterator<QString> properties(storage.childKeys());
109 while (properties.hasNext()) {
110 QString propName = properties.next();
111 QString
value = storage.value(propName).toString();
112 if (!
value.isEmpty())
113 algorithmProperties.insert(propName,
value);
116 const_cast<QSettings &
>(storage).endGroup();
122 const_cast<QSettings &
>(storage).endGroup();
127 QHashIterator<QString, QHash<QString, QString>> inputHistory(
m_lastInput);
128 while (inputHistory.hasNext()) {
130 storage.beginGroup(inputHistory.key());
135 storage.setValue(itr.key(), itr.value());
double value
The value of the point.
void save() const
Save the values stored here to persistent storage.
void setPreviousDirectory(const QString &lastdir)
Set the directory that was accessed when the previous open file dialog was used.
QHash< QString, QHash< QString, QString > > m_lastInput
A map indexing the algorithm name and a list of property name:value pairs.
QString m_previousDirectory
The directory that last used by an open file dialog.
void load()
Load any values that are available from persistent storage.
void writeSettings(QSettings &storage) const override
QString m_algorithmsGroup
The string denoting the group (in the QSettings) where the algorithm properties are stored.
QString m_dirKey
The string denoting the key for the previous dir storage.
const QString & getPreviousDirectory() const
Get the directory that was accessed when the previous open file dialog was used.
void clearAlgorithmInput(const QString &algName)
Clear values for a particular algorithm.
void readSettings(const QSettings &storage) override
AbstractAlgorithmInputHistory(const AbstractAlgorithmInputHistory &)=delete
QString previousInput(const QString &algName, const QString &propName) const
Retrieve an old parameter value.
void storeNewValue(const QString &algName, const QPair< QString, QString > &property)
Update the old values that are stored here.
virtual ~AbstractAlgorithmInputHistory()=0
Abstract destructor.