qwt_plot_marker.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PLOT_MARKER_H
11 #define QWT_PLOT_MARKER_H
12 
13 #include "qwt_global.h"
14 #include "qwt_plot_item.h"
15 
16 class QString;
17 class QRectF;
18 class QwtText;
19 class QwtSymbol;
20 
46 {
47  public:
48 
53  enum LineStyle
54  {
57 
60 
63 
65  Cross
66  };
67 
68  explicit QwtPlotMarker();
69  explicit QwtPlotMarker( const QString& title );
70  explicit QwtPlotMarker( const QwtText& title );
71 
72  virtual ~QwtPlotMarker();
73 
74  virtual int rtti() const QWT_OVERRIDE;
75 
76  double xValue() const;
77  double yValue() const;
78  QPointF value() const;
79 
80  void setXValue( double );
81  void setYValue( double );
82  void setValue( double, double );
83  void setValue( const QPointF& );
84 
85  void setLineStyle( LineStyle );
86  LineStyle lineStyle() const;
87 
88  void setLinePen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
89  void setLinePen( const QPen& );
90  const QPen& linePen() const;
91 
92  void setSymbol( const QwtSymbol* );
93  const QwtSymbol* symbol() const;
94 
95  void setLabel( const QwtText& );
96  QwtText label() const;
97 
98  void setLabelAlignment( Qt::Alignment );
99  Qt::Alignment labelAlignment() const;
100 
101  void setLabelOrientation( Qt::Orientation );
102  Qt::Orientation labelOrientation() const;
103 
104  void setSpacing( int );
105  int spacing() const;
106 
107  virtual void draw( QPainter*,
108  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
109  const QRectF& ) const QWT_OVERRIDE;
110 
111  virtual QRectF boundingRect() const QWT_OVERRIDE;
112 
113  virtual QwtGraphic legendIcon(
114  int index, const QSizeF& ) const QWT_OVERRIDE;
115 
116  protected:
117  virtual void drawLines( QPainter*,
118  const QRectF&, const QPointF& ) const;
119 
120  virtual void drawSymbol( QPainter*,
121  const QRectF&, const QPointF& ) const;
122 
123  virtual void drawLabel( QPainter*,
124  const QRectF&, const QPointF& ) const;
125 
126  private:
127 
128  class PrivateData;
129  PrivateData* m_data;
130 };
131 
132 #endif
QwtGraphic
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
QwtPlotMarker::HLine
@ HLine
A horizontal line.
Definition: qwt_plot_marker.h:59
QwtPlotMarker::NoLine
@ NoLine
No line.
Definition: qwt_plot_marker.h:56
qwt_global.h
QwtPlotMarker::PrivateData
Definition: qwt_plot_marker.cpp:20
QwtPlotMarker::VLine
@ VLine
A vertical line.
Definition: qwt_plot_marker.h:62
QwtText
A class representing a text.
Definition: qwt_text.h:51
QwtSymbol
A class for drawing symbols.
Definition: qwt_symbol.h:31
QwtPlotItem
Base class for items on the plot canvas.
Definition: qwt_plot_item.h:66
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtPlotMarker::LineStyle
LineStyle
Definition: qwt_plot_marker.h:53
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
qwt_plot_item.h
QwtPlotMarker
A class for drawing markers.
Definition: qwt_plot_marker.h:45
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:136


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46