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

@@ -2,11 +2,12 @@
#include "main.h"
#include "guiconstants.h"
#include "optionsmodel.h"
#include "addresstablemodel.h"
#include <QTimer>
ClientModel::ClientModel(QObject *parent) :
QObject(parent), options_model(0)
QObject(parent), optionsModel(0), addressTableModel(0)
{
/* Until we build signal notifications into the bitcoin core,
simply update everything using a timer.
@@ -15,7 +16,8 @@ ClientModel::ClientModel(QObject *parent) :
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
timer->start(MODEL_UPDATE_DELAY);
options_model = new OptionsModel(this);
optionsModel = new OptionsModel(this);
addressTableModel = new AddressTableModel(this);
}
qint64 ClientModel::getBalance()
@@ -128,5 +130,10 @@ ClientModel::StatusCode ClientModel::sendCoins(const QString &payTo, qint64 payA
OptionsModel *ClientModel::getOptionsModel()
{
return options_model;
return optionsModel;
}
AddressTableModel *ClientModel::getAddressTableModel()
{
return addressTableModel;
}