@@ -362,6 +362,30 void QChartAxis::setTicksCount(int count) | |||||
362 | } |
|
362 | } | |
363 | } |
|
363 | } | |
364 |
|
364 | |||
|
365 | /*! | |||
|
366 | Sets axis, shades, labels and grid lines to be visible. | |||
|
367 | */ | |||
|
368 | void QChartAxis::show() | |||
|
369 | { | |||
|
370 | m_axisVisible=true; | |||
|
371 | m_gridVisible=true; | |||
|
372 | m_labelsVisible=true; | |||
|
373 | m_shadesVisible=true; | |||
|
374 | emit updated(); | |||
|
375 | } | |||
|
376 | ||||
|
377 | /*! | |||
|
378 | Sets axis, shades, labels and grid lines to not be visible. | |||
|
379 | */ | |||
|
380 | void QChartAxis::hide() | |||
|
381 | { | |||
|
382 | m_axisVisible=false; | |||
|
383 | m_gridVisible=false; | |||
|
384 | m_labelsVisible=false; | |||
|
385 | m_shadesVisible=false; | |||
|
386 | emit updated(); | |||
|
387 | } | |||
|
388 | ||||
365 | #include "moc_qchartaxis.cpp" |
|
389 | #include "moc_qchartaxis.cpp" | |
366 |
|
390 | |||
367 | QTCOMMERCIALCHART_END_NAMESPACE |
|
391 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -62,6 +62,9 public: | |||||
62 |
|
62 | |||
63 | QChartAxisCategories* categories() { return &m_category; } |
|
63 | QChartAxisCategories* categories() { return &m_category; } | |
64 |
|
64 | |||
|
65 | void show(); | |||
|
66 | void hide(); | |||
|
67 | ||||
65 | signals: |
|
68 | signals: | |
66 | void minChanged(qreal min); |
|
69 | void minChanged(qreal min); | |
67 | void maxChanged(qreal max); |
|
70 | void maxChanged(qreal max); |
@@ -230,14 +230,8 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain) | |||||
230 | // Hide all from background when there is only piechart |
|
230 | // Hide all from background when there is only piechart | |
231 | // TODO: refactor this ugly code... should be one setting for this |
|
231 | // TODO: refactor this ugly code... should be one setting for this | |
232 | if (m_chartItems.count() == 0) { |
|
232 | if (m_chartItems.count() == 0) { | |
233 |
m_chart->axisX()-> |
|
233 | m_chart->axisX()->hide(); | |
234 |
m_chart->axisY()-> |
|
234 | m_chart->axisY()->hide(); | |
235 | m_chart->axisX()->setGridVisible(false); |
|
|||
236 | m_chart->axisY()->setGridVisible(false); |
|
|||
237 | m_chart->axisX()->setLabelsVisible(false); |
|
|||
238 | m_chart->axisY()->setLabelsVisible(false); |
|
|||
239 | m_chart->axisX()->setShadesVisible(false); |
|
|||
240 | m_chart->axisY()->setShadesVisible(false); |
|
|||
241 | m_chart->setChartBackgroundBrush(Qt::transparent); |
|
235 | m_chart->setChartBackgroundBrush(Qt::transparent); | |
242 | } |
|
236 | } | |
243 | item=pie; |
|
237 | item=pie; |
General Comments 0
You need to be logged in to leave comments.
Login now