QtPass  1.2.3
Multi-platform GUI for pass, the standard unix password manager.
qtpasssettings.cpp
Go to the documentation of this file.
1 #include "qtpasssettings.h"
2 #include "pass.h"
3 
4 #include "util.h"
5 
6 #include <QCoreApplication>
7 
8 bool QtPassSettings::initialized = false;
9 
10 Pass *QtPassSettings::pass;
11 // Go via pointer to avoid dynamic initialization,
12 // due to "random" initialization order realtive to other
13 // globals, especially around QObject emtadata dynamic initialization
14 // can lead to crashes depending on compiler, linker etc.
15 QScopedPointer<RealPass> QtPassSettings::realPass;
16 QScopedPointer<ImitatePass> QtPassSettings::imitatePass;
17 
18 QtPassSettings *QtPassSettings::m_instance = nullptr;
20  if (!QtPassSettings::initialized) {
21  QString portable_ini = QCoreApplication::applicationDirPath() +
22  QDir::separator() + "qtpass.ini";
23  if (QFile(portable_ini).exists()) {
24  m_instance = new QtPassSettings(portable_ini, QSettings::IniFormat);
25  } else {
26  m_instance = new QtPassSettings("IJHack", "QtPass");
27  }
28 
29  initialized = true;
30  }
31 
32  return m_instance;
33 }
34 
36  PasswordConfiguration config;
37 
38  config.length =
40  config.selected = static_cast<PasswordConfiguration::characterSet>(
41  getInstance()
43  .toInt());
45  getInstance()
46  ->value(SettingsConstants::passwordChars, QString())
47  .toString();
48 
49  return config;
50 }
51 
53  const PasswordConfiguration &config) {
56  config.selected);
59 }
60 
61 QHash<QString, QString> QtPassSettings::getProfiles() {
63 
64  QStringList childrenKeys = getInstance()->childKeys();
65  QHash<QString, QString> profiles;
66  foreach (QString key, childrenKeys) {
67  profiles.insert(key, getInstance()->value(key).toString());
68  }
69 
70  getInstance()->endGroup();
71 
72  return profiles;
73 }
74 
75 void QtPassSettings::setProfiles(const QHash<QString, QString> &profiles) {
78 
79  QHash<QString, QString>::const_iterator i = profiles.begin();
80  for (; i != profiles.end(); ++i) {
81  getInstance()->setValue(i.key(), i.value());
82  }
83 
84  getInstance()->endGroup();
85 }
86 
88  if (!pass) {
89  if (isUsePass()) {
90  QtPassSettings::pass = getRealPass();
91  } else {
92  QtPassSettings::pass = getImitatePass();
93  }
94  pass->init();
95  }
96  return pass;
97 }
98 
99 QString QtPassSettings::getVersion(const QString &defaultValue) {
100  return getInstance()
101  ->value(SettingsConstants::version, defaultValue)
102  .toString();
103 }
104 void QtPassSettings::setVersion(const QString &version) {
105  getInstance()->setValue(SettingsConstants::version, version);
106 }
107 
108 QByteArray QtPassSettings::getGeometry(const QByteArray &defaultValue) {
109  return getInstance()
110  ->value(SettingsConstants::geometry, defaultValue)
111  .toByteArray();
112 }
113 void QtPassSettings::setGeometry(const QByteArray &geometry) {
114  getInstance()->setValue(SettingsConstants::geometry, geometry);
115 }
116 
117 QByteArray QtPassSettings::getSavestate(const QByteArray &defaultValue) {
118  return getInstance()
119  ->value(SettingsConstants::savestate, defaultValue)
120  .toByteArray();
121 }
122 void QtPassSettings::setSavestate(const QByteArray &saveState) {
123  getInstance()->setValue(SettingsConstants::savestate, saveState);
124 }
125 
126 QPoint QtPassSettings::getPos(const QPoint &defaultValue) {
127  return getInstance()->value(SettingsConstants::pos, defaultValue).toPoint();
128 }
129 void QtPassSettings::setPos(const QPoint &pos) {
130  getInstance()->setValue(SettingsConstants::pos, pos);
131 }
132 
133 QSize QtPassSettings::getSize(const QSize &defaultValue) {
134  return getInstance()->value(SettingsConstants::size, defaultValue).toSize();
135 }
136 void QtPassSettings::setSize(const QSize &size) {
137  getInstance()->setValue(SettingsConstants::size, size);
138 }
139 
140 bool QtPassSettings::isMaximized(const bool &defaultValue) {
141  return getInstance()
142  ->value(SettingsConstants::maximized, defaultValue)
143  .toBool();
144 }
145 void QtPassSettings::setMaximized(const bool &maximized) {
146  getInstance()->setValue(SettingsConstants::maximized, maximized);
147 }
148 
149 bool QtPassSettings::isUsePass(const bool &defaultValue) {
150  return getInstance()
151  ->value(SettingsConstants::usePass, defaultValue)
152  .toBool();
153 }
154 void QtPassSettings::setUsePass(const bool &usePass) {
155  if (usePass) {
156  QtPassSettings::pass = getRealPass();
157  } else {
158  QtPassSettings::pass = getImitatePass();
159  }
160  getInstance()->setValue(SettingsConstants::usePass, usePass);
161 }
162 
164  const Enums::clipBoardType &defaultvalue) {
165  return getInstance()
166  ->value(SettingsConstants::clipBoardType, static_cast<int>(defaultvalue))
167  .toInt();
168 }
169 
172  return static_cast<Enums::clipBoardType>(getClipBoardTypeRaw(defaultvalue));
173 }
176 }
177 
178 bool QtPassSettings::isUseSelection(const bool &defaultValue) {
179  return getInstance()
180  ->value(SettingsConstants::useSelection, defaultValue)
181  .toBool();
182 }
183 void QtPassSettings::setUseSelection(const bool &useSelection) {
184  getInstance()->setValue(SettingsConstants::useSelection, useSelection);
185 }
186 
187 bool QtPassSettings::isUseAutoclear(const bool &defaultValue) {
188  return getInstance()
189  ->value(SettingsConstants::useAutoclear, defaultValue)
190  .toBool();
191 }
192 void QtPassSettings::setUseAutoclear(const bool &useAutoclear) {
193  getInstance()->setValue(SettingsConstants::useAutoclear, useAutoclear);
194 }
195 
196 int QtPassSettings::getAutoclearSeconds(const int &defaultValue) {
197  return getInstance()
198  ->value(SettingsConstants::autoclearSeconds, defaultValue)
199  .toInt();
200 }
201 void QtPassSettings::setAutoclearSeconds(const int &autoClearSeconds) {
203  autoClearSeconds);
204 }
205 
206 bool QtPassSettings::isUseAutoclearPanel(const bool &defaultValue) {
207  return getInstance()
208  ->value(SettingsConstants::useAutoclearPanel, defaultValue)
209  .toBool();
210 }
211 void QtPassSettings::setUseAutoclearPanel(const bool &useAutoclearPanel) {
213  useAutoclearPanel);
214 }
215 
216 int QtPassSettings::getAutoclearPanelSeconds(const int &defaultValue) {
217  return getInstance()
218  ->value(SettingsConstants::autoclearPanelSeconds, defaultValue)
219  .toInt();
220 }
222  const int &autoClearPanelSeconds) {
224  autoClearPanelSeconds);
225 }
226 
227 bool QtPassSettings::isHidePassword(const bool &defaultValue) {
228  return getInstance()
229  ->value(SettingsConstants::hidePassword, defaultValue)
230  .toBool();
231 }
232 void QtPassSettings::setHidePassword(const bool &hidePassword) {
233  getInstance()->setValue(SettingsConstants::hidePassword, hidePassword);
234 }
235 
236 bool QtPassSettings::isHideContent(const bool &defaultValue) {
237  return getInstance()
238  ->value(SettingsConstants::hideContent, defaultValue)
239  .toBool();
240 }
241 void QtPassSettings::setHideContent(const bool &hideContent) {
242  getInstance()->setValue(SettingsConstants::hideContent, hideContent);
243 }
244 
245 bool QtPassSettings::isAddGPGId(const bool &defaultValue) {
246  return getInstance()
247  ->value(SettingsConstants::addGPGId, defaultValue)
248  .toBool();
249 }
250 void QtPassSettings::setAddGPGId(const bool &addGPGId) {
251  getInstance()->setValue(SettingsConstants::addGPGId, addGPGId);
252 }
253 
254 QString QtPassSettings::getPassStore(const QString &defaultValue) {
255  QString returnValue = getInstance()
256  ->value(SettingsConstants::passStore, defaultValue)
257  .toString();
258 
259  // Normalize the path string
260  returnValue = QDir(returnValue).absolutePath();
261 
262  // ensure directory exists if never used pass or misconfigured.
263  // otherwise process->setWorkingDirectory(passStore); will fail on execution.
264  if (!QDir(returnValue).exists()) {
265  QDir().mkdir(returnValue);
266  }
267 
268  // ensure path ends in /
269  if (!returnValue.endsWith("/") && !returnValue.endsWith(QDir::separator())) {
270  returnValue += QDir::separator();
271  }
272 
273  return returnValue;
274 }
275 void QtPassSettings::setPassStore(const QString &passStore) {
276  getInstance()->setValue(SettingsConstants::passStore, passStore);
277 }
278 
280  QString passExecutable =
282  QtPassSettings::setPassExecutable(passExecutable);
283 
284  QString gitExecutable =
286  QtPassSettings::setGitExecutable(gitExecutable);
287 
288  QString gpgExecutable =
290  QtPassSettings::setGpgExecutable(gpgExecutable);
291 
292  QString pwgenExecutable =
294  QtPassSettings::setPwgenExecutable(pwgenExecutable);
295 }
296 QString QtPassSettings::getPassExecutable(const QString &defaultValue) {
297  return getInstance()
298  ->value(SettingsConstants::passExecutable, defaultValue)
299  .toString();
300 }
301 void QtPassSettings::setPassExecutable(const QString &passExecutable) {
302  getInstance()->setValue(SettingsConstants::passExecutable, passExecutable);
303 }
304 
305 QString QtPassSettings::getGitExecutable(const QString &defaultValue) {
306  return getInstance()
307  ->value(SettingsConstants::gitExecutable, defaultValue)
308  .toString();
309 }
310 void QtPassSettings::setGitExecutable(const QString &gitExecutable) {
311  getInstance()->setValue(SettingsConstants::gitExecutable, gitExecutable);
312 }
313 
314 QString QtPassSettings::getGpgExecutable(const QString &defaultValue) {
315  return getInstance()
316  ->value(SettingsConstants::gpgExecutable, defaultValue)
317  .toString();
318 }
319 void QtPassSettings::setGpgExecutable(const QString &gpgExecutable) {
320  getInstance()->setValue(SettingsConstants::gpgExecutable, gpgExecutable);
321 }
322 
323 QString QtPassSettings::getPwgenExecutable(const QString &defaultValue) {
324  return getInstance()
325  ->value(SettingsConstants::pwgenExecutable, defaultValue)
326  .toString();
327 }
328 void QtPassSettings::setPwgenExecutable(const QString &pwgenExecutable) {
329  getInstance()->setValue(SettingsConstants::pwgenExecutable, pwgenExecutable);
330 }
331 
332 QString QtPassSettings::getGpgHome(const QString &defaultValue) {
333  return getInstance()
334  ->value(SettingsConstants::gpgHome, defaultValue)
335  .toString();
336 }
337 
338 bool QtPassSettings::isUseWebDav(const bool &defaultValue) {
339  return getInstance()
340  ->value(SettingsConstants::useWebDav, defaultValue)
341  .toBool();
342 }
343 void QtPassSettings::setUseWebDav(const bool &useWebDav) {
344  getInstance()->setValue(SettingsConstants::useWebDav, useWebDav);
345 }
346 
347 QString QtPassSettings::getWebDavUrl(const QString &defaultValue) {
348  return getInstance()
349  ->value(SettingsConstants::webDavUrl, defaultValue)
350  .toString();
351 }
352 void QtPassSettings::setWebDavUrl(const QString &webDavUrl) {
353  getInstance()->setValue(SettingsConstants::webDavUrl, webDavUrl);
354 }
355 
356 QString QtPassSettings::getWebDavUser(const QString &defaultValue) {
357  return getInstance()
358  ->value(SettingsConstants::webDavUser, defaultValue)
359  .toString();
360 }
361 void QtPassSettings::setWebDavUser(const QString &webDavUser) {
362  getInstance()->setValue(SettingsConstants::webDavUser, webDavUser);
363 }
364 
365 QString QtPassSettings::getWebDavPassword(const QString &defaultValue) {
366  return getInstance()
367  ->value(SettingsConstants::webDavPassword, defaultValue)
368  .toString();
369 }
370 void QtPassSettings::setWebDavPassword(const QString &webDavPassword) {
371  getInstance()->setValue(SettingsConstants::webDavPassword, webDavPassword);
372 }
373 
374 QString QtPassSettings::getProfile(const QString &defaultValue) {
375  return getInstance()
376  ->value(SettingsConstants::profile, defaultValue)
377  .toString();
378 }
379 void QtPassSettings::setProfile(const QString &profile) {
380  getInstance()->setValue(SettingsConstants::profile, profile);
381 }
382 
383 bool QtPassSettings::isUseGit(const bool &defaultValue) {
384  return getInstance()->value(SettingsConstants::useGit, defaultValue).toBool();
385 }
386 void QtPassSettings::setUseGit(const bool &useGit) {
387  getInstance()->setValue(SettingsConstants::useGit, useGit);
388 }
389 
390 bool QtPassSettings::isUseOtp(const bool &defaultValue) {
391  return getInstance()->value(SettingsConstants::useOtp, defaultValue).toBool();
392 }
393 
394 void QtPassSettings::setUseOtp(const bool &useOtp) {
395  getInstance()->setValue(SettingsConstants::useOtp, useOtp);
396 }
397 
398 bool QtPassSettings::isUsePwgen(const bool &defaultValue) {
399  return getInstance()
400  ->value(SettingsConstants::usePwgen, defaultValue)
401  .toBool();
402 }
403 void QtPassSettings::setUsePwgen(const bool &usePwgen) {
404  getInstance()->setValue(SettingsConstants::usePwgen, usePwgen);
405 }
406 
407 bool QtPassSettings::isAvoidCapitals(const bool &defaultValue) {
408  return getInstance()
409  ->value(SettingsConstants::avoidCapitals, defaultValue)
410  .toBool();
411 }
412 void QtPassSettings::setAvoidCapitals(const bool &avoidCapitals) {
413  getInstance()->setValue(SettingsConstants::avoidCapitals, avoidCapitals);
414 }
415 
416 bool QtPassSettings::isAvoidNumbers(const bool &defaultValue) {
417  return getInstance()
418  ->value(SettingsConstants::avoidNumbers, defaultValue)
419  .toBool();
420 }
421 void QtPassSettings::setAvoidNumbers(const bool &avoidNumbers) {
422  getInstance()->setValue(SettingsConstants::avoidNumbers, avoidNumbers);
423 }
424 
425 bool QtPassSettings::isLessRandom(const bool &defaultValue) {
426  return getInstance()
427  ->value(SettingsConstants::lessRandom, defaultValue)
428  .toBool();
429 }
430 void QtPassSettings::setLessRandom(const bool &lessRandom) {
431  getInstance()->setValue(SettingsConstants::lessRandom, lessRandom);
432 }
433 
434 bool QtPassSettings::isUseSymbols(const bool &defaultValue) {
435  return getInstance()
436  ->value(SettingsConstants::useSymbols, defaultValue)
437  .toBool();
438 }
439 void QtPassSettings::setUseSymbols(const bool &useSymbols) {
440  getInstance()->setValue(SettingsConstants::useSymbols, useSymbols);
441 }
442 
443 void QtPassSettings::setPasswordLength(const int &passwordLength) {
444  getInstance()->setValue(SettingsConstants::passwordLength, passwordLength);
445 }
447  const int &passwordCharsselection) {
449  passwordCharsselection);
450 }
451 void QtPassSettings::setPasswordChars(const QString &passwordChars) {
452  getInstance()->setValue(SettingsConstants::passwordChars, passwordChars);
453 }
454 
455 bool QtPassSettings::isUseTrayIcon(const bool &defaultValue) {
456  return getInstance()
457  ->value(SettingsConstants::useTrayIcon, defaultValue)
458  .toBool();
459 }
460 void QtPassSettings::setUseTrayIcon(const bool &useTrayIcon) {
461  getInstance()->setValue(SettingsConstants::useTrayIcon, useTrayIcon);
462 }
463 
464 bool QtPassSettings::isHideOnClose(const bool &defaultValue) {
465  return getInstance()
466  ->value(SettingsConstants::hideOnClose, defaultValue)
467  .toBool();
468 }
469 void QtPassSettings::setHideOnClose(const bool &hideOnClose) {
470  getInstance()->setValue(SettingsConstants::hideOnClose, hideOnClose);
471 }
472 
473 bool QtPassSettings::isStartMinimized(const bool &defaultValue) {
474  return getInstance()
475  ->value(SettingsConstants::startMinimized, defaultValue)
476  .toBool();
477 }
478 void QtPassSettings::setStartMinimized(const bool &startMinimized) {
479  getInstance()->setValue(SettingsConstants::startMinimized, startMinimized);
480 }
481 
482 bool QtPassSettings::isAlwaysOnTop(const bool &defaultValue) {
483  return getInstance()
484  ->value(SettingsConstants::alwaysOnTop, defaultValue)
485  .toBool();
486 }
487 void QtPassSettings::setAlwaysOnTop(const bool &alwaysOnTop) {
488  getInstance()->setValue(SettingsConstants::alwaysOnTop, alwaysOnTop);
489 }
490 
491 bool QtPassSettings::isAutoPull(const bool &defaultValue) {
492  return getInstance()
493  ->value(SettingsConstants::autoPull, defaultValue)
494  .toBool();
495 }
496 void QtPassSettings::setAutoPull(const bool &autoPull) {
497  getInstance()->setValue(SettingsConstants::autoPull, autoPull);
498 }
499 
500 bool QtPassSettings::isAutoPush(const bool &defaultValue) {
501  return getInstance()
502  ->value(SettingsConstants::autoPush, defaultValue)
503  .toBool();
504 }
505 void QtPassSettings::setAutoPush(const bool &autoPush) {
506  getInstance()->setValue(SettingsConstants::autoPush, autoPush);
507 }
508 
509 QString QtPassSettings::getPassTemplate(const QString &defaultValue) {
510  return getInstance()
511  ->value(SettingsConstants::passTemplate, defaultValue)
512  .toString();
513 }
514 void QtPassSettings::setPassTemplate(const QString &passTemplate) {
515  getInstance()->setValue(SettingsConstants::passTemplate, passTemplate);
516 }
517 
518 bool QtPassSettings::isUseTemplate(const bool &defaultValue) {
519  return getInstance()
520  ->value(SettingsConstants::useTemplate, defaultValue)
521  .toBool();
522 }
523 void QtPassSettings::setUseTemplate(const bool &useTemplate) {
524  getInstance()->setValue(SettingsConstants::useTemplate, useTemplate);
525 }
526 
527 bool QtPassSettings::isTemplateAllFields(const bool &defaultValue) {
528  return getInstance()
529  ->value(SettingsConstants::templateAllFields, defaultValue)
530  .toBool();
531 }
532 void QtPassSettings::setTemplateAllFields(const bool &templateAllFields) {
534  templateAllFields);
535 }
536 
538  if (realPass.isNull())
539  realPass.reset(new RealPass());
540  return realPass.data();
541 }
543  if (imitatePass.isNull())
544  imitatePass.reset(new ImitatePass());
545  return imitatePass.data();
546 }
static void setPwgenExecutable(const QString &pwgenExecutable)
static const QString usePass
static void setAutoclearSeconds(const int &autoClearSeconds)
static const QString useAutoclear
static int getAutoclearSeconds(const int &defaultValue=QVariant().toInt())
static void setUsePwgen(const bool &usePwgen)
static const QString useTemplate
static bool isStartMinimized(const bool &defaultValue=QVariant().toBool())
static const QString useWebDav
static bool isMaximized(const bool &defaultValue=QVariant().toBool())
static void setUsePass(const bool &usePass)
static const QString savestate
static bool isLessRandom(const bool &defaultValue=QVariant().toBool())
static const QString hideOnClose
static void setPassExecutable(const QString &passExecutable)
static const QString hideContent
int length
Length of the password.
static const QString pwgenExecutable
static const QString profile
static QString getGpgHome(const QString &defaultValue=QVariant().toString())
static bool isAlwaysOnTop(const bool &defaultValue=QVariant().toBool())
static QPoint getPos(const QPoint &defaultValue=QVariant().toPoint())
static void setWebDavPassword(const QString &webDavPassword)
Holds the Password configuration settings.
static void setPasswordChars(const QString &passwordChars)
static QString findBinaryInPath(QString binary)
Util::findBinaryInPath search for executables.
Definition: util.cpp:79
static void setAutoPush(const bool &autoPush)
static void setGitExecutable(const QString &gitExecutable)
static void setAlwaysOnTop(const bool &alwaysOnTop)
static bool isUseSelection(const bool &defaultValue=QVariant().toBool())
static const QString avoidCapitals
static const QString version
static void setPassTemplate(const QString &passTemplate)
static const QString hidePassword
static void setUseGit(const bool &useGit)
static void setPos(const QPoint &pos)
static bool isAvoidNumbers(const bool &defaultValue=QVariant().toBool())
static ImitatePass * getImitatePass()
static void setPasswordConfiguration(const PasswordConfiguration &config)
static void setHideContent(const bool &hideContent)
static bool isUseAutoclearPanel(const bool &defaultValue=QVariant().toBool())
static void setUseWebDav(const bool &useWebDav)
static bool isUseWebDav(const bool &defaultValue=QVariant().toBool())
static void setSize(const QSize &size)
static const QString useSelection
static const QString passwordLength
static void setLessRandom(const bool &lessRandom)
static void setAutoPull(const bool &autoPull)
static bool isAddGPGId(const bool &defaultValue=QVariant().toBool())
static bool isUseAutoclear(const bool &defaultValue=QVariant().toBool())
Wrapper for executing pass to handle the password-store.
Definition: realpass.h:10
static bool isHideOnClose(const bool &defaultValue=QVariant().toBool())
static const QString useOtp
static void setProfiles(const QHash< QString, QString > &profiles)
static const QString autoclearSeconds
static bool isUseGit(const bool &defaultValue=QVariant().toBool())
static const QString addGPGId
static const QString avoidNumbers
Acts as an abstraction for pass or pass imitation.
Definition: pass.h:25
static const QString passStore
static const QString gpgHome
static QString getPassStore(const QString &defaultValue=QVariant().toString())
static void setProfile(const QString &profile)
static void setMaximized(const bool &maximized)
static QString getGitExecutable(const QString &defaultValue=QVariant().toString())
enum PasswordConfiguration::characterSet selected
static void setAutoclearPanelSeconds(const int &autoClearPanelSeconds)
static const QString passwordChars
static void setUseAutoclearPanel(const bool &useAutoclearPanel)
static const QString size
clipBoardType
Definition: enums.h:10
static bool isUseTrayIcon(const bool &defaultValue=QVariant().toBool())
static bool isUseOtp(const bool &defaultValue=QVariant().toBool())
static const QString webDavUser
static void setAvoidNumbers(const bool &avoidNumbers)
static QString getPassExecutable(const QString &defaultValue=QVariant().toString())
static const QString webDavUrl
void init()
Definition: pass.cpp:45
static QString getVersion(const QString &defaultValue=QVariant().toString())
static const QString gitExecutable
static void setHideOnClose(const bool &hideOnClose)
static bool isAvoidCapitals(const bool &defaultValue=QVariant().toBool())
static const QString pos
static QByteArray getSavestate(const QByteArray &defaultValue=QVariant().toByteArray())
static QSize getSize(const QSize &defaultValue=QVariant().toSize())
static Pass * getPass()
static const QString useAutoclearPanel
static const QString passwordCharsselection
static void setGpgExecutable(const QString &gpgExecutable)
static QString getWebDavUser(const QString &defaultValue=QVariant().toString())
Imitates pass features when pass is not enabled or available.
Definition: imitatepass.h:11
static void setStartMinimized(const bool &startMinimized)
static const QString autoPush
static const QString lessRandom
static bool isUsePwgen(const bool &defaultValue=QVariant().toBool())
static const QString passTemplate
static const QString geometry
static void setSavestate(const QByteArray &saveState)
static void setUseAutoclear(const bool &useAutoclear)
static QString getPassTemplate(const QString &defaultValue=QVariant().toString())
static Enums::clipBoardType getClipBoardType(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER)
static QString getWebDavUrl(const QString &defaultValue=QVariant().toString())
static const QString maximized
static QString getPwgenExecutable(const QString &defaultValue=QVariant().toString())
static void setUseOtp(const bool &useOtp)
static bool isUseSymbols(const bool &defaultValue=QVariant().toBool())
static const QString autoclearPanelSeconds
static const QString templateAllFields
static const QString alwaysOnTop
static void setUseTemplate(const bool &useTemplate)
static QByteArray getGeometry(const QByteArray &defaultValue=QVariant().toByteArray())
static QtPassSettings * getInstance()
static void setPasswordCharsselection(const int &passwordCharsselection)
static const QString gpgExecutable
static int getAutoclearPanelSeconds(const int &defaultValue=QVariant().toInt())
static void setAddGPGId(const bool &addGPGId)
static QString getGpgExecutable(const QString &defaultValue=QVariant().toString())
static void setWebDavUrl(const QString &webDavUrl)
static bool isUseTemplate(const bool &defaultValue=QVariant().toBool())
static QString getWebDavPassword(const QString &defaultValue=QVariant().toString())
static bool isTemplateAllFields(const bool &defaultValue=QVariant().toBool())
static const QString useTrayIcon
static void setUseSymbols(const bool &useSymbols)
Singleton that stores qtpass&#39; settings, saves and loads config.
static void initExecutables()
static const QString passExecutable
QString Characters[CHARSETS_COUNT]
The different character sets.
static void setTemplateAllFields(const bool &templateAllFields)
static QHash< QString, QString > getProfiles()
static void setUseTrayIcon(const bool &useTrayIcon)
static PasswordConfiguration getPasswordConfiguration()
static void setGeometry(const QByteArray &geometry)
static void setClipBoardType(const int &clipBoardType)
static const QString useSymbols
static RealPass * getRealPass()
static bool isHidePassword(const bool &defaultValue=QVariant().toBool())
static bool isHideContent(const bool &defaultValue=QVariant().toBool())
static const QString startMinimized
static const QString useGit
static const QString clipBoardType
static QString getProfile(const QString &defaultValue=QVariant().toString())
static const QString usePwgen
static void setWebDavUser(const QString &webDavUser)
static void setVersion(const QString &version)
static void setHidePassword(const bool &hidePassword)
static void setPassStore(const QString &passStore)
static void setUseSelection(const bool &useSelection)
static void setPasswordLength(const int &passwordLength)
static bool isAutoPull(const bool &defaultValue=QVariant().toBool())
static bool isUsePass(const bool &defaultValue=QVariant().toBool())
characterSet
The selected character set.
static const QString webDavPassword
static bool isAutoPush(const bool &defaultValue=QVariant().toBool())
static const QString autoPull
static int getClipBoardTypeRaw(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER)
static void setAvoidCapitals(const bool &avoidCapitals)