34 #ifndef QGPGME_QGPGMENEWCRYPTOCONFIG_H 35 #define QGPGME_QGPGMENEWCRYPTOCONFIG_H 37 #include "qgpgme_export.h" 38 #include "cryptoconfig.h" 41 #include <QStringList> 44 #ifdef BUILDING_QGPGME 45 # include "configuration.h" 47 # include <gpgme++/configuration.h> 62 QGpgMENewCryptoConfigEntry(
const std::shared_ptr<QGpgMENewCryptoConfigGroup> &group,
const GpgME::Configuration::Option &option);
65 QString name()
const Q_DECL_OVERRIDE;
66 QString description()
const Q_DECL_OVERRIDE;
67 QString path()
const Q_DECL_OVERRIDE;
68 bool isOptional()
const Q_DECL_OVERRIDE;
69 bool isReadOnly()
const Q_DECL_OVERRIDE;
70 bool isList()
const Q_DECL_OVERRIDE;
71 bool isRuntime()
const Q_DECL_OVERRIDE;
72 Level level()
const Q_DECL_OVERRIDE;
73 ArgType argType()
const Q_DECL_OVERRIDE;
74 bool isSet()
const Q_DECL_OVERRIDE;
75 bool boolValue()
const Q_DECL_OVERRIDE;
76 QString stringValue()
const Q_DECL_OVERRIDE;
77 int intValue()
const Q_DECL_OVERRIDE;
78 unsigned int uintValue()
const Q_DECL_OVERRIDE;
79 QUrl urlValue()
const Q_DECL_OVERRIDE;
80 unsigned int numberOfTimesSet()
const Q_DECL_OVERRIDE;
81 std::vector<int> intValueList()
const Q_DECL_OVERRIDE;
82 std::vector<unsigned int> uintValueList()
const Q_DECL_OVERRIDE;
83 QList<QUrl> urlValueList()
const Q_DECL_OVERRIDE;
84 void resetToDefault() Q_DECL_OVERRIDE;
85 void setBoolValue(
bool) Q_DECL_OVERRIDE;
86 void setStringValue(
const QString &) Q_DECL_OVERRIDE;
87 void setIntValue(
int) Q_DECL_OVERRIDE;
88 void setUIntValue(
unsigned int) Q_DECL_OVERRIDE;
89 void setURLValue(
const QUrl &) Q_DECL_OVERRIDE;
90 void setNumberOfTimesSet(
unsigned int) Q_DECL_OVERRIDE;
91 void setIntValueList(
const std::vector<int> &) Q_DECL_OVERRIDE;
92 void setUIntValueList(
const std::vector<unsigned int> &) Q_DECL_OVERRIDE;
93 void setURLValueList(
const QList<QUrl> &) Q_DECL_OVERRIDE;
94 bool isDirty()
const Q_DECL_OVERRIDE;
97 void setDirty(
bool b);
98 QString outputString()
const;
101 bool isStringType()
const;
102 QVariant stringToValue(
const QString &value,
bool unescape)
const;
103 QString toString(
bool escape)
const;
106 std::weak_ptr<QGpgMENewCryptoConfigGroup> m_group;
107 GpgME::Configuration::Option m_option;
113 QGpgMENewCryptoConfigGroup(
const std::shared_ptr<QGpgMENewCryptoConfigComponent> &parent,
const GpgME::Configuration::Option &option);
116 QString name()
const Q_DECL_OVERRIDE;
117 QString iconName()
const Q_DECL_OVERRIDE
121 QString description()
const Q_DECL_OVERRIDE;
122 QString path()
const Q_DECL_OVERRIDE;
123 QGpgME::CryptoConfigEntry::Level level()
const Q_DECL_OVERRIDE;
124 QStringList entryList()
const Q_DECL_OVERRIDE;
129 std::weak_ptr<QGpgMENewCryptoConfigComponent> m_component;
130 GpgME::Configuration::Option m_option;
131 QStringList m_entryNames;
132 QHash< QString, std::shared_ptr<QGpgMENewCryptoConfigEntry> > m_entriesByName;
142 void setComponent(
const GpgME::Configuration::Component &component);
144 QString name()
const Q_DECL_OVERRIDE;
145 QString iconName()
const Q_DECL_OVERRIDE
149 QString description()
const Q_DECL_OVERRIDE;
150 QStringList groupList()
const Q_DECL_OVERRIDE;
153 void sync(
bool runtime);
156 GpgME::Configuration::Component m_component;
157 QHash< QString, std::shared_ptr<QGpgMENewCryptoConfigGroup> > m_groupsByName;
173 QStringList componentList()
const Q_DECL_OVERRIDE;
177 void clear() Q_DECL_OVERRIDE;
178 void sync(
bool runtime) Q_DECL_OVERRIDE;
182 void reloadConfiguration(
bool showErrors);
185 QHash< QString, std::shared_ptr<QGpgMENewCryptoConfigComponent> > m_componentsByName;
Definition: qgpgmenewcryptoconfig.h:164
Definition: qgpgmenewcryptoconfig.h:110
For docu, see kleo/cryptoconfig.h.
Definition: qgpgmenewcryptoconfig.h:136
Definition: qgpgmenewcryptoconfig.h:59