mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-07-21 02:31:05 -04:00
refactor: Restructure project into sources/tests layout and dissolve PluginLLMCore
This commit is contained in:
37
sources/widgets/EditorChatButtonHandler.hpp
Normal file
37
sources/widgets/EditorChatButtonHandler.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2025-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "widgets/EditorChatButton.hpp"
|
||||
#include <texteditor/basehoverhandler.h>
|
||||
#include <QPointer>
|
||||
|
||||
namespace QodeAssist {
|
||||
|
||||
class EditorChatButtonHandler : public TextEditor::BaseHoverHandler
|
||||
{
|
||||
public:
|
||||
explicit EditorChatButtonHandler() = default;
|
||||
~EditorChatButtonHandler() override;
|
||||
|
||||
void showButton(TextEditor::TextEditorWidget *widget);
|
||||
void hideButton();
|
||||
|
||||
signals:
|
||||
void chatButtonClicked(TextEditor::TextEditorWidget *widget);
|
||||
|
||||
protected:
|
||||
void identifyMatch(
|
||||
TextEditor::TextEditorWidget *editorWidget, int pos, ReportPriority report) override;
|
||||
void operateTooltip(TextEditor::TextEditorWidget *editorWidget, const QPoint &point) override;
|
||||
|
||||
private:
|
||||
QPointer<TextEditor::TextEditorWidget> m_widget;
|
||||
QPoint m_cursorPosition;
|
||||
EditorChatButton *m_chatButton = nullptr;
|
||||
int m_buttonHeight = 0;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist
|
||||
Reference in New Issue
Block a user