File: BoxMessage.h

package info (click to toggle)
puzzle-jigsaw 1.0.2%2Bgit20201007.527c529%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,048 kB
  • sloc: cpp: 875; xml: 20; makefile: 14
file content (31 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef BOXMESSAGE_H
#define BOXMESSAGE_H

#include <QLabel>
#include <QEvent>

class BoxMessage : public QLabel {
    Q_OBJECT
    public:
        BoxMessage(QWidget *parent = nullptr);
        ~BoxMessage();

        void setText(QString text);

    private:
        QLabel *lblText;

        QPointF mousePosition;
        bool isMove;
        bool isWasMoved;

    protected:
        void resizeEvent(QResizeEvent */*e*/) override;
        bool eventFilter(QObject *obj, QEvent *event) override;

    signals:
        void clicked();

};

#endif // BOXMESSAGE_H