chartpresenter.cpp
464 lines
| 11.2 KiB
| text/x-c
|
CppLexer
/ src / chartpresenter.cpp
Jani Honkonen
|
r794 | /**************************************************************************** | ||
Michal Klocek
|
r969 | ** | ||
** Copyright (C) 2012 Digia Plc | ||||
** All rights reserved. | ||||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
#include "chartpresenter_p.h" | ||||
Michal Klocek
|
r139 | #include "qchart.h" | ||
Michal Klocek
|
r855 | #include "qchart_p.h" | ||
Michal Klocek
|
r1541 | #include "qabstractaxis.h" | ||
Michal Klocek
|
r1556 | #include "qabstractaxis_p.h" | ||
Michal Klocek
|
r131 | #include "chartdataset_p.h" | ||
Michal Klocek
|
r143 | #include "charttheme_p.h" | ||
Michal Klocek
|
r1241 | #include "chartanimation_p.h" | ||
Tero Ahola
|
r988 | #include "qabstractseries_p.h" | ||
Michal Klocek
|
r421 | #include "qareaseries.h" | ||
Michal Klocek
|
r1006 | #include "chartaxis_p.h" | ||
#include "chartbackground_p.h" | ||||
Michal Klocek
|
r1534 | #include "chartlayout_p.h" | ||
Michal Klocek
|
r1965 | #include "charttitle_p.h" | ||
Michal Klocek
|
r1241 | #include <QTimer> | ||
Michal Klocek
|
r131 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
Jani Honkonen
|
r2097 | ChartPresenter::ChartPresenter(QChart* chart, ChartDataSet* dataset) | ||
: QObject(chart), | ||||
m_chart(chart), | ||||
m_dataset(dataset), | ||||
m_chartTheme(0), | ||||
m_options(QChart::NoAnimation), | ||||
m_state(ShowState), | ||||
m_layout(new ChartLayout(this)), | ||||
m_background(0), | ||||
m_title(0) | ||||
Michal Klocek
|
r131 | { | ||
Michal Klocek
|
r1241 | |||
Michal Klocek
|
r131 | } | ||
ChartPresenter::~ChartPresenter() | ||||
{ | ||||
Michal Klocek
|
r969 | delete m_chartTheme; | ||
Michal Klocek
|
r131 | } | ||
Michal Klocek
|
r1965 | void ChartPresenter::setChartsGeometry(const QRectF& rect) | ||
Michal Klocek
|
r131 | { | ||
Michal Klocek
|
r1534 | Q_ASSERT(rect.isValid()); | ||
Michal Klocek
|
r855 | |||
Jani Honkonen
|
r2097 | if (m_chartsRect != rect) { | ||
m_chartsRect = rect; | ||||
foreach (ChartElement *chart, m_chartItems) | ||||
Michal Klocek
|
r1965 | chart->handleGeometryChanged(rect); | ||
Michal Klocek
|
r855 | } | ||
Michal Klocek
|
r139 | } | ||
Michal Klocek
|
r131 | |||
Michal Klocek
|
r1965 | QRectF ChartPresenter::chartsGeometry() const | ||
{ | ||||
return m_chartsRect; | ||||
} | ||||
Jani Honkonen
|
r2097 | void ChartPresenter::handleAxisAdded(QAbstractAxis* axis, Domain* domain) | ||
Michal Klocek
|
r223 | { | ||
Michal Klocek
|
r1556 | ChartAxis* item = axis->d_ptr->createGraphics(this); | ||
item->setDomain(domain); | ||||
Michal Klocek
|
r298 | |||
Jani Honkonen
|
r2097 | if (m_options.testFlag(QChart::GridAxisAnimations)) | ||
Michal Klocek
|
r1241 | item->setAnimation(new AxisAnimation(item)); | ||
Michal Klocek
|
r530 | |||
Jani Honkonen
|
r2097 | QObject::connect(this, SIGNAL(geometryChanged(QRectF)), item, SLOT(handleGeometryChanged(QRectF))); | ||
QObject::connect(domain, SIGNAL(updated()), item, SLOT(handleDomainUpdated())); | ||||
QObject::connect(axis, SIGNAL(visibleChanged(bool)), this, SLOT(handleAxisVisibleChanged(bool))); | ||||
Michal Klocek
|
r1698 | |||
Michal Klocek
|
r439 | //initialize | ||
Michal Klocek
|
r1698 | domain->emitUpdated(); | ||
m_chartTheme->decorate(axis); | ||||
axis->d_ptr->setDirty(false); | ||||
axis->d_ptr->emitUpdated(); | ||||
Jani Honkonen
|
r2097 | if (m_chartsRect.isValid()) | ||
item->handleGeometryChanged(m_chartsRect); | ||||
Michal Klocek
|
r1698 | |||
Tero Ahola
|
r561 | m_axisItems.insert(axis, item); | ||
Michal Klocek
|
r1628 | selectVisibleAxis(); | ||
Michal Klocek
|
r223 | } | ||
Michal Klocek
|
r1541 | void ChartPresenter::handleAxisRemoved(QAbstractAxis* axis) | ||
Michal Klocek
|
r223 | { | ||
Michal Klocek
|
r1006 | ChartAxis* item = m_axisItems.take(axis); | ||
Michal Klocek
|
r223 | Q_ASSERT(item); | ||
Michal Klocek
|
r1628 | selectVisibleAxis(); | ||
Michal Klocek
|
r1729 | item->hide(); | ||
item->disconnect(); | ||||
Jani Honkonen
|
r2097 | QObject::disconnect(this, 0, item, 0); | ||
sauimone
|
r1562 | item->deleteLater(); | ||
Michal Klocek
|
r223 | } | ||
Jani Honkonen
|
r2097 | void ChartPresenter::handleSeriesAdded(QAbstractSeries* series, Domain* domain) | ||
Michal Klocek
|
r131 | { | ||
Michal Klocek
|
r1736 | ChartElement *item = series->d_ptr->createGraphics(this); | ||
Michal Klocek
|
r969 | Q_ASSERT(item); | ||
Michal Klocek
|
r1556 | item->setDomain(domain); | ||
Jani Honkonen
|
r2097 | QObject::connect(this, SIGNAL(geometryChanged(QRectF)), item, SLOT(handleGeometryChanged(QRectF))); | ||
QObject::connect(domain, SIGNAL(updated()), item, SLOT(handleDomainUpdated())); | ||||
Michal Klocek
|
r969 | //initialize | ||
Michal Klocek
|
r1698 | item->handleDomainUpdated(); | ||
Jani Honkonen
|
r2097 | if (m_chartsRect.isValid()) | ||
item->handleGeometryChanged(m_chartsRect); | ||||
m_chartItems.insert(series, item); | ||||
Michal Klocek
|
r131 | } | ||
Tero Ahola
|
r988 | void ChartPresenter::handleSeriesRemoved(QAbstractSeries* series) | ||
Michal Klocek
|
r139 | { | ||
Michal Klocek
|
r1736 | ChartElement* item = m_chartItems.take(series); | ||
Michal Klocek
|
r530 | Q_ASSERT(item); | ||
sauimone
|
r1562 | item->deleteLater(); | ||
Michal Klocek
|
r139 | } | ||
Michal Klocek
|
r131 | |||
Michal Klocek
|
r1628 | void ChartPresenter::selectVisibleAxis() | ||
{ | ||||
QMapIterator<QAbstractAxis*, ChartAxis*> i(m_axisItems); | ||||
while (i.hasNext()) { | ||||
i.next(); | ||||
Marek Rosa
|
r2093 | // i.key()->hide(); | ||
i.key()->show(); | ||||
Michal Klocek
|
r1628 | } | ||
Marek Rosa
|
r2093 | // i.toFront(); | ||
Michal Klocek
|
r1628 | |||
Marek Rosa
|
r2093 | // bool axisX=false; | ||
// bool axisY=false; | ||||
Michal Klocek
|
r1628 | |||
Marek Rosa
|
r2093 | // while (i.hasNext()) { | ||
// i.next(); | ||||
// if(i.key()->orientation()==Qt::Vertical && !axisY) { | ||||
// axisY=true; | ||||
// i.key()->show(); | ||||
// } | ||||
// if(i.key()->orientation()==Qt::Horizontal && !axisX) { | ||||
// axisX=true; | ||||
// i.key()->show(); | ||||
// } | ||||
Michal Klocek
|
r1628 | |||
Marek Rosa
|
r2093 | // } | ||
Michal Klocek
|
r1628 | } | ||
Michal Klocek
|
r1626 | |||
void ChartPresenter::handleAxisVisibleChanged(bool visible) | ||||
{ | ||||
Jani Honkonen
|
r2097 | QAbstractAxis* axis = static_cast<QAbstractAxis*>(sender()); | ||
Michal Klocek
|
r1626 | Q_ASSERT(axis); | ||
Jani Honkonen
|
r2097 | if (visible) { | ||
Michal Klocek
|
r1626 | |||
QMapIterator<QAbstractAxis*, ChartAxis*> i(m_axisItems); | ||||
while (i.hasNext()) { | ||||
Jani Honkonen
|
r2097 | i.next(); | ||
if (i.key() == axis) | ||||
continue; | ||||
if (i.key()->orientation() == axis->orientation()) | ||||
i.key()->setVisible(false); | ||||
Michal Klocek
|
r1626 | } | ||
} | ||||
} | ||||
Jani Honkonen
|
r2097 | void ChartPresenter::setTheme(QChart::ChartTheme theme, bool force) | ||
Michal Klocek
|
r143 | { | ||
Jani Honkonen
|
r2097 | if (m_chartTheme && m_chartTheme->id() == theme) | ||
return; | ||||
Michal Klocek
|
r143 | delete m_chartTheme; | ||
m_chartTheme = ChartTheme::createTheme(theme); | ||||
Michal Klocek
|
r943 | m_chartTheme->setForced(force); | ||
m_chartTheme->decorate(m_chart); | ||||
m_chartTheme->decorate(m_chart->legend()); | ||||
Michal Klocek
|
r531 | resetAllElements(); | ||
Jani Honkonen
|
r1093 | |||
// We do not want "force" to stay on. | ||||
// Bar/pie are calling decorate when adding/removing slices/bars which means | ||||
// that to preserve users colors "force" must not be on. | ||||
m_chartTheme->setForced(false); | ||||
Michal Klocek
|
r176 | } | ||
Michal Klocek
|
r740 | QChart::ChartTheme ChartPresenter::theme() | ||
Michal Klocek
|
r143 | { | ||
Michal Klocek
|
r153 | return m_chartTheme->id(); | ||
} | ||||
Michal Klocek
|
r298 | void ChartPresenter::setAnimationOptions(QChart::AnimationOptions options) | ||
{ | ||||
Jani Honkonen
|
r2097 | if (m_options != options) { | ||
m_options = options; | ||||
Michal Klocek
|
r531 | resetAllElements(); | ||
Michal Klocek
|
r298 | } | ||
Michal Klocek
|
r530 | |||
Michal Klocek
|
r298 | } | ||
Michal Klocek
|
r531 | void ChartPresenter::resetAllElements() | ||
{ | ||||
Michal Klocek
|
r1556 | QMapIterator<QAbstractAxis*, ChartAxis*> i(m_axisItems); | ||
while (i.hasNext()) { | ||||
Jani Honkonen
|
r2097 | i.next(); | ||
Domain* domain = i.value()->domain(); | ||||
QAbstractAxis* axis = i.key(); | ||||
handleAxisRemoved(axis); | ||||
handleAxisAdded(axis, domain); | ||||
Michal Klocek
|
r969 | } | ||
Michal Klocek
|
r1556 | |||
Michal Klocek
|
r1736 | QMapIterator<QAbstractSeries*, ChartElement*> j(m_chartItems); | ||
Jani Honkonen
|
r2097 | while (j.hasNext()) { | ||
j.next(); | ||||
Domain* domain = j.value()->domain(); | ||||
QAbstractSeries* series = j.key(); | ||||
handleSeriesRemoved(series); | ||||
handleSeriesAdded(series, domain); | ||||
} | ||||
Michal Klocek
|
r1965 | |||
Jani Honkonen
|
r2097 | layout()->invalidate(); | ||
Michal Klocek
|
r531 | } | ||
Jani Honkonen
|
r1187 | void ChartPresenter::zoomIn(qreal factor) | ||
Michal Klocek
|
r439 | { | ||
Michal Klocek
|
r1965 | QRectF rect = chartsGeometry(); | ||
Jani Honkonen
|
r2097 | rect.setWidth(rect.width() / factor); | ||
rect.setHeight(rect.height() / factor); | ||||
Michal Klocek
|
r1965 | rect.moveCenter(chartsGeometry().center()); | ||
Michal Klocek
|
r969 | zoomIn(rect); | ||
Michal Klocek
|
r439 | } | ||
void ChartPresenter::zoomIn(const QRectF& rect) | ||||
{ | ||||
Michal Klocek
|
r969 | QRectF r = rect.normalized(); | ||
Michal Klocek
|
r1965 | r.translate(-chartsGeometry().topLeft()); | ||
Jani Honkonen
|
r1187 | if (!r.isValid()) | ||
return; | ||||
Michal Klocek
|
r969 | |||
Michal Klocek
|
r1241 | m_state = ZoomInState; | ||
Jani Honkonen
|
r2097 | m_statePoint = QPointF(r.center().x() / chartsGeometry().width(), r.center().y() / chartsGeometry().height()); | ||
m_dataset->zoomInDomain(r, chartsGeometry().size()); | ||||
Michal Klocek
|
r1241 | m_state = ShowState; | ||
Michal Klocek
|
r439 | } | ||
Jani Honkonen
|
r1187 | void ChartPresenter::zoomOut(qreal factor) | ||
Michal Klocek
|
r439 | { | ||
Michal Klocek
|
r1241 | m_state = ZoomOutState; | ||
Michal Klocek
|
r678 | |||
Jani Honkonen
|
r1187 | QRectF chartRect; | ||
Michal Klocek
|
r1965 | chartRect.setSize(chartsGeometry().size()); | ||
Michal Klocek
|
r678 | |||
Jani Honkonen
|
r1187 | QRectF rect; | ||
Jani Honkonen
|
r2097 | rect.setSize(chartRect.size() / factor); | ||
Jani Honkonen
|
r1187 | rect.moveCenter(chartRect.center()); | ||
if (!rect.isValid()) | ||||
return; | ||||
Jani Honkonen
|
r2097 | m_statePoint = QPointF(rect.center().x() / chartsGeometry().width(), rect.center().y() / chartsGeometry().height()); | ||
Jani Honkonen
|
r1187 | m_dataset->zoomOutDomain(rect, chartRect.size()); | ||
Michal Klocek
|
r1241 | m_state = ShowState; | ||
Michal Klocek
|
r439 | } | ||
Jani Honkonen
|
r2097 | void ChartPresenter::scroll(qreal dx, qreal dy) | ||
Michal Klocek
|
r531 | { | ||
Jani Honkonen
|
r2097 | if (dx < 0) m_state = ScrollLeftState; | ||
if (dx > 0) m_state = ScrollRightState; | ||||
if (dy < 0) m_state = ScrollUpState; | ||||
if (dy > 0) m_state = ScrollDownState; | ||||
Michal Klocek
|
r531 | |||
Jani Honkonen
|
r2097 | m_dataset->scrollDomain(dx, dy, chartsGeometry().size()); | ||
Michal Klocek
|
r1241 | m_state = ShowState; | ||
Michal Klocek
|
r531 | } | ||
Michal Klocek
|
r298 | QChart::AnimationOptions ChartPresenter::animationOptions() const | ||
{ | ||||
return m_options; | ||||
} | ||||
Michal Klocek
|
r1534 | void ChartPresenter::createBackgroundItem() | ||
Michal Klocek
|
r855 | { | ||
Michal Klocek
|
r1965 | if (!m_background) { | ||
m_background = new ChartBackground(rootItem()); | ||||
m_background->setPen(Qt::NoPen); | ||||
m_background->setZValue(ChartPresenter::BackgroundZValue); | ||||
Michal Klocek
|
r1534 | } | ||
} | ||||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | void ChartPresenter::createTitleItem() | ||
{ | ||||
Michal Klocek
|
r1965 | if (!m_title) { | ||
m_title = new ChartTitle(rootItem()); | ||||
m_title->setZValue(ChartPresenter::BackgroundZValue); | ||||
Michal Klocek
|
r1534 | } | ||
} | ||||
Tero Ahola
|
r1524 | |||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | void ChartPresenter::handleAnimationFinished() | ||
{ | ||||
Jani Honkonen
|
r2097 | m_animations.removeAll(qobject_cast<ChartAnimation*>(sender())); | ||
if (m_animations.empty()) | ||||
emit animationsFinished(); | ||||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | void ChartPresenter::startAnimation(ChartAnimation* animation) | ||
{ | ||||
Jani Honkonen
|
r2097 | if (animation->state() != QAbstractAnimation::Stopped) | ||
animation->stop(); | ||||
QObject::connect(animation, SIGNAL(finished()), this, SLOT(handleAnimationFinished()), Qt::UniqueConnection); | ||||
if (!m_animations.isEmpty()) | ||||
Michal Klocek
|
r1534 | m_animations.append(animation); | ||
QTimer::singleShot(0, animation, SLOT(start())); | ||||
} | ||||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | void ChartPresenter::setBackgroundBrush(const QBrush& brush) | ||
{ | ||||
createBackgroundItem(); | ||||
Michal Klocek
|
r1965 | m_background->setBrush(brush); | ||
Michal Klocek
|
r1534 | m_layout->invalidate(); | ||
} | ||||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | QBrush ChartPresenter::backgroundBrush() const | ||
{ | ||||
Jani Honkonen
|
r2097 | if (!m_background) | ||
return QBrush(); | ||||
Michal Klocek
|
r1965 | return m_background->brush(); | ||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | void ChartPresenter::setBackgroundPen(const QPen& pen) | ||
{ | ||||
createBackgroundItem(); | ||||
Michal Klocek
|
r1965 | m_background->setPen(pen); | ||
Michal Klocek
|
r1534 | m_layout->invalidate(); | ||
} | ||||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | QPen ChartPresenter::backgroundPen() const | ||
{ | ||||
Jani Honkonen
|
r2097 | if (!m_background) | ||
return QPen(); | ||||
Michal Klocek
|
r1965 | return m_background->pen(); | ||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r913 | |||
Michal Klocek
|
r1534 | void ChartPresenter::setTitle(const QString& title) | ||
{ | ||||
createTitleItem(); | ||||
Michal Klocek
|
r1965 | m_title->setText(title); | ||
Michal Klocek
|
r1534 | m_layout->invalidate(); | ||
} | ||||
Michal Klocek
|
r913 | |||
Michal Klocek
|
r1534 | QString ChartPresenter::title() const | ||
{ | ||||
Jani Honkonen
|
r2097 | if (!m_title) | ||
return QString(); | ||||
Michal Klocek
|
r1965 | return m_title->text(); | ||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | void ChartPresenter::setTitleFont(const QFont& font) | ||
{ | ||||
createTitleItem(); | ||||
Michal Klocek
|
r1965 | m_title->setFont(font); | ||
Michal Klocek
|
r1534 | m_layout->invalidate(); | ||
} | ||||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | QFont ChartPresenter::titleFont() const | ||
{ | ||||
Jani Honkonen
|
r2097 | if (!m_title) | ||
return QFont(); | ||||
Michal Klocek
|
r1965 | return m_title->font(); | ||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r913 | |||
Michal Klocek
|
r1534 | void ChartPresenter::setTitleBrush(const QBrush &brush) | ||
{ | ||||
createTitleItem(); | ||||
Michal Klocek
|
r1965 | m_title->setBrush(brush); | ||
Michal Klocek
|
r1534 | m_layout->invalidate(); | ||
} | ||||
Michal Klocek
|
r869 | |||
Michal Klocek
|
r1534 | QBrush ChartPresenter::titleBrush() const | ||
{ | ||||
Jani Honkonen
|
r2097 | if (!m_title) | ||
return QBrush(); | ||||
Michal Klocek
|
r1965 | return m_title->brush(); | ||
Michal Klocek
|
r1534 | } | ||
void ChartPresenter::setBackgroundVisible(bool visible) | ||||
{ | ||||
createBackgroundItem(); | ||||
Michal Klocek
|
r1965 | m_background->setVisible(visible); | ||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r871 | |||
Michal Klocek
|
r855 | |||
Michal Klocek
|
r1534 | bool ChartPresenter::isBackgroundVisible() const | ||
{ | ||||
Jani Honkonen
|
r2097 | if (!m_background) | ||
return false; | ||||
Michal Klocek
|
r1965 | return m_background->isVisible(); | ||
Michal Klocek
|
r855 | } | ||
Michal Klocek
|
r1534 | void ChartPresenter::setBackgroundDropShadowEnabled(bool enabled) | ||
Michal Klocek
|
r855 | { | ||
Michal Klocek
|
r1534 | createBackgroundItem(); | ||
Michal Klocek
|
r1965 | m_background->setDropShadowEnabled(enabled); | ||
Michal Klocek
|
r855 | } | ||
Michal Klocek
|
r1534 | bool ChartPresenter::isBackgroundDropShadowEnabled() const | ||
Michal Klocek
|
r855 | { | ||
Jani Honkonen
|
r2097 | if (!m_background) | ||
return false; | ||||
Michal Klocek
|
r1965 | return m_background->isDropShadowEnabled(); | ||
Michal Klocek
|
r855 | } | ||
Michal Klocek
|
r143 | |||
Michal Klocek
|
r1534 | |||
QGraphicsLayout* ChartPresenter::layout() | ||||
Michal Klocek
|
r1241 | { | ||
Michal Klocek
|
r1534 | return m_layout; | ||
Michal Klocek
|
r1241 | } | ||
Michal Klocek
|
r1965 | void ChartPresenter::setMargins(const QMargins& margins) | ||
Michal Klocek
|
r1241 | { | ||
Michal Klocek
|
r1965 | m_layout->setMargins(margins); | ||
Michal Klocek
|
r1534 | } | ||
Michal Klocek
|
r1965 | QMargins ChartPresenter::margins() const | ||
Michal Klocek
|
r1534 | { | ||
Michal Klocek
|
r1965 | return m_layout->margins(); | ||
Michal Klocek
|
r1534 | } | ||
QLegend* ChartPresenter::legend() | ||||
{ | ||||
return m_chart->legend(); | ||||
} | ||||
Michal Klocek
|
r1965 | void ChartPresenter::setVisible(bool visible) | ||
{ | ||||
m_chart->setVisible(visible); | ||||
} | ||||
ChartBackground* ChartPresenter::backgroundElement() | ||||
{ | ||||
return m_background; | ||||
} | ||||
Michal Klocek
|
r1534 | QList<ChartAxis*> ChartPresenter::axisItems() const | ||
{ | ||||
return m_axisItems.values(); | ||||
} | ||||
Michal Klocek
|
r1965 | ChartTitle* ChartPresenter::titleElement() | ||
Michal Klocek
|
r1534 | { | ||
Michal Klocek
|
r1965 | return m_title; | ||
Michal Klocek
|
r1241 | } | ||
Michal Klocek
|
r131 | #include "moc_chartpresenter_p.cpp" | ||
QTCOMMERCIALCHART_END_NAMESPACE | ||||