lbrycrd/src/qt/addressbookdialog.h

53 lines
1.1 KiB
C
Raw Normal View History

2011-05-08 22:23:31 +02:00
#ifndef ADDRESSBOOKDIALOG_H
#define ADDRESSBOOKDIALOG_H
#include <QDialog>
2011-05-12 14:44:52 +02:00
namespace Ui {
class AddressBookDialog;
}
class AddressTableModel;
2011-05-12 14:44:52 +02:00
2011-05-13 22:00:27 +02:00
QT_BEGIN_NAMESPACE
class QTableView;
QT_END_NAMESPACE
2011-05-08 22:23:31 +02:00
class AddressBookDialog : public QDialog
{
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
};
explicit AddressBookDialog(Mode mode, QWidget *parent = 0);
~AddressBookDialog();
2011-05-08 22:23:31 +02:00
void setModel(AddressTableModel *model);
2011-05-12 14:44:52 +02:00
void setTab(int tab);
2011-05-13 22:00:27 +02:00
const QString &getReturnValue() const { return returnValue; }
2011-05-12 14:44:52 +02:00
private:
Ui::AddressBookDialog *ui;
AddressTableModel *model;
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_buttonBox_accepted();
void on_deleteButton_clicked();
void on_tabWidget_currentChanged(int index);
2011-05-12 17:55:24 +02:00
void on_newAddressButton_clicked();
void on_editButton_clicked();
void on_copyToClipboard_clicked();
2011-05-08 22:23:31 +02:00
};
#endif // ADDRESSBOOKDIALOG_H