mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
35 lines
640 B
C++
35 lines
640 B
C++
|
#pragma once
|
||
|
#include "widgets/basewidget.hpp"
|
||
|
|
||
|
#include <QWidget>
|
||
|
#include <QLabel>
|
||
|
|
||
|
namespace chatterino {
|
||
|
namespace widgets {
|
||
|
|
||
|
class TooltipWidget : public BaseWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
TooltipWidget(BaseWidget *parent = nullptr);
|
||
|
|
||
|
void setText(QString text);
|
||
|
void moveTo(QPoint point);
|
||
|
|
||
|
static TooltipWidget* getInstance()
|
||
|
{
|
||
|
static TooltipWidget *tooltipWidget = nullptr;
|
||
|
if(tooltipWidget == nullptr)
|
||
|
{
|
||
|
tooltipWidget = new TooltipWidget();
|
||
|
}
|
||
|
return tooltipWidget;
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
QLabel *displayText;
|
||
|
};
|
||
|
|
||
|
} // namespace widgets
|
||
|
} // namespace chatterino
|