MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / showButton

Method showButton

widgets/EditorChatButtonHandler.cpp:19–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void EditorChatButtonHandler::showButton(TextEditor::TextEditorWidget *widget)
20{
21 if (!widget)
22 return;
23
24 m_widget = widget;
25
26 identifyMatch(widget, widget->textCursor().position(), [this](auto priority) {
27 if (priority != Priority_None && m_widget) {
28 const QTextCursor cursor = m_widget->textCursor();
29 const QRect selectionRect = m_widget->cursorRect(cursor);
30 m_cursorPosition = m_widget->viewport()->mapToGlobal(selectionRect.topLeft())
31 - Utils::ToolTip::offsetFromPosition();
32 operateTooltip(m_widget, m_cursorPosition);
33 }
34 });
35}
36
37void EditorChatButtonHandler::hideButton()
38{

Callers

nothing calls this directly

Calls 1

positionMethod · 0.45

Tested by

no test coverage detected