@@ -48,7 +48,7 int main(int argc, char *argv[]) | |||
|
48 | 48 | |
|
49 | 49 | QChartAxis* axisX = chartView->axisX(); |
|
50 | 50 | axisX->setLabelsAngle(45); |
|
51 | axisX->setGridPen(Qt::DashLine); | |
|
51 | axisX->setGridLinePen(Qt::DashLine); | |
|
52 | 52 | |
|
53 | 53 | QChartAxisCategories* categoriesX = axisX->categories(); |
|
54 | 54 | categoriesX->insert(0,"low"); |
@@ -69,7 +69,7 int main(int argc, char *argv[]) | |||
|
69 | 69 | //! [5] |
|
70 | 70 | |
|
71 | 71 | //! [6] |
|
72 | chartView->axisX()->setGridVisible(false); | |
|
72 | chartView->axisX()->setGridLineVisible(false); | |
|
73 | 73 | //! [6] |
|
74 | 74 | |
|
75 | 75 | window.setCentralWidget(chartView); |
@@ -70,7 +70,7 int main(int argc, char *argv[]) | |||
|
70 | 70 | |
|
71 | 71 | //! [6] |
|
72 | 72 | chartView->axisX()->setAxisVisible(false); |
|
73 | chartView->axisX()->setGridVisible(false); | |
|
73 | chartView->axisX()->setGridLineVisible(false); | |
|
74 | 74 | chartView->axisX()->setLabelsVisible(false); |
|
75 | 75 | //! [6] |
|
76 | 76 |
@@ -67,7 +67,7 int main(int argc, char *argv[]) | |||
|
67 | 67 | //! [5] |
|
68 | 68 | |
|
69 | 69 | //! [6] |
|
70 | chartView->axisX()->setGridVisible(false); | |
|
70 | chartView->axisX()->setGridLineVisible(false); | |
|
71 | 71 | //! [6] |
|
72 | 72 | |
|
73 | 73 | window.setCentralWidget(chartView); |
@@ -140,7 +140,7 int main(int argc, char *argv[]) | |||
|
140 | 140 | |
|
141 | 141 | // Disable axis, since they don't really apply to bar chart |
|
142 | 142 | // drilldownChart->axisX()->setAxisVisible(false); |
|
143 | drilldownChart->axisX()->setGridVisible(false); | |
|
143 | drilldownChart->axisX()->setGridLineVisible(false); | |
|
144 | 144 | // drilldownChart->axisX()->setLabelsVisible(false); |
|
145 | 145 | |
|
146 | 146 | QLegend* l = drilldownChart->legend(); |
@@ -336,7 +336,7 void AxisItem::handleAxisUpdated() | |||
|
336 | 336 | setAxisOpacity(0); |
|
337 | 337 | } |
|
338 | 338 | |
|
339 | if(m_chartAxis->isGridVisible()) { | |
|
339 | if(m_chartAxis->isGridLineVisible()) { | |
|
340 | 340 | setGridOpacity(100); |
|
341 | 341 | } |
|
342 | 342 | else { |
@@ -363,7 +363,7 void AxisItem::handleAxisUpdated() | |||
|
363 | 363 | setLabelsPen(m_chartAxis->labelsPen()); |
|
364 | 364 | setLabelsBrush(m_chartAxis->labelsBrush()); |
|
365 | 365 | setLabelsFont(m_chartAxis->labelsFont()); |
|
366 | setGridPen(m_chartAxis->gridPen()); | |
|
366 | setGridPen(m_chartAxis->gridLinePen()); | |
|
367 | 367 | setShadesPen(m_chartAxis->shadesPen()); |
|
368 | 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 | 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 | 143 | QChartAxis::QChartAxis(QObject* parent):QObject(parent), |
|
144 | 144 | m_axisVisible(true), |
|
145 | m_gridVisible(true), | |
|
145 | m_gridLineVisible(true), | |
|
146 | 146 | m_labelsVisible(true), |
|
147 | 147 | m_labelsAngle(0), |
|
148 | 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) { | |
|
193 | m_gridVisible=visible; | |
|
192 | if (m_gridLineVisible!=visible) { | |
|
193 | m_gridLineVisible=visible; | |
|
194 | 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) { | |
|
204 | m_gridPen=pen; | |
|
203 | if (m_gridLinePen!=pen) { | |
|
204 | m_gridLinePen=pen; | |
|
205 | 205 | emit updated(); |
|
206 | 206 | } |
|
207 | 207 | } |
@@ -368,7 +368,7 void QChartAxis::setTicksCount(int count) | |||
|
368 | 368 | void QChartAxis::show() |
|
369 | 369 | { |
|
370 | 370 | m_axisVisible=true; |
|
371 | m_gridVisible=true; | |
|
371 | m_gridLineVisible=true; | |
|
372 | 372 | m_labelsVisible=true; |
|
373 | 373 | m_shadesVisible=true; |
|
374 | 374 | emit updated(); |
@@ -380,7 +380,7 void QChartAxis::show() | |||
|
380 | 380 | void QChartAxis::hide() |
|
381 | 381 | { |
|
382 | 382 | m_axisVisible=false; |
|
383 | m_gridVisible=false; | |
|
383 | m_gridLineVisible=false; | |
|
384 | 384 | m_labelsVisible=false; |
|
385 | 385 | m_shadesVisible=false; |
|
386 | 386 | emit updated(); |
@@ -22,10 +22,10 public: | |||
|
22 | 22 | QPen axisPen() const { return m_axisPen;}; |
|
23 | 23 | |
|
24 | 24 | //grid handling |
|
25 | bool isGridVisible() const { return m_gridVisible;}; | |
|
26 | void setGridVisible(bool visible); | |
|
27 | void setGridPen(const QPen& pen); | |
|
28 | QPen gridPen() const {return m_gridPen;} | |
|
25 | bool isGridLineVisible() const { return m_gridLineVisible;}; | |
|
26 | void setGridLineVisible(bool visible); | |
|
27 | void setGridLinePen(const QPen& pen); | |
|
28 | QPen gridLinePen() const {return m_gridLinePen;} | |
|
29 | 29 | |
|
30 | 30 | //labels handling |
|
31 | 31 | bool labelsVisible() const { return m_labelsVisible;}; |
@@ -81,8 +81,8 private: | |||
|
81 | 81 | QPen m_axisPen; |
|
82 | 82 | QBrush m_axisBrush; |
|
83 | 83 | |
|
84 | bool m_gridVisible; | |
|
85 | QPen m_gridPen; | |
|
84 | bool m_gridLineVisible; | |
|
85 | QPen m_gridLinePen; | |
|
86 | 86 | |
|
87 | 87 | bool m_labelsVisible; |
|
88 | 88 | QPen m_labelsPen; |
General Comments 0
You need to be logged in to leave comments.
Login now