/******************************************************************************* * * * Société de Transports de Montréal. * * 2012 - 2013 * * * * Projet Zones Tests * * * * * * * *******************************************************************************/ /* Description: Description du fichier si nécessaire. */ /* ************************************************************************** */ /* Revision: ### YYYMMDD JFM Verision d'origine. ### YYYYMMDD Description du besoin ou du bug Description du changement. */ /* ************************************************************************** */ #ifndef GRAPHCURSORWIDGET_H #define GRAPHCURSORWIDGET_H #include "GlobalDefine.h" #include class CVerticalGraphCursorWidget : public QGraphicsWidget { Q_OBJECT public: CVerticalGraphCursorWidget(qreal Height, QGraphicsItem *Parent = 0); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); qreal GetPixelPos(); void SetColor(QColor color){mColor = color;} quint64 GetTime(); void SetTime(quint64 time); bool IsCursorSet(); void ClearCursor(); void SetCursor(); private: QLine mLine; QColor mColor; quint64 mCursorTime; bool mCursorSet; }; class CHorizontalGraphCursorWidget : public QGraphicsWidget { Q_OBJECT public: CHorizontalGraphCursorWidget(qreal Width, QGraphicsItem *Parent = 0); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); qreal GetPixelPos(); void SetColor(QColor color){mColor = color;} bool IsCursorSet(); void ClearCursor(); void SetCursor(); private: QLine mLine; QColor mColor; quint64 mCursorPos; bool mCursorSet; }; #endif // GRAPHCURSORWIDGET_H