##// END OF EJS Templates
Logvalueaxis and multiaxis examples updated
Logvalueaxis and multiaxis examples updated

File last commit:

r2358:9d5a354692be
r2371:64c51f3e619b
Show More
callout.h
32 lines | 674 B | text/x-c | CLexer
Marek Rosa
Added callout example (Drawing on top of chart)
r2150 #ifndef CALLOUT_H
#define CALLOUT_H
#include <QGraphicsItem>
#include <QFont>
class QGraphicsSceneMouseEvent;
class Callout : public QGraphicsItem
{
public:
Callout(QGraphicsItem * parent = 0);
void setText(const QString &text);
void setAnchor(QPointF point);
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,QWidget *widget);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
private:
QString m_text;
QRectF m_textRect;
QPointF m_anchor;
QFont m_font;
QPointF m_clickOffset;
};
#endif // CALLOUT_H