@@ -177,8 +177,8 QComboBox* ThemeWidget::createLegendBox() const | |||
|
177 | 177 | QChart* ThemeWidget::createAreaChart() const |
|
178 | 178 | { |
|
179 | 179 | QChart *chart = new QChart(); |
|
180 | chart->axisX()->setNiceNumbers(true); | |
|
181 | chart->axisY()->setNiceNumbers(true); | |
|
180 | chart->axisX()->setNiceNumbersEnabled(true); | |
|
181 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
182 | 182 | chart->setTitle("Area chart"); |
|
183 | 183 | |
|
184 | 184 | // The lower series initialized to zero values |
@@ -207,8 +207,8 QChart* ThemeWidget::createAreaChart() const | |||
|
207 | 207 | QChart* ThemeWidget::createBarChart(int valueCount) const |
|
208 | 208 | { |
|
209 | 209 | QChart* chart = new QChart(); |
|
210 | chart->axisX()->setNiceNumbers(true); | |
|
211 | chart->axisY()->setNiceNumbers(true); | |
|
210 | chart->axisX()->setNiceNumbersEnabled(true); | |
|
211 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
212 | 212 | chart->setTitle("Bar chart"); |
|
213 | 213 | |
|
214 | 214 | QBarCategories categories; |
@@ -230,8 +230,8 QChart* ThemeWidget::createBarChart(int valueCount) const | |||
|
230 | 230 | QChart* ThemeWidget::createLineChart() const |
|
231 | 231 | { |
|
232 | 232 | QChart* chart = new QChart(); |
|
233 | chart->axisX()->setNiceNumbers(true); | |
|
234 | chart->axisY()->setNiceNumbers(true); | |
|
233 | chart->axisX()->setNiceNumbersEnabled(true); | |
|
234 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
235 | 235 | chart->setTitle("Line chart"); |
|
236 | 236 | |
|
237 | 237 | QString name("Series "); |
@@ -276,8 +276,8 QChart* ThemeWidget::createPieChart() const | |||
|
276 | 276 | QChart* ThemeWidget::createSplineChart() const |
|
277 | 277 | { // spine chart |
|
278 | 278 | QChart* chart = new QChart(); |
|
279 | chart->axisX()->setNiceNumbers(true); | |
|
280 | chart->axisY()->setNiceNumbers(true); | |
|
279 | chart->axisX()->setNiceNumbersEnabled(true); | |
|
280 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
281 | 281 | chart->setTitle("Spline chart"); |
|
282 | 282 | QString name("Series "); |
|
283 | 283 | int nameIndex = 0; |
@@ -295,8 +295,8 QChart* ThemeWidget::createSplineChart() const | |||
|
295 | 295 | QChart* ThemeWidget::createScatterChart() const |
|
296 | 296 | { // scatter chart |
|
297 | 297 | QChart* chart = new QChart(); |
|
298 | chart->axisX()->setNiceNumbers(true); | |
|
299 | chart->axisY()->setNiceNumbers(true); | |
|
298 | chart->axisX()->setNiceNumbersEnabled(true); | |
|
299 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
300 | 300 | chart->setTitle("Scatter chart"); |
|
301 | 301 | QString name("Series "); |
|
302 | 302 | int nameIndex = 0; |
@@ -68,7 +68,7 int main(int argc, char *argv[]) | |||
|
68 | 68 | //![5] |
|
69 | 69 | chart->legend()->setVisible(true); |
|
70 | 70 | chart->legend()->setAlignment(QLegend::AlignmentBottom); |
|
71 | chart->axisY()->setNiceNumbers(true); | |
|
71 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
72 | 72 | //![5] |
|
73 | 73 | |
|
74 | 74 | //![6] |
@@ -27,8 +27,8 int main(int argc, char *argv[]) | |||
|
27 | 27 | QApplication a(argc, argv); |
|
28 | 28 | QMainWindow window; |
|
29 | 29 | QChart* chart = new QChart(); |
|
30 | chart->axisX()->setNiceNumbers(true); | |
|
31 | chart->axisY()->setNiceNumbers(true); | |
|
30 | chart->axisX()->setNiceNumbersEnabled(true); | |
|
31 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
32 | 32 | ChartView chartView(chart,&window); |
|
33 | 33 | chartView.setRenderHint(QPainter::Antialiasing); |
|
34 | 34 | chart->setAnimationOptions(QChart::AllAnimations); |
@@ -68,7 +68,7 int main(int argc, char *argv[]) | |||
|
68 | 68 | //![5] |
|
69 | 69 | chart->legend()->setVisible(true); |
|
70 | 70 | chart->legend()->setAlignment(QLegend::AlignmentBottom); |
|
71 | chart->axisY()->setNiceNumbers(true); | |
|
71 | chart->axisY()->setNiceNumbersEnabled(true); | |
|
72 | 72 | //![5] |
|
73 | 73 | |
|
74 | 74 | //![6] |
@@ -36,7 +36,7 void DrilldownChart::changeSeries(QSeries* series) | |||
|
36 | 36 | m_currentSeries = series; |
|
37 | 37 | addSeries(series); |
|
38 | 38 | setTitle(series->name()); |
|
39 | axisY()->setNiceNumbers(true); | |
|
39 | axisY()->setNiceNumbersEnabled(true); | |
|
40 | 40 | } |
|
41 | 41 | |
|
42 | 42 | void DrilldownChart::handleClicked(QBarSet *barset, QString category, Qt::MouseButtons button) |
@@ -101,7 +101,7 int main(int argc, char *argv[]) | |||
|
101 | 101 | |
|
102 | 102 | //! [7] |
|
103 | 103 | drilldownChart->axisX()->setGridLineVisible(false); |
|
104 | drilldownChart->axisY()->setNiceNumbers(true); | |
|
104 | drilldownChart->axisY()->setNiceNumbersEnabled(true); | |
|
105 | 105 | drilldownChart->legend()->setVisible(true); |
|
106 | 106 | drilldownChart->legend()->setAlignment(QLegend::AlignmentBottom); |
|
107 | 107 | //! [7] |
@@ -49,7 +49,7 public: | |||
|
49 | 49 | void setBrush(const QBrush &brush); |
|
50 | 50 | QBrush brush() const; |
|
51 | 51 | |
|
52 | void setPointsVisible(bool visible); | |
|
52 | void setPointsVisible(bool visible = true); | |
|
53 | 53 | bool pointsVisible() const; |
|
54 | 54 | |
|
55 | 55 | bool setModel(QAbstractItemModel* model); |
@@ -147,11 +147,6 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
147 | 147 | */ |
|
148 | 148 | |
|
149 | 149 | /*! |
|
150 | \fn bool QChartAxis::niceNumbers() const | |
|
151 | \brief Returns whether nice numbers are enabled or not. | |
|
152 | */ | |
|
153 | ||
|
154 | /*! | |
|
155 | 150 | \fn QChartAxisCategories* QChartAxis::categories() |
|
156 | 151 | \brief Returns pointer to the list of categories which correspond to the values on the axis. |
|
157 | 152 | */ |
@@ -482,7 +477,7 void QChartAxis::hide() | |||
|
482 | 477 | /*! |
|
483 | 478 | Sets the nice numbers state to \a enable |
|
484 | 479 | */ |
|
485 | void QChartAxis::setNiceNumbers(bool enable) | |
|
480 | void QChartAxis::setNiceNumbersEnabled(bool enable) | |
|
486 | 481 | { |
|
487 | 482 | if (d_ptr->m_niceNumbers != enable){ |
|
488 | 483 | d_ptr->m_niceNumbers = enable; |
@@ -490,7 +485,10 void QChartAxis::setNiceNumbers(bool enable) | |||
|
490 | 485 | } |
|
491 | 486 | } |
|
492 | 487 | |
|
493 | bool QChartAxis::niceNumbers() const | |
|
488 | /*! | |
|
489 | Returns whether nice numbers are enabled or not. | |
|
490 | */ | |
|
491 | bool QChartAxis::niceNumbersEnabled() const | |
|
494 | 492 | { |
|
495 | 493 | return d_ptr->m_niceNumbers; |
|
496 | 494 | } |
@@ -40,19 +40,19 public: | |||
|
40 | 40 | |
|
41 | 41 | //axis handling |
|
42 | 42 | bool isAxisVisible() const; |
|
43 | void setAxisVisible(bool visible); | |
|
43 | void setAxisVisible(bool visible = true); | |
|
44 | 44 | void setAxisPen(const QPen &pen); |
|
45 | 45 | QPen axisPen() const; |
|
46 | 46 | |
|
47 | 47 | //grid handling |
|
48 | 48 | bool isGridLineVisible() const; |
|
49 | void setGridLineVisible(bool visible); | |
|
49 | void setGridLineVisible(bool visible = true); | |
|
50 | 50 | void setGridLinePen(const QPen &pen); |
|
51 | 51 | QPen gridLinePen() const; |
|
52 | 52 | |
|
53 | 53 | //labels handling |
|
54 | 54 | bool labelsVisible() const; |
|
55 | void setLabelsVisible(bool visible); | |
|
55 | void setLabelsVisible(bool visible = true); | |
|
56 | 56 | void setLabelsPen(const QPen &pen); |
|
57 | 57 | QPen labelsPen() const; |
|
58 | 58 | void setLabelsBrush(const QBrush &brush); |
@@ -64,7 +64,7 public: | |||
|
64 | 64 | |
|
65 | 65 | //shades handling |
|
66 | 66 | bool shadesVisible() const; |
|
67 | void setShadesVisible(bool visible); | |
|
67 | void setShadesVisible(bool visible = true); | |
|
68 | 68 | void setShadesPen(const QPen &pen); |
|
69 | 69 | QPen shadesPen() const; |
|
70 | 70 | void setShadesBrush(const QBrush &brush); |
@@ -83,8 +83,8 public: | |||
|
83 | 83 | void setTicksCount(int count); |
|
84 | 84 | int ticksCount() const; |
|
85 | 85 | |
|
86 | void setNiceNumbers(bool enable); | |
|
87 | bool niceNumbers() const; | |
|
86 | void setNiceNumbersEnabled(bool enable = true); | |
|
87 | bool niceNumbersEnabled() const; | |
|
88 | 88 | |
|
89 | 89 | QChartAxisCategories* categories(); |
|
90 | 90 |
@@ -82,7 +82,7 public: | |||
|
82 | 82 | void setBackgroundPen(const QPen &pen); |
|
83 | 83 | QPen backgroundPen() const; |
|
84 | 84 | |
|
85 | void setBackgroundVisible(bool visible); | |
|
85 | void setBackgroundVisible(bool visible = true); | |
|
86 | 86 | bool isBackgroundVisible() const; |
|
87 | 87 | |
|
88 | 88 | void setAnimationOptions(AnimationOptions options); |
General Comments 0
You need to be logged in to leave comments.
Login now