create new address from main gui, move address book model to client model

This commit is contained in:
Wladimir J. van der Laan
2011-06-03 21:03:20 +02:00
parent 9d9a4e874d
commit 2547f1f7e5
8 changed files with 49 additions and 20 deletions

View File

@@ -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.
*/

View File

@@ -2,7 +2,9 @@
#define CLIENTMODEL_H
#include <QObject>
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);

View File

@@ -29,7 +29,7 @@ public:
void setModel(AddressTableModel *model);
void loadRow(int row);
void saveCurrentRow();
QString saveCurrentRow();
private:
Ui::EditAddressDialog *ui;