lbrycrd/src/qt/addressbookpage.h

57 lines
1.1 KiB
C
Raw Normal View History

2011-07-07 17:33:15 +02:00
#ifndef ADDRESSBOOKPAGE_H
#define ADDRESSBOOKPAGE_H
2011-05-08 22:23:31 +02:00
#include <QDialog>
2011-05-12 14:44:52 +02:00
namespace Ui {
2011-07-07 17:33:15 +02:00
class AddressBookPage;
2011-05-12 14:44:52 +02:00
}
class AddressTableModel;
2011-05-12 14:44:52 +02:00
2011-05-13 22:00:27 +02:00
QT_BEGIN_NAMESPACE
class QTableView;
class QItemSelection;
2011-05-13 22:00:27 +02:00
QT_END_NAMESPACE
2011-07-07 17:33:15 +02:00
class AddressBookPage : public QDialog
2011-05-08 22:23:31 +02:00
{
Q_OBJECT
2011-05-12 14:44:52 +02:00
2011-05-08 22:23:31 +02:00
public:
enum Tabs {
2011-05-12 14:44:52 +02:00
SendingTab = 0,
ReceivingTab = 1
};
enum Mode {
ForSending, // Pick address for sending
ForEditing // Open address book for editing
};
2011-07-07 17:33:15 +02:00
explicit AddressBookPage(Mode mode, Tabs tab, QWidget *parent = 0);
~AddressBookPage();
2011-05-08 22:23:31 +02:00
void setModel(AddressTableModel *model);
2011-05-13 22:00:27 +02:00
const QString &getReturnValue() const { return returnValue; }
2011-07-07 17:33:15 +02:00
public slots:
void done(int retval);
2011-05-12 14:44:52 +02:00
private:
2011-07-07 17:33:15 +02:00
Ui::AddressBookPage *ui;
AddressTableModel *model;
Mode mode;
2011-07-07 17:33:15 +02:00
Tabs tab;
2011-05-13 22:00:27 +02:00
QString returnValue;
QTableView *getCurrentTable();
2011-05-12 17:55:24 +02:00
private slots:
2011-05-13 22:00:27 +02:00
void on_deleteButton_clicked();
2011-05-12 17:55:24 +02:00
void on_newAddressButton_clicked();
void on_copyToClipboard_clicked();
void selectionChanged();
2011-05-08 22:23:31 +02:00
};
#endif // ADDRESSBOOKDIALOG_H