mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
refactor: use new QAction style for governance list and masternode list
This commit is contained in:
parent
4f89c98dc4
commit
1cdd9fbdf5
@ -387,14 +387,12 @@ void GovernanceList::showProposalContextMenu(const QPoint& pos)
|
||||
return;
|
||||
}
|
||||
|
||||
// right click menu with option to open proposal url
|
||||
QString proposal_url = proposal->url();
|
||||
proposal_url.replace(QChar('&'), QString("&&"));
|
||||
|
||||
// right click menu with option to open proposal url
|
||||
QAction* openProposalUrl = new QAction(proposal_url, this);
|
||||
proposalContextMenu->clear();
|
||||
proposalContextMenu->addAction(openProposalUrl);
|
||||
connect(openProposalUrl, &QAction::triggered, proposal, &Proposal::openUrl);
|
||||
proposalContextMenu->addAction(proposal_url, proposal, &Proposal::openUrl);
|
||||
proposalContextMenu->exec(QCursor::pos());
|
||||
}
|
||||
|
||||
|
@ -81,15 +81,12 @@ MasternodeList::MasternodeList(QWidget* parent) :
|
||||
|
||||
ui->checkBoxMyMasternodesOnly->setEnabled(false);
|
||||
|
||||
QAction* copyProTxHashAction = new QAction(tr("Copy ProTx Hash"), this);
|
||||
QAction* copyCollateralOutpointAction = new QAction(tr("Copy Collateral Outpoint"), this);
|
||||
contextMenuDIP3 = new QMenu(this);
|
||||
contextMenuDIP3->addAction(copyProTxHashAction);
|
||||
contextMenuDIP3->addAction(copyCollateralOutpointAction);
|
||||
contextMenuDIP3->addAction(tr("Copy ProTx Hash"), this, &MasternodeList::copyProTxHash_clicked);
|
||||
contextMenuDIP3->addAction(tr("Copy Collateral Outpoint"), this, &MasternodeList::copyCollateralOutpoint_clicked);
|
||||
|
||||
connect(ui->tableWidgetMasternodesDIP3, &QTableWidget::customContextMenuRequested, this, &MasternodeList::showContextMenuDIP3);
|
||||
connect(ui->tableWidgetMasternodesDIP3, &QTableWidget::doubleClicked, this, &MasternodeList::extraInfoDIP3_clicked);
|
||||
connect(copyProTxHashAction, &QAction::triggered, this, &MasternodeList::copyProTxHash_clicked);
|
||||
connect(copyCollateralOutpointAction, &QAction::triggered, this, &MasternodeList::copyCollateralOutpoint_clicked);
|
||||
|
||||
timer = new QTimer(this);
|
||||
connect(timer, &QTimer::timeout, this, &MasternodeList::updateDIP3ListScheduled);
|
||||
|
Loading…
Reference in New Issue
Block a user