Browse Source

WIP: Added bookmark UI.

kevaview
Just Wonder 5 years ago
parent
commit
66bd3aefba
  1. 7
      src/Makefile.qt.include
  2. 43
      src/qt/forms/kevabookmarksdialog.ui
  3. 2
      src/qt/forms/kevadialog.ui
  4. 78
      src/qt/kevabookmarksdialog.cpp
  5. 51
      src/qt/kevabookmarksdialog.h
  6. 152
      src/qt/kevabookmarksmodel.cpp
  7. 79
      src/qt/kevabookmarksmodel.h
  8. 24
      src/qt/kevadialog.cpp
  9. 1
      src/qt/kevadialog.h
  10. 16
      src/qt/walletmodel.cpp
  11. 5
      src/qt/walletmodel.h

7
src/Makefile.qt.include

@ -138,6 +138,7 @@ QT_FORMS_UI = \
qt/forms/kevadialog.ui \ qt/forms/kevadialog.ui \
qt/forms/kevadetaildialog.ui \ qt/forms/kevadetaildialog.ui \
qt/forms/kevaaddkeydialog.ui \ qt/forms/kevaaddkeydialog.ui \
qt/forms/kevabookmarksdialog.ui \
qt/forms/kevanewnamespacedialog.ui \ qt/forms/kevanewnamespacedialog.ui \
qt/forms/kevamynamespacesdialog.ui \ qt/forms/kevamynamespacesdialog.ui \
qt/forms/debugwindow.ui \ qt/forms/debugwindow.ui \
@ -180,8 +181,10 @@ QT_MOC_CPP = \
qt/moc_recentrequeststablemodel.cpp \ qt/moc_recentrequeststablemodel.cpp \
qt/moc_kevatablemodel.cpp \ qt/moc_kevatablemodel.cpp \
qt/moc_kevanamespacemodel.cpp \ qt/moc_kevanamespacemodel.cpp \
qt/moc_kevabookmarksmodel.cpp \
qt/moc_kevadetaildialog.cpp \ qt/moc_kevadetaildialog.cpp \
qt/moc_kevaaddkeydialog.cpp \ qt/moc_kevaaddkeydialog.cpp \
qt/moc_kevabookmarksdialog.cpp \
qt/moc_kevanewnamespacedialog.cpp \ qt/moc_kevanewnamespacedialog.cpp \
qt/moc_kevamynamespacesdialog.cpp \ qt/moc_kevamynamespacesdialog.cpp \
qt/moc_rpcconsole.cpp \ qt/moc_rpcconsole.cpp \
@ -273,8 +276,10 @@ BITCOIN_QT_H = \
qt/kevadialog.h \ qt/kevadialog.h \
qt/kevatablemodel.h \ qt/kevatablemodel.h \
qt/kevanamespacemodel.h \ qt/kevanamespacemodel.h \
qt/kevabookmarksmodel.h \
qt/kevadetaildialog.h \ qt/kevadetaildialog.h \
qt/kevaaddkeydialog.h \ qt/kevaaddkeydialog.h \
qt/kevabookmarksdialog.h \
qt/kevanewnamespacedialog.h \ qt/kevanewnamespacedialog.h \
qt/kevamynamespacesdialog.h \ qt/kevamynamespacesdialog.h \
qt/utilitydialog.h \ qt/utilitydialog.h \
@ -395,8 +400,10 @@ BITCOIN_QT_WALLET_CPP = \
qt/kevadialog.cpp \ qt/kevadialog.cpp \
qt/kevatablemodel.cpp \ qt/kevatablemodel.cpp \
qt/kevanamespacemodel.cpp \ qt/kevanamespacemodel.cpp \
qt/kevabookmarksmodel.cpp \
qt/kevadetaildialog.cpp \ qt/kevadetaildialog.cpp \
qt/kevaaddkeydialog.cpp \ qt/kevaaddkeydialog.cpp \
qt/kevabookmarksdialog.cpp \
qt/kevanewnamespacedialog.cpp \ qt/kevanewnamespacedialog.cpp \
qt/kevamynamespacesdialog.cpp \ qt/kevamynamespacesdialog.cpp \
qt/walletframe.cpp \ qt/walletframe.cpp \

43
src/qt/forms/kevabookmarksdialog.ui

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KevaBookmarksDialog</class>
<widget class="QDialog" name="KevaBookmarksDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Namespace Bookmarks</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTableView" name="namespaceView">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
</ui>

2
src/qt/forms/kevadialog.ui

@ -124,7 +124,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="receiveButton"> <widget class="QPushButton" name="bookmarksButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>

