@@ -0,0 +1,61 | |||
|
1 | #include "chart_p.h" | |
|
2 | #include "chartpresenter_p.h" | |
|
3 | ||
|
4 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
|
5 | ||
|
6 | ||
|
7 | Chart::Chart(ChartPresenter *presenter):QObject(presenter), | |
|
8 | m_animator(0), | |
|
9 | m_presenter(presenter) | |
|
10 | { | |
|
11 | }; | |
|
12 | ||
|
13 | void Chart::setAnimator(ChartAnimator* animator) | |
|
14 | { | |
|
15 | m_animator=animator; | |
|
16 | } | |
|
17 | ||
|
18 | ChartAnimator* Chart::animator() const | |
|
19 | { | |
|
20 | return m_animator; | |
|
21 | } | |
|
22 | ||
|
23 | ChartPresenter* Chart::presenter() const | |
|
24 | { | |
|
25 | return m_presenter; | |
|
26 | } | |
|
27 | ||
|
28 | void Chart::handleGeometryChanged(const QRectF& rect) | |
|
29 | { | |
|
30 | Q_UNUSED(rect); | |
|
31 | qWarning()<<"Slot not implemented"; | |
|
32 | } | |
|
33 | ||
|
34 | void Chart::handleDomainChanged(qreal minX,qreal maxX,qreal minY,qreal maxY) | |
|
35 | { | |
|
36 | Q_UNUSED(minX); | |
|
37 | Q_UNUSED(maxX); | |
|
38 | Q_UNUSED(minY); | |
|
39 | Q_UNUSED(maxY); | |
|
40 | qWarning()<<"Slot not implemented"; | |
|
41 | } | |
|
42 | ||
|
43 | void Chart::rangeXChanged(qreal min, qreal max, int tickXCount) | |
|
44 | { | |
|
45 | Q_UNUSED(min); | |
|
46 | Q_UNUSED(max); | |
|
47 | Q_UNUSED(tickXCount); | |
|
48 | qWarning()<<"Slot not implemented"; | |
|
49 | } | |
|
50 | ||
|
51 | void Chart::rangeYChanged(qreal min, qreal max, int tickYCount) | |
|
52 | { | |
|
53 | Q_UNUSED(min); | |
|
54 | Q_UNUSED(max); | |
|
55 | Q_UNUSED(tickYCount); | |
|
56 | qWarning()<<"Slot not implemented"; | |
|
57 | } | |
|
58 | ||
|
59 | #include "moc_chart_p.cpp" | |
|
60 | ||
|
61 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -0,0 +1,35 | |||
|
1 | #ifndef CHART_H_ | |
|
2 | #define CHART_H_ | |
|
3 | ||
|
4 | #include "qchartglobal.h" | |
|
5 | #include <QObject> | |
|
6 | ||
|
7 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
|
8 | ||
|
9 | class ChartAnimator; | |
|
10 | class ChartPresenter; | |
|
11 | ||
|
12 | class Chart: public QObject | |
|
13 | { | |
|
14 | Q_OBJECT | |
|
15 | public: | |
|
16 | explicit Chart(ChartPresenter *presenter); | |
|
17 | ||
|
18 | public slots: | |
|
19 | virtual void handleGeometryChanged(const QRectF& rect); | |
|
20 | virtual void handleDomainChanged(qreal minX,qreal maxX,qreal minY,qreal maxY); | |
|
21 | virtual void rangeXChanged(qreal min, qreal max, int tickXCount); | |
|
22 | virtual void rangeYChanged(qreal min, qreal max, int tickYCount); | |
|
23 | ||
|
24 | void setAnimator(ChartAnimator* animator); | |
|
25 | ChartAnimator* animator() const; | |
|
26 | ChartPresenter* presenter() const; | |
|
27 | ||
|
28 | private: | |
|
29 | ChartAnimator* m_animator; | |
|
30 | ChartPresenter* m_presenter; | |
|
31 | }; | |
|
32 | ||
|
33 | QTCOMMERCIALCHART_END_NAMESPACE | |
|
34 | ||
|
35 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now