You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
1.4 KiB

#ifndef __POINT_2D_WIDGET_HEADER__
#define __POINT_2D_WIDGET_HEADER__
#ifndef __linux__
#include <WinSock2.h>
#endif
#include <queue>
#include "../guiClass.h"
enum{
P2D_STYLE_TOOLTIP = 0,
P2D_STYLE_TARGET = 1,
P2D_STYLE_POI = 2,
P2D_STYLE_ROI = 3
};
class point2DWidget : public QWidget {
private:
uint32_t m_nX;
uint32_t m_nY;
uint32_t m_nlX;
uint32_t m_nlY;
uint32_t m_nMaxX;
uint32_t m_nMaxY;
QWidget *m_pParent;
QTimer *m_pAnimationTimer;
uint8_t m_bStyle;
uint8_t m_bMode;
uint8_t m_bNSteps;
uint8_t m_LineHeight;
uint8_t m_bPointSize;
uint16_t m_bHandleLength;
uint16_t m_bBannerWidth;
uint32_t m_nAuxCounter;
uint8_t m_bDirection;
uint8_t m_bLabelHeight;
QColor m_pPenColor;
QColor m_pBrushColor;
QColor m_pTextColor;
QFont m_pFont;
bool m_bAutoHide;
bool m_bRoundPoint;
uint32_t m_nAutoHideInterval;
uint32_t m_nAutohideCounter;
char m_cLabel[3][128];
public:
explicit point2DWidget(QWidget *parent = NULL, uint8_t Mode = P2D_STYLE_TOOLTIP );
~point2DWidget();
void create( uint32_t x, uint32_t y, char *labelLine1 = NULL, char *labelLine2 = NULL, char *labelLine3 = NULL );
void setMaxValues(uint32_t x, uint32_t y);
void setAutoHide( bool ah = true, uint32_t interval = 120 ); // 3 seconds
public slots:
void paintEvent(QPaintEvent*);
private slots:
void handleTimer();
};
#endif