This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

49
customcontrols/dmlabel.h Normal file
View File

@@ -0,0 +1,49 @@
#ifndef DMLABEL_H
#define DMLABEL_H
/*
#include "data/constants.h"
#include <QCursor>
#include <QLabel>
#include <QMouseEvent>
#include <QKeyEvent>
#include <QObject>
#include <QPixmap>
#include <QRubberBand>
class DMLabel: public QLabel {
Q_OBJECT
public:
DMLabel (QWidget *parent = nullptr);
~DMLabel();
void enableSelect(bool state);
void setType(PartType value);
signals:
void mouseHover(int x, int y);
void regionSelected(int x1, int x2, int y1, int y2);
void selectMarker(bool);
void checkTimeScope(bool);
void mouseDoubleClick();
protected slots:
virtual void enterEvent ( QEvent*);
virtual void leaveEvent ( QEvent*);
virtual void mouseMoveEvent ( QMouseEvent * event );
virtual void mousePressEvent ( QMouseEvent * event );
virtual void mouseReleaseEvent ( QMouseEvent * event );
virtual void mouseDoubleClickEvent ( QMouseEvent * event );
private:
int x,y;
PartType partType;
QCursor cursorCrosshair;
QRubberBand rubberBand;
int rubberStartX, rubberStartY, rubberStopX, rubberStopY;
int x1, x2, y1, y2;
bool selectROI;
bool selectEnable;
bool ctrlKeyFlag;
bool altKeyFlag;
bool shiftKeyFlag;
};*/
#endif // DMLABEL_H