2017-12-23 22:17:38 +01:00
|
|
|
#pragma once
|
|
|
|
#include "widgets/basewidget.hpp"
|
|
|
|
|
|
|
|
#include <QLabel>
|
2017-12-23 23:24:35 +01:00
|
|
|
#include <QWidget>
|
2017-12-23 22:17:38 +01:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
|
|
|
|
|
|
|
class TooltipWidget : public BaseWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TooltipWidget(BaseWidget *parent = nullptr);
|
|
|
|
|
|
|
|
void setText(QString text);
|
|
|
|
void moveTo(QPoint point);
|
|
|
|
|
2017-12-23 23:24:35 +01:00
|
|
|
static TooltipWidget *getInstance()
|
2017-12-23 22:17:38 +01:00
|
|
|
{
|
|
|
|
static TooltipWidget *tooltipWidget = nullptr;
|
2017-12-23 23:24:35 +01:00
|
|
|
if (tooltipWidget == nullptr) {
|
2017-12-23 22:17:38 +01:00
|
|
|
tooltipWidget = new TooltipWidget();
|
|
|
|
}
|
|
|
|
return tooltipWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
QLabel *displayText;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|