android: Fix XML form filter.
[qpwmc.git] / pwmdFileOptionsWidget.h
blobbc207437cb655116779317b48bbcf63262776f30
1 /*
2 Copyright (C) 2015-2023 Ben Kibbey <bjk@luxsci.net>
4 This file is part of qpwmc.
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 USA
21 #ifndef PWMDFILEOPTIONSWIDGET_H
22 #define PWMDFILEOPTIONSWIDGET_H
24 #include <QFrame>
25 #include "pwmd.h"
26 #include "pwmdClientInfo.h"
27 #include "ui_pwmdFileOptionsWidget.h"
29 class PwmdFileOptionsDialog;
30 class PwmdFileOptionsWidget : public QFrame
32 Q_OBJECT
33 public:
34 PwmdFileOptionsWidget (QWidget * = 0);
35 ~PwmdFileOptionsWidget ();
36 void setHandle (Pwmd *);
37 void setFilename (QString, bool opened = true);
38 bool lock ();
39 QString decryptKeyFile ();
40 bool updateCacheTimeout ();
41 void setLocked (bool);
43 signals:
44 void clientLockStateChanged (bool);
45 void commandsFinished ();
47 private slots:
48 void slotUpdateCacheTimeout ();
49 void slotClearCacheEntry ();
50 void slotChangePassword ();
51 void slotCacheTimeoutChanged (int);
52 void slotStatusMessage (QString, void *);
53 void slotCommandResult (PwmdCommandQueueItem *item, QString result,
54 gpg_error_t rc, bool queued);
55 void slotLock (int);
56 void slotNoTimeoutChanged (int);
57 void slotNotCachedChanged (int);
59 private:
60 void isCachedFinalize (gpg_error_t);
61 void cacheTimeoutFinalize (const QString &);
62 void updateCacheTimeoutFinalize (gpg_error_t);
63 void clearCacheEntryFinalize (gpg_error_t);
64 void keyInfoFinalize (gpg_error_t, const QString &);
65 void refreshClientInfoFinalize (const QString &);
67 Ui::PwmdFileOptionsWidget ui;
68 Pwmd *pwm;
69 bool _sym;
70 bool _sign;
71 QString _filename;
72 bool _opened;
73 QString _decryptKeyFile;
74 bool _finishing;
77 #endif