##// END OF EJS Templates
Documented QChart properties
Tero Ahola -
r1526:3a8d24692369
parent child
Show More
@@ -66,6 +66,47 QTCOMMERCIALCHART_BEGIN_NAMESPACE
66 */
66 */
67
67
68 /*!
68 /*!
69 \property QChart::animationOptions
70 The animation \a options for the chart. Animations are enabled/disabled based on this setting.
71 */
72
73 /*!
74 \property QChart::backgroundVisible
75 Whether the chart background is visible or not.
76 \sa setBackgroundBrush(), setBackgroundPen()
77 */
78
79 /*!
80 \property QChart::dropShadowEnabled
81 If set to true, the background drop shadow effect is enabled. If set to false, it is disabled. Note that the drop
82 shadow effect depends on theme, which means the setting may be changed if you switch to another theme.
83 */
84
85 /*!
86 \property QChart::margins
87 Margins around the plot area. Note that the margin area is used for drawing chart title, legend and axes.
88 */
89
90 /*!
91 \property QChart::theme
92 Theme is a built-in collection of UI style related settings applied for all visual elements of a chart, like colors,
93 pens, brushes and fonts of series, axes, title and legend. \l {Chart themes demo} shows an example with a few
94 different themes.
95 Note: changing the theme will overwrite all customizations previously applied to the series.
96 */
97
98 /*!
99 \property QChart::title
100 Title is the name (label) of a chart. It is shown as a headline on top of the chart.
101 */
102
103 /*!
104 \fn void QChart::marginsChanged(QRectF newMargins)
105 The margins around plot area have changed to \a newMargins. This may happen for example if you change title font size,
106 modify axes or hide/show legend.
107 */
108
109 /*!
69 Constructs a chart object which is a child of a\a parent. Parameter \a wFlags is passed to the QGraphicsWidget constructor.
110 Constructs a chart object which is a child of a\a parent. Parameter \a wFlags is passed to the QGraphicsWidget constructor.
70 */
111 */
71 QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) : QGraphicsWidget(parent,wFlags),
112 QChart::QChart(QGraphicsItem *parent, Qt::WindowFlags wFlags) : QGraphicsWidget(parent,wFlags),
@@ -232,21 +273,11 QBrush QChart::titleBrush() const
232 return d_ptr->m_presenter->m_titleItem->brush();
273 return d_ptr->m_presenter->m_titleItem->brush();
233 }
274 }
234
275
235 /*!
236 Sets the \a theme used by the chart for rendering the graphical representation of the data.
237
238 Note: changing the theme will overwrite all customizations (pen, brush, font, ect.) done to the series.
239 \sa theme()
240 */
241 void QChart::setTheme(QChart::ChartTheme theme)
276 void QChart::setTheme(QChart::ChartTheme theme)
242 {
277 {
243 d_ptr->m_presenter->setTheme(theme);
278 d_ptr->m_presenter->setTheme(theme);
244 }
279 }
245
280
246 /*!
247 Returns the theme enum used by the chart.
248 \sa ChartTheme, setTheme()
249 */
250 QChart::ChartTheme QChart::theme() const
281 QChart::ChartTheme QChart::theme() const
251 {
282 {
252 return d_ptr->m_presenter->theme();
283 return d_ptr->m_presenter->theme();
@@ -344,17 +375,11 void QChart::resizeEvent(QGraphicsSceneResizeEvent *event)
344 d_ptr->m_presenter->setGeometry(d_ptr->m_rect);
375 d_ptr->m_presenter->setGeometry(d_ptr->m_rect);
345 }
376 }
346
377
347 /*!
348 Sets animation \a options for the chart
349 */
350 void QChart::setAnimationOptions(AnimationOptions options)
378 void QChart::setAnimationOptions(AnimationOptions options)
351 {
379 {
352 d_ptr->m_presenter->setAnimationOptions(options);
380 d_ptr->m_presenter->setAnimationOptions(options);
353 }
381 }
354
382
355 /*!
356 Returns animation options for the chart
357 */
358 QChart::AnimationOptions QChart::animationOptions() const
383 QChart::AnimationOptions QChart::animationOptions() const
359 {
384 {
360 return d_ptr->m_presenter->animationOptions();
385 return d_ptr->m_presenter->animationOptions();
@@ -400,9 +425,6 void QChart::scroll(const QPointF &delta)
400 d_ptr->m_presenter->scroll(-delta.x(), delta.y());
425 d_ptr->m_presenter->scroll(-delta.x(), delta.y());
401 }
426 }
402
427
403 /*!
404 Sets the chart background visibility state to \a visible
405 */
406 void QChart::setBackgroundVisible(bool visible)
428 void QChart::setBackgroundVisible(bool visible)
407 {
429 {
408 //TODO: refactor me
430 //TODO: refactor me
@@ -410,9 +432,6 void QChart::setBackgroundVisible(bool visible)
410 d_ptr->m_presenter->m_backgroundItem->setVisible(visible);
432 d_ptr->m_presenter->m_backgroundItem->setVisible(visible);
411 }
433 }
412
434
413 /*!
414 Returns the chart's background visibility state
415 */
416 bool QChart::isBackgroundVisible() const
435 bool QChart::isBackgroundVisible() const
417 {
436 {
418 //TODO: refactor me
437 //TODO: refactor me
@@ -422,18 +441,12 bool QChart::isBackgroundVisible() const
422 return d_ptr->m_presenter->m_backgroundItem->isVisible();
441 return d_ptr->m_presenter->m_backgroundItem->isVisible();
423 }
442 }
424
443
425 /*!
426 Sets the background drop shadow effect state to \a enabled.
427 */
428 void QChart::setDropShadowEnabled(bool enabled)
444 void QChart::setDropShadowEnabled(bool enabled)
429 {
445 {
430 d_ptr->m_presenter->createChartBackgroundItem();
446 d_ptr->m_presenter->createChartBackgroundItem();
431 d_ptr->m_presenter->m_backgroundItem->setDropShadowEnabled(enabled);
447 d_ptr->m_presenter->m_backgroundItem->setDropShadowEnabled(enabled);
432 }
448 }
433
449
434 /*!
435 Returns true if the drop shadow effect is enabled for the chart background.
436 */
437 bool QChart::isDropShadowEnabled() const
450 bool QChart::isDropShadowEnabled() const
438 {
451 {
439 if (!d_ptr->m_presenter->m_backgroundItem)
452 if (!d_ptr->m_presenter->m_backgroundItem)
General Comments 0
You need to be logged in to leave comments. Login now