38 lines
622 B
C++
38 lines
622 B
C++
#ifndef GCROSS_H
|
|
#define GCROSS_H
|
|
|
|
#include <QGraphicsItem>
|
|
#include <QColor>
|
|
#include <QPainter>
|
|
#include "math.h"
|
|
|
|
class gCross : public QGraphicsItem
|
|
{
|
|
|
|
public:
|
|
gCross(qreal x=0, qreal y=0);
|
|
gCross(QPointF p);
|
|
QRectF boundingRect() 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 setSize(qreal d);
|
|
|
|
private:
|
|
qreal x, y, dim;
|
|
QColor col;
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
};
|
|
|
|
#endif // GCROSS_H
|