6 #include "qt/settings/forms/ui_informationwidget.h"
17 #define REQUEST_UPDATE_COUNTS 0
25 this->setStyleSheet(parent->styleSheet());
29 ui->left->setContentsMargins(10,10,10,10);
30 setCssProperty({
ui->layoutOptions1,
ui->layoutOptions2,
ui->layoutOptions3},
"container-options");
36 ui->labelTitleDataDir,
37 ui->labelTitleBerkeley,
42 ui->labelTitleConnections,
43 ui->labelTitleMasternodes,
44 ui->labelTitleBlockNumber,
45 ui->labelTitleBlockTime,
46 ui->labelTitleBlockHash,
47 ui->labelTitleNumberTransactions,
48 ui->labelInfoNumberTransactions,
51 ui->labelInfoBerkeley,
54 ui->labelInfoConnections,
55 ui->labelInfoMasternodes,
56 ui->labelInfoBlockNumber
57 },
"text-main-settings");
60 ui->labelTitleGeneral,
61 ui->labelTitleNetwork,
62 ui->labelTitleBlockchain,
68 ui->labelTitleMemory->setVisible(
false);
69 ui->labelTitleNumberTransactions->setVisible(
false);
70 ui->labelInfoNumberTransactions->setText(
"0");
71 ui->labelInfoNumberTransactions->setVisible(
false);
74 ui->labelInfoName->setText(tr(
"Main"));
75 ui->labelInfoName->setProperty(
"cssClass",
"text-main-settings");
76 ui->labelInfoConnections->setText(
"0 (In: 0 / Out: 0)");
77 ui->labelInfoMasternodes->setText(
"Total: 0 (IPv4: 0 / IPv6: 0 / Tor: 0 / Unknown: 0");
80 ui->labelInfoBlockNumber->setText(
"0");
81 ui->labelInfoBlockTime->setText(
"Sept 6, 2018. Thursday, 8:21:49 PM");
82 ui->labelInfoBlockTime->setProperty(
"cssClass",
"text-main-grey");
83 ui->labelInfoBlockHash->setProperty(
"cssClass",
"text-main-hash");
93 ui->labelInfoBerkeley->setText(DbEnv::version(0, 0, 0));
95 ui->labelInfoBerkeley->setText(tr(
"No information"));
98 connect(
ui->pushButtonBackups, &QPushButton::clicked, [
this](){
99 if (!GUIUtil::showBackups())
100 inform(tr(
"Unable to open backups folder"));
102 connect(
ui->pushButtonFile, &QPushButton::clicked, [
this](){
103 if (!GUIUtil::openConfigfile())
104 inform(tr(
"Unable to open pivx.conf with default application"));
117 ui->labelInfoName->setText(QString::fromStdString(
Params().NetworkIDString()));
136 if (!netActivityState && numConnections == 0) {
137 connections = tr(
"Network activity disabled");
139 connections = QString::number(numConnections) +
" (";
142 if(!netActivityState) {
143 connections +=
" " + tr(
"Network activity disabled");
146 ui->labelInfoConnections->setText(connections);
163 if (!isVisible())
return;
164 ui->labelInfoBlockNumber->setText(QString::number(count));
173 ui->labelInfoMasternodes->setText(strMasternodes);
188 QWidget::showEvent(event);
197 QWidget::hideEvent(event);
206 QMetaObject::invokeMethod(
this,
"setMasternodeCount",
208 QMetaObject::invokeMethod(
this,
"setNumBlocks",
const CChainParams & Params()
Return the currently selected parameters.
QString getLastBlockHash() const
QString clientName() const
void startMasternodesTimer()
PeerTableModel * getPeerTableModel()
void numBlocksChanged(int count)
void stopMasternodesTimer()
QDateTime getLastBlockDate() const
void strMasternodesChanged(const QString &strMasternodes)
void numConnectionsChanged(int count)
bool getNetworkActive() const
Return true if network activity in core is enabled.
QString formatClientStartupTime() const
QString getMasternodesCountString()
int getNumConnections(unsigned int flags=CONNECTIONS_ALL) const
Return number of connections, default is in- and outbound (total)
BanTableModel * getBanTableModel()
QString formatFullVersion() const
int getLastBlockProcessedHeight() const
void networkActiveChanged(bool networkActive)
Local Bitcoin RPC console.
void setWalletModel(WalletModel *model)
void setClientModel(ClientModel *model)
void showNetwork()
Switch to network tab and show.
void setCssTitleScreen(QLabel *label)
void setCssProperty(std::initializer_list< QWidget * > args, const QString &value)
void setCssBtnSecondary(QPushButton *btn, bool forceUpdate)
bool error(const char *fmt, const Args &... args)