| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2024 Waqar Ahmed <waqar.17a@gmail.com> |
| 3 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 4 | */ |
| 5 | |
| 6 | #ifndef KATEARGUMENTHINTTREE_H |
| 7 | #define KATEARGUMENTHINTTREE_H |
| 8 | |
| 9 | #include <QFrame> |
| 10 | |
| 11 | class KateCompletionWidget; |
| 12 | class KateArgumentHintModel; |
| 13 | class QPlainTextEdit; |
| 14 | class QLabel; |
| 15 | class QFont; |
| 16 | class ArgumentHighlighter; |
| 17 | |
| 18 | class ArgumentHintWidget : public QFrame |
| 19 | { |
| 20 | public: |
| 21 | explicit ArgumentHintWidget(KateArgumentHintModel *model, const QFont &font, KateCompletionWidget *completion, QWidget *parent); |
| 22 | |
| 23 | void positionAndShow(); |
| 24 | void clearAndHide(); |
| 25 | |
| 26 | void selectNext(); |
| 27 | void selectPrevious(); |
| 28 | |
| 29 | void updateGeometry(); |
| 30 | |
| 31 | private: |
| 32 | void activateHint(int i, int rowCount); |
| 33 | |
| 34 | KateCompletionWidget *const m_completionWidget; |
| 35 | QPlainTextEdit *const m_view; |
| 36 | QLabel *const m_currentIndicator; |
| 37 | int m_current = -1; |
| 38 | KateArgumentHintModel *const m_model; |
| 39 | ArgumentHighlighter *const m_highlighter; |
| 40 | QWidget *const m_leftSide; |
| 41 | }; |
| 42 | |
| 43 | #endif |
| 44 | |