mirror-chatterino2/src/widgets/TooltipWidget.hpp

41 lines
741 B
C++
Raw Normal View History

#pragma once
2018-06-26 14:09:39 +02:00
#include "widgets/BaseWindow.hpp"
#include <QLabel>
#include <QWidget>
2018-01-22 20:14:43 +01:00
#include <pajlada/signals/signal.hpp>
namespace chatterino {
class TooltipWidget : public BaseWindow
{
Q_OBJECT
public:
2018-05-26 17:11:09 +02:00
static TooltipWidget *getInstance();
TooltipWidget(BaseWidget *parent = nullptr);
2018-05-26 17:11:09 +02:00
virtual ~TooltipWidget() override;
void setText(QString text);
#ifdef USEWINSDK
void raise();
#endif
protected:
void changeEvent(QEvent *) override;
void leaveEvent(QEvent *) override;
2018-05-16 14:55:45 +02:00
void themeRefreshEvent() override;
void scaleChangedEvent(float) override;
private:
QLabel *displayText;
2018-01-22 20:14:43 +01:00
pajlada::Signals::Connection fontChangedConnection;
2018-01-22 20:14:43 +01:00
void updateFont();
};
} // namespace chatterino