Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
PolyLine.hpp
00001 
00002 #ifndef _POLYLINE_H_
00003 #define _POLYLINE_H_
00004 
00005 #include <QAbstractGraphicsShapeItem>
00006 
00007 namespace jafar {
00008 namespace qdisplay {
00009 
00015 class PolyLine : public QAbstractGraphicsShapeItem
00016 {
00017     public:
00018         PolyLine(double scale = 1.0, QGraphicsItem *parent = 0);
00019         ~PolyLine();
00020     
00027         void setColor(int r, int g, int b);
00028         
00032         void addPoint(double x, double y);
00033         
00034         QRectF boundingRect() const;
00035         QPainterPath shape() const;
00036         
00037         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
00038         
00042         double scale() const;
00043     private:
00044         QVector<QPointF> m_points;
00045         mutable QRectF m_boundingRect;
00046         double m_scale;
00047 };
00048 
00049 }
00050 }
00051 
00052 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:19 for Jafar by doxygen 1.7.6.1
LAAS-CNRS