1#ifndef QTPASSSETTINGS_H
2#define QTPASSSETTINGS_H
25 QtPassSettings(
const QString &organization,
const QSettings::Format format)
26 : QSettings(organization, format) {}
27 QtPassSettings(
const QString &organization,
const QString &application)
28 : QSettings(organization, application) {}
32 static bool initialized;
36 static QScopedPointer<RealPass> realPass;
37 static QScopedPointer<ImitatePass> imitatePass;
43 getVersion(
const QString &defaultValue = QVariant().toString());
44 static void setVersion(
const QString &version);
47 getGeometry(
const QByteArray &defaultValue = QVariant().toByteArray());
48 static void setGeometry(
const QByteArray &geometry);
51 getSavestate(
const QByteArray &defaultValue = QVariant().toByteArray());
54 static QPoint
getPos(
const QPoint &defaultValue = QVariant().toPoint());
55 static void setPos(
const QPoint &pos);
57 static QSize
getSize(
const QSize &defaultValue = QVariant().toSize());
58 static void setSize(
const QSize &size);
60 static bool isMaximized(
const bool &defaultValue = QVariant().toBool());
63 static bool isUsePass(
const bool &defaultValue = QVariant().toBool());
72 static bool isUseSelection(
const bool &defaultValue = QVariant().toBool());
75 static bool isUseAutoclear(
const bool &defaultValue = QVariant().toBool());
89 static bool isHidePassword(
const bool &defaultValue = QVariant().toBool());
92 static bool isHideContent(
const bool &defaultValue = QVariant().toBool());
95 static bool isUseMonospace(
const bool &defaultValue = QVariant().toBool());
98 static bool isDisplayAsIs(
const bool &defaultValue = QVariant().toBool());
101 static bool isNoLineWrapping(
const bool &defaultValue = QVariant().toBool());
104 static bool isAddGPGId(
const bool &defaultValue = QVariant().toBool());
108 getPassStore(
const QString &defaultValue = QVariant().toString());
133 getGpgHome(
const QString &defaultValue = QVariant().toString());
135 static bool isUseWebDav(
const bool &defaultValue = QVariant().toBool());
139 getWebDavUrl(
const QString &defaultValue = QVariant().toString());
143 getWebDavUser(
const QString &defaultValue = QVariant().toString());
151 getProfile(
const QString &defaultValue = QVariant().toString());
152 static void setProfile(
const QString &profile);
154 static bool isUseGit(
const bool &defaultValue = QVariant().toBool());
155 static void setUseGit(
const bool &useGit);
157 static bool isUseOtp(
const bool &defaultValue = QVariant().toBool());
158 static void setUseOtp(
const bool &useOtp);
160 static bool isUseQrencode(
const bool &defaultValue = QVariant().toBool());
167 static bool isUsePwgen(
const bool &defaultValue = QVariant().toBool());
170 static bool isAvoidCapitals(
const bool &defaultValue = QVariant().toBool());
173 static bool isAvoidNumbers(
const bool &defaultValue = QVariant().toBool());
176 static bool isLessRandom(
const bool &defaultValue = QVariant().toBool());
179 static bool isUseSymbols(
const bool &defaultValue = QVariant().toBool());
188 static bool isUseTrayIcon(
const bool &defaultValue = QVariant().toBool());
191 static bool isHideOnClose(
const bool &defaultValue = QVariant().toBool());
194 static bool isStartMinimized(
const bool &defaultValue = QVariant().toBool());
197 static bool isAlwaysOnTop(
const bool &defaultValue = QVariant().toBool());
200 static bool isAutoPull(
const bool &defaultValue = QVariant().toBool());
203 static bool isAutoPush(
const bool &defaultValue = QVariant().toBool());
210 static bool isUseTemplate(
const bool &defaultValue = QVariant().toBool());
217 static QHash<QString, QHash<QString, QString>>
getProfiles();
219 setProfiles(
const QHash<QString, QHash<QString, QString>> &profiles);
Imitates pass features when pass is not enabled or available.
Acts as an abstraction for pass or pass imitation.
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 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.
Holds the Password configuration settings.