24 int halfSize = size / 2;
26 int halfLineWidth = lineWidth / 2;
31 return QCursor (Qt::CrossCursor);
36 const int BACKGROUND_COLOR = Qt::white, FOREGROUND_COLOR = Qt::black;
40 QPixmap picMask (size,
42 QPainter picMaskPaint (&picMask);
43 picMask.fill (QColor (BACKGROUND_COLOR));
45 QPen pen (QBrush (FOREGROUND_COLOR),
47 picMaskPaint.setPen (pen);
49 picMaskPaint.drawLine (QPointF (halfSize,
50 halfSize - innerRadius - halfLineWidth),
53 picMaskPaint.drawLine (QPointF (halfSize - innerRadius - halfLineWidth,
57 picMaskPaint.drawLine (QPointF (halfSize,
58 halfSize + innerRadius + halfLineWidth),
60 size - 1 - lineWidth));
61 picMaskPaint.drawLine (QPointF (halfSize + innerRadius + halfLineWidth,
63 QPointF (size - 1 - lineWidth,
68 pic.fill (QColor (FOREGROUND_COLOR));
70 return QCursor (pic.createMaskFromColor(QColor (BACKGROUND_COLOR)),
71 picMask.createMaskFromColor(QColor (BACKGROUND_COLOR)));
int CursorSizeToPixels(CursorSize cursorSize)
CursorFactory()
Single constructor.
QCursor generate(const DocumentModelDigitizeCurve &modelDigitizeCurve) const
Factory method to generate standard or custom cursor.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
CursorSize cursorSize() const
Get method for cursor size.
int cursorInnerRadius() const
Get method for cursor inner radius.
bool cursorStandardCross() const
Get method for cursor type.
int cursorLineWidth() const
Get method for cursor line width.