QtPass  1.3.2
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::isUseQrencode(const bool &defaultValue) {
399  return getInstance()
400  ->value(SettingsConstants::useQrencode, defaultValue)
401  .toBool();
402 }
403 
404 void QtPassSettings::setUseQrencode(const bool &useQrencode) {
405  getInstance()->setValue(SettingsConstants::useQrencode, useQrencode);
406 }
407 
408 bool QtPassSettings::isUsePwgen(const bool &defaultValue) {
409  return getInstance()
410  ->value(SettingsConstants::usePwgen, defaultValue)
411  .toBool();
412 }
413 void QtPassSettings::setUsePwgen(const bool &usePwgen) {
414  getInstance()->setValue(SettingsConstants::usePwgen, usePwgen);
415 }
416 
417 bool QtPassSettings::isAvoidCapitals(const bool &defaultValue) {
418  return getInstance()
419  ->value(SettingsConstants::avoidCapitals, defaultValue)
420  .toBool();
421 }
422 void QtPassSettings::setAvoidCapitals(const bool &avoidCapitals) {
423  getInstance()->setValue(SettingsConstants::avoidCapitals, avoidCapitals);
424 }
425 
426 bool QtPassSettings::isAvoidNumbers(const bool &defaultValue) {
427  return getInstance()
428  ->value(SettingsConstants::avoidNumbers, defaultValue)
429  .toBool();
430 }
431 void QtPassSettings::setAvoidNumbers(const bool &avoidNumbers) {
432  getInstance()->setValue(SettingsConstants::avoidNumbers, avoidNumbers);
433 }
434 
435 bool QtPassSettings::isLessRandom(const bool &defaultValue) {
436  return getInstance()
437  ->value(SettingsConstants::lessRandom, defaultValue)
438  .toBool();
439 }
440 void QtPassSettings::setLessRandom(const bool &lessRandom) {
441  getInstance()->setValue(SettingsConstants::lessRandom, lessRandom);
442 }
443 
444 bool QtPassSettings::isUseSymbols(const bool &defaultValue) {
445  return getInstance()
446  ->value(SettingsConstants::useSymbols, defaultValue)
447  .toBool();
448 }
449 void QtPassSettings::setUseSymbols(const bool &useSymbols) {
450  getInstance()->setValue(SettingsConstants::useSymbols, useSymbols);
451 }
452 
453 void QtPassSettings::setPasswordLength(const int &passwordLength) {
454  getInstance()->setValue(SettingsConstants::passwordLength, passwordLength);
455 }
457  const int &passwordCharsselection) {
459  passwordCharsselection);
460 }
461 void QtPassSettings::setPasswordChars(const QString &passwordChars) {
462  getInstance()->setValue(SettingsConstants::passwordChars, passwordChars);
463 }
464 
465 bool QtPassSettings::isUseTrayIcon(const bool &defaultValue) {
466  return getInstance()
467  ->value(SettingsConstants::useTrayIcon, defaultValue)
468  .toBool();
469 }
470 void QtPassSettings::setUseTrayIcon(const bool &useTrayIcon) {
471  getInstance()->setValue(SettingsConstants::useTrayIcon, useTrayIcon);
472 }
473 
474 bool QtPassSettings::isHideOnClose(const bool &defaultValue) {
475  return getInstance()
476  ->value(SettingsConstants::hideOnClose, defaultValue)
477  .toBool();
478 }
479 void QtPassSettings::setHideOnClose(const bool &hideOnClose) {
480  getInstance()->setValue(SettingsConstants::hideOnClose, hideOnClose);
481 }
482 
483 bool QtPassSettings::isStartMinimized(const bool &defaultValue) {
484  return getInstance()
485  ->value(SettingsConstants::startMinimized, defaultValue)
486  .toBool();
487 }
488 void QtPassSettings::setStartMinimized(const bool &startMinimized) {
489  getInstance()->setValue(SettingsConstants::startMinimized, startMinimized);
490 }
491 
492 bool QtPassSettings::isAlwaysOnTop(const bool &defaultValue) {
493  return getInstance()
494  ->value(SettingsConstants::alwaysOnTop, defaultValue)
495  .toBool();
496 }
497 void QtPassSettings::setAlwaysOnTop(const bool &alwaysOnTop) {
498  getInstance()->setValue(SettingsConstants::alwaysOnTop, alwaysOnTop);
499 }
500 
501 bool QtPassSettings::isAutoPull(const bool &defaultValue) {
502  return getInstance()
503  ->value(SettingsConstants::autoPull, defaultValue)
504  .toBool();
505 }
506 void QtPassSettings::setAutoPull(const bool &autoPull) {
507  getInstance()->setValue(SettingsConstants::autoPull, autoPull);
508 }
509 
510 bool QtPassSettings::isAutoPush(const bool &defaultValue) {
511  return getInstance()
512  ->value(SettingsConstants::autoPush, defaultValue)
513  .toBool();
514 }
515 void QtPassSettings::setAutoPush(const bool &autoPush) {
516  getInstance()->setValue(SettingsConstants::autoPush, autoPush);
517 }
518 
519 QString QtPassSettings::getPassTemplate(const QString &defaultValue) {
520  return getInstance()
521  ->value(SettingsConstants::passTemplate, defaultValue)
522  .toString();
523 }
524 void QtPassSettings::setPassTemplate(const QString &passTemplate) {
525  getInstance()->setValue(SettingsConstants::passTemplate, passTemplate);
526 }
527 
528 bool QtPassSettings::isUseTemplate(const bool &defaultValue) {
529  return getInstance()
530  ->value(SettingsConstants::useTemplate, defaultValue)
531  .toBool();
532 }
533 void QtPassSettings::setUseTemplate(const bool &useTemplate) {
534  getInstance()->setValue(SettingsConstants::useTemplate, useTemplate);
535 }
536 
537 bool QtPassSettings::isTemplateAllFields(const bool &defaultValue) {
538  return getInstance()
539  ->value(SettingsConstants::templateAllFields, defaultValue)
540  .toBool();
541 }
542 void QtPassSettings::setTemplateAllFields(const bool &templateAllFields) {
544  templateAllFields);
545 }
546 
548  if (realPass.isNull())
549  realPass.reset(new RealPass());
550  return realPass.data();
551 }
553  if (imitatePass.isNull())
554  imitatePass.reset(new ImitatePass());
555  return imitatePass.data();
556 }
QtPassSettings::getGitExecutable
static QString getGitExecutable(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:305
QtPassSettings::getClipBoardTypeRaw
static int getClipBoardTypeRaw(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER)
Definition: qtpasssettings.cpp:163
QtPassSettings::setUseSymbols
static void setUseSymbols(const bool &useSymbols)
Definition: qtpasssettings.cpp:449
QtPassSettings::setStartMinimized
static void setStartMinimized(const bool &startMinimized)
Definition: qtpasssettings.cpp:488
QtPassSettings::setAutoclearSeconds
static void setAutoclearSeconds(const int &autoClearSeconds)
Definition: qtpasssettings.cpp:201
QtPassSettings::isLessRandom
static bool isLessRandom(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:435
QtPassSettings::setUsePass
static void setUsePass(const bool &usePass)
Definition: qtpasssettings.cpp:154
PasswordConfiguration::characterSet
characterSet
The selected character set.
Definition: passwordconfiguration.h:14
SettingsConstants::webDavPassword
const static QString webDavPassword
Definition: settingsconstants.h:39
QtPassSettings::getPwgenExecutable
static QString getPwgenExecutable(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:323
QtPassSettings::getSize
static QSize getSize(const QSize &defaultValue=QVariant().toSize())
Definition: qtpasssettings.cpp:133
SettingsConstants::avoidNumbers
const static QString avoidNumbers
Definition: settingsconstants.h:48
SettingsConstants::alwaysOnTop
const static QString alwaysOnTop
Definition: settingsconstants.h:57
QtPassSettings
Singleton that stores qtpass' settings, saves and loads config.
Definition: qtpasssettings.h:21
SettingsConstants::autoPush
const static QString autoPush
Definition: settingsconstants.h:59
SettingsConstants::passwordCharsselection
const static QString passwordCharsselection
Definition: settingsconstants.h:52
QtPassSettings::isHideOnClose
static bool isHideOnClose(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:474
PasswordConfiguration::CUSTOM
@ CUSTOM
Definition: passwordconfiguration.h:18
SettingsConstants::useTrayIcon
const static QString useTrayIcon
Definition: settingsconstants.h:54
QtPassSettings::getPos
static QPoint getPos(const QPoint &defaultValue=QVariant().toPoint())
Definition: qtpasssettings.cpp:126
PasswordConfiguration::length
int length
Length of the password.
Definition: passwordconfiguration.h:24
SettingsConstants::gpgExecutable
const static QString gpgExecutable
Definition: settingsconstants.h:33
QtPassSettings::getVersion
static QString getVersion(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:99
QtPassSettings::getPassTemplate
static QString getPassTemplate(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:519
QtPassSettings::isUseTrayIcon
static bool isUseTrayIcon(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:465
QtPassSettings::getGpgExecutable
static QString getGpgExecutable(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:314
QtPassSettings::getPassExecutable
static QString getPassExecutable(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:296
SettingsConstants::useGit
const static QString useGit
Definition: settingsconstants.h:42
SettingsConstants::templateAllFields
const static QString templateAllFields
Definition: settingsconstants.h:62
QtPassSettings::getPasswordConfiguration
static PasswordConfiguration getPasswordConfiguration()
Definition: qtpasssettings.cpp:35
QtPassSettings::isMaximized
static bool isMaximized(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:140
Util::findBinaryInPath
static QString findBinaryInPath(QString binary)
Util::findBinaryInPath search for executables.
Definition: util.cpp:90
SettingsConstants::webDavUrl
const static QString webDavUrl
Definition: settingsconstants.h:37
QtPassSettings::initExecutables
static void initExecutables()
Definition: qtpasssettings.cpp:279
QtPassSettings::isUsePwgen
static bool isUsePwgen(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:408
QtPassSettings::getImitatePass
static ImitatePass * getImitatePass()
Definition: qtpasssettings.cpp:552
QtPassSettings::setUsePwgen
static void setUsePwgen(const bool &usePwgen)
Definition: qtpasssettings.cpp:413
SettingsConstants::autoPull
const static QString autoPull
Definition: settingsconstants.h:58
QtPassSettings::isUseAutoclearPanel
static bool isUseAutoclearPanel(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:206
SettingsConstants::passStore
const static QString passStore
Definition: settingsconstants.h:30
SettingsConstants::pos
const static QString pos
Definition: settingsconstants.h:16
SettingsConstants::useTemplate
const static QString useTemplate
Definition: settingsconstants.h:61
QtPassSettings::getInstance
static QtPassSettings * getInstance()
Definition: qtpasssettings.cpp:19
QtPassSettings::setSavestate
static void setSavestate(const QByteArray &saveState)
Definition: qtpasssettings.cpp:122
QtPassSettings::setWebDavUrl
static void setWebDavUrl(const QString &webDavUrl)
Definition: qtpasssettings.cpp:352
SettingsConstants::useOtp
const static QString useOtp
Definition: settingsconstants.h:43
QtPassSettings::setUseTrayIcon
static void setUseTrayIcon(const bool &useTrayIcon)
Definition: qtpasssettings.cpp:470
SettingsConstants::addGPGId
const static QString addGPGId
Definition: settingsconstants.h:29
SettingsConstants::version
const static QString version
Definition: settingsconstants.h:12
QtPassSettings::setAvoidCapitals
static void setAvoidCapitals(const bool &avoidCapitals)
Definition: qtpasssettings.cpp:422
QtPassSettings::isAddGPGId
static bool isAddGPGId(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:245
QtPassSettings::setVersion
static void setVersion(const QString &version)
Definition: qtpasssettings.cpp:104
SettingsConstants::usePwgen
const static QString usePwgen
Definition: settingsconstants.h:46
QtPassSettings::isTemplateAllFields
static bool isTemplateAllFields(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:537
QtPassSettings::setPasswordCharsselection
static void setPasswordCharsselection(const int &passwordCharsselection)
Definition: qtpasssettings.cpp:456
QtPassSettings::isAutoPush
static bool isAutoPush(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:510
SettingsConstants::profile
const static QString profile
Definition: settingsconstants.h:40
QtPassSettings::getWebDavPassword
static QString getWebDavPassword(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:365
QtPassSettings::setHideOnClose
static void setHideOnClose(const bool &hideOnClose)
Definition: qtpasssettings.cpp:479
QtPassSettings::setUseSelection
static void setUseSelection(const bool &useSelection)
Definition: qtpasssettings.cpp:183
SettingsConstants::passwordLength
const static QString passwordLength
Definition: settingsconstants.h:51
QtPassSettings::setTemplateAllFields
static void setTemplateAllFields(const bool &templateAllFields)
Definition: qtpasssettings.cpp:542
QtPassSettings::isUsePass
static bool isUsePass(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:149
QtPassSettings::setUseAutoclearPanel
static void setUseAutoclearPanel(const bool &useAutoclearPanel)
Definition: qtpasssettings.cpp:211
QtPassSettings::setMaximized
static void setMaximized(const bool &maximized)
Definition: qtpasssettings.cpp:145
QtPassSettings::setProfiles
static void setProfiles(const QHash< QString, QString > &profiles)
Definition: qtpasssettings.cpp:75
QtPassSettings::getPass
static Pass * getPass()
Definition: qtpasssettings.cpp:87
QtPassSettings::isStartMinimized
static bool isStartMinimized(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:483
PasswordConfiguration::selected
enum PasswordConfiguration::characterSet selected
QtPassSettings::isHideContent
static bool isHideContent(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:236
QtPassSettings::setClipBoardType
static void setClipBoardType(const int &clipBoardType)
Definition: qtpasssettings.cpp:174
SettingsConstants::pwgenExecutable
const static QString pwgenExecutable
Definition: settingsconstants.h:34
SettingsConstants::gpgHome
const static QString gpgHome
Definition: settingsconstants.h:35
QtPassSettings::getWebDavUrl
static QString getWebDavUrl(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:347
QtPassSettings::setHidePassword
static void setHidePassword(const bool &hidePassword)
Definition: qtpasssettings.cpp:232
SettingsConstants::useQrencode
const static QString useQrencode
Definition: settingsconstants.h:44
SettingsConstants::clipBoardType
const static QString clipBoardType
Definition: settingsconstants.h:63
QtPassSettings::getProfile
static QString getProfile(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:374
SettingsConstants::useAutoclearPanel
const static QString useAutoclearPanel
Definition: settingsconstants.h:25
QtPassSettings::setAddGPGId
static void setAddGPGId(const bool &addGPGId)
Definition: qtpasssettings.cpp:250
QtPassSettings::setWebDavPassword
static void setWebDavPassword(const QString &webDavPassword)
Definition: qtpasssettings.cpp:370
QtPassSettings::isUseTemplate
static bool isUseTemplate(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:528
QtPassSettings::getGpgHome
static QString getGpgHome(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:332
QtPassSettings::setAutoPush
static void setAutoPush(const bool &autoPush)
Definition: qtpasssettings.cpp:515
SettingsConstants::hideOnClose
const static QString hideOnClose
Definition: settingsconstants.h:55
QtPassSettings::getGeometry
static QByteArray getGeometry(const QByteArray &defaultValue=QVariant().toByteArray())
Definition: qtpasssettings.cpp:108
QtPassSettings::isUseGit
static bool isUseGit(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:383
QtPassSettings::setUseTemplate
static void setUseTemplate(const bool &useTemplate)
Definition: qtpasssettings.cpp:533
QtPassSettings::isAutoPull
static bool isAutoPull(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:501
SettingsConstants::geometry
const static QString geometry
Definition: settingsconstants.h:14
QtPassSettings::setAlwaysOnTop
static void setAlwaysOnTop(const bool &alwaysOnTop)
Definition: qtpasssettings.cpp:497
SettingsConstants::startMinimized
const static QString startMinimized
Definition: settingsconstants.h:56
QtPassSettings::setPwgenExecutable
static void setPwgenExecutable(const QString &pwgenExecutable)
Definition: qtpasssettings.cpp:328
QtPassSettings::isUseQrencode
static bool isUseQrencode(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:398
SettingsConstants::autoclearPanelSeconds
const static QString autoclearPanelSeconds
Definition: settingsconstants.h:26
QtPassSettings::isAvoidCapitals
static bool isAvoidCapitals(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:417
QtPassSettings::setGeometry
static void setGeometry(const QByteArray &geometry)
Definition: qtpasssettings.cpp:113
SettingsConstants::autoclearSeconds
const static QString autoclearSeconds
Definition: settingsconstants.h:24
QtPassSettings::getClipBoardType
static Enums::clipBoardType getClipBoardType(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER)
Definition: qtpasssettings.cpp:171
SettingsConstants::maximized
const static QString maximized
Definition: settingsconstants.h:20
QtPassSettings::setPos
static void setPos(const QPoint &pos)
Definition: qtpasssettings.cpp:129
QtPassSettings::isAvoidNumbers
static bool isAvoidNumbers(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:426
QtPassSettings::setSize
static void setSize(const QSize &size)
Definition: qtpasssettings.cpp:136
QtPassSettings::setPasswordConfiguration
static void setPasswordConfiguration(const PasswordConfiguration &config)
Definition: qtpasssettings.cpp:52
SettingsConstants::hidePassword
const static QString hidePassword
Definition: settingsconstants.h:27
QtPassSettings::getAutoclearPanelSeconds
static int getAutoclearPanelSeconds(const int &defaultValue=QVariant().toInt())
Definition: qtpasssettings.cpp:216
Pass::init
void init()
Definition: pass.cpp:45
SettingsConstants::gitExecutable
const static QString gitExecutable
Definition: settingsconstants.h:32
QtPassSettings::setPassExecutable
static void setPassExecutable(const QString &passExecutable)
Definition: qtpasssettings.cpp:301
QtPassSettings::setUseWebDav
static void setUseWebDav(const bool &useWebDav)
Definition: qtpasssettings.cpp:343
SettingsConstants::hideContent
const static QString hideContent
Definition: settingsconstants.h:28
SettingsConstants::passExecutable
const static QString passExecutable
Definition: settingsconstants.h:31
QtPassSettings::setHideContent
static void setHideContent(const bool &hideContent)
Definition: qtpasssettings.cpp:241
QtPassSettings::setGitExecutable
static void setGitExecutable(const QString &gitExecutable)
Definition: qtpasssettings.cpp:310
SettingsConstants::useAutoclear
const static QString useAutoclear
Definition: settingsconstants.h:22
QtPassSettings::setAutoPull
static void setAutoPull(const bool &autoPull)
Definition: qtpasssettings.cpp:506
QtPassSettings::isUseSymbols
static bool isUseSymbols(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:444
QtPassSettings::setPassStore
static void setPassStore(const QString &passStore)
Definition: qtpasssettings.cpp:275
QtPassSettings::isUseSelection
static bool isUseSelection(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:178
QtPassSettings::setUseOtp
static void setUseOtp(const bool &useOtp)
Definition: qtpasssettings.cpp:394
QtPassSettings::setPassTemplate
static void setPassTemplate(const QString &passTemplate)
Definition: qtpasssettings.cpp:524
QtPassSettings::isUseAutoclear
static bool isUseAutoclear(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:187
PasswordConfiguration
Holds the Password configuration settings.
Definition: passwordconfiguration.h:10
QtPassSettings::getSavestate
static QByteArray getSavestate(const QByteArray &defaultValue=QVariant().toByteArray())
Definition: qtpasssettings.cpp:117
QtPassSettings::setProfile
static void setProfile(const QString &profile)
Definition: qtpasssettings.cpp:379
SettingsConstants::useSelection
const static QString useSelection
Definition: settingsconstants.h:23
SettingsConstants::webDavUser
const static QString webDavUser
Definition: settingsconstants.h:38
PasswordConfiguration::Characters
QString Characters[CHARSETS_COUNT]
The different character sets.
Definition: passwordconfiguration.h:28
Enums::clipBoardType
clipBoardType
Definition: enums.h:10
SettingsConstants::avoidCapitals
const static QString avoidCapitals
Definition: settingsconstants.h:47
QtPassSettings::getProfiles
static QHash< QString, QString > getProfiles()
Definition: qtpasssettings.cpp:61
QtPassSettings::getAutoclearSeconds
static int getAutoclearSeconds(const int &defaultValue=QVariant().toInt())
Definition: qtpasssettings.cpp:196
RealPass
Wrapper for executing pass to handle the password-store.
Definition: realpass.h:10
QtPassSettings::setLessRandom
static void setLessRandom(const bool &lessRandom)
Definition: qtpasssettings.cpp:440
QtPassSettings::setUseQrencode
static void setUseQrencode(const bool &useQrencode)
Definition: qtpasssettings.cpp:404
QtPassSettings::setUseGit
static void setUseGit(const bool &useGit)
Definition: qtpasssettings.cpp:386
Pass
Acts as an abstraction for pass or pass imitation.
Definition: pass.h:25
QtPassSettings::setWebDavUser
static void setWebDavUser(const QString &webDavUser)
Definition: qtpasssettings.cpp:361
SettingsConstants::savestate
const static QString savestate
Definition: settingsconstants.h:15
QtPassSettings::isUseOtp
static bool isUseOtp(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:390
QtPassSettings::setUseAutoclear
static void setUseAutoclear(const bool &useAutoclear)
Definition: qtpasssettings.cpp:192
QtPassSettings::setPasswordChars
static void setPasswordChars(const QString &passwordChars)
Definition: qtpasssettings.cpp:461
QtPassSettings::getPassStore
static QString getPassStore(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:254
QtPassSettings::setAvoidNumbers
static void setAvoidNumbers(const bool &avoidNumbers)
Definition: qtpasssettings.cpp:431
SettingsConstants::lessRandom
const static QString lessRandom
Definition: settingsconstants.h:49
util.h
QtPassSettings::setPasswordLength
static void setPasswordLength(const int &passwordLength)
Definition: qtpasssettings.cpp:453
SettingsConstants::passwordChars
const static QString passwordChars
Definition: settingsconstants.h:53
QtPassSettings::isUseWebDav
static bool isUseWebDav(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:338
SettingsConstants::useWebDav
const static QString useWebDav
Definition: settingsconstants.h:36
QtPassSettings::isHidePassword
static bool isHidePassword(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:227
SettingsConstants::size
const static QString size
Definition: settingsconstants.h:17
SettingsConstants::usePass
const static QString usePass
Definition: settingsconstants.h:21
ImitatePass
Imitates pass features when pass is not enabled or available.
Definition: imitatepass.h:11
SettingsConstants::useSymbols
const static QString useSymbols
Definition: settingsconstants.h:50
QtPassSettings::isAlwaysOnTop
static bool isAlwaysOnTop(const bool &defaultValue=QVariant().toBool())
Definition: qtpasssettings.cpp:492
QtPassSettings::getRealPass
static RealPass * getRealPass()
Definition: qtpasssettings.cpp:547
qtpasssettings.h
SettingsConstants::passTemplate
const static QString passTemplate
Definition: settingsconstants.h:60
QtPassSettings::setGpgExecutable
static void setGpgExecutable(const QString &gpgExecutable)
Definition: qtpasssettings.cpp:319
QtPassSettings::getWebDavUser
static QString getWebDavUser(const QString &defaultValue=QVariant().toString())
Definition: qtpasssettings.cpp:356
QtPassSettings::setAutoclearPanelSeconds
static void setAutoclearPanelSeconds(const int &autoClearPanelSeconds)
Definition: qtpasssettings.cpp:221
pass.h