Code Documentation 3.1
Social Network Visualizer
Loading...
Searching...
No Matches
graphicsguide.h
Go to the documentation of this file.
1
17#ifndef GRAPHICSGUIDE_H
18#define GRAPHICSGUIDE_H
19
20
21#include <QGraphicsItem>
22#include <QObject>
23
24
25class GraphicsWidget;
26
27static const int TypeGuide = QGraphicsItem::UserType+7;
28static const int ZValueGuide = 10;
29
30class GraphicsGuide : public QObject, public QGraphicsItem {
31 Q_OBJECT
32 Q_INTERFACES (QGraphicsItem)
33
34public:
36 const double &x0, const double &y0, const double &radius );
38 const double &y0, const int &width);
39 bool isCircle();
40 void setCircle(const QPointF &center, const double &radius) ;
41 void setHorizontalLine(const QPointF &origin, const int &width) ;
42 double radius();
43 int width();
44 enum { Type = UserType + 7 };
45 int type() const { return Type; }
46 void die();
47
48
49protected:
50 QRectF boundingRect() const;
51 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
52
53private:
55 double m_radius;
57 bool circle;
58
59};
60
61#endif
62
63
64
Definition graphicsguide.h:30
void die()
Definition graphicsguide.cpp:97
@ Type
Definition graphicsguide.h:44
int m_width
Definition graphicsguide.h:56
GraphicsWidget * graphicsWidget
Definition graphicsguide.h:54
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition graphicsguide.cpp:84
double radius()
Definition graphicsguide.cpp:46
void setCircle(const QPointF &center, const double &radius)
Definition graphicsguide.cpp:54
bool isCircle()
Definition graphicsguide.cpp:50
double m_radius
Definition graphicsguide.h:55
bool circle
Definition graphicsguide.h:57
int width()
Definition graphicsguide.cpp:69
int type() const
Definition graphicsguide.h:45
QRectF boundingRect() const
Definition graphicsguide.cpp:74
void setHorizontalLine(const QPointF &origin, const int &width)
Definition graphicsguide.cpp:62
Definition graphicswidget.h:42
static const int TypeGuide
Definition graphicsguide.h:27
static const int ZValueGuide
Definition graphicsguide.h:28