Files
BareCode/src/editor/SignatureTooltip.h
2026-08-10 09:28:12 +02:00

30 lines
879 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include <QFrame>
#include <QLabel>
#include <QString>
#include <QVBoxLayout>
// ---------------------------------------------------------------------------
// SignatureTooltip – Schwebendes Popup das die Signatur einer Funktion zeigt.
// Erscheint unter dem Cursor, verschwindet automatisch wenn der Nutzer
// die Klammer schließt oder den Kontext verlässt.
// ---------------------------------------------------------------------------
class SignatureTooltip : public QFrame
{
Q_OBJECT
public:
explicit SignatureTooltip(QWidget *parent = nullptr);
void showSignature(const QString &signature,
const QString &description,
const QPoint &globalPos);
void hide();
private:
QVBoxLayout *m_layout = nullptr;
QLabel *m_sigLabel = nullptr;
QLabel *m_descLabel = nullptr;
};