78
src/qt/kevabookmarksdialog.cpp

@ -0,0 +1,78 @@
// Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/kevabookmarksdialog.h>
#include <qt/forms/ui_kevabookmarksdialog.h>
#include <qt/kevabookmarksmodel.h>
#include <qt/kevadialog.h>
#include <QPushButton>
#include <QModelIndex>
KevaBookmarksDialog::KevaBookmarksDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::KevaBookmarksDialog)
{
ui->setupUi(this);
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
ui->buttonBox->button(QDialogButtonBox::Apply)->setText(tr("Show"));
connect(ui->buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject()));
connect(ui->buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply()));
}
void KevaBookmarksDialog::setModel(WalletModel *_model)
{
this->model = _model;
if(_model && _model->getOptionsModel())
{
_model->getKevaBookmarksModel()->sort(KevaBookmarksModel::Name, Qt::DescendingOrder);
QTableView* tableView = ui->namespaceView;
tableView->verticalHeader()->hide();
tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
tableView->setModel(_model->getKevaBookmarksModel());
tableView->setAlternatingRowColors(true);
tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
tableView->setSelectionMode(QAbstractItemView::ContiguousSelection);
tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
connect(tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(namespaceView_selectionChanged()));
}
}
void KevaBookmarksDialog::namespaceView_selectionChanged()
{
bool enable = !ui->namespaceView->selectionModel()->selectedRows().isEmpty();
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(enable);
if (enable) {
selectedIndex = ui->namespaceView->selectionModel()->currentIndex();
} else {
QModelIndex empty;
selectedIndex = empty;
}
}
void KevaBookmarksDialog::apply()
{
QModelIndex idIdx = selectedIndex.sibling(selectedIndex.row(), KevaBookmarksModel::Id);
QString idStr = idIdx.data(Qt::DisplayRole).toString();
KevaDialog* dialog = (KevaDialog*)this->parentWidget();
dialog->showNamespace(idStr);
QDialog::close();
}
void KevaBookmarksDialog::reject()
{
QDialog::reject();
}
KevaBookmarksDialog::~KevaBookmarksDialog()
{
delete ui;
}

51
src/qt/kevabookmarksdialog.h

@ -0,0 +1,51 @@
// Copyright (c) 2011-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_KEVABOOKMARKSDIALOG_H
#define BITCOIN_QT_KEVABOOKMARKSDIALOG_H
#include <QObject>
#include <QString>
#include <QDialog>
#include <QItemSelection>
#include <QAbstractItemView>
class WalletModel;
namespace Ui {
class KevaBookmarksDialog;
}
/** Dialog showing namepsace creation. */
class KevaBookmarksDialog : public QDialog
{
Q_OBJECT
enum ColumnWidths {
ID_COLUMN_WIDTH = 260,
NAME_COLUMN_WIDTH = 260,
MINIMUM_COLUMN_WIDTH = 260
};
public:
explicit KevaBookmarksDialog(QWidget *parent = 0);
~KevaBookmarksDialog();
void setModel(WalletModel *_model);
public Q_SLOTS:
void apply();
void reject();
private Q_SLOTS:
void namespaceView_selectionChanged();
private:
Ui::KevaBookmarksDialog *ui;
WalletModel *model;
QModelIndex selectedIndex;
};
#endif // BITCOIN_QT_KEVABOOKMARKSDIALOG_H

152
src/qt/kevabookmarksmodel.cpp

