##// END OF EJS Templates
App for demonstrating QML customization apis
App for demonstrating QML customization apis

File last commit:

r1241:51695bb27b0e
r1259:5664856ed1d4
Show More
chartpresenter_p.h
142 lines | 4.0 KiB | text/x-c | CLexer
/ src / chartpresenter_p.h
Jani Honkonen
Add license headers
r794 /****************************************************************************
**
** 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$
**
****************************************************************************/
Michal Klocek
Fixes header guard style issues
r969 #ifndef CHARTPRESENTER_H
#define CHARTPRESENTER_H
Michal Klocek
Refactors qchart , adds line animation...
r131
#include "qchartglobal.h"
Michal Klocek
Refactor themes...
r143 #include "qchart.h" //becouse of QChart::ChartThemeId //TODO
Michal Klocek
Refactors qchart , adds line animation...
r131 #include <QRectF>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactors chartitem...
r677 class Chart;
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 class QAbstractSeries;
Michal Klocek
Refactors qchart , adds line animation...
r131 class ChartDataSet;
class Domain;
Michal Klocek
Changes QChartAxis -> QAxis
r1006 class ChartAxis;
Michal Klocek
Refactor themes...
r143 class ChartTheme;
Michal Klocek
Animation refactor...
r530 class ChartAnimator;
Michal Klocek
Changes QChartAxis -> QAxis
r1006 class ChartBackground;
Michal Klocek
Refactors axis animation, line animations
r1241 class ChartAnimation;
Michal Klocek
Refactors qchart , adds line animation...
r131
class ChartPresenter: public QObject
{
Q_OBJECT
public:
Tero Ahola
Fixed drawing issues in Scatter
r375 enum ZValues {
BackgroundZValue = -1,
ShadesZValue,
GridZValue,
LineChartZValue,
sauimone
barhcart zvalue added
r594 BarSeriesZValue,
Tero Ahola
Z order for pie
r490 ScatterSeriesZValue,
sauimone
background to legend, theme applies
r540 PieSeriesZValue,
Michal Klocek
Adds back reimplemnted categories handling
r701 AxisZValue,
sauimone
background to legend, theme applies
r540 LegendZValue
Tero Ahola
Fixed drawing issues in Scatter
r375 };
Michal Klocek
Refactors axis animation, line animations
r1241 enum State {ShowState,
ScrollUpState,
ScrollDownState,
ScrollLeftState,
ScrollRightState,
ZoomInState,
ZoomOutState
};
Michal Klocek
Adds ZOrder enum to presenter
r262
Michal Klocek
Refactors qchart , adds line animation...
r131 ChartPresenter(QChart* chart,ChartDataSet *dataset);
virtual ~ChartPresenter();
Michal Klocek
Refactored for MVP...
r139
Michal Klocek
Polishing qchart class
r742 ChartAnimator* animator() const { return m_animator; }
ChartTheme *chartTheme() const { return m_chartTheme; }
ChartDataSet *dataSet() const { return m_dataset; }
QGraphicsItem* rootItem() const { return m_chart; }
Michal Klocek
Refactors qchart , adds line animation...
r131
Michal Klocek
Adds PIMPL to qchart
r740 void setTheme(QChart::ChartTheme theme,bool force = true);
QChart::ChartTheme theme();
Michal Klocek
Refactor themes...
r143
Michal Klocek
Adds animation settings handling
r298 void setAnimationOptions(QChart::AnimationOptions options);
QChart::AnimationOptions animationOptions() const;
Jani Honkonen
Add gestures support for zoomlinechart example...
r1187 void zoomIn(qreal factor);
Michal Klocek
Refactor domain model...
r439 void zoomIn(const QRectF& rect);
Jani Honkonen
Add gestures support for zoomlinechart example...
r1187 void zoomOut(qreal factor);
Michal Klocek
Adds scroll support...
r531 void scroll(int dx,int dy);
Jani Honkonen
Fix add/remove animation for pie and apply colors from theme when adding/removing
r659
Michal Klocek
Refactor qledgend handling...
r855 void setGeometry(const QRectF& rect);
QRectF chartGeometry() const { return m_chartRect; }
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void setMinimumMarginHeight(ChartAxis* axis, qreal height);
void setMinimumMarginWidth(ChartAxis* axis, qreal width);
Michal Klocek
Refactor qledgend handling...
r855 qreal minimumLeftMargin() const { return m_minLeftMargin; }
qreal minimumBottomMargin() const { return m_minBottomMargin; }
Michal Klocek
Refactors axis animation, line animations
r1241 void startAnimation(ChartAnimation* animation);
State state() const { return m_state; }
QPointF statePoint() const { return m_statePoint; }
Michal Klocek
Refactor qledgend handling...
r855 public: //TODO: fix me
Michal Klocek
Adds scroll support...
r531 void resetAllElements();
Michal Klocek
Refactor qledgend handling...
r855 void createChartBackgroundItem();
void createChartTitleItem();
Michal Klocek
Increses margins prescision
r874 QRectF margins() const { return m_chartMargins;}
Michal Klocek
Refactors qchart , adds line animation...
r131
sauimone
Q_SIGNALS and Q_SLOTS
r775 public Q_SLOTS:
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 void handleSeriesAdded(QAbstractSeries* series,Domain* domain);
void handleSeriesRemoved(QAbstractSeries* series);
Michal Klocek
Changes QChartAxis -> QAxis
r1006 void handleAxisAdded(QAxis* axis,Domain* domain);
void handleAxisRemoved(QAxis* axis);
Michal Klocek
Refactor qledgend handling...
r855 void updateLayout();
Michal Klocek
Refactor domain model...
r439
Michal Klocek
Refactors axis animation, line animations
r1241 private Q_SLOTS:
void handleAnimationFinished();
sauimone
Q_SIGNALS and Q_SLOTS
r775 Q_SIGNALS:
Michal Klocek
Refactored for MVP...
r139 void geometryChanged(const QRectF& rect);
Michal Klocek
Refactors axis animation, line animations
r1241 void animationsFinished();
Michal Klocek
Refactor qledgend handling...
r855
Michal Klocek
Refactors qchart , adds line animation...
r131 private:
QChart* m_chart;
Michal Klocek
Animation refactor...
r530 ChartAnimator* m_animator;
Michal Klocek
Refactors qchart , adds line animation...
r131 ChartDataSet* m_dataset;
Michal Klocek
Refactor themes...
r143 ChartTheme *m_chartTheme;
Tero Ahola
Renamed QSeries to QAbstractSeries
r988 QMap<QAbstractSeries *, Chart *> m_chartItems;
Michal Klocek
Changes QChartAxis -> QAxis
r1006 QMap<QAxis *, ChartAxis *> m_axisItems;
Michal Klocek
Refactors qchart , adds line animation...
r131 QRectF m_rect;
Michal Klocek
Refactor qledgend handling...
r855 QRectF m_chartRect;
Michal Klocek
Adds animation settings handling
r298 QChart::AnimationOptions m_options;
Michal Klocek
Refactor qledgend handling...
r855 qreal m_minLeftMargin;
qreal m_minBottomMargin;
Michal Klocek
Refactors axis animation, line animations
r1241 State m_state;
QPointF m_statePoint;
QList<ChartAnimation*> m_animations;
Michal Klocek
Refactor qledgend handling...
r855 public: //TODO: fixme
ChartBackground* m_backgroundItem;
QGraphicsSimpleTextItem* m_titleItem;
int m_marginBig;
int m_marginSmall;
int m_marginTiny;
Michal Klocek
Increses margins prescision
r874 QRectF m_chartMargins;
QRectF m_legendMargins;
Michal Klocek
Refactors qchart , adds line animation...
r131 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif /* CHARTPRESENTER_H_ */