@@ -36,7 +36,7 void LineChartItem::addPoints(const QVector<QPointF>& points) | |||
|
36 | 36 | const QPointF& point =m_data[i]; |
|
37 | 37 | QGraphicsRectItem* item = new QGraphicsRectItem(0,0,3,3,this); |
|
38 | 38 | item->setPos(point.x()-1,point.y()-1);; |
|
39 |
if(!m_clipRect.contains(point) || !m_series-> |
|
|
39 | if(!m_clipRect.contains(point) || !m_series->pointsVisible()) item->setVisible(false); | |
|
40 | 40 | m_points << item; |
|
41 | 41 | } |
|
42 | 42 | } |
@@ -47,7 +47,7 void LineChartItem::addPoint(const QPointF& point) | |||
|
47 | 47 | QGraphicsRectItem* item = new QGraphicsRectItem(0,0,3,3,this); |
|
48 | 48 | m_clipRect.contains(point); |
|
49 | 49 | item->setPos(point.x()-1,point.y()-1); |
|
50 |
if(!m_clipRect.contains(point) || !m_series-> |
|
|
50 | if(!m_clipRect.contains(point) || !m_series->pointsVisible()) item->setVisible(false); | |
|
51 | 51 | m_points << item; |
|
52 | 52 | } |
|
53 | 53 |
@@ -40,7 +40,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
40 | 40 | */ |
|
41 | 41 | |
|
42 | 42 | /*! |
|
43 |
\fn bool QLineSeries:: |
|
|
43 | \fn bool QLineSeries::pointsVisible() const | |
|
44 | 44 | \brief Returns if the points are drawn for this series. |
|
45 | 45 | \sa setPointsVisible() |
|
46 | 46 | */ |
@@ -30,7 +30,7 public: // from QChartSeries | |||
|
30 | 30 | QPen pen() const { return m_pen;} |
|
31 | 31 | |
|
32 | 32 | void setPointsVisible(bool visible); |
|
33 |
bool |
|
|
33 | bool pointsVisible() const {return m_pointsVisible;} | |
|
34 | 34 | |
|
35 | 35 | int count() const; |
|
36 | 36 | qreal x(int pos) const; |
General Comments 0
You need to be logged in to leave comments.
Login now