QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
appsettings.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2016 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
7#ifndef SRC_APPSETTINGS_H_
8#define SRC_APPSETTINGS_H_
9
10#include "enums.h"
12
13#include <QByteArray>
14#include <QPoint>
15#include <QSize>
16#include <QString>
17#include <QStringList>
18
42 static auto defaultSecretFieldNames() -> QStringList {
43 return {QStringLiteral("pin"), QStringLiteral("pincode"),
44 QStringLiteral("puk"), QStringLiteral("cvv"),
45 QStringLiteral("cvc"), QStringLiteral("secret"),
46 QStringLiteral("token"), QStringLiteral("key"),
47 QStringLiteral("passphrase"), QStringLiteral("password"),
48 QStringLiteral("recovery"), QStringLiteral("answer"),
49 QStringLiteral("seed"), QStringLiteral("mnemonic")};
50 }
51
52 // --- Window / session ---
53 QString version;
54 QByteArray geometry;
55 QByteArray savestate;
56 QString activeProfile;
57
58 // --- Backend selection / store ---
59 bool usePass{false};
60 QString passStore;
62
63 // --- Executables ---
65 QString gitExecutable;
66 QString gpgExecutable;
69 QString gpgHome;
71
72 // --- Clipboard / autoclear ---
75 bool useSelection{false};
76 bool useAutoclear{false};
79 bool restoreClipboard{true};
81 bool useAutoclearPanel{false};
83
84 // --- Content display ---
85 bool hidePassword{false};
88 bool hideSecretFields{true};
94 bool hideAllFields{false};
95 bool hideContent{false};
96 bool useMonospace{false};
97 bool displayAsIs{false};
98 bool noLineWrapping{false};
99
100 // --- Features ---
101 bool addGPGId{true};
102 bool useGit{false};
103 bool useGrepSearch{false};
104 bool useOtp{true};
105 bool useQrencode{false};
106 bool usePwgen{false};
107 bool autoPull{false};
108 bool autoPush{false};
112 bool showProcessOutput{false};
113 bool showMenuBar{false};
114
115 // --- Templates ---
116 QString passTemplate;
117 bool useTemplate{false};
118 bool templateAllFields{false};
119
120 // --- Password generation ---
122 bool avoidCapitals{false};
123 bool avoidNumbers{false};
124 bool lessRandom{false};
125 bool useSymbols{false};
126
127 // --- System / tray ---
128 bool useTrayIcon{false};
129 bool hideOnClose{false};
130 bool startMinimized{false};
131 bool alwaysOnTop{false};
132};
133
134#endif // SRC_APPSETTINGS_H_
The Enums namespace: clipboard behaviour and the identifiers of the subprocess kinds QtPass queues.
ClipBoardType
Defines when to copy passwords to clipboard.
Definition enums.h:24
@ CLIPBOARD_NEVER
Definition enums.h:25
Value object for the password generator: chosen character set, its alphabets and the length.
Plain value-object holding all flat QtPass configuration.
Definition appsettings.h:36
bool displayAsIs
Show file content unmodified.
Definition appsettings.h:97
QByteArray geometry
Main-window saved geometry.
Definition appsettings.h:54
bool useGrepSearch
Enable content (grep) search.
QString gpgExecutable
Path to the gpg/gpg2 executable.
Definition appsettings.h:66
QString qrencodeExecutable
Path to the qrencode executable.
Definition appsettings.h:68
QString sshAuthSockOverride
Manual SSH_AUTH_SOCK override path.
Definition appsettings.h:70
bool lessRandom
Generate memorable (less random) passwords.
bool useSymbols
Include special symbols.
bool hideOnClose
Hide to tray instead of quitting on close.
QStringList secretFieldNames
Definition appsettings.h:91
QString passSigningKey
GPG key used to sign .gpg-id files.
Definition appsettings.h:61
bool usePass
Use the pass CLI (true) or native git/gpg.
Definition appsettings.h:59
QString pwgenExecutable
Path to the pwgen executable.
Definition appsettings.h:67
bool hideContent
Hide the entire content panel.
Definition appsettings.h:95
bool useOtp
Enable native TOTP (OTP) support.
QString passStore
Password-store root path.
Definition appsettings.h:60
bool hidePassword
Definition appsettings.h:85
bool useAutoclearPanel
Clear the content panel after a delay.
Definition appsettings.h:81
bool noLineWrapping
Disable line wrapping in the panel.
Definition appsettings.h:98
bool showMenuBar
Show the menu bar (Ctrl+M toggles it).
QString gitExecutable
Path to the git executable.
Definition appsettings.h:65
QString gpgHome
GPG home directory (read-only externally).
Definition appsettings.h:69
static auto defaultSecretFieldNames() -> QStringList
The secret field names a new or emptied setting starts with: what an entry commonly holds besides its...
Definition appsettings.h:42
bool autoPull
Automatically git pull on open.
bool alwaysOnTop
Keep the main window always on top.
int autoclearPanelSeconds
Panel autoclear delay (seconds).
Definition appsettings.h:82
bool hideSecretFields
Definition appsettings.h:88
bool showProcessOutput
Show external process output.
bool startMinimized
Start the window minimised.
bool usePwgen
Use pwgen for password generation.
bool useTrayIcon
Show a system tray icon.
bool gitUseParentRepository
QString passExecutable
Path to the pass executable.
Definition appsettings.h:64
bool avoidCapitals
Exclude uppercase letters.
int autoclearSeconds
Clipboard autoclear delay (seconds).
Definition appsettings.h:80
bool useSelection
Use the X11 primary selection.
Definition appsettings.h:75
bool useGit
Enable git integration.
bool restoreClipboard
Definition appsettings.h:79
bool addGPGId
Auto-add .gpg-id files to git.
Enums::ClipBoardType clipBoardType
Clipboard copy behaviour.
Definition appsettings.h:73
bool hideAllFields
Definition appsettings.h:94
QString version
Last-run application version.
Definition appsettings.h:53
QByteArray savestate
Main-window saved dock/toolbar state.
Definition appsettings.h:55
QString passTemplate
Newline-separated template field names.
bool useAutoclear
Definition appsettings.h:76
bool useMonospace
Render content in a monospace font.
Definition appsettings.h:96
bool templateAllFields
Treat every key: line as a field.
bool avoidNumbers
Exclude digits.
bool useQrencode
Enable qrencode support.
QString activeProfile
Name of the active profile.
Definition appsettings.h:56
bool useTemplate
Use the password template.
PasswordConfiguration passwordConfiguration
Length/charset/custom chars.
Holds the password generator settings: which character set is selected, the alphabet of every set,...