コード例 #1
0
void WalletModel::update()
{
	qint64 newBalance = getBalance();
	qint64 newUnconfirmedBalance = getUnconfirmedBalance();
	int newNumTransactions = getNumTransactions();
	EncryptionStatus newEncryptionStatus = getEncryptionStatus();
	bool newMintStatus = getMintUnlockedbool();
        qint64 newReserveBalance = getCoinStakeReserveValue();

	if (cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance)
		emit balanceChanged(newBalance, getStake(), newUnconfirmedBalance);

	if (cachedNumTransactions != newNumTransactions)
		emit numTransactionsChanged(newNumTransactions);

	if (cachedEncryptionStatus != newEncryptionStatus)
		emit encryptionStatusChanged(newEncryptionStatus);
        
	if (cachedMintStatus != newMintStatus)
		emit mintStatusChanged(newMintStatus,newReserveBalance);

	cachedBalance = newBalance;
	cachedUnconfirmedBalance = newUnconfirmedBalance;
	cachedNumTransactions = newNumTransactions;
	cachedMintStatus = newMintStatus;
        cachedReserveBalance = newReserveBalance;
}
コード例 #2
0
void WalletModel::updateTransaction()
{
    // Balance and number of transactions might have changed
    checkBalanceChanged();

    int newNumTransactions = getNumTransactions();
    if(cachedNumTransactions != newNumTransactions)
    {
        cachedNumTransactions = newNumTransactions;
        emit numTransactionsChanged(newNumTransactions);
    }
}
コード例 #3
0
ファイル: walletmodel.cpp プロジェクト: djtms/altcoin
void WalletModel::updateTransaction(const QString &hash, int status)
{
    if(transactionTableModel)
        transactionTableModel->updateTransaction(hash, status);

    // Balance and number of transactions might have changed
    checkBalanceChanged();

    int newNumTransactions = getNumTransactions();
    if(cachedNumTransactions != newNumTransactions)
    {
        cachedNumTransactions = newNumTransactions;
        emit numTransactionsChanged(newNumTransactions);
    }
}
コード例 #4
0
ファイル: walletmodel.cpp プロジェクト: nullcoin/nullcoin
void WalletModel::updateTransaction(const QString &hash, int status)
{
    if(transactionTableModel)
        transactionTableModel->updateTransaction(hash, status);

    // Balance and number of transactions might have changed
    checkBalanceChanged();

    if(cachedUnconfirmedBalance || cachedImmatureBalance)
        pollTimer->start();

    int newNumTransactions = getNumTransactions();
    if(cachedNumTransactions != newNumTransactions) {
        emit numTransactionsChanged(newNumTransactions);
        cachedNumTransactions = newNumTransactions;
    }
}
コード例 #5
0
ファイル: walletmodel.cpp プロジェクト: DevAoD/AoD
void WalletModel::update()
{
    qint64 newBalance = getBalance();
    qint64 newUnconfirmedBalance = getUnconfirmedBalance();
    int newNumTransactions = getNumTransactions();
    EncryptionStatus newEncryptionStatus = getEncryptionStatus();

    if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance)
        emit balanceChanged(newBalance, getStake(), newUnconfirmedBalance);

    if(cachedNumTransactions != newNumTransactions)
        emit numTransactionsChanged(newNumTransactions);

    if(cachedEncryptionStatus != newEncryptionStatus)
        emit encryptionStatusChanged(newEncryptionStatus);

    cachedBalance = newBalance;
    cachedUnconfirmedBalance = newUnconfirmedBalance;
    cachedNumTransactions = newNumTransactions;
}