8#ifndef SRC_FIRSTRUNWIZARD_H_
9#define SRC_FIRSTRUNWIZARD_H_
58 static auto secretKeys(
const QString &gpgExecutable) -> QList<UserInfo>;
65 static auto isStore(
const QString &path) -> bool;
AppSettings, the value object holding every flat QtPass setting.
Last page: a summary of what Finish will do and the two preferences worth asking on day one.
QLabel * m_summary
Store, what Finish does with it, gpg, mode.
void initializePage() override
Fill the summary from the settings.
QCheckBox * m_trayIcon
Tray icon; hidden when there is no tray.
FirstRunWizard * m_wizard
Owner; its settings get the preferences.
QCheckBox * m_hidePassword
Show the password line as dots; on.
DoneWizardPage(FirstRunWizard *wizard)
Build the page.
auto validatePage() -> bool override
Store the preferences.
The first start of QtPass: find GnuPG (and pass and Git), make sure there is a secret key,...
@ DonePage
DoneWizardPage: summary and two preferences.
@ ProgramsPage
ProgramsWizardPage: where gpg, pass and git are.
@ KeyPage
KeyWizardPage: the secret keys, with generation.
@ StorePage
StoreWizardPage: the store folder and the Git choice.
@ IntroPage
What QtPass is and what the wizard will do.
auto initialiseStore(const QString &store) -> bool
Make store a password store for the ticked keys: create the folder when it is missing,...
void accept() override
Write the settings and, when the chosen store has no .gpg-id yet, create and initialise it for the ch...
auto initialiseGit(const QString &store) -> bool
Give an existing store the Git repository it was chosen to have.
static auto isStore(const QString &path) -> bool
Whether path points at an initialised store.
FirstRunWizard(QWidget *parent=nullptr)
Build the wizard from the current settings.
static auto secretKeys(const QString &gpgExecutable) -> QList< UserInfo >
The secret keys gpg lists for gpgExecutable.
auto settings() const -> AppSettings
The settings as the pages have edited them so far.
The secret keys gpg knows; a new pair can be generated here. The enabled ones become the recipients o...
QListWidget * m_list
One checkable row per secret key.
void initializePage() override
List the secret keys for the gpg chosen on the previous page.
void reload()
List the secret keys of the chosen gpg into the wizard and the widget, ticking every usable key and g...
auto isComplete() const -> bool override
Always passable: an existing store needs no recipient choice here (and its key may not be imported ye...
QPushButton * m_generate
Opens KeygenDialog.
void generate()
Run KeygenDialog on a private ImitatePass built from the wizard's settings, so the chosen gpg is used...
FirstRunWizard * m_wizard
Owner; holds the key list this page fills.
QLabel * m_status
Says so when gpg has no secret key yet.
auto validatePage() -> bool override
Remember which keys are enabled.
KeyWizardPage(FirstRunWizard *wizard)
Build the page.
Where gpg, pass and git are; gpg is required, the rest optional. A stored path that no longer runs is...
QLineEdit * m_gpg
The gpg executable; required.
QLineEdit * m_pass
The pass executable; optional.
QLineEdit * m_git
The git executable; optional.
FirstRunWizard * m_wizard
Owner; its settings are what the page edits.
void initializePage() override
Fill the fields from the settings (autodetection already ran).
QLabel * m_gpgStatus
Under the gpg field: why it cannot be used.
void updateStatus()
After an edit: say under the gpg field when it is missing or not executable, allow "use pass" only fo...
auto isComplete() const -> bool override
Whether the gpg path points at something that can run.
ProgramsWizardPage(FirstRunWizard *wizard)
Build the page.
auto validatePage() -> bool override
Store the paths and the pass/Git choices in the settings.
QCheckBox * m_usePass
Run pass instead of gpg/git; needs m_pass.
The folder the passwords live in: an existing store is used as-is, a folder without ....
StoreWizardPage(FirstRunWizard *wizard)
Build the page.
QLabel * m_status
What Finish will do with the folder.
auto validatePage() -> bool override
Store the path and the Git choice.
void initializePage() override
Show the configured store path.
auto recipients() const -> int
How many keys are ticked on the key page.
auto isComplete() const -> bool override
Whether a path is given and, for a folder that is not a store yet, at least one key was ticked to enc...
QLineEdit * m_path
The store folder, in native separators.
QCheckBox * m_useGit
Keep the store under Git; off without git.
FirstRunWizard * m_wizard
Owner; its settings get the path and flag.
void updateStatus()
After an edit: describe the folder (existing store with its entry count, empty folder,...
Plain value-object holding all flat QtPass configuration.
UserInfo, one GPG key as listed by gpg, with the selection flag the recipient dialogs use.