MCPcopy Create free account
hub / github.com/KDE/kate / mousePressEvent

Method mousePressEvent

apps/lib/diff/difflinenumarea.cpp:205–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void LineNumArea::mousePressEvent(QMouseEvent *e)
206{
207 auto pos = e->pos();
208 auto r = rect();
209 r.setLeft(lineNumAreaWidth());
210 if (!r.contains(pos)) {
211 QWidget::mousePressEvent(e);
212 return;
213 }
214
215 int block = textEdit->cursorForPosition(pos).block().blockNumber();
216 if (textEdit->isHunkLine(block)) {
217 textEdit->toggleFoldHunk(block);
218 }
219}
220
221void LineNumArea::wheelEvent(QWheelEvent *e)
222{

Callers

nothing calls this directly

Calls 3

lineNumAreaWidthFunction · 0.85
isHunkLineMethod · 0.80
toggleFoldHunkMethod · 0.80

Tested by

no test coverage detected