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