From 65fee98933b091f9cdcc8c830df0b0951a1074ee Mon Sep 17 00:00:00 2001 From: kvazar-network Date: Fri, 10 May 2024 16:17:21 +0300 Subject: [PATCH] implement extended record browser --- src/qt/forms/kevadetaildialog.ui | 310 ++++++++++++++++++++++++++----- src/qt/kevadetaildialog.cpp | 38 +++- 2 files changed, 294 insertions(+), 54 deletions(-) diff --git a/src/qt/forms/kevadetaildialog.ui b/src/qt/forms/kevadetaildialog.ui index 8c1df56a0..f196a6f7e 100644 --- a/src/qt/forms/kevadetaildialog.ui +++ b/src/qt/forms/kevadetaildialog.ui @@ -15,55 +15,269 @@ - - - - - - - - - - true - - - Qt::AlignLeft - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - Qt::PlainText - - - - - - - true + + + 0 - - - - - - true - - - Qt::AlignLeft - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - Qt::PlainText - + + + Data + + + + 0 + + + + + #scrollArea { background: transparent } + + + QFrame::NoFrame + + + true + + + Qt::ScrollBarAsNeeded + + + + #scrollAreaWidgetContents { background: transparent } + + + + + + + 0 + 0 + + + + + + + + true + + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + Qt::PlainText + + + + + + + #detailValue { background: transparent } + + + + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + Qt::PlainText + + + + + + + + + + + + Meta + + + + 10 + + + + + Date + + + + true + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Block + + + + true + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Namespace + + + + true + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Transaction ID + + + + true + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + diff --git a/src/qt/kevadetaildialog.cpp b/src/qt/kevadetaildialog.cpp index 34148bec3..1fb70fd8b 100644 --- a/src/qt/kevadetaildialog.cpp +++ b/src/qt/kevadetaildialog.cpp @@ -21,6 +21,11 @@ KevaDetailDialog::KevaDetailDialog(const QModelIndex &idx, QWidget *parent, cons this->nameSpace = nameSpace; setWindowTitle( + "Record browser" + ); + + // Data tab + ui->detailKey->setText( idx.sibling( idx.row(), KevaTableModel::Key @@ -29,21 +34,42 @@ KevaDetailDialog::KevaDetailDialog(const QModelIndex &idx, QWidget *parent, cons ).toString() ); - /* @TODO multi-tab data/meta browser - ui->detailKey->setText( + ui->detailValue->setText( idx.sibling( idx.row(), - KevaTableModel::Key + KevaTableModel::Value ).data( Qt::DisplayRole ).toString() ); - */ - ui->detailValue->setText( + // Meta tab + ui->detailDate->setText( idx.sibling( idx.row(), - KevaTableModel::Value + KevaTableModel::Date + ).data( + Qt::DisplayRole + ).toString() + ); + + ui->detailBlock->setText( + idx.sibling( + idx.row(), + KevaTableModel::Block + ).data( + Qt::DisplayRole + ).toString() + ); + + ui->detailNamespace->setText( + nameSpace + ); + + ui->detailTransaction->setText( + idx.sibling( + idx.row(), + KevaTableModel::TransactionID ).data( Qt::DisplayRole ).toString()