KWallet

querydriver.h
1/*
2 This file is part of the KDE
3 SPDX-FileCopyrightText: 2015 Valentin Rusu <kde@rusu.info>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include <QApplication>
11
12#include <KWallet>
13
14using namespace KWallet;
15
16class QueryDriver : public QApplication
17{
19public:
20 enum Mode { List, Read, Write };
21 QueryDriver(int &argc, char *argv[]);
22 ~QueryDriver() override;
23
24 void setWalletName(const QString &walletName);
25 void setMode(Mode mode);
26 void setVerbose()
27 {
28 verbose = true;
29 }
30 void setEntryName(const QString &entryName)
31 {
32 this->entryName = entryName;
33 }
34 void setEntryFolder(const QString &entryFolder)
35 {
36 this->entryFolder = entryFolder;
37 }
38
39private:
40 void timerEvent(QTimerEvent *event) override;
41 void readEntries();
42 void readValue();
43 void readMapValue();
44 void readPasswordValue();
45 void writeValue();
46
47private Q_SLOTS:
48 void walletOpened(bool);
49
50public:
51 QString walletName;
52 Wallet *theWallet = nullptr;
53 Mode mode;
54 bool verbose = false;
55 QString entryName;
56 QString entryFolder;
57};
KDE Wallet.
Definition kwallet.h:48
virtual bool event(QEvent *e) override
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:06 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.