30 lines
879 B
C++
30 lines
879 B
C++
#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;
|
||
};
|