summaryrefslogtreecommitdiff
path: root/OptionEngine.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2018-02-23 23:49:48 +0000
committerThomas Preud'homme <robotux@celest.fr>2018-02-23 23:49:48 +0000
commitbd56579c7d9de94c17287adefa118290e6b7ba33 (patch)
tree666d7d0b6945b442573b7a3145969f66a53aa460 /OptionEngine.h
parentb3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (diff)
New upstream version 1.4.0.3
Diffstat (limited to 'OptionEngine.h')
-rw-r--r--OptionEngine.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/OptionEngine.h b/OptionEngine.h
index ca8a786..027861f 100644
--- a/OptionEngine.h
+++ b/OptionEngine.h
@@ -20,6 +20,7 @@
#include <QTimer>
#include <QWidget>
#include <QHash>
+#include <unordered_map>
#include "interface/OptionInterface.h"
@@ -41,13 +42,13 @@ class OptionEngine : public QObject
/// \brief Destroy the option
~OptionEngine();
/// \brief To add option group to options
- bool addOptionGroup(const QString &groupName,const QList<QPair<QString, QVariant> > &KeysList);
+ bool addOptionGroup(const std::string &groupName,const std::vector<std::pair<std::string, std::string> > &KeysList);
/// \brief To remove option group to options, remove the widget need be do into the calling object
- bool removeOptionGroup(const QString &groupName);
+ bool removeOptionGroup(const std::string &groupName);
/// \brief To get option value
- QVariant getOptionValue(const QString &groupName,const QString &variableName) const;
+ std::string getOptionValue(const std::string &groupName,const std::string &variableName) const;
/// \brief To set option value
- void setOptionValue(const QString &groupName,const QString &variableName,const QVariant &value);
+ void setOptionValue(const std::string &groupName,const std::string &variableName,const std::string &value);
/// \brief To invalid option value
//void setInvalidOptionValue(const QString &groupName,const QString &variableName);
/// \brief get query reset options
@@ -56,14 +57,14 @@ class OptionEngine : public QObject
/// \brief OptionEngineGroupKey then: Group -> Key
struct OptionEngineGroupKey
{
- QVariant defaultValue;
- QVariant currentValue;
+ std::string defaultValue;
+ std::string currentValue;
bool emptyList;
};
/// \brief store the option group list
- QHash<QString,QHash<QString,OptionEngineGroupKey> > GroupKeysList;
- QStringList unmanagedTabName;
+ std::unordered_map<std::string,std::unordered_map<std::string,OptionEngineGroupKey> > GroupKeysList;
+ std::vector<std::string> unmanagedTabName;
/// \brief Enumeration of backend
enum Backend
{
@@ -77,7 +78,7 @@ class OptionEngine : public QObject
//the reset of right value of widget need be do into the calling object
void internal_resetToDefaultValue();
signals:
- void newOptionValue(const QString&,const QString&,const QVariant&) const;
+ void newOptionValue(const std::string&,const std::string&,const std::string&) const;
void resetOptions() const;
public:
static OptionEngine *optionEngine;