From 2547f1f7e5dd6cb6397152047b67c4b2d4981c6b Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 3 Jun 2011 21:03:20 +0200 Subject: create new address from main gui, move address book model to client model --- gui/include/addresstablemodel.h | 4 ++-- gui/include/clientmodel.h | 6 +++++- gui/include/editaddressdialog.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'gui/include') diff --git a/gui/include/addresstablemodel.h b/gui/include/addresstablemodel.h index 1890260971..8799414334 100644 --- a/gui/include/addresstablemodel.h +++ b/gui/include/addresstablemodel.h @@ -35,9 +35,9 @@ public: bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()); /* Add an address to the model. - Returns true on success, false otherwise. + Returns the added address on success, and an empty string otherwise. */ - bool addRow(const QString &type, const QString &label, const QString &address); + QString addRow(const QString &type, const QString &label, const QString &address); /* Update address list from core. Invalidates any indices. */ diff --git a/gui/include/clientmodel.h b/gui/include/clientmodel.h index 01c0d70fc7..d68b34fe96 100644 --- a/gui/include/clientmodel.h +++ b/gui/include/clientmodel.h @@ -2,7 +2,9 @@ #define CLIENTMODEL_H #include + class OptionsModel; +class AddressTableModel; class ClientModel : public QObject { @@ -22,6 +24,7 @@ public: }; OptionsModel *getOptionsModel(); + AddressTableModel *getAddressTableModel(); qint64 getBalance(); QString getAddress(); @@ -34,7 +37,8 @@ public: /* Send coins */ StatusCode sendCoins(const QString &payTo, qint64 payAmount); private: - OptionsModel *options_model; + OptionsModel *optionsModel; + AddressTableModel *addressTableModel; signals: void balanceChanged(qint64 balance); diff --git a/gui/include/editaddressdialog.h b/gui/include/editaddressdialog.h index dd7766951b..6f396d0457 100644 --- a/gui/include/editaddressdialog.h +++ b/gui/include/editaddressdialog.h @@ -29,7 +29,7 @@ public: void setModel(AddressTableModel *model); void loadRow(int row); - void saveCurrentRow(); + QString saveCurrentRow(); private: Ui::EditAddressDialog *ui; -- cgit v1.2.3