mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-09 02:42:32 +02:00
Merge g757 via qt_addrbook_walletname-0.18
This commit is contained in:
commit
a81ccd2654
@ -164,6 +164,7 @@ void AddressBookPage::setModel(AddressTableModel *_model)
|
|||||||
connect(_model, &AddressTableModel::rowsInserted, this, &AddressBookPage::selectNewAddress);
|
connect(_model, &AddressTableModel::rowsInserted, this, &AddressBookPage::selectNewAddress);
|
||||||
|
|
||||||
selectionChanged();
|
selectionChanged();
|
||||||
|
this->updateWindowsTitleWithWalletName();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBookPage::on_copyAddress_clicked()
|
void AddressBookPage::on_copyAddress_clicked()
|
||||||
@ -328,3 +329,16 @@ void AddressBookPage::selectNewAddress(const QModelIndex &parent, int begin, int
|
|||||||
newAddressToSelect.clear();
|
newAddressToSelect.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddressBookPage::updateWindowsTitleWithWalletName()
|
||||||
|
{
|
||||||
|
const QString walletName = this->model->GetWalletDisplayName();
|
||||||
|
|
||||||
|
if (mode == ForEditing) {
|
||||||
|
switch(tab)
|
||||||
|
{
|
||||||
|
case SendingTab: setWindowTitle(tr("Sending addresses - %1").arg(walletName)); break;
|
||||||
|
case ReceivingTab: setWindowTitle(tr("Receiving addresses - %1").arg(walletName)); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -56,6 +56,7 @@ private:
|
|||||||
AddressBookSortFilterProxyModel *proxyModel;
|
AddressBookSortFilterProxyModel *proxyModel;
|
||||||
QMenu *contextMenu;
|
QMenu *contextMenu;
|
||||||
QString newAddressToSelect;
|
QString newAddressToSelect;
|
||||||
|
void updateWindowsTitleWithWalletName();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
/** Delete currently selected address entry */
|
/** Delete currently selected address entry */
|
||||||
|
@ -450,3 +450,5 @@ void AddressTableModel::emitDataChanged(int idx)
|
|||||||
{
|
{
|
||||||
Q_EMIT dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex()));
|
Q_EMIT dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString AddressTableModel::GetWalletDisplayName() const { return walletModel->getDisplayName(); };
|
||||||
|
@ -87,6 +87,8 @@ public:
|
|||||||
|
|
||||||
OutputType GetDefaultAddressType() const;
|
OutputType GetDefaultAddressType() const;
|
||||||
|
|
||||||
|
QString GetWalletDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WalletModel* const walletModel;
|
WalletModel* const walletModel;
|
||||||
AddressTablePriv *priv = nullptr;
|
AddressTablePriv *priv = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user