-
Notifications
You must be signed in to change notification settings - Fork 402
/
Copy pathhardwarekeystoredialog.h
76 lines (63 loc) · 2.1 KB
/
hardwarekeystoredialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef HARDWAREKEYSTOREDIALOG_H
#define HARDWAREKEYSTOREDIALOG_H
#include <QDialog>
#include <QStringList>
#include <QString>
namespace Ui {
class HardwareKeystoreDialog;
}
class HardwareKeystoreDialogPriv;
/**
* @brief The HardwareKeystoreDialog class Hardware keystore dialog
*/
class HardwareKeystoreDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief HardwareKeystoreDialog Constructor
* @param devices List of devices
* @param parent Parent widget
*/
explicit HardwareKeystoreDialog(const QStringList& devices, QWidget *parent = 0);
/**
* @brief ~HardwareKeystoreDialog Destructor
*/
~HardwareKeystoreDialog();
/**
* @brief currentIndex Get the currently selected index
* @return Current index
*/
int currentIndex() const;
/**
* @brief setCurrentIndex Set the currently selected index
* @param index Current index
*/
void setCurrentIndex(int index);
/**
* @brief SelectDevice Select hardware keystore device
* @param fingerprint Fingerprint of the selected device
* @param errorMessage Error message during device selection
* @param canceled Device selection canceled by the user
* @param stake Is stake app
* @param parent Parent widget
* @return true: device selected; false: device not selected
*/
static bool SelectDevice(QString& fingerprint, QString& errorMessage, bool& canceled, bool stake, QWidget *parent = 0);
/**
* @brief AskDevice Ask for hardware keystore device
* @param fingerprint Fingerprint of the device
* @param title Title of the message box to display
* @param message Message to display to the user
* @param stake Is stake app
* @return true: device selected; false: device not selected
*/
static bool AskDevice(QString& fingerprint, const QString& title, const QString& message, bool stake, QWidget *parent = 0);
private Q_SLOTS:
void on_cancelButton_clicked();
void on_okButton_clicked();
private:
Ui::HardwareKeystoreDialog *ui;
HardwareKeystoreDialogPriv *d;
};
#endif // HARDWAREKEYSTOREDIALOG_H