feather/src/model/SubaddressView.cpp

24 lines
622 B
C++
Raw Normal View History

2020-12-26 19:56:06 +00:00
// SPDX-License-Identifier: BSD-3-Clause
2024-01-01 17:07:58 +00:00
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
2020-12-26 19:56:06 +00:00
2020-10-11 15:23:13 +00:00
#include "SubaddressView.h"
2023-03-28 20:42:12 +00:00
#include "utils/Utils.h"
2020-10-11 15:23:13 +00:00
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();
2023-03-28 20:42:12 +00:00
Utils::copyColumn(&index, index.column());
2020-10-11 15:23:13 +00:00
}
else
QTreeView::keyPressEvent(event);
}
}