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