55class QGpgMENewCryptoConfigEntry :
public QGpgME::CryptoConfigEntry
58 QGpgMENewCryptoConfigEntry(
const std::shared_ptr<QGpgMENewCryptoConfigGroup> &group,
const GpgME::Configuration::Option &option);
59 ~QGpgMENewCryptoConfigEntry();
61 QString name()
const override;
62 QString description()
const override;
63 QString path()
const override;
64 bool isOptional()
const override;
65 bool isReadOnly()
const override;
66 bool isList()
const override;
67 bool isRuntime()
const override;
68 Level level()
const override;
69 ArgType argType()
const override;
70 bool isSet()
const override;
71 bool boolValue()
const override;
72 QString stringValue()
const override;
73 int intValue()
const override;
74 unsigned int uintValue()
const override;
75 QUrl urlValue()
const override;
76 unsigned int numberOfTimesSet()
const override;
77 std::vector<int> intValueList()
const override;
78 std::vector<unsigned int> uintValueList()
const override;
79 QList<QUrl> urlValueList()
const override;
80 void resetToDefault()
override;
81 void setBoolValue(
bool)
override;
82 void setStringValue(
const QString &)
override;
83 void setIntValue(
int)
override;
84 void setUIntValue(
unsigned int)
override;
85 void setURLValue(
const QUrl &)
override;
86 void setNumberOfTimesSet(
unsigned int)
override;
87 void setIntValueList(
const std::vector<int> &)
override;
88 void setUIntValueList(
const std::vector<unsigned int> &)
override;
89 void setURLValueList(
const QList<QUrl> &)
override;
90 bool isDirty()
const override;
92 QStringList stringValueList()
const;
93 QVariant defaultValue()
const;
96 void setDirty(
bool b);
97 QString outputString()
const;
100 bool isStringType()
const;
101 QVariant stringToValue(
const QString &value,
bool unescape)
const;
102 QString toString(
bool escape)
const;
105 std::weak_ptr<QGpgMENewCryptoConfigGroup> m_group;
106 GpgME::Configuration::Option m_option;
109class QGpgMENewCryptoConfigGroup :
public QGpgME::CryptoConfigGroup
112 QGpgMENewCryptoConfigGroup(
const std::shared_ptr<QGpgMENewCryptoConfigComponent> &parent,
const GpgME::Configuration::Option &option);
113 ~QGpgMENewCryptoConfigGroup();
115 QString name()
const override;
116 QString iconName()
const override
120 QString description()
const override;
121 QString path()
const override;
122 QGpgME::CryptoConfigEntry::Level level()
const override;
123 QStringList entryList()
const override;
127 friend class QGpgMENewCryptoConfigComponent;
128 std::weak_ptr<QGpgMENewCryptoConfigComponent> m_component;
129 GpgME::Configuration::Option m_option;
130 QStringList m_entryNames;
131 QHash< QString, std::shared_ptr<QGpgMENewCryptoConfigEntry> > m_entriesByName;
135class QGpgMENewCryptoConfigComponent :
public QGpgME::CryptoConfigComponent,
public std::enable_shared_from_this<QGpgMENewCryptoConfigComponent>
138 QGpgMENewCryptoConfigComponent();
139 ~QGpgMENewCryptoConfigComponent();
141 void setComponent(
const GpgME::Configuration::Component &component);
143 QString name()
const override;
144 QString iconName()
const override
148 QString description()
const override;
149 QStringList groupList()
const override;
152 void sync(
bool runtime);
155 GpgME::Configuration::Component m_component;
156 QHash< QString, std::shared_ptr<QGpgMENewCryptoConfigGroup> > m_groupsByName;
Definition qgpgmenewcryptoconfig.h:56