| 172 | } |
| 173 | |
| 174 | void AddressBookPage::onEditAction() |
| 175 | { |
| 176 | if(!model) |
| 177 | return; |
| 178 | |
| 179 | if(!ui->tableView->selectionModel()) |
| 180 | return; |
| 181 | QModelIndexList indexes = ui->tableView->selectionModel()->selectedRows(); |
| 182 | if(indexes.isEmpty()) |
| 183 | return; |
| 184 | |
| 185 | auto dlg = new EditAddressDialog( |
| 186 | tab == SendingTab ? |
| 187 | EditAddressDialog::EditSendingAddress : |
| 188 | EditAddressDialog::EditReceivingAddress, this); |
| 189 | dlg->setModel(model); |
| 190 | QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0)); |
| 191 | dlg->loadRow(origIndex.row()); |
| 192 | GUIUtil::ShowModalDialogAsynchronously(dlg); |
| 193 | } |
| 194 | |
| 195 | void AddressBookPage::on_newAddress_clicked() |
| 196 | { |
nothing calls this directly
no test coverage detected