summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eedb5d1)
This allows you, for example, to op/deop multiple users at once.
sortByColumn(0, Qt::AscendingOrder);
setContextMenuPolicy(Qt::CustomContextMenu);
sortByColumn(0, Qt::AscendingOrder);
setContextMenuPolicy(Qt::CustomContextMenu);
+ setSelectionMode(QAbstractItemView::ExtendedSelection);
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(showContextMenu(const QPoint&)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(showContextMenu(const QPoint&)));
if(index.data(NetworkModel::ItemTypeRole) != NetworkModel::IrcUserItemType)
return;
if(index.data(NetworkModel::ItemTypeRole) != NetworkModel::IrcUserItemType)
return;
+ QModelIndexList indexList = selectedIndexes();
+ // make sure the item we clicked on is first
+ indexList.removeAll(index);
+ indexList.prepend(index);
+
- Client::mainUi()->actionProvider()->addActions(&contextMenu, index);
+ Client::mainUi()->actionProvider()->addActions(&contextMenu, indexList);
contextMenu.exec(QCursor::pos());
}
contextMenu.exec(QCursor::pos());
}