-
Notifications
You must be signed in to change notification settings - Fork 2
/
AddressWidget.h
49 lines (38 loc) · 945 Bytes
/
AddressWidget.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
//
// Created by Arne Gockeln on 28.07.17.
//
#ifndef INC_2FA_ADDRESSWIDGET_H
#define INC_2FA_ADDRESSWIDGET_H
#include <QWidget>
#include <QItemSelection>
#include <QSortFilterProxyModel>
#include "TableModel.h"
#include <QTableView>
#include <QPushButton>
#include <QMenu>
#include <QAction>
#include "ServiceItem.h"
#include "AddDialog.h"
using namespace TwoFA;
class AddressWidget: public QWidget {
Q_OBJECT
public:
explicit AddressWidget(QWidget *t_parent = 0);
void readFromFile();
void writeToFile();
public slots:
void showAddEntryDialog();
void addEntry(ServiceItem& t_serviceItem);
void editEntry();
void removeEntry();
TableModel *getTableModel();
signals:
void selectionChanged(const QItemSelection &t_selected);
private:
TableModel *m_table;
QTableView *m_tableView;
QSortFilterProxyModel *m_proxyModel;
QPushButton *m_addButton;
QPushButton *m_delButton;
};
#endif //INC_2FA_ADDRESSWIDGET_H