@ -0,0 +1,152 @@
// Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/kevabookmarksmodel.h>
#include <qt/bitcoinunits.h>
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
#include <clientversion.h>
#include <streams.h>
KevaBookmarksModel::KevaBookmarksModel(CWallet *wallet, WalletModel *parent) :
QAbstractTableModel(parent), walletModel(parent)
{
Q_UNUSED(wallet)
/* These columns must match the indices in the ColumnIndex enumeration */
columns << tr("Id") << tr("Name");
}
KevaBookmarksModel::~KevaBookmarksModel()
{
/* Intentionally left empty */
}
int KevaBookmarksModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return list.length();
}
int KevaBookmarksModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return columns.length();
}
QVariant KevaBookmarksModel::data(const QModelIndex &index, int role) const
{
if(!index.isValid() || index.row() >= list.length())
return QVariant();
if (role == Qt::TextColorRole)
{
return QVariant();
}
else if(role == Qt::DisplayRole || role == Qt::EditRole)
{
const BookmarkEntry *rec = &list[index.row()];
switch(index.column())
{
case Id:
return QString::fromStdString(rec->id);
case Name:
return QString::fromStdString(rec->name);
}
}
else if (role == Qt::TextAlignmentRole)
{
return (int)(Qt::AlignLeft|Qt::AlignVCenter);
}
return QVariant();
}
bool KevaBookmarksModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
return true;
}
QVariant KevaBookmarksModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if(orientation == Qt::Horizontal)
{
if(role == Qt::DisplayRole && section < columns.size())
{
return columns[section];
}
}
return QVariant();
}
QModelIndex KevaBookmarksModel::index(int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(parent);
return createIndex(row, column);
}
bool KevaBookmarksModel::removeRows(int row, int count, const QModelIndex &parent)
{
Q_UNUSED(parent);
if(count > 0 && row >= 0 && (row+count) <= list.size())
{
beginRemoveRows(parent, row, row + count - 1);
list.erase(list.begin() + row, list.begin() + row + count);
endRemoveRows();
return true;
} else {
return false;
}
}
Qt::ItemFlags KevaBookmarksModel::flags(const QModelIndex &index) const
{
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
}
// actually add to table in GUI
void KevaBookmarksModel::setBookmarks(std::vector<BookmarkEntry> vBookmarEntries)
{
// Remove the old ones.
removeRows(0, list.size());
list.clear();
for (auto it = vBookmarEntries.begin(); it != vBookmarEntries.end(); it++) {
beginInsertRows(QModelIndex(), 0, 0);
list.prepend(*it);
endInsertRows();
}
}
void KevaBookmarksModel::sort(int column, Qt::SortOrder order)
{
qSort(list.begin(), list.end(), BookmarkEntryLessThan(column, order));
Q_EMIT dataChanged(index(0, 0, QModelIndex()), index(list.size() - 1, NUMBER_OF_COLUMNS - 1, QModelIndex()));
}
bool BookmarkEntryLessThan::operator()(BookmarkEntry &left, BookmarkEntry &right) const
{
BookmarkEntry *pLeft = &left;
BookmarkEntry *pRight = &right;
if (order == Qt::DescendingOrder)
std::swap(pLeft, pRight);
switch(column)
{
case KevaBookmarksModel::Id:
return pLeft->id < pRight->id;
case KevaBookmarksModel::Name:
return pLeft->name < pRight->name;
default:
return pLeft->id < pRight->id;
}
}

79
src/qt/kevabookmarksmodel.h

@ -0,0 +1,79 @@
// Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_KEVABOOKMARKSMODEL_H
#define BITCOIN_QT_KEVABOOKMARKSMODEL_H
#include <qt/walletmodel.h>
#include <QAbstractTableModel>
#include <QStringList>
#include <QDateTime>
class CWallet;
class BookmarkEntry
{
public:
BookmarkEntry() { }
std::string id;
std::string name;
};
class BookmarkEntryLessThan
{
public:
BookmarkEntryLessThan(int nColumn, Qt::SortOrder fOrder):
column(nColumn), order(fOrder) {}
bool operator()(BookmarkEntry &left, BookmarkEntry &right) const;
private:
int column;
Qt::SortOrder order;
};
/** Model for list of recently generated payment requests / bitcoin: URIs.
* Part of wallet model.
*/
class KevaBookmarksModel: public QAbstractTableModel
{
Q_OBJECT
public:
explicit KevaBookmarksModel(CWallet *wallet, WalletModel *parent);
~KevaBookmarksModel();
enum ColumnIndex {
Id = 0,
Name = 1,
NUMBER_OF_COLUMNS
};
/** @name Methods overridden from QAbstractTableModel
@{*/
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
QModelIndex index(int row, int column, const QModelIndex &parent) const;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
Qt::ItemFlags flags(const QModelIndex &index) const;
/*@}*/
const BookmarkEntry &entry(int row) const { return list[row]; }
void setBookmarks(std::vector<BookmarkEntry> vBookmarkEntries);
public Q_SLOTS:
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
private:
WalletModel *walletModel;
QStringList columns;
QList<BookmarkEntry> list;
int64_t nReceiveRequestsMaxId;
};
#endif // BITCOIN_QT_KEVABOOKMARKSMODEL_H

24
src/qt/kevadialog.cpp

