33 #ifndef KLEO_TQGPGMECRYPTOCONFIG_H 34 #define KLEO_TQGPGMECRYPTOCONFIG_H 36 #include <kleo/cryptoconfig.h> 38 #include <tqstringlist.h> 40 #include <tqvariant.h> 44 class QGpgMECryptoConfigEntry;
65 virtual void sync(
bool runtime );
68 void slotCollectStdOut( TDEProcIO* proc );
71 void runGpgConf(
bool showErrors );
74 TQDict<QGpgMECryptoConfigComponent> mComponents;
78 class QGpgMECryptoConfigGroup;
89 TQString
name()
const {
return mName; }
92 TQStringList groupList()
const;
95 void sync(
bool runtime );
98 void slotCollectStdOut( TDEProcIO* proc );
103 TQDict<QGpgMECryptoConfigGroup> mGroups;
105 TQString mDescription;
106 QGpgMECryptoConfigGroup* mCurrentGroup;
107 TQString mCurrentGroupName;
113 QGpgMECryptoConfigGroup(
const TQString & name,
const TQString& description,
int level );
114 ~QGpgMECryptoConfigGroup() {}
116 TQString name()
const {
return mName; }
117 TQString iconName()
const {
return TQString(); }
118 TQString description()
const {
return mDescription; }
120 TQStringList entryList()
const;
125 TQDict<QGpgMECryptoConfigEntry> mEntries;
127 TQString mDescription;
133 QGpgMECryptoConfigEntry(
const TQStringList& parsedLine );
134 ~QGpgMECryptoConfigEntry();
136 TQString name()
const {
return mName; }
137 TQString description()
const {
return mDescription; }
138 bool isOptional()
const;
139 bool isReadOnly()
const;
141 bool isRuntime()
const;
142 Level level()
const {
return static_cast<Level
>( mLevel ); }
143 ArgType argType()
const {
return static_cast<ArgType
>( mArgType ); }
145 bool boolValue()
const;
146 TQString stringValue()
const;
147 int intValue()
const;
148 unsigned int uintValue()
const;
149 KURL urlValue()
const;
150 unsigned int numberOfTimesSet()
const;
151 TQStringList stringValueList()
const;
152 TQValueList<int> intValueList()
const;
153 TQValueList<unsigned int> uintValueList()
const;
154 KURL::List urlValueList()
const;
155 void resetToDefault();
156 void setBoolValue(
bool );
157 void setStringValue(
const TQString& );
158 void setIntValue(
int );
159 void setUIntValue(
unsigned int );
160 void setURLValue(
const KURL& );
161 void setNumberOfTimesSet(
unsigned int );
162 void setStringValueList(
const TQStringList& );
163 void setIntValueList(
const TQValueList<int>& );
164 void setUIntValueList(
const TQValueList<unsigned int>& );
165 void setURLValueList(
const KURL::List& );
166 bool isDirty()
const {
return mDirty; }
168 void setDirty(
bool b );
169 TQString outputString()
const;
172 bool isStringType()
const;
173 TQVariant stringToValue(
const TQString& value,
bool unescape )
const;
174 TQString toString(
bool escape )
const;
177 TQString mDescription;
178 TQVariant mDefaultValue;
182 uint mRealArgType : 6;
TQString description() const
Return user-visible description of this component.
TQString name() const
Return the internal name of this component.
virtual Kleo::CryptoConfigComponent * component(const TQString &name) const
For docu, see kleo/cryptoconfig.h.
Main interface to crypto configuration.
virtual TQStringList componentList() const
Returns the list of known components (e.g.
Crypto config for one component (e.g.
Group containing a set of config options.
virtual void sync(bool runtime)
Write back changes.
CryptoConfig implementation around the gpgconf command-line tool For method docu, see kleo/cryptoconf...
Description of a single option.
TQString iconName() const
Return the name of the icon for this component.
QGpgMECryptoConfig()
Constructor.
CryptoConfigEntry * entry(const TQString &componentName, const TQString &groupName, const TQString &entryName) const
Convenience method to get hold of a single configuration entry when its component, group and name are known.
virtual void clear()
Tells the CryptoConfig to discard any cached information, including all components, groups and entries.