Sh3/graphicscrossitem.h

40 lines
721 B
C
Raw Normal View History

2025-07-02 07:45:34 +03:00
#ifndef GRAPHICSCROSSITEM_H
#define GRAPHICSCROSSITEM_H
#include <QColor>
#include <QGraphicsItem>
#include <QPainter>
#include "math.h"
class graphicsCrossItem : public QGraphicsItem
{
public:
graphicsCrossItem(qreal x=0, qreal y=0);
QRectF boundingRect() const;
// QPainterPath shape() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QColor color() {return col;}
void setColor(QColor c);
void setPos(QPointF p);
void setPos(qreal x, qreal y) {setPos(QPointF(x, y));}
void setPosPolar(qreal d, qreal a);
void setScaleIndex(qreal s);
private:
qreal x, y, dim, scIndex;
QColor col;
};
#endif // GRAPHICSARCITEM_H