forked from IJHack/QtPass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usersdialog.h
51 lines (41 loc) · 988 Bytes
/
usersdialog.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
#ifndef USERSDIALOG_H
#define USERSDIALOG_H
#include <QDialog>
#include <QList>
#include <QStandardItemModel>
#include <QCloseEvent>
#include <QDateTime>
namespace Ui {
class UsersDialog;
}
class QListWidgetItem;
struct UserInfo {
UserInfo() : validity('-'), have_secret(false), enabled(false) {}
QString name;
QString key_id;
char validity;
bool have_secret;
bool enabled;
QDateTime expiry;
QDateTime created;
};
class UsersDialog : public QDialog
{
Q_OBJECT
public:
explicit UsersDialog(QWidget *parent = 0);
~UsersDialog();
void setUsers(QList<UserInfo> *);
protected:
void closeEvent(QCloseEvent *event);
private slots:
void itemChange(QListWidgetItem *);
void on_clearButton_clicked();
void on_lineEdit_textChanged(const QString &filter);
void on_checkBox_clicked();
private:
Ui::UsersDialog *ui;
QList<UserInfo> *userList;
void populateList(const QString &filter);
};
#endif // USERSDIALOG_H