-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyLabel.h
40 lines (34 loc) · 805 Bytes
/
MyLabel.h
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
32
33
34
35
36
37
38
39
40
#ifndef MYLABEL_H
#define MYLABEL_H
#include<qwidget.h>
#include<qlabel.h>
#pragma execution_character_set("utf-8")
#include<qpainter.h>
#include<vector>
#include<iostream>
#include<qmouseeventtransition.h>
#include <QtWidgets/QMainWindow>
#include <QtWidgets\qwidget.h>
#include<qevent.h>
//#include<labeltool.h>
using namespace std;
class MyLabel:public QLabel{
Q_OBJECT
public:
MyLabel(QWidget *parent=0);
//MyLabel(QWidget *parent,LabelTool* labelTool);
~MyLabel();
protected:
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event);
public:
void paintPoints();
void paintLines();
void showTruth();
public:
vector<QPoint*> points;
//LabelTool* labelTool;
};
#endif