diff --git a/configure.ac b/configure.ac index 854884638..9ea6f95b0 100644 --- a/configure.ac +++ b/configure.ac @@ -3,9 +3,9 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 16) define(_CLIENT_VERSION_REVISION, 5) -define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 2) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2019) +define(_COPYRIGHT_YEAR, 2020) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Kevacoin Core]]) AC_INIT([Kevacoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/kevacoin-project/kevacoin/issues],[kevacoin],[https://kevacoin.org/]) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 81181b98d..baa779ae4 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -140,6 +140,7 @@ QT_FORMS_UI = \ qt/forms/kevaaddkeydialog.ui \ qt/forms/kevabookmarksdialog.ui \ qt/forms/kevanewnamespacedialog.ui \ + qt/forms/kevaeditbookmarkdialog.ui \ qt/forms/kevamynamespacesdialog.ui \ qt/forms/debugwindow.ui \ qt/forms/sendcoinsdialog.ui \ @@ -186,6 +187,7 @@ QT_MOC_CPP = \ qt/moc_kevaaddkeydialog.cpp \ qt/moc_kevabookmarksdialog.cpp \ qt/moc_kevanewnamespacedialog.cpp \ + qt/moc_kevaeditbookmarkdialog.cpp \ qt/moc_kevamynamespacesdialog.cpp \ qt/moc_rpcconsole.cpp \ qt/moc_sendcoinsdialog.cpp \ @@ -281,6 +283,7 @@ BITCOIN_QT_H = \ qt/kevaaddkeydialog.h \ qt/kevabookmarksdialog.h \ qt/kevanewnamespacedialog.h \ + qt/kevaeditbookmarkdialog.h \ qt/kevamynamespacesdialog.h \ qt/utilitydialog.h \ qt/walletframe.h \ @@ -405,6 +408,7 @@ BITCOIN_QT_WALLET_CPP = \ qt/kevaaddkeydialog.cpp \ qt/kevabookmarksdialog.cpp \ qt/kevanewnamespacedialog.cpp \ + qt/kevaeditbookmarkdialog.cpp \ qt/kevamynamespacesdialog.cpp \ qt/walletframe.cpp \ qt/walletmodel.cpp \ diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index 6aae59014..21ca71575 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -55,6 +55,8 @@ res/icons/hd_enabled.png res/icons/hd_disabled.png res/icons/network_disabled.png + res/icons/star.png + res/icons/star_empty.png res/movies/spinner-000.png diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 53b34cea7..ba936bba3 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -313,7 +313,7 @@ void BitcoinGUI::createActions() historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); - kevaAction = new QAction(platformStyle->SingleColorIcon(":/icons/keva"), tr("&Keva"), this); + kevaAction = new QAction(QIcon(":/icons/keva"), tr("&Keva"), this); kevaAction->setStatusTip(tr("Keva related operations")); kevaAction->setToolTip(kevaAction->statusTip()); kevaAction->setCheckable(true); diff --git a/src/qt/forms/kevabookmarksdialog.ui b/src/qt/forms/kevabookmarksdialog.ui index f1b1124a4..b237d450d 100644 --- a/src/qt/forms/kevabookmarksdialog.ui +++ b/src/qt/forms/kevabookmarksdialog.ui @@ -33,7 +33,7 @@ Qt::Horizontal - QDialogButtonBox::Apply|QDialogButtonBox::Cancel + QDialogButtonBox::Save|QDialogButtonBox::Ok|QDialogButtonBox::Close diff --git a/src/qt/forms/kevadialog.ui b/src/qt/forms/kevadialog.ui index 393ad632c..adb6272bb 100644 --- a/src/qt/forms/kevadialog.ui +++ b/src/qt/forms/kevadialog.ui @@ -1,329 +1,361 @@ - KevaDialog - - - - 0 - 0 - 776 - 396 - - - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - + KevaDialog + + + + 0 + 0 + 776 + 396 + + + - - - - - The namespace ID with a prefix "N". - - - - - - - Use this form to perform Keva database operations. - - - - - - - The namespace ID with a prefix "N". - - - Namespace: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - namespace - - - - - - - - - - 0 - 0 - - - - Show content of the namespace. - - - Show - - - - :/icons/eye:/icons/eye - - - false - - - - - - - - 0 - 0 - - - - Create a new namespace - - - &Create namespace - - - - :/icons/add:/icons/add - - - - - - - + + + 0 0 - - - - List my namespaces - - - &My Namespaces - - - - :/icons/editpaste:/icons/editpaste - - - - - - - - 0 - 0 - - - - Show bookmarks - - - &Bookmarks - - - - :/icons/address-book:/icons/address-book - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 10 - - - - - - - - - 0 - 0 - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - - - - 75 - true - - - - Content of namespace - - - - - - - Qt::CustomContextMenu - - - false - - - true - - - - - - - - - false + - - Show the selected request (does the same as double clicking an entry) + + QFrame::StyledPanel - - Show + + QFrame::Sunken - - - :/icons/edit:/icons/edit - - - false - - - - - - - false - - - Remove the selected entries from the list - - - Remove - - - - :/icons/remove:/icons/remove - - - false - - - - - - - false - - - Add new key-value pair - - - Add key-value + + + + + + + + + The namespace ID with a prefix "N". + + + 600 + + + + + + + Bookmark this namespace + + + + :/icons/star_empty:/icons/star_empty + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + Use this form to perform Keva database operations. + + + + + + + The namespace ID with a prefix "N". + + + Namespace: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + namespace + + + + + + + + + + 0 + 0 + + + + Show content of the namespace. + + + Show + + + + :/icons/eye:/icons/eye + + + false + + + + + + + + 0 + 0 + + + + Create a new namespace + + + &Create namespace + + + + :/icons/add:/icons/add + + + + + + + + 0 + 0 + + + + List my namespaces + + + &My Namespaces + + + + :/icons/editpaste:/icons/editpaste + + + + + + + + 0 + 0 + + + + Show bookmarks + + + &Bookmarks + + + + :/icons/address-book:/icons/address-book + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + + Qt::Vertical - - - :/icons/add:/icons/add + + + 20 + 10 + - - false + + + + + + + 0 + 0 + - - - - - - Qt::Horizontal + + QFrame::StyledPanel - - - 40 - 20 - + + QFrame::Raised - - - + + + + + + 75 + true + + + + Content of namespace + + + + + + + Qt::CustomContextMenu + + + false + + + true + + + + + + + + + false + + + Show the selected request (does the same as double clicking an entry) + + + Show + + + + :/icons/edit:/icons/edit + + + false + + + + + + + false + + + Remove the selected entries from the list + + + Remove + + + + :/icons/remove:/icons/remove + + + false + + + + + + + false + + + Add new key-value pair + + + Add key-value + + + + :/icons/add:/icons/add + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + - - - - - - - - BitcoinAmountField - QLineEdit -
qt/bitcoinamountfield.h
- 1 -
-
- - reqMessage - receiveButton - clearButton - recentRequestsView - showValueButton - removeButton - - - - - + + + + + BitcoinAmountField + QLineEdit +
qt/bitcoinamountfield.h
+ 1 +
+
+ + reqMessage + receiveButton + clearButton + recentRequestsView + showValueButton + removeButton + + + + +
diff --git a/src/qt/forms/kevaeditbookmarkdialog.ui b/src/qt/forms/kevaeditbookmarkdialog.ui new file mode 100644 index 000000000..8e8319c3a --- /dev/null +++ b/src/qt/forms/kevaeditbookmarkdialog.ui @@ -0,0 +1,60 @@ + + + KevaEditBookmarkDialog + + + + 0 + 0 + 400 + 100 + + + + Bookmark Name + + + + + + + + Bookmark name. + + + Name: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + bookmarkName + + + + + + + This pane allows change of bookmark name + + + false + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Save + + + + + + + diff --git a/src/qt/kevabookmarksdialog.cpp b/src/qt/kevabookmarksdialog.cpp index 0cc46892a..8bfe1a646 100644 --- a/src/qt/kevabookmarksdialog.cpp +++ b/src/qt/kevabookmarksdialog.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -16,10 +17,14 @@ KevaBookmarksDialog::KevaBookmarksDialog(QWidget *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())); + + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); + ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("&Show")); + ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false); + ui->buttonBox->button(QDialogButtonBox::Save)->setText(tr("&Edit")); + connect(ui->buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()), this, SLOT(reject())); + connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(apply())); + connect(ui->buttonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(rename())); } void KevaBookmarksDialog::setModel(WalletModel *_model) @@ -48,7 +53,8 @@ void KevaBookmarksDialog::setModel(WalletModel *_model) void KevaBookmarksDialog::namespaceView_selectionChanged() { bool enable = !ui->namespaceView->selectionModel()->selectedRows().isEmpty(); - ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(enable); + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(enable); + ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(enable); if (enable) { selectedIndex = ui->namespaceView->selectionModel()->currentIndex(); @@ -58,6 +64,12 @@ void KevaBookmarksDialog::namespaceView_selectionChanged() } } +void KevaBookmarksDialog::on_namespaceView_doubleClicked(const QModelIndex &index) +{ + selectedIndex = index; + this->apply(); +} + void KevaBookmarksDialog::apply() { QModelIndex idIdx = selectedIndex.sibling(selectedIndex.row(), KevaBookmarksModel::Id); @@ -67,6 +79,39 @@ void KevaBookmarksDialog::apply() QDialog::close(); } +void KevaBookmarksDialog::rename() +{ + QModelIndex idIdx = selectedIndex.sibling(selectedIndex.row(), KevaBookmarksModel::Id); + QString idStr = idIdx.data(Qt::DisplayRole).toString(); + QModelIndex nameIdx = selectedIndex.sibling(selectedIndex.row(), KevaBookmarksModel::Name); + QString nameStr = nameIdx.data(Qt::DisplayRole).toString(); + KevaEditBookmarkDialog *dialog = new KevaEditBookmarkDialog(this, idStr, nameStr); + dialog->setAttribute(Qt::WA_DeleteOnClose); + dialog->show(); +} + +void KevaBookmarksDialog::saveName(const QString& id, const QString& name) +{ + QJsonArray array; + KevaBookmarksModel* bookmarksModel = this->model->getKevaBookmarksModel(); + bookmarksModel->loadBookmarks(array); + + for (int i = 0; i < array.size(); ++i) { + QJsonObject obj = array[i].toObject(); + BookmarkEntry entry; + QString idStr = obj["id"].toString(); + if (idStr == id) { + QJsonObject entry; + entry["id"] = id; + entry["name"] = name; + array.replace(i, entry); + break; + } + } + bookmarksModel->saveBookmarks(array); + bookmarksModel->loadBookmarks(); +} + void KevaBookmarksDialog::reject() { QDialog::reject(); diff --git a/src/qt/kevabookmarksdialog.h b/src/qt/kevabookmarksdialog.h index cd96d71f1..310a1af9f 100644 --- a/src/qt/kevabookmarksdialog.h +++ b/src/qt/kevabookmarksdialog.h @@ -18,7 +18,6 @@ namespace Ui { class KevaBookmarksDialog; } - /** Dialog showing namepsace creation. */ class KevaBookmarksDialog : public QDialog { @@ -38,9 +37,12 @@ public: public Q_SLOTS: void apply(); void reject(); + void rename(); + void saveName(const QString& id, const QString& name); private Q_SLOTS: void namespaceView_selectionChanged(); + void on_namespaceView_doubleClicked(const QModelIndex &index); private: Ui::KevaBookmarksDialog *ui; diff --git a/src/qt/kevabookmarksmodel.cpp b/src/qt/kevabookmarksmodel.cpp index 9e823f806..939b37b13 100644 --- a/src/qt/kevabookmarksmodel.cpp +++ b/src/qt/kevabookmarksmodel.cpp @@ -146,6 +146,16 @@ void KevaBookmarksModel::setBookmarks(QJsonArray &array) setBookmarks(std::move(vBookmarEntries)); } +bool KevaBookmarksModel::isBookmarked(std::string& ns) +{ + for (int i = 0; i < list.size(); ++i) { + if (list.at(i).id == ns) { + return true; + } + } + return false; +} + void KevaBookmarksModel::sort(int column, Qt::SortOrder order) { qSort(list.begin(), list.end(), BookmarkEntryLessThan(column, order)); diff --git a/src/qt/kevabookmarksmodel.h b/src/qt/kevabookmarksmodel.h index b2821b3a1..9c7d428a9 100644 --- a/src/qt/kevabookmarksmodel.h +++ b/src/qt/kevabookmarksmodel.h @@ -74,6 +74,7 @@ public: int loadBookmarks(); int loadBookmarks(QJsonArray &json); int saveBookmarks(QJsonArray &json); + bool isBookmarked(std::string& ns); public Q_SLOTS: void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); diff --git a/src/qt/kevadialog.cpp b/src/qt/kevadialog.cpp index c9e5230ca..2891aac01 100644 --- a/src/qt/kevadialog.cpp +++ b/src/qt/kevadialog.cpp @@ -55,6 +55,15 @@ KevaDialog::KevaDialog(const PlatformStyle *_platformStyle, QWidget *parent) : QAction *copyMessageAction = new QAction(tr("Copy message"), this); QAction *copyAmountAction = new QAction(tr("Copy amount"), this); + bookmarks = new KevaBookmarksModel(NULL, NULL); + bookmarks->loadBookmarks(); + + ui->kevaView->setTextElideMode(Qt::ElideRight); + ui->kevaView->setWordWrap(false); + QHeaderView *verticalHeader = ui->kevaView->verticalHeader(); + verticalHeader->setSectionResizeMode(QHeaderView::Fixed); + verticalHeader->setDefaultSectionSize(36); + // context menu contextMenu = new QMenu(this); contextMenu->addAction(copyURIAction); @@ -147,10 +156,23 @@ void KevaDialog::onNamespaceChanged(const QString& nameSpace) { std::string namespaceStr = nameSpace.toStdString(); valtype nameSpaceVal; + bool isValidNamespace = false; if (DecodeKevaNamespace(namespaceStr, Params(), nameSpaceVal)) { ui->addKVButton->setEnabled(true); + isValidNamespace = true; } else { ui->addKVButton->setEnabled(false); + ui->bookmarkNamespace->setIcon(QIcon(":/icons/star_empty")); + } + + if (!isValidNamespace) { + return; + } + + if (bookmarks->isBookmarked(namespaceStr)) { + ui->bookmarkNamespace->setIcon(QIcon(":/icons/star")); + } else { + ui->bookmarkNamespace->setIcon(QIcon(":/icons/star_empty")); } } @@ -213,6 +235,54 @@ void KevaDialog::on_kevaView_doubleClicked(const QModelIndex &index) dialog->show(); } +void KevaDialog::on_bookmarkNamespace_clicked() +{ + valtype namespaceVal; + QString nameSpace = ui->nameSpace->text(); + std::string namespaceStr = nameSpace.toStdString(); + if (!DecodeKevaNamespace(namespaceStr, Params(), namespaceVal)) { + return; + } + QJsonArray array; + bookmarks->loadBookmarks(array); + + int index = -1; + for (int i = 0; i < array.size(); ++i) { + QJsonObject obj = array[i].toObject(); + BookmarkEntry entry; + std::string id = obj["id"].toString().toStdString(); + if (id == namespaceStr) { + index = i; + break; + } + } + + if (index >= 0) { + // Remove bookmark + array.removeAt(index); + ui->bookmarkNamespace->setIcon(QIcon(":/icons/star_empty")); + } else { + // Add bookmark + QJsonObject entry; + entry["id"] = namespaceStr.c_str(); + entry["name"] = ""; + + std::vector vNamespaceEntries; + this->model->getNamespaceEntries(vNamespaceEntries); + for(auto it = vNamespaceEntries.begin(); it != vNamespaceEntries.end(); it++) { + if ((*it).id == namespaceStr) { + entry["name"] = (*it).name.c_str(); + break; + } + } + + array.prepend(entry); + ui->bookmarkNamespace->setIcon(QIcon(":/icons/star")); + } + + bookmarks->saveBookmarks(array); +} + void KevaDialog::kevaView_selectionChanged() { // Enable Show/Remove buttons only if anything is selected. diff --git a/src/qt/kevadialog.h b/src/qt/kevadialog.h index 66b9958c2..2820ca310 100644 --- a/src/qt/kevadialog.h +++ b/src/qt/kevadialog.h @@ -17,6 +17,7 @@ class PlatformStyle; class WalletModel; +class KevaBookmarksModel; namespace Ui { class KevaDialog; @@ -62,6 +63,7 @@ private: WalletModel *model; QMenu *contextMenu; const PlatformStyle *platformStyle; + KevaBookmarksModel* bookmarks; QModelIndex selectedRow(); void copyColumnToClipboard(int column); @@ -77,6 +79,7 @@ private Q_SLOTS: void on_kevaView_doubleClicked(const QModelIndex &index); void kevaView_selectionChanged(); void on_bookmarksButton_clicked(); + void on_bookmarkNamespace_clicked(); void updateDisplayUnit(); void showMenu(const QPoint &point); void copyURI(); diff --git a/src/qt/kevaeditbookmarkdialog.cpp b/src/qt/kevaeditbookmarkdialog.cpp new file mode 100644 index 000000000..c866c7ce5 --- /dev/null +++ b/src/qt/kevaeditbookmarkdialog.cpp @@ -0,0 +1,53 @@ +// 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 +#include +#include + +#include +#include + +#include +#include + +KevaEditBookmarkDialog::KevaEditBookmarkDialog(QWidget *parent, const QString& id, const QString& name) : + QDialog(parent), id(id), name(name), + ui(new Ui::KevaEditBookmarkDialog) +{ + ui->setupUi(this); + ui->bookmarkName->setText(name); + this->parentDialog = (KevaBookmarksDialog*)parent; + + connect(ui->buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(close())); + connect(ui->buttonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(save())); + connect(ui->bookmarkName, SIGNAL(textChanged(const QString &)), this, SLOT(onNameChanged(const QString &))); + ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false); +} + +void KevaEditBookmarkDialog::onNameChanged(const QString & name) +{ + int length = name.length(); + bool enabled = length > 0; + ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(enabled); + this->name = name; +} + +void KevaEditBookmarkDialog::save() +{ + KevaDialog* dialog = (KevaDialog*)this->parentWidget(); + QString bookmarkText = ui->bookmarkName->text(); + this->parentDialog->saveName(id, name); + QDialog::close(); +} + +void KevaEditBookmarkDialog::close() +{ + QDialog::close(); +} + +KevaEditBookmarkDialog::~KevaEditBookmarkDialog() +{ + delete ui; +} \ No newline at end of file diff --git a/src/qt/kevaeditbookmarkdialog.h b/src/qt/kevaeditbookmarkdialog.h new file mode 100644 index 000000000..5e9c443ff --- /dev/null +++ b/src/qt/kevaeditbookmarkdialog.h @@ -0,0 +1,41 @@ +// 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_KEVAEDITBOOKMARKDIALOG_H +#define BITCOIN_QT_KEVAEDITBOOKMARKDIALOG_H + +#include +#include + +#include + +namespace Ui { + class KevaEditBookmarkDialog; +} + +class KevaBookmarksDialog; + + +/** Dialog showing namepsace creation. */ +class KevaEditBookmarkDialog : public QDialog +{ + Q_OBJECT + +public: + explicit KevaEditBookmarkDialog(QWidget *parent, const QString& id, const QString& name); + ~KevaEditBookmarkDialog(); + +public Q_SLOTS: + void save(); + void close(); + void onNameChanged(const QString & ns); + +private: + Ui::KevaEditBookmarkDialog *ui; + QString id; + QString name; + KevaBookmarksDialog* parentDialog; +}; + +#endif // BITCOIN_QT_KEVAEDITBOOKMARKDIALOG_H diff --git a/src/qt/kevamynamespacesdialog.cpp b/src/qt/kevamynamespacesdialog.cpp index 191f08612..d76d62de0 100644 --- a/src/qt/kevamynamespacesdialog.cpp +++ b/src/qt/kevamynamespacesdialog.cpp @@ -60,6 +60,12 @@ void KevaMyNamespacesDialog::namespaceView_selectionChanged() } } +void KevaMyNamespacesDialog::on_namespaceView_doubleClicked(const QModelIndex &index) +{ + selectedIndex = ui->namespaceView->selectionModel()->currentIndex(); + this->apply(); +} + void KevaMyNamespacesDialog::apply() { QModelIndex idIdx = selectedIndex.sibling(selectedIndex.row(), KevaNamespaceModel::Id); diff --git a/src/qt/kevamynamespacesdialog.h b/src/qt/kevamynamespacesdialog.h index b8ed56cad..2b79281fd 100644 --- a/src/qt/kevamynamespacesdialog.h +++ b/src/qt/kevamynamespacesdialog.h @@ -41,6 +41,7 @@ public Q_SLOTS: private Q_SLOTS: void namespaceView_selectionChanged(); + void on_namespaceView_doubleClicked(const QModelIndex &index); private: Ui::KevaMyNamespacesDialog *ui; diff --git a/src/qt/kevatablemodel.cpp b/src/qt/kevatablemodel.cpp index 08327be60..ea9ce1aa5 100644 --- a/src/qt/kevatablemodel.cpp +++ b/src/qt/kevatablemodel.cpp @@ -75,6 +75,11 @@ QVariant KevaTableModel::data(const QModelIndex &index, int role) const { if (index.column() == Block) return (int)(Qt::AlignRight|Qt::AlignVCenter); + else if (index.column() == Value) { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) + return (int)(Qt::AlignLeft|Qt::AlignTop); +#endif + } } return QVariant(); } diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 384cb904d..521956601 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -1181,8 +1181,8 @@ KevaBookmarksDialog - - Show + + &Edit @@ -1215,7 +1215,7 @@ KevaDialog - + Show the selected request (does the same as double clicking an entry) @@ -1226,13 +1226,18 @@ - - + + The namespace ID with a prefix "N". - + + Bookmark this namespace + + + + Use this form to perform Keva database operations. @@ -1322,7 +1327,7 @@ - + Warning Warning @@ -1376,6 +1381,24 @@ + + KevaEditBookmarkDialog + + + Bookmark name. + + + + + Name: + + + + + This pane allows change of bookmark name + + + KevaMyNamespacesDialog @@ -1438,7 +1461,7 @@ - + Requested diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index 8c5b70ce1..fe2f200b4 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -925,9 +925,13 @@ KevaBookmarksDialog - Show + &Show 显示 + + &Edit + 编辑 + KevaBookmarksModel diff --git a/src/qt/res/icons/keva.png b/src/qt/res/icons/keva.png index aa342e03c..6179c0230 100644 Binary files a/src/qt/res/icons/keva.png and b/src/qt/res/icons/keva.png differ diff --git a/src/qt/res/icons/star.png b/src/qt/res/icons/star.png index 79868e2cb..95b948f8c 100644 Binary files a/src/qt/res/icons/star.png and b/src/qt/res/icons/star.png differ diff --git a/src/qt/res/icons/star_empty.png b/src/qt/res/icons/star_empty.png index 87a5472b8..fb04dd010 100644 Binary files a/src/qt/res/icons/star_empty.png and b/src/qt/res/icons/star_empty.png differ