fear: Add hint-trigger for call code completion (#266)

This commit is contained in:
Petr Mironychev
2025-11-17 22:24:04 +01:00
committed by GitHub
parent 86c6930c5f
commit bcdec96d92
13 changed files with 565 additions and 54 deletions

View File

@ -0,0 +1,49 @@
/*
* Copyright (C) 2025 Petr Mironychev
*
* This file is part of QodeAssist.
*
* QodeAssist is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* QodeAssist is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with QodeAssist. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <QPointer>
#include <functional>
namespace TextEditor {
class TextEditorWidget;
}
namespace QodeAssist {
class CompletionHintWidget;
class CompletionHintHandler
{
public:
CompletionHintHandler();
~CompletionHintHandler();
void showHint(TextEditor::TextEditorWidget *widget, QPoint position, int fontSize);
void hideHint();
bool isHintVisible() const;
void updateHintPosition(TextEditor::TextEditorWidget *widget, QPoint position);
private:
QPointer<CompletionHintWidget> m_hintWidget;
};
} // namespace QodeAssist