mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 23:31:32 +02:00
29 lines
791 B
C++
29 lines
791 B
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// SPDX-FileCopyrightText: The Monero Project
|
|
|
|
#include "SubaddressView.h"
|
|
|
|
#include "utils/Utils.h"
|
|
#include "SubaddressModel.h"
|
|
|
|
SubaddressView::SubaddressView(QWidget *parent) : QTreeView(parent) {
|
|
|
|
}
|
|
|
|
void SubaddressView::keyPressEvent(QKeyEvent *event){
|
|
QModelIndexList selectedRows = selectionModel()->selectedRows();
|
|
|
|
if(!selectedIndexes().isEmpty()){
|
|
if(event->matches(QKeySequence::Copy)){
|
|
QModelIndex index = this->currentIndex();
|
|
if (index.column() == SubaddressModel::ModelColumn::Address) {
|
|
emit copyAddress();
|
|
} else {
|
|
Utils::copyColumn(&index, index.column());
|
|
}
|
|
}
|
|
else
|
|
QTreeView::keyPressEvent(event);
|
|
}
|
|
}
|