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