Qt handles the "..." for too long table rows. Remove this functionality from Transact...
[novacoin.git] / src / qt / addressbookpage.h
1 #ifndef ADDRESSBOOKPAGE_H
2 #define ADDRESSBOOKPAGE_H
3
4 #include <QDialog>
5
6 namespace Ui {
7     class AddressBookPage;
8 }
9 class AddressTableModel;
10
11 QT_BEGIN_NAMESPACE
12 class QTableView;
13 class QItemSelection;
14 QT_END_NAMESPACE
15
16 class AddressBookPage : public QDialog
17 {
18     Q_OBJECT
19
20 public:
21     enum Tabs {
22         SendingTab = 0,
23         ReceivingTab = 1
24     };
25
26     enum Mode {
27         ForSending, // Pick address for sending
28         ForEditing  // Open address book for editing
29     };
30
31     explicit AddressBookPage(Mode mode, Tabs tab, QWidget *parent = 0);
32     ~AddressBookPage();
33
34     void setModel(AddressTableModel *model);
35     const QString &getReturnValue() const { return returnValue; }
36
37 public slots:
38     void done(int retval);
39
40 private:
41     Ui::AddressBookPage *ui;
42     AddressTableModel *model;
43     Mode mode;
44     Tabs tab;
45     QString returnValue;
46
47     QTableView *getCurrentTable();
48
49 private slots:
50     void on_buttonBox_accepted();
51     void on_deleteButton_clicked();
52     void on_newAddressButton_clicked();
53     void on_copyToClipboard_clicked();
54     void selectionChanged();
55 };
56
57 #endif // ADDRESSBOOKDIALOG_H