MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / contextMenuEvent

Method contextMenuEvent

src/resultviewer.cpp:63–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void ResultViewer::contextMenuEvent(QContextMenuEvent * /*event*/) {
64 QList<QTableWidgetSelectionRange> selectionRange = selectedRanges();
65
66 if (selectionRange.empty())
67 return;
68
69 auto *contextMenu = new QMenu(this);
70
71 if (selectionRange.size() == 1 && selectionRange[0].rowCount() == 1) {
72 contextMenu->addAction(detailInformationAction);
73 contextMenu->setDefaultAction(detailInformationAction);
74 }
75
76 if (! selectionRange.empty()) {
77 contextMenu->addAction(judgeSelectedAction);
78 }
79
80 contextMenu->addAction(deleteContestantAction);
81 contextMenu->exec(QCursor::pos());
82 delete contextMenu;
83}
84
85void ResultViewer::setContest(Contest *contest) {
86 if (curContest) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected