##// END OF EJS Templates
Renames Grid to GridLine
Michal Klocek -
r535:774f7e43278b
parent child
Show More
@@ -48,7 +48,7 int main(int argc, char *argv[])
48
48
49 QChartAxis* axisX = chartView->axisX();
49 QChartAxis* axisX = chartView->axisX();
50 axisX->setLabelsAngle(45);
50 axisX->setLabelsAngle(45);
51 axisX->setGridPen(Qt::DashLine);
51 axisX->setGridLinePen(Qt::DashLine);
52
52
53 QChartAxisCategories* categoriesX = axisX->categories();
53 QChartAxisCategories* categoriesX = axisX->categories();
54 categoriesX->insert(0,"low");
54 categoriesX->insert(0,"low");
@@ -69,7 +69,7 int main(int argc, char *argv[])
69 //! [5]
69 //! [5]
70
70
71 //! [6]
71 //! [6]
72 chartView->axisX()->setGridVisible(false);
72 chartView->axisX()->setGridLineVisible(false);
73 //! [6]
73 //! [6]
74
74
75 window.setCentralWidget(chartView);
75 window.setCentralWidget(chartView);
@@ -70,7 +70,7 int main(int argc, char *argv[])
70
70
71 //! [6]
71 //! [6]
72 chartView->axisX()->setAxisVisible(false);
72 chartView->axisX()->setAxisVisible(false);
73 chartView->axisX()->setGridVisible(false);
73 chartView->axisX()->setGridLineVisible(false);
74 chartView->axisX()->setLabelsVisible(false);
74 chartView->axisX()->setLabelsVisible(false);
75 //! [6]
75 //! [6]
76
76
@@ -67,7 +67,7 int main(int argc, char *argv[])
67 //! [5]
67 //! [5]
68
68
69 //! [6]
69 //! [6]
70 chartView->axisX()->setGridVisible(false);
70 chartView->axisX()->setGridLineVisible(false);
71 //! [6]
71 //! [6]
72
72
73 window.setCentralWidget(chartView);
73 window.setCentralWidget(chartView);
@@ -140,7 +140,7 int main(int argc, char *argv[])
140
140
141 // Disable axis, since they don't really apply to bar chart
141 // Disable axis, since they don't really apply to bar chart
142 // drilldownChart->axisX()->setAxisVisible(false);
142 // drilldownChart->axisX()->setAxisVisible(false);
143 drilldownChart->axisX()->setGridVisible(false);
143 drilldownChart->axisX()->setGridLineVisible(false);
144 // drilldownChart->axisX()->setLabelsVisible(false);
144 // drilldownChart->axisX()->setLabelsVisible(false);
145
145
146 QLegend* l = drilldownChart->legend();
146 QLegend* l = drilldownChart->legend();
@@ -336,7 +336,7 void AxisItem::handleAxisUpdated()
336 setAxisOpacity(0);
336 setAxisOpacity(0);
337 }
337 }
338
338
339 if(m_chartAxis->isGridVisible()) {
339 if(m_chartAxis->isGridLineVisible()) {
340 setGridOpacity(100);
340 setGridOpacity(100);
341 }
341 }
342 else {
342 else {
@@ -363,7 +363,7 void AxisItem::handleAxisUpdated()
363 setLabelsPen(m_chartAxis->labelsPen());
363 setLabelsPen(m_chartAxis->labelsPen());
364 setLabelsBrush(m_chartAxis->labelsBrush());
364 setLabelsBrush(m_chartAxis->labelsBrush());
365 setLabelsFont(m_chartAxis->labelsFont());
365 setLabelsFont(m_chartAxis->labelsFont());
366 setGridPen(m_chartAxis->gridPen());
366 setGridPen(m_chartAxis->gridLinePen());
367 setShadesPen(m_chartAxis->shadesPen());
367 setShadesPen(m_chartAxis->shadesPen());
368 setShadesBrush(m_chartAxis->shadesBrush());
368 setShadesBrush(m_chartAxis->shadesBrush());
369
369
@@ -28,9 +28,9 QTCOMMERCIALCHART_BEGIN_NAMESPACE
28
28
29
29
30 /*!
30 /*!
31 \fn bool QChartAxis::isGridVisible() const
31 \fn bool QChartAxis::isGridLineVisible() const
32 \brief Returns if grid is visible
32 \brief Returns if grid is visible
33 \sa setGridVisible()
33 \sa setGridLineVisible()
34 */
34 */
35
35
36 /*!
36 /*!
@@ -142,7 +142,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
142
142
143 QChartAxis::QChartAxis(QObject* parent):QObject(parent),
143 QChartAxis::QChartAxis(QObject* parent):QObject(parent),
144 m_axisVisible(true),
144 m_axisVisible(true),
145 m_gridVisible(true),
145 m_gridLineVisible(true),
146 m_labelsVisible(true),
146 m_labelsVisible(true),
147 m_labelsAngle(0),
147 m_labelsAngle(0),
148 m_shadesVisible(true),
148 m_shadesVisible(true),
@@ -185,23 +185,23 void QChartAxis::setAxisVisible(bool visible)
185 }
185 }
186
186
187 /*!
187 /*!
188 Sets if grid is \a visible.
188 Sets if grid line is \a visible.
189 */
189 */
190 void QChartAxis::setGridVisible(bool visible)
190 void QChartAxis::setGridLineVisible(bool visible)
191 {
191 {
192 if (m_gridVisible!=visible) {
192 if (m_gridLineVisible!=visible) {
193 m_gridVisible=visible;
193 m_gridLineVisible=visible;
194 emit updated();
194 emit updated();
195 }
195 }
196 }
196 }
197
197
198 /*!
198 /*!
199 Sets \a pen used to draw grid.
199 Sets \a pen used to draw grid line.
200 */
200 */
201 void QChartAxis::setGridPen(const QPen& pen)
201 void QChartAxis::setGridLinePen(const QPen& pen)
202 {
202 {
203 if (m_gridPen!=pen) {
203 if (m_gridLinePen!=pen) {
204 m_gridPen=pen;
204 m_gridLinePen=pen;
205 emit updated();
205 emit updated();
206 }
206 }
207 }
207 }
@@ -368,7 +368,7 void QChartAxis::setTicksCount(int count)
368 void QChartAxis::show()
368 void QChartAxis::show()
369 {
369 {
370 m_axisVisible=true;
370 m_axisVisible=true;
371 m_gridVisible=true;
371 m_gridLineVisible=true;
372 m_labelsVisible=true;
372 m_labelsVisible=true;
373 m_shadesVisible=true;
373 m_shadesVisible=true;
374 emit updated();
374 emit updated();
@@ -380,7 +380,7 void QChartAxis::show()
380 void QChartAxis::hide()
380 void QChartAxis::hide()
381 {
381 {
382 m_axisVisible=false;
382 m_axisVisible=false;
383 m_gridVisible=false;
383 m_gridLineVisible=false;
384 m_labelsVisible=false;
384 m_labelsVisible=false;
385 m_shadesVisible=false;
385 m_shadesVisible=false;
386 emit updated();
386 emit updated();
@@ -22,10 +22,10 public:
22 QPen axisPen() const { return m_axisPen;};
22 QPen axisPen() const { return m_axisPen;};
23
23
24 //grid handling
24 //grid handling
25 bool isGridVisible() const { return m_gridVisible;};
25 bool isGridLineVisible() const { return m_gridLineVisible;};
26 void setGridVisible(bool visible);
26 void setGridLineVisible(bool visible);
27 void setGridPen(const QPen& pen);
27 void setGridLinePen(const QPen& pen);
28 QPen gridPen() const {return m_gridPen;}
28 QPen gridLinePen() const {return m_gridLinePen;}
29
29
30 //labels handling
30 //labels handling
31 bool labelsVisible() const { return m_labelsVisible;};
31 bool labelsVisible() const { return m_labelsVisible;};
@@ -81,8 +81,8 private:
81 QPen m_axisPen;
81 QPen m_axisPen;
82 QBrush m_axisBrush;
82 QBrush m_axisBrush;
83
83
84 bool m_gridVisible;
84 bool m_gridLineVisible;
85 QPen m_gridPen;
85 QPen m_gridLinePen;
86
86
87 bool m_labelsVisible;
87 bool m_labelsVisible;
88 QPen m_labelsPen;
88 QPen m_labelsPen;
General Comments 0
You need to be logged in to leave comments. Login now