@ -13,11 +13,12 @@
#include <qt/bitcoinunits.h> #include <qt/bitcoinunits.h>
#include <qt/optionsmodel.h> #include <qt/optionsmodel.h>
#include <qt/platformstyle.h> #include <qt/platformstyle.h>
#include <qt/receiverequestdialog.h>
#include <qt/kevatablemodel.h> #include <qt/kevatablemodel.h>
#include <qt/kevanamespacemodel.h> #include <qt/kevanamespacemodel.h>
#include <qt/kevabookmarksmodel.h>
#include <qt/kevadetaildialog.h> #include <qt/kevadetaildialog.h>
#include <qt/kevaaddkeydialog.h> #include <qt/kevaaddkeydialog.h>
#include <qt/kevabookmarksdialog.h>
#include <qt/kevanewnamespacedialog.h> #include <qt/kevanewnamespacedialog.h>
#include <qt/kevamynamespacesdialog.h> #include <qt/kevamynamespacesdialog.h>
#include <qt/walletmodel.h> #include <qt/walletmodel.h>
@ -38,11 +39,11 @@ KevaDialog::KevaDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
if (!_platformStyle->getImagesOnButtons()) { if (!_platformStyle->getImagesOnButtons()) {
ui->receiveButton->setIcon(QIcon()); ui->bookmarksButton->setIcon(QIcon());
ui->showValueButton->setIcon(QIcon()); ui->showValueButton->setIcon(QIcon());
ui->removeButton->setIcon(QIcon()); ui->removeButton->setIcon(QIcon());
} else { } else {
ui->receiveButton->setIcon(_platformStyle->SingleColorIcon(":/icons/address-book")); ui->bookmarksButton->setIcon(_platformStyle->SingleColorIcon(":/icons/address-book"));
ui->showValueButton->setIcon(_platformStyle->SingleColorIcon(":/icons/edit")); ui->showValueButton->setIcon(_platformStyle->SingleColorIcon(":/icons/edit"));
ui->removeButton->setIcon(_platformStyle->SingleColorIcon(":/icons/remove")); ui->removeButton->setIcon(_platformStyle->SingleColorIcon(":/icons/remove"));
ui->addKVButton->setIcon(_platformStyle->SingleColorIcon(":/icons/add")); ui->addKVButton->setIcon(_platformStyle->SingleColorIcon(":/icons/add"));
@ -171,6 +172,23 @@ void KevaDialog::on_listNamespaces_clicked()
dialog->show(); dialog->show();
} }
void KevaDialog::on_bookmarksButton_clicked()
{
if(!model || !model->getKevaTableModel())
return;
KevaBookmarksDialog *dialog = new KevaBookmarksDialog(this);
std::vector<BookmarkEntry> vBookmarkEntries;
model->getKevaBookmarkEntries(vBookmarkEntries);
model->getKevaBookmarksModel()->setBookmarks(std::move(vBookmarkEntries));
model->getKevaBookmarksModel()->sort(KevaBookmarksModel::Name, Qt::DescendingOrder);
dialog->setModel(model);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
}
void KevaDialog::on_showContent_clicked() void KevaDialog::on_showContent_clicked()
{ {
if(!model || !model->getKevaTableModel()) if(!model || !model->getKevaTableModel())

1
src/qt/kevadialog.h

@ -75,6 +75,7 @@ private Q_SLOTS:
void on_addKVButton_clicked(); void on_addKVButton_clicked();
void on_kevaView_doubleClicked(const QModelIndex &index); void on_kevaView_doubleClicked(const QModelIndex &index);
void kevaView_selectionChanged(); void kevaView_selectionChanged();
void on_bookmarksButton_clicked();
void updateDisplayUnit(); void updateDisplayUnit();
void showMenu(const QPoint &point); void showMenu(const QPoint &point);
void copyURI(); void copyURI();

16
src/qt/walletmodel.cpp

@ -13,6 +13,7 @@
#include <qt/recentrequeststablemodel.h> #include <qt/recentrequeststablemodel.h>
#include <qt/kevatablemodel.h> #include <qt/kevatablemodel.h>
#include <qt/kevanamespacemodel.h> #include <qt/kevanamespacemodel.h>
#include <qt/kevabookmarksmodel.h>
#include <qt/sendcoinsdialog.h> #include <qt/sendcoinsdialog.h>
#include <qt/transactiontablemodel.h> #include <qt/transactiontablemodel.h>
@ -49,6 +50,7 @@ WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *_wallet, O
recentRequestsTableModel(0), recentRequestsTableModel(0),
kevaTableModel(0), kevaTableModel(0),
kevaNamespaceModel(0), kevaNamespaceModel(0),
kevaBookmarksModel(0),
cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0), cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0),
cachedEncryptionStatus(Unencrypted), cachedEncryptionStatus(Unencrypted),
cachedNumBlocks(0) cachedNumBlocks(0)
@ -61,6 +63,7 @@ WalletModel::WalletModel(const PlatformStyle *platformStyle, CWallet *_wallet, O
recentRequestsTableModel = new RecentRequestsTableModel(wallet, this); recentRequestsTableModel = new RecentRequestsTableModel(wallet, this);
kevaTableModel = new KevaTableModel(wallet, this); kevaTableModel = new KevaTableModel(wallet, this);
kevaNamespaceModel = new KevaNamespaceModel(wallet, this); kevaNamespaceModel = new KevaNamespaceModel(wallet, this);
kevaBookmarksModel = new KevaBookmarksModel(wallet, this);
// This timer will be fired repeatedly to update the balance // This timer will be fired repeatedly to update the balance
pollTimer = new QTimer(this); pollTimer = new QTimer(this);
@ -413,6 +416,11 @@ KevaNamespaceModel *WalletModel::getKevaNamespaceModel()
return kevaNamespaceModel; return kevaNamespaceModel;
} }
KevaBookmarksModel *WalletModel::getKevaBookmarksModel()
{
return kevaBookmarksModel;
}
WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const
{ {
if(!wallet->IsCrypted()) if(!wallet->IsCrypted())
@ -881,6 +889,14 @@ void WalletModel::getNamespaceEntries(std::vector<NamespaceEntry>& vNamespaceEnt
} }
} }
void WalletModel::getKevaBookmarkEntries(std::vector<BookmarkEntry>& vBookmarkEntries)
{
BookmarkEntry entry;
entry.id = "NgKBKkBAJMtzsuit85TpTpo5Xj6UQUg1wr";
entry.name = "Kevacoin Official Blog";
vBookmarkEntries.push_back(std::move(entry));
}
int WalletModel::createNamespace(std::string displayNameStr, std::string& namespaceId) int WalletModel::createNamespace(std::string displayNameStr, std::string& namespaceId)
{ {

5
src/qt/walletmodel.h

@ -23,8 +23,10 @@ class PlatformStyle;
class RecentRequestsTableModel; class RecentRequestsTableModel;
class KevaTableModel; class KevaTableModel;
class KevaNamespaceModel; class KevaNamespaceModel;
class KevaBookmarksModel;
class KevaEntry; class KevaEntry;
class NamespaceEntry; class NamespaceEntry;
class BookmarkEntry;
class TransactionTableModel; class TransactionTableModel;
class WalletModelTransaction; class WalletModelTransaction;
@ -142,6 +144,7 @@ public:
RecentRequestsTableModel *getRecentRequestsTableModel(); RecentRequestsTableModel *getRecentRequestsTableModel();
KevaTableModel *getKevaTableModel(); KevaTableModel *getKevaTableModel();
KevaNamespaceModel *getKevaNamespaceModel(); KevaNamespaceModel *getKevaNamespaceModel();
KevaBookmarksModel *getKevaBookmarksModel();
CAmount getBalance(const CCoinControl *coinControl = nullptr) const; CAmount getBalance(const CCoinControl *coinControl = nullptr) const;
CAmount getUnconfirmedBalance() const; CAmount getUnconfirmedBalance() const;
@ -235,6 +238,7 @@ public:
// Keva // Keva
void getKevaEntries(std::vector<KevaEntry>& vKevaEntries, std::string nameSpace); void getKevaEntries(std::vector<KevaEntry>& vKevaEntries, std::string nameSpace);
void getNamespaceEntries(std::vector<NamespaceEntry>& vNamespaceEntries); void getNamespaceEntries(std::vector<NamespaceEntry>& vNamespaceEntries);
void getKevaBookmarkEntries(std::vector<BookmarkEntry>& vBookmarkEntries);
int createNamespace(std::string displayName, std::string& namespaceId); int createNamespace(std::string displayName, std::string& namespaceId);
int deleteKevaEntry(std::string nameSpace, std::string key); int deleteKevaEntry(std::string nameSpace, std::string key);
@ -252,6 +256,7 @@ private:
RecentRequestsTableModel *recentRequestsTableModel; RecentRequestsTableModel *recentRequestsTableModel;
KevaTableModel *kevaTableModel; KevaTableModel *kevaTableModel;
KevaNamespaceModel *kevaNamespaceModel; KevaNamespaceModel *kevaNamespaceModel;
KevaBookmarksModel *kevaBookmarksModel;
// Cache some values to be able to detect changes // Cache some values to be able to detect changes
CAmount cachedBalance; CAmount cachedBalance;

Loading…
Cancel
Save