| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
LineNumberArea Class Reference

A widget for displaying line numbers in the code editor. More...

`#include <lua_debugger_code_editor.h>`

Inheritance diagram for LineNumberArea:

## Public Member Functions
| LineNumberArea (LuaDebuggerCodeView *editor)
| Construct the helper widget bound to a specific code view.
QSize | sizeHint () const override
| Size the gutter according to the editor's width requirements.
bool | isDraggingBreakpoint () const
| True if a breakpoint drag-and-drop is currently in progress.
qint32 | dragTargetLine () const
| Current drag target line, or -1 if not dragging.
qint32 | dragSourceLine () const
| Source line being dragged, or -1 if not dragging.

## Protected Member Functions
void | paintEvent (QPaintEvent *event) override
| Delegate painting back to the code view.
void | mousePressEvent (QMouseEvent *event) override
| Toggle breakpoints when the gutter is clicked.
void | mouseMoveEvent (QMouseEvent *event) override
| Track drag gestures in the breakpoint gutter.
void | mouseReleaseEvent (QMouseEvent *event) override
| Commit click vs drag-drop action on mouse release.
void | contextMenuEvent (QContextMenuEvent *event) override
| Right-click / Ctrl-click / two-finger trackpad tap on the breakpoint gutter: always pop the Edit / Disable / Remove menu when the click lands on an existing breakpoint, regardless of whether it carries extras. Clicks on bare lines are ignored.

## Detailed Description

A widget for displaying line numbers in the code editor.

## Constructor & Destructor Documentation

## ◆ LineNumberArea()

LineNumberArea::LineNumberArea | ( | LuaDebuggerCodeView * | editor | ) |
| inline

Construct the helper widget bound to a specific code view.

Parameters

  editor | Owning code editor responsible for painting content.

## Member Function Documentation

## ◆ contextMenuEvent()

void LineNumberArea::contextMenuEvent | ( | QContextMenuEvent * | event | ) |
| override protected

Right-click / Ctrl-click / two-finger trackpad tap on the breakpoint gutter: always pop the Edit / Disable / Remove menu when the click lands on an existing breakpoint, regardless of whether it carries extras. Clicks on bare lines are ignored.

Parameters

  event | The context menu event.

## ◆ dragSourceLine()

qint32 LineNumberArea::dragSourceLine | ( |  | ) | const
| inline

Source line being dragged, or -1 if not dragging.

Returns
  The source line number, or -1.

## ◆ dragTargetLine()

qint32 LineNumberArea::dragTargetLine | ( |  | ) | const
| inline

Current drag target line, or -1 if not dragging.

Returns
  The target line number, or -1.

## ◆ isDraggingBreakpoint()

bool LineNumberArea::isDraggingBreakpoint | ( |  | ) | const
| inline

True if a breakpoint drag-and-drop is currently in progress.

Returns
  True if dragging a breakpoint, false otherwise.

## ◆ mouseMoveEvent()

void LineNumberArea::mouseMoveEvent | ( | QMouseEvent * | event | ) |
| override protected

Track drag gestures in the breakpoint gutter.

Parameters

  event | The mouse move event.

## ◆ mousePressEvent()

void LineNumberArea::mousePressEvent | ( | QMouseEvent * | event | ) |
| override protected

Toggle breakpoints when the gutter is clicked.

Parameters

  event | The mouse press event.

## ◆ mouseReleaseEvent()

void LineNumberArea::mouseReleaseEvent | ( | QMouseEvent * | event | ) |
| override protected

Commit click vs drag-drop action on mouse release.

Parameters

  event | The mouse release event.

## ◆ paintEvent()

void LineNumberArea::paintEvent | ( | QPaintEvent * | event | ) |
| inline override protected

Delegate painting back to the code view.

Parameters

  event | The paint event.

## ◆ sizeHint()

QSize LineNumberArea::sizeHint | ( |  | ) | const
| inline override

Size the gutter according to the editor's width requirements.

Returns
  The recommended size for the line number area.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/lua_debugger/lua_debugger_code_editor.h
- /builds/wireshark/wireshark/ui/qt/lua_debugger/lua_debugger_code_editor.cpp