Changeset View
Changeset View
Standalone View
Standalone View
src/qt/addresstablemodel.h
// Copyright (c) 2011-2015 The Bitcoin Core developers | // Copyright (c) 2011-2015 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_QT_ADDRESSTABLEMODEL_H | #ifndef BITCOIN_QT_ADDRESSTABLEMODEL_H | ||||
#define BITCOIN_QT_ADDRESSTABLEMODEL_H | #define BITCOIN_QT_ADDRESSTABLEMODEL_H | ||||
#include <QAbstractTableModel> | #include <QAbstractTableModel> | ||||
#include <QStringList> | #include <QStringList> | ||||
enum class OutputType; | |||||
class AddressTablePriv; | class AddressTablePriv; | ||||
class WalletModel; | class WalletModel; | ||||
namespace interfaces { | namespace interfaces { | ||||
class Wallet; | class Wallet; | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | bool removeRows(int row, int count, | ||||
const QModelIndex &parent = QModelIndex()) override; | const QModelIndex &parent = QModelIndex()) override; | ||||
Qt::ItemFlags flags(const QModelIndex &index) const override; | Qt::ItemFlags flags(const QModelIndex &index) const override; | ||||
/*@}*/ | /*@}*/ | ||||
/* Add an address to the model. | /* Add an address to the model. | ||||
Returns the added address on success, and an empty string otherwise. | Returns the added address on success, and an empty string otherwise. | ||||
*/ | */ | ||||
QString addRow(const QString &type, const QString &label, | QString addRow(const QString &type, const QString &label, | ||||
const QString &address); | const QString &address, const OutputType address_type); | ||||
/* Look up label for address in address book, if not found return empty | /* Look up label for address in address book, if not found return empty | ||||
* string. | * string. | ||||
*/ | */ | ||||
QString labelForAddress(const QString &address) const; | QString labelForAddress(const QString &address) const; | ||||
/* Look up row index of an address in the model. | /* Look up row index of an address in the model. | ||||
Return -1 if not found. | Return -1 if not found. | ||||
Show All 24 Lines |