mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-31 01:04:20 +00:00
fix context menu items, add transaction ID item
This commit is contained in:
parent
1ead67cd11
commit
39e8aa306e
@ -53,10 +53,10 @@ KevaDialog::KevaDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// context menu actions
|
// context menu actions
|
||||||
QAction *copyURIAction = new QAction(tr("Copy URI"), this);
|
QAction *copyKeyAction = new QAction(tr("Copy key"), this);
|
||||||
QAction *copyLabelAction = new QAction(tr("Copy label"), this);
|
QAction *copyValueAction = new QAction(tr("Copy value"), this);
|
||||||
QAction *copyMessageAction = new QAction(tr("Copy message"), this);
|
QAction *copyBlockAction = new QAction(tr("Copy block height"), this);
|
||||||
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
|
QAction *copyTransactionAction = new QAction(tr("Copy transaction ID"), this);
|
||||||
|
|
||||||
bookmarks = new KevaBookmarksModel(NULL, NULL);
|
bookmarks = new KevaBookmarksModel(NULL, NULL);
|
||||||
bookmarks->loadBookmarks();
|
bookmarks->loadBookmarks();
|
||||||
@ -69,17 +69,17 @@ KevaDialog::KevaDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
|
|||||||
|
|
||||||
// context menu
|
// context menu
|
||||||
contextMenu = new QMenu(this);
|
contextMenu = new QMenu(this);
|
||||||
contextMenu->addAction(copyURIAction);
|
contextMenu->addAction(copyKeyAction);
|
||||||
contextMenu->addAction(copyLabelAction);
|
contextMenu->addAction(copyValueAction);
|
||||||
contextMenu->addAction(copyMessageAction);
|
contextMenu->addAction(copyBlockAction);
|
||||||
contextMenu->addAction(copyAmountAction);
|
contextMenu->addAction(copyTransactionAction);
|
||||||
|
|
||||||
// context menu signals
|
// context menu signals
|
||||||
connect(ui->kevaView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showMenu(QPoint)));
|
connect(ui->kevaView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showMenu(QPoint)));
|
||||||
connect(copyURIAction, SIGNAL(triggered()), this, SLOT(copyURI()));
|
connect(copyKeyAction, SIGNAL(triggered()), this, SLOT(copyKey()));
|
||||||
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel()));
|
connect(copyValueAction, SIGNAL(triggered()), this, SLOT(copyValue()));
|
||||||
connect(copyMessageAction, SIGNAL(triggered()), this, SLOT(copyMessage()));
|
connect(copyBlockAction, SIGNAL(triggered()), this, SLOT(copyBlock()));
|
||||||
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
|
connect(copyTransactionAction, SIGNAL(triggered()), this, SLOT(copyTransaction()));
|
||||||
|
|
||||||
connect(ui->nameSpace, SIGNAL(textChanged(const QString &)), this, SLOT(onNamespaceChanged(const QString &)));
|
connect(ui->nameSpace, SIGNAL(textChanged(const QString &)), this, SLOT(onNamespaceChanged(const QString &)));
|
||||||
}
|
}
|
||||||
@ -460,39 +460,29 @@ void KevaDialog::showMenu(const QPoint &point)
|
|||||||
contextMenu->exec(QCursor::pos());
|
contextMenu->exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
// context menu action: copy URI
|
// context menu action: copy key
|
||||||
void KevaDialog::copyURI()
|
void KevaDialog::copyKey()
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
QModelIndex sel = selectedRow();
|
|
||||||
if (!sel.isValid()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const KevaTableModel * const submodel = model->getKevaTableModel();
|
|
||||||
const QString uri = GUIUtil::formatBitcoinURI(submodel->entry(sel.row()).recipient);
|
|
||||||
GUIUtil::setClipboard(uri);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// context menu action: copy label
|
|
||||||
void KevaDialog::copyLabel()
|
|
||||||
{
|
{
|
||||||
copyColumnToClipboard(KevaTableModel::Key);
|
copyColumnToClipboard(KevaTableModel::Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
// context menu action: copy message
|
// context menu action: copy value
|
||||||
void KevaDialog::copyMessage()
|
void KevaDialog::copyValue()
|
||||||
{
|
{
|
||||||
copyColumnToClipboard(KevaTableModel::Value);
|
copyColumnToClipboard(KevaTableModel::Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// context menu action: copy amount
|
// context menu action: copy block
|
||||||
void KevaDialog::copyAmount()
|
void KevaDialog::copyBlock()
|
||||||
{
|
{
|
||||||
copyColumnToClipboard(KevaTableModel::Block);
|
copyColumnToClipboard(KevaTableModel::Block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// context menu action: copy transaction ID
|
||||||
|
void KevaDialog::copyTransaction()
|
||||||
|
{
|
||||||
|
copyColumnToClipboard(KevaTableModel::TransactionID);
|
||||||
|
}
|
||||||
|
|
||||||
int KevaDialog::createNamespace(std::string displayName, std::string& namespaceId)
|
int KevaDialog::createNamespace(std::string displayName, std::string& namespaceId)
|
||||||
{
|
{
|
||||||
|
@ -84,10 +84,10 @@ private Q_SLOTS:
|
|||||||
void on_bookmarkNamespace_clicked();
|
void on_bookmarkNamespace_clicked();
|
||||||
void updateDisplayUnit();
|
void updateDisplayUnit();
|
||||||
void showMenu(const QPoint &point);
|
void showMenu(const QPoint &point);
|
||||||
void copyURI();
|
void copyKey();
|
||||||
void copyLabel();
|
void copyValue();
|
||||||
void copyMessage();
|
void copyBlock();
|
||||||
void copyAmount();
|
void copyTransaction();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_QT_KEVADIALOG_H
|
#endif // BITCOIN_QT_KEVADIALOG_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user