Init
This commit is contained in:
39
graphicscrossitem.h
Normal file
39
graphicscrossitem.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user