QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
templateio.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2014 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_TEMPLATEIO_H_
9
#define SRC_TEMPLATEIO_H_
10
11
#include <QHash>
12
#include <QString>
13
#include <QStringList>
14
24
class
TemplateIO {
25
public
:
31
static
auto
readTemplates
(
const
QString &storePath)
32
-> QHash<QString, QStringList>;
39
static
auto
writeTemplates
(
const
QString &storePath,
40
const
QHash<QString, QStringList> &templates)
41
-> bool;
49
static
auto
getFolderTemplate
(
const
QString &folderPath,
50
const
QString &storePath) -> QString;
51
64
static
auto
secretFieldsIn
(
const
QString &templateText) -> QStringList;
65
72
static
auto
readSecretFields
(
const
QString &storePath) -> QStringList;
73
81
static
auto
fieldsIn
(
const
QString &templateText) -> QStringList;
82
83
private
:
84
TemplateIO() =
default
;
85
};
86
87
#endif
// SRC_TEMPLATEIO_H_
TemplateIO::writeTemplates
static auto writeTemplates(const QString &storePath, const QHash< QString, QStringList > &templates) -> bool
Write templates to .templates file in password store.
Definition
templateio.cpp:147
TemplateIO::readTemplates
static auto readTemplates(const QString &storePath) -> QHash< QString, QStringList >
Read templates from .templates file in password store.
Definition
templateio.cpp:75
TemplateIO::fieldsIn
static auto fieldsIn(const QString &templateText) -> QStringList
The field names of the template in the settings: one per line, with comment lines (starting with #,...
Definition
templateio.cpp:139
TemplateIO::getFolderTemplate
static auto getFolderTemplate(const QString &folderPath, const QString &storePath) -> QString
Get default template for a folder. Looks in folder, then parent folders up to root.
Definition
templateio.cpp:176
TemplateIO::readSecretFields
static auto readSecretFields(const QString &storePath) -> QStringList
The field names the store's .templates file marks as secret, in any of its sections (see secretFields...
Definition
templateio.cpp:133
TemplateIO::secretFieldsIn
static auto secretFieldsIn(const QString &templateText) -> QStringList
The field names a template marks as secret.
Definition
templateio.cpp:111
src
templateio.h
Generated by
1.18.0