You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iBase/iProperty/PtyItems/ZxSymbolPaint.h

64 lines
2.1 KiB
C++

#pragma once
#include <QPointF>
#include <QColor>
#include "iProperty_global.h"
enum ZxPointSymbolType
{
PST_NONE = 0,
PST_CROSS_1,
PST_CROSS_2,
PST_CROSS_3,
PST_CROSS_4,
PST_CIRCLE_1,
PST_CIRCLE_2,
PST_CIRCLE_3,
PST_TRIANGLE_1,
PST_TRIANGLE_2,
PST_TRIANGLE_3,
PST_TRIANGLE_4,
PST_RECT_1,
PST_RECT_2,
PST_RECT_3
//...
};
class QPainter;
class I_PROPERTY_EXPORT ZxSymbolPaint
{
public:
ZxSymbolPaint();
static int ZxSymbolCount();
static void draw(QPainter* painter, const QPointF &midpos, const int symbolType, const float size , const QColor &color);
private:
static void drawCross1(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawCross2(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawCross3(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawCross4(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawCircle1(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawCircle2(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawCircle3(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawTriangle1(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawTriangle2(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawTriangle3(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawTriangle4(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawRect1(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawRect2(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
static void drawRect3(QPainter* painter, const QPointF &midpos, const float size, const QColor &color);
};