Add tips section
Add more tips Allow QT translations Fix tips
This commit is contained in:
parent
313a2b1722
commit
4f3851a722
|
@ -549,12 +549,57 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_tip_header">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Helpful tip of the day:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_tip">
|
||||
<property name="text">
|
||||
<string>Tip</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../bitcoin.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -129,6 +129,9 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
|
|||
ui->labelTransactionsStatus->setIcon(icon);
|
||||
ui->labelWalletStatus->setIcon(icon);
|
||||
|
||||
// Set tip of the day
|
||||
UpdateTip();
|
||||
|
||||
// Recent transactions
|
||||
ui->listTransactions->setItemDelegate(txdelegate);
|
||||
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
|
||||
|
@ -143,6 +146,25 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
|
|||
connect(ui->labelTransactionsStatus, SIGNAL(clicked()), this, SLOT(handleOutOfSyncWarningClicks()));
|
||||
}
|
||||
|
||||
void OverviewPage::UpdateTip()
|
||||
{
|
||||
QStringList tips = {
|
||||
tr("Never share your wallet.dat file/your private key with anyone"),
|
||||
tr("For more advanced settings use the console in 'Help' -> 'Debug Window'"),
|
||||
tr("Encrypt your wallet with a strong passphrase for maximum security"),
|
||||
tr("Make sure to keep your wallet updated."),
|
||||
tr("Backup your private key to recover your coins, using 'File' > 'Backup Wallet'"),
|
||||
tr("Always do your own research before using an external cryptocurrency service"),
|
||||
tr("Never share your private key to an untrustworthy person."),
|
||||
tr("Who own the private keys own the coins."),
|
||||
tr("To see ongoing development and contribute, checkout Dogecoin repository on GitHub!"),
|
||||
tr("Services that claim to double your dogecoins are always ponzi schemes")
|
||||
};
|
||||
|
||||
int i = rand() % tips.length();
|
||||
ui->label_tip->setText(tips[i]);
|
||||
}
|
||||
|
||||
void OverviewPage::handleTransactionClicked(const QModelIndex &index)
|
||||
{
|
||||
if(filter)
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
void setClientModel(ClientModel *clientModel);
|
||||
void setWalletModel(WalletModel *walletModel);
|
||||
void showOutOfSyncWarning(bool fShow);
|
||||
void UpdateTip();
|
||||
|
||||
public Q_SLOTS:
|
||||
void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
|
||||
|
|
Loading…
Reference in a new issue