QtPass 1.4.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
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
8bool QtPassSettings::initialized = false;
9
10Pass *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.
15QScopedPointer<RealPass> QtPassSettings::realPass;
16QScopedPointer<ImitatePass> QtPassSettings::imitatePass;
17
18QtPassSettings *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
37
38 config.length =
43 .toInt());
46 ->value(SettingsConstants::passwordChars, QString())
47 .toString();
48
49 return config;
50}
51
53 const PasswordConfiguration &config) {
56 config.selected);
59}
60
61QHash<QString, QHash<QString, QString>> QtPassSettings::getProfiles() {
63 QHash<QString, QHash<QString, QString>> profiles;
64
65 // migration from version <= v1.3.2: profiles datastructure
66 QStringList childKeys = getInstance()->childKeys();
67 if (!childKeys.empty()) {
68 foreach (QString key, childKeys) {
69 QHash<QString, QString> profile;
70 profile.insert("path", getInstance()->value(key).toString());
71 profile.insert("signingKey", "");
72 profiles.insert(key, profile);
73 }
74 }
75 // /migration from version <= v1.3.2
76
77 QStringList childGroups = getInstance()->childGroups();
78 foreach (QString group, childGroups) {
79 QHash<QString, QString> profile;
80 profile.insert("path", getInstance()->value(group + "/path").toString());
81 profile.insert("signingKey",
82 getInstance()->value(group + "/signingKey").toString());
83 // profiles.insert(group, getInstance()->value(group).toString());
84 profiles.insert(group, profile);
85 }
86
87 getInstance()->endGroup();
88
89 return profiles;
90}
91
93 const QHash<QString, QHash<QString, QString>> &profiles) {
96
97 QHash<QString, QHash<QString, QString>>::const_iterator i = profiles.begin();
98 for (; i != profiles.end(); ++i) {
99 getInstance()->setValue(i.key() + "/path", i.value().value("path"));
100 getInstance()->setValue(i.key() + "/signingKey",
101 i.value().value("signingKey"));
102 }
103
104 getInstance()->endGroup();
105}
106
108 if (!pass) {
109 if (isUsePass()) {
110 QtPassSettings::pass = getRealPass();
111 } else {
112 QtPassSettings::pass = getImitatePass();
113 }
114 pass->init();
115 }
116 return pass;
117}
118
119QString QtPassSettings::getVersion(const QString &defaultValue) {
120 return getInstance()
121 ->value(SettingsConstants::version, defaultValue)
122 .toString();
123}
124void QtPassSettings::setVersion(const QString &version) {
125 getInstance()->setValue(SettingsConstants::version, version);
126}
127
128QByteArray QtPassSettings::getGeometry(const QByteArray &defaultValue) {
129 return getInstance()
130 ->value(SettingsConstants::geometry, defaultValue)
131 .toByteArray();
132}
133void QtPassSettings::setGeometry(const QByteArray &geometry) {
134 getInstance()->setValue(SettingsConstants::geometry, geometry);
135}
136
137QByteArray QtPassSettings::getSavestate(const QByteArray &defaultValue) {
138 return getInstance()
139 ->value(SettingsConstants::savestate, defaultValue)
140 .toByteArray();
141}
142void QtPassSettings::setSavestate(const QByteArray &saveState) {
143 getInstance()->setValue(SettingsConstants::savestate, saveState);
144}
145
146QPoint QtPassSettings::getPos(const QPoint &defaultValue) {
147 return getInstance()->value(SettingsConstants::pos, defaultValue).toPoint();
148}
149void QtPassSettings::setPos(const QPoint &pos) {
150 getInstance()->setValue(SettingsConstants::pos, pos);
151}
152
153QSize QtPassSettings::getSize(const QSize &defaultValue) {
154 return getInstance()->value(SettingsConstants::size, defaultValue).toSize();
155}
156void QtPassSettings::setSize(const QSize &size) {
157 getInstance()->setValue(SettingsConstants::size, size);
158}
159
160bool QtPassSettings::isMaximized(const bool &defaultValue) {
161 return getInstance()
162 ->value(SettingsConstants::maximized, defaultValue)
163 .toBool();
164}
165void QtPassSettings::setMaximized(const bool &maximized) {
166 getInstance()->setValue(SettingsConstants::maximized, maximized);
167}
168
169bool QtPassSettings::isUsePass(const bool &defaultValue) {
170 return getInstance()
171 ->value(SettingsConstants::usePass, defaultValue)
172 .toBool();
173}
174void QtPassSettings::setUsePass(const bool &usePass) {
175 if (usePass) {
176 QtPassSettings::pass = getRealPass();
177 } else {
178 QtPassSettings::pass = getImitatePass();
179 }
180 getInstance()->setValue(SettingsConstants::usePass, usePass);
181}
182
184 const Enums::clipBoardType &defaultvalue) {
185 return getInstance()
186 ->value(SettingsConstants::clipBoardType, static_cast<int>(defaultvalue))
187 .toInt();
188}
189
192 return static_cast<Enums::clipBoardType>(getClipBoardTypeRaw(defaultvalue));
193}
194void QtPassSettings::setClipBoardType(const int &clipBoardType) {
195 getInstance()->setValue(SettingsConstants::clipBoardType, clipBoardType);
196}
197
198bool QtPassSettings::isUseSelection(const bool &defaultValue) {
199 return getInstance()
200 ->value(SettingsConstants::useSelection, defaultValue)
201 .toBool();
202}
203void QtPassSettings::setUseSelection(const bool &useSelection) {
204 getInstance()->setValue(SettingsConstants::useSelection, useSelection);
205}
206
207bool QtPassSettings::isUseAutoclear(const bool &defaultValue) {
208 return getInstance()
209 ->value(SettingsConstants::useAutoclear, defaultValue)
210 .toBool();
211}
212void QtPassSettings::setUseAutoclear(const bool &useAutoclear) {
213 getInstance()->setValue(SettingsConstants::useAutoclear, useAutoclear);
214}
215
216int QtPassSettings::getAutoclearSeconds(const int &defaultValue) {
217 return getInstance()
218 ->value(SettingsConstants::autoclearSeconds, defaultValue)
219 .toInt();
220}
221void QtPassSettings::setAutoclearSeconds(const int &autoClearSeconds) {
223 autoClearSeconds);
224}
225
226bool QtPassSettings::isUseAutoclearPanel(const bool &defaultValue) {
227 return getInstance()
228 ->value(SettingsConstants::useAutoclearPanel, defaultValue)
229 .toBool();
230}
231void QtPassSettings::setUseAutoclearPanel(const bool &useAutoclearPanel) {
233 useAutoclearPanel);
234}
235
236int QtPassSettings::getAutoclearPanelSeconds(const int &defaultValue) {
237 return getInstance()
238 ->value(SettingsConstants::autoclearPanelSeconds, defaultValue)
239 .toInt();
240}
242 const int &autoClearPanelSeconds) {
244 autoClearPanelSeconds);
245}
246
247bool QtPassSettings::isHidePassword(const bool &defaultValue) {
248 return getInstance()
249 ->value(SettingsConstants::hidePassword, defaultValue)
250 .toBool();
251}
252void QtPassSettings::setHidePassword(const bool &hidePassword) {
253 getInstance()->setValue(SettingsConstants::hidePassword, hidePassword);
254}
255
256bool QtPassSettings::isHideContent(const bool &defaultValue) {
257 return getInstance()
258 ->value(SettingsConstants::hideContent, defaultValue)
259 .toBool();
260}
261void QtPassSettings::setHideContent(const bool &hideContent) {
262 getInstance()->setValue(SettingsConstants::hideContent, hideContent);
263}
264
265bool QtPassSettings::isUseMonospace(const bool &defaultValue) {
266 return getInstance()
267 ->value(SettingsConstants::useMonospace, defaultValue)
268 .toBool();
269}
270void QtPassSettings::setUseMonospace(const bool &useMonospace) {
271 getInstance()->setValue(SettingsConstants::useMonospace, useMonospace);
272}
273
274bool QtPassSettings::isDisplayAsIs(const bool &defaultValue) {
275 return getInstance()
276 ->value(SettingsConstants::displayAsIs, defaultValue)
277 .toBool();
278}
279void QtPassSettings::setDisplayAsIs(const bool &displayAsIs) {
280 getInstance()->setValue(SettingsConstants::displayAsIs, displayAsIs);
281}
282
283bool QtPassSettings::isNoLineWrapping(const bool &defaultValue) {
284 return getInstance()
285 ->value(SettingsConstants::noLineWrapping, defaultValue)
286 .toBool();
287}
288void QtPassSettings::setNoLineWrapping(const bool &noLineWrapping) {
289 getInstance()->setValue(SettingsConstants::noLineWrapping, noLineWrapping);
290}
291
292bool QtPassSettings::isAddGPGId(const bool &defaultValue) {
293 return getInstance()
294 ->value(SettingsConstants::addGPGId, defaultValue)
295 .toBool();
296}
297void QtPassSettings::setAddGPGId(const bool &addGPGId) {
298 getInstance()->setValue(SettingsConstants::addGPGId, addGPGId);
299}
300
301QString QtPassSettings::getPassStore(const QString &defaultValue) {
302 QString returnValue = getInstance()
303 ->value(SettingsConstants::passStore, defaultValue)
304 .toString();
305
306 // Normalize the path string
307 returnValue = QDir(returnValue).absolutePath();
308
309 // ensure directory exists if never used pass or misconfigured.
310 // otherwise process->setWorkingDirectory(passStore); will fail on execution.
311 if (!QDir(returnValue).exists()) {
312 QDir().mkdir(returnValue);
313 }
314
315 // ensure path ends in /
316 if (!returnValue.endsWith("/") && !returnValue.endsWith(QDir::separator())) {
317 returnValue += QDir::separator();
318 }
319
320 return returnValue;
321}
322void QtPassSettings::setPassStore(const QString &passStore) {
323 getInstance()->setValue(SettingsConstants::passStore, passStore);
324}
325
326QString QtPassSettings::getPassSigningKey(const QString &defaultValue) {
327 return getInstance()
328 ->value(SettingsConstants::passSigningKey, defaultValue)
329 .toString();
330}
331void QtPassSettings::setPassSigningKey(const QString &passSigningKey) {
332 getInstance()->setValue(SettingsConstants::passSigningKey, passSigningKey);
333}
334
336 QString passExecutable =
338 QtPassSettings::setPassExecutable(passExecutable);
339
340 QString gitExecutable =
343
344 QString gpgExecutable =
347
348 QString pwgenExecutable =
350 QtPassSettings::setPwgenExecutable(pwgenExecutable);
351}
352QString QtPassSettings::getPassExecutable(const QString &defaultValue) {
353 return getInstance()
354 ->value(SettingsConstants::passExecutable, defaultValue)
355 .toString();
356}
357void QtPassSettings::setPassExecutable(const QString &passExecutable) {
358 getInstance()->setValue(SettingsConstants::passExecutable, passExecutable);
359}
360
361QString QtPassSettings::getGitExecutable(const QString &defaultValue) {
362 return getInstance()
363 ->value(SettingsConstants::gitExecutable, defaultValue)
364 .toString();
365}
366void QtPassSettings::setGitExecutable(const QString &gitExecutable) {
367 getInstance()->setValue(SettingsConstants::gitExecutable, gitExecutable);
368}
369
370QString QtPassSettings::getGpgExecutable(const QString &defaultValue) {
371 return getInstance()
372 ->value(SettingsConstants::gpgExecutable, defaultValue)
373 .toString();
374}
375void QtPassSettings::setGpgExecutable(const QString &gpgExecutable) {
376 getInstance()->setValue(SettingsConstants::gpgExecutable, gpgExecutable);
377}
378
379QString QtPassSettings::getPwgenExecutable(const QString &defaultValue) {
380 return getInstance()
381 ->value(SettingsConstants::pwgenExecutable, defaultValue)
382 .toString();
383}
384void QtPassSettings::setPwgenExecutable(const QString &pwgenExecutable) {
385 getInstance()->setValue(SettingsConstants::pwgenExecutable, pwgenExecutable);
386}
387
388QString QtPassSettings::getGpgHome(const QString &defaultValue) {
389 return getInstance()
390 ->value(SettingsConstants::gpgHome, defaultValue)
391 .toString();
392}
393
394bool QtPassSettings::isUseWebDav(const bool &defaultValue) {
395 return getInstance()
396 ->value(SettingsConstants::useWebDav, defaultValue)
397 .toBool();
398}
399void QtPassSettings::setUseWebDav(const bool &useWebDav) {
400 getInstance()->setValue(SettingsConstants::useWebDav, useWebDav);
401}
402
403QString QtPassSettings::getWebDavUrl(const QString &defaultValue) {
404 return getInstance()
405 ->value(SettingsConstants::webDavUrl, defaultValue)
406 .toString();
407}
408void QtPassSettings::setWebDavUrl(const QString &webDavUrl) {
409 getInstance()->setValue(SettingsConstants::webDavUrl, webDavUrl);
410}
411
412QString QtPassSettings::getWebDavUser(const QString &defaultValue) {
413 return getInstance()
414 ->value(SettingsConstants::webDavUser, defaultValue)
415 .toString();
416}
417void QtPassSettings::setWebDavUser(const QString &webDavUser) {
418 getInstance()->setValue(SettingsConstants::webDavUser, webDavUser);
419}
420
421QString QtPassSettings::getWebDavPassword(const QString &defaultValue) {
422 return getInstance()
423 ->value(SettingsConstants::webDavPassword, defaultValue)
424 .toString();
425}
426void QtPassSettings::setWebDavPassword(const QString &webDavPassword) {
427 getInstance()->setValue(SettingsConstants::webDavPassword, webDavPassword);
428}
429
430QString QtPassSettings::getProfile(const QString &defaultValue) {
431 return getInstance()
432 ->value(SettingsConstants::profile, defaultValue)
433 .toString();
434}
435void QtPassSettings::setProfile(const QString &profile) {
436 getInstance()->setValue(SettingsConstants::profile, profile);
437}
438
439bool QtPassSettings::isUseGit(const bool &defaultValue) {
440 return getInstance()->value(SettingsConstants::useGit, defaultValue).toBool();
441}
442void QtPassSettings::setUseGit(const bool &useGit) {
443 getInstance()->setValue(SettingsConstants::useGit, useGit);
444}
445
446bool QtPassSettings::isUseOtp(const bool &defaultValue) {
447 return getInstance()->value(SettingsConstants::useOtp, defaultValue).toBool();
448}
449
450void QtPassSettings::setUseOtp(const bool &useOtp) {
451 getInstance()->setValue(SettingsConstants::useOtp, useOtp);
452}
453
454bool QtPassSettings::isUseQrencode(const bool &defaultValue) {
455 return getInstance()
456 ->value(SettingsConstants::useQrencode, defaultValue)
457 .toBool();
458}
459
460void QtPassSettings::setUseQrencode(const bool &useQrencode) {
461 getInstance()->setValue(SettingsConstants::useQrencode, useQrencode);
462}
463
464QString QtPassSettings::getQrencodeExecutable(const QString &defaultValue) {
465 return getInstance()
466 ->value(SettingsConstants::qrencodeExecutable, defaultValue)
467 .toString();
468}
469void QtPassSettings::setQrencodeExecutable(const QString &qrencodeExecutable) {
471 qrencodeExecutable);
472}
473
474bool QtPassSettings::isUsePwgen(const bool &defaultValue) {
475 return getInstance()
476 ->value(SettingsConstants::usePwgen, defaultValue)
477 .toBool();
478}
479void QtPassSettings::setUsePwgen(const bool &usePwgen) {
480 getInstance()->setValue(SettingsConstants::usePwgen, usePwgen);
481}
482
483bool QtPassSettings::isAvoidCapitals(const bool &defaultValue) {
484 return getInstance()
485 ->value(SettingsConstants::avoidCapitals, defaultValue)
486 .toBool();
487}
488void QtPassSettings::setAvoidCapitals(const bool &avoidCapitals) {
489 getInstance()->setValue(SettingsConstants::avoidCapitals, avoidCapitals);
490}
491
492bool QtPassSettings::isAvoidNumbers(const bool &defaultValue) {
493 return getInstance()
494 ->value(SettingsConstants::avoidNumbers, defaultValue)
495 .toBool();
496}
497void QtPassSettings::setAvoidNumbers(const bool &avoidNumbers) {
498 getInstance()->setValue(SettingsConstants::avoidNumbers, avoidNumbers);
499}
500
501bool QtPassSettings::isLessRandom(const bool &defaultValue) {
502 return getInstance()
503 ->value(SettingsConstants::lessRandom, defaultValue)
504 .toBool();
505}
506void QtPassSettings::setLessRandom(const bool &lessRandom) {
507 getInstance()->setValue(SettingsConstants::lessRandom, lessRandom);
508}
509
510bool QtPassSettings::isUseSymbols(const bool &defaultValue) {
511 return getInstance()
512 ->value(SettingsConstants::useSymbols, defaultValue)
513 .toBool();
514}
515void QtPassSettings::setUseSymbols(const bool &useSymbols) {
516 getInstance()->setValue(SettingsConstants::useSymbols, useSymbols);
517}
518
519void QtPassSettings::setPasswordLength(const int &passwordLength) {
520 getInstance()->setValue(SettingsConstants::passwordLength, passwordLength);
521}
523 const int &passwordCharsselection) {
525 passwordCharsselection);
526}
527void QtPassSettings::setPasswordChars(const QString &passwordChars) {
528 getInstance()->setValue(SettingsConstants::passwordChars, passwordChars);
529}
530
531bool QtPassSettings::isUseTrayIcon(const bool &defaultValue) {
532 return getInstance()
533 ->value(SettingsConstants::useTrayIcon, defaultValue)
534 .toBool();
535}
536void QtPassSettings::setUseTrayIcon(const bool &useTrayIcon) {
537 getInstance()->setValue(SettingsConstants::useTrayIcon, useTrayIcon);
538}
539
540bool QtPassSettings::isHideOnClose(const bool &defaultValue) {
541 return getInstance()
542 ->value(SettingsConstants::hideOnClose, defaultValue)
543 .toBool();
544}
545void QtPassSettings::setHideOnClose(const bool &hideOnClose) {
546 getInstance()->setValue(SettingsConstants::hideOnClose, hideOnClose);
547}
548
549bool QtPassSettings::isStartMinimized(const bool &defaultValue) {
550 return getInstance()
551 ->value(SettingsConstants::startMinimized, defaultValue)
552 .toBool();
553}
554void QtPassSettings::setStartMinimized(const bool &startMinimized) {
555 getInstance()->setValue(SettingsConstants::startMinimized, startMinimized);
556}
557
558bool QtPassSettings::isAlwaysOnTop(const bool &defaultValue) {
559 return getInstance()
560 ->value(SettingsConstants::alwaysOnTop, defaultValue)
561 .toBool();
562}
563void QtPassSettings::setAlwaysOnTop(const bool &alwaysOnTop) {
564 getInstance()->setValue(SettingsConstants::alwaysOnTop, alwaysOnTop);
565}
566
567bool QtPassSettings::isAutoPull(const bool &defaultValue) {
568 return getInstance()
569 ->value(SettingsConstants::autoPull, defaultValue)
570 .toBool();
571}
572void QtPassSettings::setAutoPull(const bool &autoPull) {
573 getInstance()->setValue(SettingsConstants::autoPull, autoPull);
574}
575
576bool QtPassSettings::isAutoPush(const bool &defaultValue) {
577 return getInstance()
578 ->value(SettingsConstants::autoPush, defaultValue)
579 .toBool();
580}
581void QtPassSettings::setAutoPush(const bool &autoPush) {
582 getInstance()->setValue(SettingsConstants::autoPush, autoPush);
583}
584
585QString QtPassSettings::getPassTemplate(const QString &defaultValue) {
586 return getInstance()
587 ->value(SettingsConstants::passTemplate, defaultValue)
588 .toString();
589}
590void QtPassSettings::setPassTemplate(const QString &passTemplate) {
591 getInstance()->setValue(SettingsConstants::passTemplate, passTemplate);
592}
593
594bool QtPassSettings::isUseTemplate(const bool &defaultValue) {
595 return getInstance()
596 ->value(SettingsConstants::useTemplate, defaultValue)
597 .toBool();
598}
599void QtPassSettings::setUseTemplate(const bool &useTemplate) {
600 getInstance()->setValue(SettingsConstants::useTemplate, useTemplate);
601}
602
603bool QtPassSettings::isTemplateAllFields(const bool &defaultValue) {
604 return getInstance()
605 ->value(SettingsConstants::templateAllFields, defaultValue)
606 .toBool();
607}
608void QtPassSettings::setTemplateAllFields(const bool &templateAllFields) {
610 templateAllFields);
611}
612
614 if (realPass.isNull())
615 realPass.reset(new RealPass());
616 return realPass.data();
617}
619 if (imitatePass.isNull())
620 imitatePass.reset(new ImitatePass());
621 return imitatePass.data();
622}
Imitates pass features when pass is not enabled or available.
Definition: imitatepass.h:11
Acts as an abstraction for pass or pass imitation.
Definition: pass.h:18
void init()
Definition: pass.cpp:47
Singleton that stores qtpass' settings, saves and loads config.
static QString getPassSigningKey(const QString &defaultValue=QVariant().toString())
static void setMaximized(const bool &maximized)
static QString getVersion(const QString &defaultValue=QVariant().toString())
static void setStartMinimized(const bool &startMinimized)
static void setUseWebDav(const bool &useWebDav)
static bool isUseAutoclearPanel(const bool &defaultValue=QVariant().toBool())
static void setAutoclearPanelSeconds(const int &autoClearPanelSeconds)
static void setPassExecutable(const QString &passExecutable)
static bool isUseSymbols(const bool &defaultValue=QVariant().toBool())
static void setHidePassword(const bool &hidePassword)
static bool isUseTemplate(const bool &defaultValue=QVariant().toBool())
static void setPwgenExecutable(const QString &pwgenExecutable)
static QString getWebDavUrl(const QString &defaultValue=QVariant().toString())
static void setProfile(const QString &profile)
static bool isTemplateAllFields(const bool &defaultValue=QVariant().toBool())
static int getAutoclearPanelSeconds(const int &defaultValue=QVariant().toInt())
static void setUseTrayIcon(const bool &useTrayIcon)
static void setWebDavPassword(const QString &webDavPassword)
static bool isUseOtp(const bool &defaultValue=QVariant().toBool())
static bool isLessRandom(const bool &defaultValue=QVariant().toBool())
static void setPassStore(const QString &passStore)
static ImitatePass * getImitatePass()
static void setPasswordConfiguration(const PasswordConfiguration &config)
static bool isUseGit(const bool &defaultValue=QVariant().toBool())
static void setHideOnClose(const bool &hideOnClose)
static bool isUsePass(const bool &defaultValue=QVariant().toBool())
static bool isAlwaysOnTop(const bool &defaultValue=QVariant().toBool())
static void setPasswordLength(const int &passwordLength)
static QString getPassTemplate(const QString &defaultValue=QVariant().toString())
static void setGitExecutable(const QString &gitExecutable)
static void setPasswordChars(const QString &passwordChars)
static void setUseOtp(const bool &useOtp)
static int getAutoclearSeconds(const int &defaultValue=QVariant().toInt())
static void setProfiles(const QHash< QString, QHash< QString, QString > > &profiles)
static QString getProfile(const QString &defaultValue=QVariant().toString())
static void setUsePwgen(const bool &usePwgen)
static bool isHideOnClose(const bool &defaultValue=QVariant().toBool())
static QByteArray getGeometry(const QByteArray &defaultValue=QVariant().toByteArray())
static void setPassSigningKey(const QString &passSigningKey)
static bool isAvoidNumbers(const bool &defaultValue=QVariant().toBool())
static QString getPwgenExecutable(const QString &defaultValue=QVariant().toString())
static void setPasswordCharsselection(const int &passwordCharsselection)
static bool isAutoPull(const bool &defaultValue=QVariant().toBool())
static QByteArray getSavestate(const QByteArray &defaultValue=QVariant().toByteArray())
static bool isUseTrayIcon(const bool &defaultValue=QVariant().toBool())
static QString getWebDavUser(const QString &defaultValue=QVariant().toString())
static bool isDisplayAsIs(const bool &defaultValue=QVariant().toBool())
static QHash< QString, QHash< QString, QString > > getProfiles()
static void initExecutables()
static void setUseTemplate(const bool &useTemplate)
static bool isUsePwgen(const bool &defaultValue=QVariant().toBool())
static bool isUseWebDav(const bool &defaultValue=QVariant().toBool())
static bool isAvoidCapitals(const bool &defaultValue=QVariant().toBool())
static void setAutoPull(const bool &autoPull)
static void setPassTemplate(const QString &passTemplate)
static void setGpgExecutable(const QString &gpgExecutable)
static bool isStartMinimized(const bool &defaultValue=QVariant().toBool())
static void setPos(const QPoint &pos)
static void setVersion(const QString &version)
static void setUseAutoclear(const bool &useAutoclear)
static void setAlwaysOnTop(const bool &alwaysOnTop)
static QString getGpgExecutable(const QString &defaultValue=QVariant().toString())
static void setWebDavUser(const QString &webDavUser)
static void setDisplayAsIs(const bool &displayAsIs)
static void setUseMonospace(const bool &useMonospace)
static Pass * getPass()
static void setAvoidCapitals(const bool &avoidCapitals)
static PasswordConfiguration getPasswordConfiguration()
static void setQrencodeExecutable(const QString &qrencodeExecutable)
static void setWebDavUrl(const QString &webDavUrl)
static Enums::clipBoardType getClipBoardType(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER)
static void setAddGPGId(const bool &addGPGId)
static void setUsePass(const bool &usePass)
static RealPass * getRealPass()
static bool isUseMonospace(const bool &defaultValue=QVariant().toBool())
static bool isUseQrencode(const bool &defaultValue=QVariant().toBool())
static int getClipBoardTypeRaw(const Enums::clipBoardType &defaultvalue=Enums::CLIPBOARD_NEVER)
static bool isAutoPush(const bool &defaultValue=QVariant().toBool())
static bool isHideContent(const bool &defaultValue=QVariant().toBool())
static QtPassSettings * getInstance()
static QString getPassStore(const QString &defaultValue=QVariant().toString())
static void setSavestate(const QByteArray &saveState)
static void setUseAutoclearPanel(const bool &useAutoclearPanel)
static void setAutoclearSeconds(const int &autoClearSeconds)
static void setNoLineWrapping(const bool &noLineWrapping)
static QString getQrencodeExecutable(const QString &defaultValue=QVariant().toString())
static void setUseQrencode(const bool &useQrencode)
static bool isNoLineWrapping(const bool &defaultValue=QVariant().toBool())
static void setAvoidNumbers(const bool &avoidNumbers)
static QPoint getPos(const QPoint &defaultValue=QVariant().toPoint())
static QSize getSize(const QSize &defaultValue=QVariant().toSize())
static void setAutoPush(const bool &autoPush)
static void setClipBoardType(const int &clipBoardType)
static void setSize(const QSize &size)
static bool isUseAutoclear(const bool &defaultValue=QVariant().toBool())
static QString getWebDavPassword(const QString &defaultValue=QVariant().toString())
static void setLessRandom(const bool &lessRandom)
static QString getGpgHome(const QString &defaultValue=QVariant().toString())
static bool isMaximized(const bool &defaultValue=QVariant().toBool())
static void setHideContent(const bool &hideContent)
static void setGeometry(const QByteArray &geometry)
static QString getPassExecutable(const QString &defaultValue=QVariant().toString())
static QString getGitExecutable(const QString &defaultValue=QVariant().toString())
static void setUseSelection(const bool &useSelection)
static void setTemplateAllFields(const bool &templateAllFields)
static void setUseSymbols(const bool &useSymbols)
static bool isAddGPGId(const bool &defaultValue=QVariant().toBool())
static bool isHidePassword(const bool &defaultValue=QVariant().toBool())
static bool isUseSelection(const bool &defaultValue=QVariant().toBool())
static void setUseGit(const bool &useGit)
Wrapper for executing pass to handle the password-store.
Definition: realpass.h:10
static const QString maximized
static const QString savestate
static const QString useSelection
static const QString passExecutable
static const QString noLineWrapping
static const QString autoPull
static const QString lessRandom
static const QString pwgenExecutable
static const QString geometry
static const QString gpgHome
static const QString version
static const QString passTemplate
static const QString useAutoclear
static const QString webDavUrl
static const QString clipBoardType
static const QString autoclearPanelSeconds
static const QString avoidNumbers
static const QString useAutoclearPanel
static const QString useWebDav
static const QString usePass
static const QString hideOnClose
static const QString alwaysOnTop
static const QString pos
static const QString useGit
static const QString gitExecutable
static const QString gpgExecutable
static const QString profile
static const QString useTrayIcon
static const QString size
static const QString useOtp
static const QString startMinimized
static const QString hideContent
static const QString avoidCapitals
static const QString webDavUser
static const QString autoclearSeconds
static const QString usePwgen
static const QString useMonospace
static const QString passwordLength
static const QString qrencodeExecutable
static const QString passStore
static const QString passwordChars
static const QString webDavPassword
static const QString displayAsIs
static const QString useSymbols
static const QString passSigningKey
static const QString templateAllFields
static const QString passwordCharsselection
static const QString addGPGId
static const QString useQrencode
static const QString useTemplate
static const QString autoPush
static const QString hidePassword
static QString findBinaryInPath(QString binary)
Util::findBinaryInPath search for executables.
Definition: util.cpp:90
clipBoardType
Definition: enums.h:10
Holds the Password configuration settings.
int length
Length of the password.
enum PasswordConfiguration::characterSet selected
characterSet
The selected character set.
QString Characters[CHARSETS_COUNT]
The different character sets.