##// END OF EJS Templates
Adds mulitbarvalueaxis eample to charviewer
Adds mulitbarvalueaxis eample to charviewer

File last commit:

r2131:730996457e67
r2143:394c0457c4c4
Show More
chartpresenter_p.h
171 lines | 4.6 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$
**
****************************************************************************/
unknown
Added missing warning about private implementation
r1366 // W A R N I N G
// -------------
//
// This file is not part of the QtCommercial Chart API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
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>
Michal Klocek
Implements minimumMargins...
r1883 #include <QMargins>
Michal Klocek
Refactors qchart , adds line animation...
r131
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactors Chart to ChartElement
r1736 class ChartElement;
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 layout...
r1965 class ChartTitle;
Michal Klocek
Refactors axis animation, line animations
r1241 class ChartAnimation;
Michal Klocek
Refactors layout managment...
r1534 class ChartLayout;
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,
Michal Klocek
Fixes mouse handling in base class of chartseries
r1747 ShadesZValue ,
Tero Ahola
Fixed drawing issues in Scatter
r375 GridZValue,
Tero Ahola
Switched the z-order of axis to be below series...
r1790 AxisZValue,
Tero Ahola
All the series to use the same z-plane
r1260 SeriesZValue,
LineChartZValue = SeriesZValue,
Michal Klocek
Fixes mouse handling in base class of chartseries
r1747 SplineChartZValue = SeriesZValue,
Tero Ahola
All the series to use the same z-plane
r1260 BarSeriesZValue = SeriesZValue,
ScatterSeriesZValue = SeriesZValue,
PieSeriesZValue = SeriesZValue,
Michal Klocek
Fixes mouse handling in base class of chartseries
r1747 LegendZValue,
TopMostZValue
Tero Ahola
Fixed drawing issues in Scatter
r375 };
Tero Ahola
All the series to use the same z-plane
r1260
enum State {
ShowState,
Michal Klocek
Refactors axis animation, line animations
r1241 ScrollUpState,
ScrollDownState,
ScrollLeftState,
ScrollRightState,
ZoomInState,
ZoomOutState
};
Michal Klocek
Adds ZOrder enum to presenter
r262
Jani Honkonen
src folder: another massive victory for coding style police
r2131 ChartPresenter(QChart *chart, ChartDataSet *dataset);
Michal Klocek
Refactors qchart , adds line animation...
r131 virtual ~ChartPresenter();
Michal Klocek
Refactored for MVP...
r139
Michal Klocek
Polishing qchart class
r742 ChartTheme *chartTheme() const { return m_chartTheme; }
ChartDataSet *dataSet() const { return m_dataset; }
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QGraphicsItem *rootItem() const { return m_chart; }
ChartBackground *backgroundElement();
ChartTitle *titleElement();
QList<ChartAxis *> axisItems() const;
QList<ChartElement *> chartItems() const;
Michal Klocek
Refactors layout managment...
r1534
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QLegend *legend();
Michal Klocek
Refactors layout managment...
r1534
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void setBackgroundBrush(const QBrush &brush);
Michal Klocek
Refactors layout managment...
r1534 QBrush backgroundBrush() const;
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void setBackgroundPen(const QPen &pen);
Michal Klocek
Refactors layout managment...
r1534 QPen backgroundPen() const;
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void setTitle(const QString &title);
Michal Klocek
Refactors layout managment...
r1534 QString title() const;
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void setTitleFont(const QFont &font);
Michal Klocek
Refactors layout managment...
r1534 QFont titleFont() const;
void setTitleBrush(const QBrush &brush);
QBrush titleBrush() const;
void setBackgroundVisible(bool visible);
bool isBackgroundVisible() const;
void setBackgroundDropShadowEnabled(bool enabled);
bool isBackgroundDropShadowEnabled() const;
void setVisible(bool visible);
Michal Klocek
Refactors qchart , adds line animation...
r131
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void setTheme(QChart::ChartTheme theme, bool force = true);
Michal Klocek
Adds PIMPL to qchart
r740 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);
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void zoomIn(const QRectF &rect);
Jani Honkonen
Add gestures support for zoomlinechart example...
r1187 void zoomOut(qreal factor);
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void scroll(qreal dx, qreal dy);
Jani Honkonen
Fix add/remove animation for pie and apply colors from theme when adding/removing
r659
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void startAnimation(ChartAnimation *animation);
Michal Klocek
Refactors axis animation, line animations
r1241 State state() const { return m_state; }
QPointF statePoint() const { return m_statePoint; }
Michal Klocek
Refactors layout managment...
r1534
Michal Klocek
Adds scroll support...
r531 void resetAllElements();
Michal Klocek
Refactors layout managment...
r1534
Jani Honkonen
src folder: another massive victory for coding style police
r2131 ChartLayout *layout();
Michal Klocek
Refactors layout managment...
r1534
private:
void createBackgroundItem();
void createTitleItem();
Michal Klocek
Add defualt show axis...
r1628 void selectVisibleAxis();
Michal Klocek
Refactors qchart , adds line animation...
r131
sauimone
Q_SIGNALS and Q_SLOTS
r775 public Q_SLOTS:
Jani Honkonen
src folder: another massive victory for coding style police
r2131 void handleSeriesAdded(QAbstractSeries *series, Domain *domain);
void handleSeriesRemoved(QAbstractSeries *series);
void handleAxisAdded(QAbstractAxis *axis, Domain *domain);
void handleAxisRemoved(QAbstractAxis *axis);
Michal Klocek
Adds logic to fix overlaping axes
r1626 void handleAxisVisibleChanged(bool visible);
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
Refactors axis animation, line animations
r1241 void animationsFinished();
Michal Klocek
Refactor qledgend handling...
r855
Michal Klocek
Refactors qchart , adds line animation...
r131 private:
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QChart *m_chart;
ChartDataSet *m_dataset;
Michal Klocek
Refactor themes...
r143 ChartTheme *m_chartTheme;
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QMap<QAbstractSeries *, ChartElement *> m_chartItems;
QMap<QAbstractAxis *, ChartAxis *> m_axisItems;
Michal Klocek
Adds animation settings handling
r298 QChart::AnimationOptions m_options;
Michal Klocek
Refactors axis animation, line animations
r1241 State m_state;
QPointF m_statePoint;
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QList<ChartAnimation *> m_animations;
ChartLayout *m_layout;
ChartBackground *m_background;
ChartTitle *m_title;
Michal Klocek
Refactors qchart , adds line animation...
r131 };
QTCOMMERCIALCHART_END_NAMESPACE
Jani Honkonen
Fix Krazy issues
r1935 #endif /* CHARTPRESENTER_H */