* 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
44 lines
712 B
C++
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
|