@@ -15,10 +15,6 void Bar::setSize(const QSizeF& size) | |||||
15 | mHeight = size.height(); |
|
15 | mHeight = size.height(); | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | void Bar::setPlotDomain(const PlotDomain& data) |
|
|||
19 | { |
|
|||
20 | mPlotDomain = data; |
|
|||
21 | } |
|
|||
22 |
|
18 | |||
23 | void Bar::resize( qreal w, qreal h ) |
|
19 | void Bar::resize( qreal w, qreal h ) | |
24 | { |
|
20 | { |
@@ -15,7 +15,6 public: | |||||
15 |
|
15 | |||
16 | public: // from ChartItem |
|
16 | public: // from ChartItem | |
17 | void setSize(const QSizeF &size); |
|
17 | void setSize(const QSizeF &size); | |
18 | void setPlotDomain(const PlotDomain& data); |
|
|||
19 |
|
18 | |||
20 | // Layout Stuff |
|
19 | // Layout Stuff | |
21 | void resize( qreal w, qreal h ); // Size of bar. |
|
20 | void resize( qreal w, qreal h ); // Size of bar. | |
@@ -36,7 +35,6 private: | |||||
36 | qreal mYpos; |
|
35 | qreal mYpos; | |
37 | QColor mColor; |
|
36 | QColor mColor; | |
38 |
|
37 | |||
39 | PlotDomain mPlotDomain; |
|
|||
40 | }; |
|
38 | }; | |
41 |
|
39 | |||
42 | QTCOMMERCIALCHART_END_NAMESPACE |
|
40 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -23,11 +23,6 void BarLabel::setSize(const QSizeF &size) | |||||
23 | mSize = size; |
|
23 | mSize = size; | |
24 | } |
|
24 | } | |
25 |
|
25 | |||
26 | void BarLabel::setPlotDomain(const PlotDomain& data) |
|
|||
27 | { |
|
|||
28 | mDomain = data; |
|
|||
29 | } |
|
|||
30 |
|
||||
31 | void BarLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
26 | void BarLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
32 | { |
|
27 | { | |
33 | painter->drawText(boundingRect(),mLabel); |
|
28 | painter->drawText(boundingRect(),mLabel); |
@@ -15,7 +15,6 public: | |||||
15 |
|
15 | |||
16 | // From ChartItem |
|
16 | // From ChartItem | |
17 | void setSize(const QSizeF &size); |
|
17 | void setSize(const QSizeF &size); | |
18 | void setPlotDomain(const PlotDomain& data); |
|
|||
19 |
|
18 | |||
20 | // From QGraphicsItem |
|
19 | // From QGraphicsItem | |
21 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
|
20 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); | |
@@ -23,7 +22,6 public: | |||||
23 |
|
22 | |||
24 | private: |
|
23 | private: | |
25 |
|
24 | |||
26 | PlotDomain mDomain; |
|
|||
27 | QSizeF mSize; |
|
25 | QSizeF mSize; | |
28 | QString mLabel; |
|
26 | QString mLabel; | |
29 | qreal mXpos; |
|
27 | qreal mXpos; |
@@ -26,11 +26,6 void Separator::setSize(const QSizeF &size) | |||||
26 | mHeight = size.height(); |
|
26 | mHeight = size.height(); | |
27 | } |
|
27 | } | |
28 |
|
28 | |||
29 | void Separator::setPlotDomain(const PlotDomain& data) |
|
|||
30 | { |
|
|||
31 |
|
||||
32 | } |
|
|||
33 |
|
||||
34 | void Separator::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
|
29 | void Separator::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) | |
35 | { |
|
30 | { | |
36 | qDebug() << "separator::paint" << boundingRect(); |
|
31 | qDebug() << "separator::paint" << boundingRect(); |
@@ -15,7 +15,6 public: | |||||
15 |
|
15 | |||
16 | // From ChartItem |
|
16 | // From ChartItem | |
17 | void setSize(const QSizeF &size); |
|
17 | void setSize(const QSizeF &size); | |
18 | void setPlotDomain(const PlotDomain& data); |
|
|||
19 |
|
18 | |||
20 | // From QGraphicsItem |
|
19 | // From QGraphicsItem | |
21 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); |
|
20 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); |
@@ -1,7 +1,6 | |||||
1 | #ifndef CHARTITEM_H_ |
|
1 | #ifndef CHARTITEM_H_ | |
2 | #define CHARTITEM_H_ |
|
2 | #define CHARTITEM_H_ | |
3 |
|
3 | |||
4 | #include "plotdomain_p.h" |
|
|||
5 | #include "domain_p.h" |
|
4 | #include "domain_p.h" | |
6 | #include <QGraphicsItem> |
|
5 | #include <QGraphicsItem> | |
7 |
|
6 |
@@ -47,19 +47,6 void PiePresenter::seriesChanged() | |||||
47 | resize(); |
|
47 | resize(); | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | void PiePresenter::setSize(const QSizeF &size) |
|
|||
51 | { |
|
|||
52 | // TODO: allow user setting the size? |
|
|||
53 | // TODO: allow user defining the margins? |
|
|||
54 | m_rect.setSize(size); |
|
|||
55 | resize(); |
|
|||
56 | } |
|
|||
57 |
|
||||
58 | void PiePresenter::setPlotDomain(const PlotDomain& plotDomain) |
|
|||
59 | { |
|
|||
60 | // TODO |
|
|||
61 | } |
|
|||
62 |
|
||||
63 | void PiePresenter::resize() |
|
50 | void PiePresenter::resize() | |
64 | { |
|
51 | { | |
65 | m_pieRect = m_rect; |
|
52 | m_pieRect = m_rect; | |
@@ -114,7 +101,10 void PiePresenter::handleDomainChanged(const Domain& domain) | |||||
114 |
|
101 | |||
115 | void PiePresenter::handleGeometryChanged(const QRectF& rect) |
|
102 | void PiePresenter::handleGeometryChanged(const QRectF& rect) | |
116 | { |
|
103 | { | |
117 | setSize(rect.size()); |
|
104 | // TODO: allow user setting the size? | |
|
105 | // TODO: allow user defining the margins? | |||
|
106 | m_rect.setSize(rect.size()); | |||
|
107 | resize(); | |||
118 | } |
|
108 | } | |
119 |
|
109 | |||
120 | #include "moc_piepresenter.cpp" |
|
110 | #include "moc_piepresenter.cpp" |
@@ -18,8 +18,6 public: | |||||
18 | ~PiePresenter(); |
|
18 | ~PiePresenter(); | |
19 |
|
19 | |||
20 | public: // from ChartItem |
|
20 | public: // from ChartItem | |
21 | void setSize(const QSizeF &size); |
|
|||
22 | void setPlotDomain(const PlotDomain& data); |
|
|||
23 | QRectF boundingRect() const { return m_rect; } |
|
21 | QRectF boundingRect() const { return m_rect; } | |
24 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {} |
|
22 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {} | |
25 |
|
23 |
@@ -1,13 +1,8 | |||||
1 | #include "qchart.h" |
|
1 | #include "qchart.h" | |
2 | #include "qchartseries.h" |
|
|||
3 | #include "qscatterseries.h" |
|
2 | #include "qscatterseries.h" | |
4 | #include "qscatterseries_p.h" |
|
3 | #include "qscatterseries_p.h" | |
5 | #include "qpieseries.h" |
|
4 | #include "qpieseries.h" | |
6 | #include "qchartaxis.h" |
|
5 | #include "qchartaxis.h" | |
7 | #include "charttheme_p.h" |
|
|||
8 | #include "chartitem_p.h" |
|
|||
9 | #include "plotdomain_p.h" |
|
|||
10 | #include "axisitem_p.h" |
|
|||
11 | #include "chartpresenter_p.h" |
|
6 | #include "chartpresenter_p.h" | |
12 | #include "chartdataset_p.h" |
|
7 | #include "chartdataset_p.h" | |
13 |
|
8 |
@@ -49,9 +49,9 void QScatterSeriesPrivate::themeChanged(ChartTheme *theme) | |||||
49 | //m_theme = theme->themeForSeries(); |
|
49 | //m_theme = theme->themeForSeries(); | |
50 | } |
|
50 | } | |
51 |
|
51 | |||
52 |
void QScatterSeriesPrivate::setPlotDomain(const |
|
52 | void QScatterSeriesPrivate::setPlotDomain(const Domain& plotDomain) | |
53 | { |
|
53 | { | |
54 | m_visibleChartArea = plotDomain; |
|
54 | //m_visibleChartArea = plotDomain; | |
55 | changeGeometry(); |
|
55 | changeGeometry(); | |
56 | } |
|
56 | } | |
57 |
|
57 |
@@ -4,7 +4,7 | |||||
4 | #include "qchartseries.h" |
|
4 | #include "qchartseries.h" | |
5 | #include "charttheme_p.h" |
|
5 | #include "charttheme_p.h" | |
6 | #include "chartitem_p.h" |
|
6 | #include "chartitem_p.h" | |
7 |
#include " |
|
7 | #include "domain_p.h" | |
8 | #include <QGraphicsItem> |
|
8 | #include <QGraphicsItem> | |
9 |
|
9 | |||
10 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
10 | QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
@@ -19,7 +19,7 public: | |||||
19 |
|
19 | |||
20 | public: // from ChartObjectInterface |
|
20 | public: // from ChartObjectInterface | |
21 | void setSize(const QSizeF &size); |
|
21 | void setSize(const QSizeF &size); | |
22 |
void setPlotDomain(const |
|
22 | void setPlotDomain(const Domain& data); | |
23 |
|
23 | |||
24 | public: // from ChartThemeObserver |
|
24 | public: // from ChartThemeObserver | |
25 | void themeChanged(ChartTheme *theme); |
|
25 | void themeChanged(ChartTheme *theme); | |
@@ -39,7 +39,7 public: | |||||
39 | QList<qreal> m_sceney; |
|
39 | QList<qreal> m_sceney; | |
40 | QColor m_markerColor; |
|
40 | QColor m_markerColor; | |
41 | //SeriesTheme m_theme; |
|
41 | //SeriesTheme m_theme; | |
42 |
|
|
42 | Domain m_visibleChartArea; | |
43 | }; |
|
43 | }; | |
44 |
|
44 | |||
45 | QTCOMMERCIALCHART_END_NAMESPACE |
|
45 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -20,7 +20,6 SOURCES += barchart/barchartseries.cpp \ | |||||
20 | barchart/separator.cpp \ |
|
20 | barchart/separator.cpp \ | |
21 | barchart/bargroupbase.cpp \ |
|
21 | barchart/bargroupbase.cpp \ | |
22 | barchart/barchartseriesbase.cpp \ |
|
22 | barchart/barchartseriesbase.cpp \ | |
23 | plotdomain.cpp \ |
|
|||
24 | qscatterseries.cpp \ |
|
23 | qscatterseries.cpp \ | |
25 | qchart.cpp \ |
|
24 | qchart.cpp \ | |
26 | axisitem.cpp \ |
|
25 | axisitem.cpp \ | |
@@ -36,7 +35,6 PRIVATE_HEADERS += linechart/linechartitem_p.h \ | |||||
36 | barchart/barlabel_p.h \ |
|
35 | barchart/barlabel_p.h \ | |
37 | barchart/bar_p.h \ |
|
36 | barchart/bar_p.h \ | |
38 | barchart/separator_p.h \ |
|
37 | barchart/separator_p.h \ | |
39 | plotdomain_p.h \ |
|
|||
40 | qscatterseries_p.h \ |
|
38 | qscatterseries_p.h \ | |
41 | axisitem_p.h \ |
|
39 | axisitem_p.h \ | |
42 | chartitem_p.h \ |
|
40 | chartitem_p.h \ |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now