Mantid
Loading...
Searching...
No Matches
AlgorithmInputHistory.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------
10// Includes
11//----------------------------------
12#include "DllOption.h"
15#include <QHash>
16#include <QString>
17
18namespace MantidQt {
19namespace API {
20
25public:
30
33 void storeNewValue(const QString &algName, const QPair<QString, QString> &property);
34
36 void clearAlgorithmInput(const QString &algName);
37
39 QString previousInput(const QString &algName, const QString &propName) const;
40
43 void setPreviousDirectory(const QString &lastdir);
44
47 const QString &getPreviousDirectory() const;
48
50 void save() const;
51
53 void readSettings(const QSettings &storage) override;
54
56 void writeSettings(QSettings &storage) const override;
57
58protected:
60 AbstractAlgorithmInputHistory(const QString &settingsGroup);
61
62private:
64 void load();
65
68
71
75
77 QString m_dirKey;
78};
79
81private:
83 ~AlgorithmInputHistoryImpl() override = default;
84
85private:
87};
88
90} // namespace API
91} // namespace MantidQt
92
93namespace Mantid {
94namespace Kernel {
97}
98} // namespace Mantid
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
#define EXTERN_MANTIDQT_COMMON
Definition: DllOption.h:16
This abstract class deals with the loading and saving of previous algorithm property values to/from M...
AbstractAlgorithmInputHistory & operator=(const AbstractAlgorithmInputHistory &)=delete
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.
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.
AbstractAlgorithmInputHistory(const AbstractAlgorithmInputHistory &)=delete
Defines an interface for an object to load and store any configuration settings that should persist b...
Definition: Configurable.h:24
Manage the lifetime of a class intended to be a singleton.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
Helper class which provides the Collimation Length for SANS instruments.
Policy class controlling creation of the singleton Implementation classes should mark their default c...