<translation>90 дней</translation>
</message>
<message>
+ <location filename="../mintingview.cpp" line="101"/>
+ <source>Copy transaction ID of input</source>
+ <translation>Скопировать ID транзакции входа</translation>
+ </message>
+ <message>
+ <location filename="../mintingview.cpp" line="102"/>
+ <source>Copy address of input</source>
+ <translation>Скопировать адрес входа</translation>
+ </message>
+ <message>
<location filename="../mintingview.cpp" line="167"/>
<source>Export Minting Data</source>
<translation>Экспортировать данные таблицы</translation>
<context>
<name>QObject</name>
<message>
- <source>Potential PoS reward = from %1 to %2 </source>
- <translation>Потенциальная PoS награда = от %1 до %2 </translation>
+ <source>from %1 NVC to %2 NVC</source>
+ <translation>от %1 NVC до %2 NVC</translation>
</message>
<message>
<source>%1 d</source>
#include <QLineEdit>
#include <QComboBox>
#include <QMessageBox>
+#include <QMenu>
MintingView::MintingView(QWidget *parent) :
QWidget(parent), model(0), mintingView(0)
connect(mintingCombo, SIGNAL(activated(int)), this, SLOT(chooseMintingInterval(int)));
+ // Actions
+ QAction *copyTxIDAction = new QAction(tr("Copy transaction ID of input"), this);
+ QAction *copyAddressAction = new QAction(tr("Copy address of input"), this);
+
+ contextMenu = new QMenu();
+ contextMenu->addAction(copyAddressAction);
+ contextMenu->addAction(copyTxIDAction);
+
+ connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress()));
+ connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
+
+ connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
}
mintingView->verticalHeader()->hide();
mintingView->horizontalHeader()->resizeSection(
- MintingTableModel::Address, 300);
-#if QT_VERSION < 0x050000
- mintingView->horizontalHeader()->setResizeMode(
- MintingTableModel::TxHash, QHeaderView::Stretch);
-#else
- mintingView->horizontalHeader()->setSectionResizeMode(
- MintingTableModel::TxHash, QHeaderView::Stretch);
-#endif
- mintingView->horizontalHeader()->resizeSection(
MintingTableModel::Age, 120);
mintingView->horizontalHeader()->resizeSection(
MintingTableModel::Balance, 120);
MintingTableModel::CoinDay,120);
mintingView->horizontalHeader()->resizeSection(
MintingTableModel::MintProbability, 120);
+#if QT_VERSION < 0x050000
+ mintingView->horizontalHeader()->setResizeMode(
+ MintingTableModel::MintReward, QHeaderView::Stretch);
+#else
+ mintingView->horizontalHeader()->setSectionResizeMode(MintingTableModel::MintReward, QHeaderView::Stretch);
+#endif
mintingView->horizontalHeader()->resizeSection(
- MintingTableModel::MintReward, 300);
+ MintingTableModel::Address, 0);
+ mintingView->horizontalHeader()->resizeSection(
+ MintingTableModel::TxHash, 0);
}
}
QMessageBox::Abort, QMessageBox::Abort);
}
}
+
+void MintingView::copyTxID()
+{
+ GUIUtil::copyEntryData(mintingView, MintingTableModel::TxHash, 0);
+}
+
+void MintingView::copyAddress()
+{
+ GUIUtil::copyEntryData(mintingView, MintingTableModel::Address, 0 );
+}
+
+void MintingView::contextualMenu(const QPoint &point)
+{
+ QModelIndex index = mintingView->indexAt(point);
+ if(index.isValid())
+ {
+ contextMenu->exec(QCursor::pos());
+ }
+}
\ No newline at end of file