Files
Sourcetrail/src/lib_gui/qt/element/QtTooltip.h
T
Eberhard Graether 01864b4d0c ui: Added custom tooltipping to code and graph (issue #195)
* Tooltips show node type with access specifier, reference count and fully qualified name
* Fields and global variables include the type name
* Methods and functinos show whole signature. Gets broken into multiple lines if too long.

Included changes:

* Upgraded to C++14
* fixed clang warnings
* Pass location of .srctrlprj file to build.sh script to load on launch
* Split off QtCodeField for showing highlighted and annotated code fom QtCodeArea
* removed TokenComponentSignature
* added TaskDecoratorDelay

bug id = 195
2017-07-31 12:45:22 +02:00

44 lines
712 B
C++

#ifndef QT_TOOLTIP_H
#define QT_TOOLTIP_H
#include <QFrame>
struct TooltipInfo;
class QtTooltip
: public QFrame
{
Q_OBJECT
public:
QtTooltip(QWidget* parent = nullptr);
virtual ~QtTooltip();
void setTooltipInfo(TooltipInfo info);
void setParentView(QWidget* parentView);
bool isHovered() const;
public slots:
virtual void show();
virtual void hide(bool force = false);
protected:
virtual void leaveEvent(QEvent* event);
virtual void enterEvent(QEvent* event);
private:
void addTitle(QString title, int count, QString countText);
void addWidget(QWidget* widget);
void clearLayout(QLayout* layout);
QWidget* m_parentView;
QPoint m_offset;
bool m_isHovered;
};
#endif // QT_TOOLTIP_H