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 RealPass QtPassSettings::realPass;
12 ImitatePass QtPassSettings::imitatePass;
13 
14 QtPassSettings *QtPassSettings::m_instance = nullptr;
16  if (!QtPassSettings::initialized) {
17  QString portable_ini = QCoreApplication::applicationDirPath() +
18  QDir::separator() + "qtpass.ini";
19  if (QFile(portable_ini).exists()) {
20  m_instance = new QtPassSettings(portable_ini, QSettings::IniFormat);
21  } else {
22  m_instance = new QtPassSettings("IJHack", "QtPass");
23  }
24 
25  initialized = true;
26  }
27 
28  return m_instance;
29 }
30 
32  PasswordConfiguration config;
33 
34  config.length =
36  config.selected = static_cast<PasswordConfiguration::characterSet>(
37  getInstance()
39  .toInt());
41  getInstance()
42  ->value(SettingsConstants::passwordChars, QString())
43  .toString();
44 
45  return config;
46 }
47 
49  const PasswordConfiguration &config) {
52  config.selected);
55 }
56 
57 QHash<QString, QString> QtPassSettings::getProfiles() {
59 
60  QStringList childrenKeys = getInstance()->childKeys();
61  QHash<QString, QString> profiles;
62  foreach (QString key, childrenKeys) {
63  profiles.insert(key, getInstance()->value(key).toString());
64  }
65 
66  getInstance()->endGroup();
67 
68  return profiles;
69 }
70 
71 void QtPassSettings::setProfiles(const QHash<QString, QString> &profiles) {
74 
75  QHash<QString, QString>::const_iterator i = profiles.begin();
76  for (; i != profiles.end(); ++i) {
77  getInstance()->setValue(i.key(), i.value());
78  }
79 
80  getInstance()->endGroup();
81 }
82 
84  if (!pass) {
85  if (isUsePass()) {
86  QtPassSettings::pass = &QtPassSettings::realPass;
87  } else {
88  QtPassSettings::pass = &QtPassSettings::imitatePass;
89  }
90  pass->init();
91  }
92  return pass;
93 }
94 
95 QString QtPassSettings::getVersion(const QString &defaultValue) {
96  return getInstance()
97  ->value(SettingsConstants::version, defaultValue)
98  .toString();
99 }
100 void QtPassSettings::setVersion(const QString &version) {
101  getInstance()->setValue(SettingsConstants::version, version);
102 }
103 
104 QByteArray QtPassSettings::getGeometry(const QByteArray &defaultValue) {
105  return getInstance()
106  ->value(SettingsConstants::geometry, defaultValue)
107  .toByteArray();
108 }
109 void QtPassSettings::setGeometry(const QByteArray &geometry) {
110  getInstance()->setValue(SettingsConstants::geometry, geometry);
111 }
112 
113 QByteArray QtPassSettings::getSavestate(const QByteArray &defaultValue) {
114  return getInstance()
115  ->value(SettingsConstants::savestate, defaultValue)
116  .toByteArray();
117 }
118 void QtPassSettings::setSavestate(const QByteArray &saveState) {
119  getInstance()->setValue(SettingsConstants::savestate, saveState);
120 }
121 
122 QPoint QtPassSettings::getPos(const QPoint &defaultValue) {
123  return getInstance()->value(SettingsConstants::pos, defaultValue).toPoint();
124 }
125 void QtPassSettings::setPos(const QPoint &pos) {
126  getInstance()->setValue(SettingsConstants::pos, pos);
127 }
128 
129 QSize QtPassSettings::getSize(const QSize &defaultValue) {
130  return getInstance()->value(SettingsConstants::size, defaultValue).toSize();
131 }
132 void QtPassSettings::setSize(const QSize &size) {
133  getInstance()->setValue(SettingsConstants::size, size);
134 }
135 
136 bool QtPassSettings::isMaximized(const bool &defaultValue) {
137  return getInstance()
138  ->value(SettingsConstants::maximized, defaultValue)
139  .toBool();
140 }
141 void QtPassSettings::setMaximized(const bool &maximized) {
142  getInstance()->setValue(SettingsConstants::maximized, maximized);
143 }
144 
145 bool QtPassSettings::isUsePass(const bool &defaultValue) {
146  return getInstance()
147  ->value(SettingsConstants::usePass, defaultValue)
148  .toBool();
149 }
150 void QtPassSettings::setUsePass(const bool &usePass) {
151  if (usePass) {
152  QtPassSettings::pass = &QtPassSettings::realPass;
153  } else {
154  QtPassSettings::pass = &QtPassSettings::imitatePass;
155  }
156  getInstance()->setValue(SettingsConstants::usePass, usePass);
157 }
158 
160  const Enums::clipBoardType &defaultvalue) {
161  return getInstance()
162  ->value(SettingsConstants::clipBoardType, static_cast<int>(defaultvalue))
163  .toInt();
164 }
165 
168  return static_cast<Enums::clipBoardType>(getClipBoardTypeRaw(defaultvalue));
169 }
172 }
173 
174 bool QtPassSettings::isUseSelection(const bool &defaultValue) {
175  return getInstance()
176  ->value(SettingsConstants::useSelection, defaultValue)
177  .toBool();
178 }
179 void QtPassSettings::setUseSelection(const bool &useSelection) {
180  getInstance()->setValue(SettingsConstants::useSelection, useSelection);
181 }
182 
183 bool QtPassSettings::isUseAutoclear(const bool &defaultValue) {
184  return getInstance()
185  ->value(SettingsConstants::useAutoclear, defaultValue)
186  .toBool();
187 }
188 void QtPassSettings::setUseAutoclear(const bool &useAutoclear) {
189  getInstance()->setValue(SettingsConstants::useAutoclear, useAutoclear);
190 }
191 
192 int QtPassSettings::getAutoclearSeconds(const int &defaultValue) {
193  return getInstance()
194  ->value(SettingsConstants::autoclearSeconds, defaultValue)
195  .toInt();
196 }
197 void QtPassSettings::setAutoclearSeconds(const int &autoClearSeconds) {
199  autoClearSeconds);
200 }
201 
202 bool QtPassSettings::isUseAutoclearPanel(const bool &defaultValue) {
203  return getInstance()
204  ->value(SettingsConstants::useAutoclearPanel, defaultValue)
205  .toBool();
206 }
207 void QtPassSettings::setUseAutoclearPanel(const bool &useAutoclearPanel) {
209  useAutoclearPanel);
210 }
211 
212 int QtPassSettings::getAutoclearPanelSeconds(const int &defaultValue) {
213  return getInstance()
214  ->value(SettingsConstants::autoclearPanelSeconds, defaultValue)
215  .toInt();
216 }
218  const int &autoClearPanelSeconds) {
220  autoClearPanelSeconds);
221 }
222 
223 bool QtPassSettings::isHidePassword(const bool &defaultValue) {
224  return getInstance()
225  ->value(SettingsConstants::hidePassword, defaultValue)
226  .toBool();
227 }
228 void QtPassSettings::setHidePassword(const bool &hidePassword) {
229  getInstance()->setValue(SettingsConstants::hidePassword, hidePassword);
230 }
231 
232 bool QtPassSettings::isHideContent(const bool &defaultValue) {
233  return getInstance()
234  ->value(SettingsConstants::hideContent, defaultValue)
235  .toBool();
236 }
237 void QtPassSettings::setHideContent(const bool &hideContent) {
238  getInstance()->setValue(SettingsConstants::hideContent, hideContent);
239 }
240 
241 bool QtPassSettings::isAddGPGId(const bool &defaultValue) {
242  return getInstance()
243  ->value(SettingsConstants::addGPGId, defaultValue)
244  .toBool();
245 }
246 void QtPassSettings::setAddGPGId(const bool &addGPGId) {
247  getInstance()->setValue(SettingsConstants::addGPGId, addGPGId);
248 }
249 
250 QString QtPassSettings::getPassStore(const QString &defaultValue) {
251  QString returnValue = getInstance()
252  ->value(SettingsConstants::passStore, defaultValue)
253  .toString();
254 
255  // ensure directory exists if never used pass or misconfigured.
256  // otherwise process->setWorkingDirectory(passStore); will fail on execution.
257  if (!QDir(returnValue).exists()) {
258  QDir().mkdir(returnValue);
259  }
260 
261  // ensure path ends in /
262  if (!returnValue.endsWith("/")) {
263  returnValue += "/";
264  }
265 
266  return returnValue;
267 }
268 void QtPassSettings::setPassStore(const QString &passStore) {
269  getInstance()->setValue(SettingsConstants::passStore, passStore);
270 }
271 
273  QString passExecutable =
275  QtPassSettings::setPassExecutable(passExecutable);
276 
277  QString gitExecutable =
279  QtPassSettings::setGitExecutable(gitExecutable);
280 
281  QString gpgExecutable =
283  QtPassSettings::setGpgExecutable(gpgExecutable);
284 
285  QString pwgenExecutable =
287  QtPassSettings::setPwgenExecutable(pwgenExecutable);
288 }
289 QString QtPassSettings::getPassExecutable(const QString &defaultValue) {
290  return getInstance()
291  ->value(SettingsConstants::passExecutable, defaultValue)
292  .toString();
293 }
294 void QtPassSettings::setPassExecutable(const QString &passExecutable) {
295  getInstance()->setValue(SettingsConstants::passExecutable, passExecutable);
296 }
297 
298 QString QtPassSettings::getGitExecutable(const QString &defaultValue) {
299  return getInstance()
300  ->value(SettingsConstants::gitExecutable, defaultValue)
301  .toString();
302 }
303 void QtPassSettings::setGitExecutable(const QString &gitExecutable) {
304  getInstance()->setValue(SettingsConstants::gitExecutable, gitExecutable);
305 }
306 
307 QString QtPassSettings::getGpgExecutable(const QString &defaultValue) {
308  return getInstance()
309  ->value(SettingsConstants::gpgExecutable, defaultValue)
310  .toString();
311 }
312 void QtPassSettings::setGpgExecutable(const QString &gpgExecutable) {
313  getInstance()->setValue(SettingsConstants::gpgExecutable, gpgExecutable);
314 }
315 
316 QString QtPassSettings::getPwgenExecutable(const QString &defaultValue) {
317  return getInstance()
318  ->value(SettingsConstants::pwgenExecutable, defaultValue)
319  .toString();
320 }
321 void QtPassSettings::setPwgenExecutable(const QString &pwgenExecutable) {
322  getInstance()->setValue(SettingsConstants::pwgenExecutable, pwgenExecutable);
323 }
324 
325 QString QtPassSettings::getGpgHome(const QString &defaultValue) {
326  return getInstance()
327  ->value(SettingsConstants::gpgHome, defaultValue)
328  .toString();
329 }
330 
331 bool QtPassSettings::isUseWebDav(const bool &defaultValue) {
332  return getInstance()
333  ->value(SettingsConstants::useWebDav, defaultValue)
334  .toBool();
335 }
336 void QtPassSettings::setUseWebDav(const bool &useWebDav) {
337  getInstance()->setValue(SettingsConstants::useWebDav, useWebDav);
338 }
339 
340 QString QtPassSettings::getWebDavUrl(const QString &defaultValue) {
341  return getInstance()
342  ->value(SettingsConstants::webDavUrl, defaultValue)
343  .toString();
344 }
345 void QtPassSettings::setWebDavUrl(const QString &webDavUrl) {
346  getInstance()->setValue(SettingsConstants::webDavUrl, webDavUrl);
347 }
348 
349 QString QtPassSettings::getWebDavUser(const QString &defaultValue) {
350  return getInstance()
351  ->value(SettingsConstants::webDavUser, defaultValue)
352  .toString();
353 }
354 void QtPassSettings::setWebDavUser(const QString &webDavUser) {
355  getInstance()->setValue(SettingsConstants::webDavUser, webDavUser);
356 }
357 
358 QString QtPassSettings::getWebDavPassword(const QString &defaultValue) {
359  return getInstance()
360  ->value(SettingsConstants::webDavPassword, defaultValue)
361  .toString();
362 }
363 void QtPassSettings::setWebDavPassword(const QString &webDavPassword) {
364  getInstance()->setValue(SettingsConstants::webDavPassword, webDavPassword);
365 }
366 
367 QString QtPassSettings::getProfile(const QString &defaultValue) {
368  return getInstance()
369  ->value(SettingsConstants::profile, defaultValue)
370  .toString();
371 }
372 void QtPassSettings::setProfile(const QString &profile) {
373  getInstance()->setValue(SettingsConstants::profile, profile);
374 }
375 
376 bool QtPassSettings::isUseGit(const bool &defaultValue) {
377  return getInstance()->value(SettingsConstants::useGit, defaultValue).toBool();
378 }
379 void QtPassSettings::setUseGit(const bool &useGit) {
380  getInstance()->setValue(SettingsConstants::useGit, useGit);
381 }
382 
383 bool QtPassSettings::isUseOtp(const bool &defaultValue) {
384  return getInstance()->value(SettingsConstants::useOtp, defaultValue).toBool();
385 }
386 
387 void QtPassSettings::setUseOtp(const bool &useOtp) {
388  getInstance()->setValue(SettingsConstants::useOtp, useOtp);
389 }
390 
391 bool QtPassSettings::isUsePwgen(const bool &defaultValue) {
392  return getInstance()
393  ->value(SettingsConstants::usePwgen, defaultValue)
394  .toBool();
395 }
396 void QtPassSettings::setUsePwgen(const bool &usePwgen) {
397  getInstance()->setValue(SettingsConstants::usePwgen, usePwgen);
398 }
399 
400 bool QtPassSettings::isAvoidCapitals(const bool &defaultValue) {
401  return getInstance()
402  ->value(SettingsConstants::avoidCapitals, defaultValue)
403  .toBool();
404 }
405 void QtPassSettings::setAvoidCapitals(const bool &avoidCapitals) {
406  getInstance()->setValue(SettingsConstants::avoidCapitals, avoidCapitals);
407 }
408 
409 bool QtPassSettings::isAvoidNumbers(const bool &defaultValue) {
410  return getInstance()
411  ->value(SettingsConstants::avoidNumbers, defaultValue)
412  .toBool();
413 }
414 void QtPassSettings::setAvoidNumbers(const bool &avoidNumbers) {
415  getInstance()->setValue(SettingsConstants::avoidNumbers, avoidNumbers);
416 }
417 
418 bool QtPassSettings::isLessRandom(const bool &defaultValue) {
419  return getInstance()
420  ->value(SettingsConstants::lessRandom, defaultValue)
421  .toBool();
422 }
423 void QtPassSettings::setLessRandom(const bool &lessRandom) {
424  getInstance()->setValue(SettingsConstants::lessRandom, lessRandom);
425 }
426 
427 bool QtPassSettings::isUseSymbols(const bool &defaultValue) {
428  return getInstance()
429  ->value(SettingsConstants::useSymbols, defaultValue)
430  .toBool();
431 }
432 void QtPassSettings::setUseSymbols(const bool &useSymbols) {
433  getInstance()->setValue(SettingsConstants::useSymbols, useSymbols);
434 }
435 
436 void QtPassSettings::setPasswordLength(const int &passwordLength) {
437  getInstance()->setValue(SettingsConstants::passwordLength, passwordLength);
438 }
440  const int &passwordCharsselection) {
442  passwordCharsselection);
443 }
444 void QtPassSettings::setPasswordChars(const QString &passwordChars) {
445  getInstance()->setValue(SettingsConstants::passwordChars, passwordChars);
446 }
447 
448 bool QtPassSettings::isUseTrayIcon(const bool &defaultValue) {
449  return getInstance()
450  ->value(SettingsConstants::useTrayIcon, defaultValue)
451  .toBool();
452 }
453 void QtPassSettings::setUseTrayIcon(const bool &useTrayIcon) {
454  getInstance()->setValue(SettingsConstants::useTrayIcon, useTrayIcon);
455 }
456 
457 bool QtPassSettings::isHideOnClose(const bool &defaultValue) {
458  return getInstance()
459  ->value(SettingsConstants::hideOnClose, defaultValue)
460  .toBool();
461 }
462 void QtPassSettings::setHideOnClose(const bool &hideOnClose) {
463  getInstance()->setValue(SettingsConstants::hideOnClose, hideOnClose);
464 }
465 
466 bool QtPassSettings::isStartMinimized(const bool &defaultValue) {
467  return getInstance()
468  ->value(SettingsConstants::startMinimized, defaultValue)
469  .toBool();
470 }
471 void QtPassSettings::setStartMinimized(const bool &startMinimized) {
472  getInstance()->setValue(SettingsConstants::startMinimized, startMinimized);
473 }
474 
475 bool QtPassSettings::isAlwaysOnTop(const bool &defaultValue) {
476  return getInstance()
477  ->value(SettingsConstants::alwaysOnTop, defaultValue)
478  .toBool();
479 }
480 void QtPassSettings::setAlwaysOnTop(const bool &alwaysOnTop) {
481  getInstance()->setValue(SettingsConstants::alwaysOnTop, alwaysOnTop);
482 }
483 
484 bool QtPassSettings::isAutoPull(const bool &defaultValue) {
485  return getInstance()
486  ->value(SettingsConstants::autoPull, defaultValue)
487  .toBool();
488 }
489 void QtPassSettings::setAutoPull(const bool &autoPull) {
490  getInstance()->setValue(SettingsConstants::autoPull, autoPull);
491 }
492 
493 bool QtPassSettings::isAutoPush(const bool &defaultValue) {
494  return getInstance()
495  ->value(SettingsConstants::autoPush, defaultValue)
496  .toBool();
497 }
498 void QtPassSettings::setAutoPush(const bool &autoPush) {
499  getInstance()->setValue(SettingsConstants::autoPush, autoPush);
500 }
501 
502 QString QtPassSettings::getPassTemplate(const QString &defaultValue) {
503  return getInstance()
504  ->value(SettingsConstants::passTemplate, defaultValue)
505  .toString();
506 }
507 void QtPassSettings::setPassTemplate(const QString &passTemplate) {
508  getInstance()->setValue(SettingsConstants::passTemplate, passTemplate);
509 }
510 
511 bool QtPassSettings::isUseTemplate(const bool &defaultValue) {
512  return getInstance()
513  ->value(SettingsConstants::useTemplate, defaultValue)
514  .toBool();
515 }
516 void QtPassSettings::setUseTemplate(const bool &useTemplate) {
517  getInstance()->setValue(SettingsConstants::useTemplate, useTemplate);
518 }
519 
520 bool QtPassSettings::isTemplateAllFields(const bool &defaultValue) {
521  return getInstance()
522  ->value(SettingsConstants::templateAllFields, defaultValue)
523  .toBool();
524 }
525 void QtPassSettings::setTemplateAllFields(const bool &templateAllFields) {
527  templateAllFields);
528 }
529 
530 RealPass *QtPassSettings::getRealPass() { return &realPass; }
531 ImitatePass *QtPassSettings::getImitatePass() { return &imitatePass; }
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:75
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 const QString groupProfiles
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:39
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)