MCPcopy Create free account
hub / github.com/ckb-next/ckb-next / removeMultipleColumns

Method removeMultipleColumns

src/gui/macrotablemodel.cpp:490–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490void MacroTableModel::removeMultipleColumns(QModelIndexList l){
491 // The list is not always in order, so sort it from lowest to highest
492 std::sort(l.begin(), l.end(), [](const QModelIndex& a, const QModelIndex& b) { return a < b; });
493 // and then iterate counting down
494 for(int i = l.length(); i--;){
495 const int row = l.at(i).row();
496 emit beginRemoveRows(QModelIndex(), row, row);
497 macroLines.remove(row);
498 emit endRemoveRows();
499 }
500}
501
502bool MacroTableModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int dstrow, int column, const QModelIndex& parent){
503 if(dstrow == -1 || action != Qt::MoveAction || !data->hasFormat("application/x-qabstractitemmodeldatalist"))

Callers 1

Calls 5

lengthMethod · 0.80
atMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected