| 1 |
#ifndef BOXMESSAGE_H |
| 2 |
#define BOXMESSAGE_H |
| 3 |
|
| 4 |
#include <QLabel> |
| 5 |
#include <QEvent> |
| 6 |
|
| 7 |
class BoxMessage : public QLabel { |
| 8 |
Q_OBJECT |
| 9 |
public: |
| 10 |
BoxMessage(QWidget *parent = nullptr); |
| 11 |
~BoxMessage(); |
| 12 |
|
| 13 |
void setText(QString text); |
| 14 |
|
| 15 |
private: |
| 16 |
QLabel *lblText; |
| 17 |
|
| 18 |
QPointF mousePosition; |
| 19 |
bool isMove; |
| 20 |
bool isWasMoved; |
| 21 |
|
| 22 |
protected: |
| 23 |
void resizeEvent(QResizeEvent */*e*/) override; |
| 24 |
bool eventFilter(QObject *obj, QEvent *event) override; |
| 25 |
|
| 26 |
signals: |
| 27 |
void clicked(); |
| 28 |
|
| 29 |
}; |
| 30 |
|
| 31 |
#endif // BOXMESSAGE_H |