##// END OF EJS Templates
Removed setting scene rect in QChartView::resizeEvent
Tero Ahola -
r739:6c5910e9d6f4
parent child
Show More
@@ -1,419 +1,416
1 #include "qchartview.h"
1 #include "qchartview.h"
2 #include "qchart.h"
2 #include "qchart.h"
3 #include "qchartaxis.h"
3 #include "qchartaxis.h"
4 #include <QGraphicsView>
4 #include <QGraphicsView>
5 #include <QGraphicsScene>
5 #include <QGraphicsScene>
6 #include <QRubberBand>
6 #include <QRubberBand>
7 #include <QResizeEvent>
7 #include <QResizeEvent>
8 #include <QDebug>
8 #include <QDebug>
9
9
10 /*!
10 /*!
11 \enum QChartView::RubberBandPolicy
11 \enum QChartView::RubberBandPolicy
12
12
13 This enum describes the different types of rubber bands that can be used for zoom rect selection
13 This enum describes the different types of rubber bands that can be used for zoom rect selection
14
14
15 \value NoRubberBand
15 \value NoRubberBand
16 \value VerticalRubberBand
16 \value VerticalRubberBand
17 \value HorizonalRubberBand
17 \value HorizonalRubberBand
18 \value RectangleRubberBand
18 \value RectangleRubberBand
19 */
19 */
20
20
21 /*!
21 /*!
22 \class QChartView
22 \class QChartView
23 \brief Standalone charting widget.
23 \brief Standalone charting widget.
24
24
25 QChartView is a standalone widget that can display charts. It does not require separate
25 QChartView is a standalone widget that can display charts. It does not require separate
26 QGraphicsScene to work. It manages the graphical representation of different types of
26 QGraphicsScene to work. It manages the graphical representation of different types of
27 QChartSeries and other chart related objects like QChartAxis and QChartLegend. If you want to
27 QChartSeries and other chart related objects like QChartAxis and QChartLegend. If you want to
28 display a chart in your existing QGraphicsScene, you can use the QChart class instead.
28 display a chart in your existing QGraphicsScene, you can use the QChart class instead.
29
29
30 \sa QChart
30 \sa QChart
31 */
31 */
32
32
33 QTCOMMERCIALCHART_BEGIN_NAMESPACE
33 QTCOMMERCIALCHART_BEGIN_NAMESPACE
34
34
35 /*!
35 /*!
36 Constructs a chartView object which is a child of a\a parent.
36 Constructs a chartView object which is a child of a\a parent.
37 */
37 */
38 QChartView::QChartView(QWidget *parent) :
38 QChartView::QChartView(QWidget *parent) :
39 QGraphicsView(parent),
39 QGraphicsView(parent),
40 m_scene(new QGraphicsScene(this)),
40 m_scene(new QGraphicsScene(this)),
41 m_chart(new QChart()),
41 m_chart(new QChart()),
42 m_rubberBand(0),
42 m_rubberBand(0),
43 m_verticalRubberBand(false),
43 m_verticalRubberBand(false),
44 m_horizonalRubberBand(false)
44 m_horizonalRubberBand(false)
45 {
45 {
46 setFrameShape(QFrame::NoFrame);
46 setFrameShape(QFrame::NoFrame);
47 setBackgroundRole(QPalette::Window);
47 setBackgroundRole(QPalette::Window);
48 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
48 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
49 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
49 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
50 setScene(m_scene);
50 setScene(m_scene);
51 m_scene->addItem(m_chart);
51 m_scene->addItem(m_chart);
52 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
52 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
53 }
53 }
54
54
55
55
56 /*!
56 /*!
57 Destroys the object and it's children, like QChartSeries and QChartAxis object added to it.
57 Destroys the object and it's children, like QChartSeries and QChartAxis object added to it.
58 */
58 */
59 QChartView::~QChartView()
59 QChartView::~QChartView()
60 {
60 {
61 }
61 }
62
62
63 /*!
63 /*!
64 Resizes and updates the chart area using the \a event data
64 Resizes and updates the chart area using the \a event data
65 */
65 */
66 void QChartView::resizeEvent(QResizeEvent *event)
66 void QChartView::resizeEvent(QResizeEvent *event)
67 {
67 {
68 // If the scene rect is the size of the view, you will get scrolling effect at least on OSX;
69 // i.e. you are able to move the chart inside the view a couple of pixels by mouse flicking
70 m_scene->setSceneRect(0, 0, size().width() - 2, size().height() - 2);
71 m_chart->resize(size());
68 m_chart->resize(size());
72 QWidget::resizeEvent(event);
69 QGraphicsView::resizeEvent(event);
73 }
70 }
74
71
75 /*!
72 /*!
76 Adds the \a series and optional \a axisY onto the chart and takes the ownership of the objects.
73 Adds the \a series and optional \a axisY onto the chart and takes the ownership of the objects.
77 If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and
74 If auto scaling is enabled, re-scales the axes the series is bound to (both the x axis and
78 the y axis).
75 the y axis).
79 \sa removeSeries(), removeAllSeries()
76 \sa removeSeries(), removeAllSeries()
80 */
77 */
81 void QChartView::addSeries(QSeries* series,QChartAxis *axisY)
78 void QChartView::addSeries(QSeries* series,QChartAxis *axisY)
82 {
79 {
83 m_chart->addSeries(series,axisY);
80 m_chart->addSeries(series,axisY);
84 }
81 }
85
82
86 /*!
83 /*!
87 Removes the \a series specified in a perameter from the QChartView.
84 Removes the \a series specified in a perameter from the QChartView.
88 It releses its ownership of the specified QChartSeries object.
85 It releses its ownership of the specified QChartSeries object.
89 It does not delete the pointed QChartSeries data object
86 It does not delete the pointed QChartSeries data object
90 \sa addSeries(), removeAllSeries()
87 \sa addSeries(), removeAllSeries()
91 */
88 */
92 void QChartView::removeSeries(QSeries* series)
89 void QChartView::removeSeries(QSeries* series)
93 {
90 {
94 m_chart->removeSeries(series);
91 m_chart->removeSeries(series);
95 }
92 }
96
93
97 /*!
94 /*!
98 Removes all the QChartSeries that have been added to the QChartView
95 Removes all the QChartSeries that have been added to the QChartView
99 It also deletes the pointed QChartSeries data objects
96 It also deletes the pointed QChartSeries data objects
100 \sa addSeries(), removeSeries()
97 \sa addSeries(), removeSeries()
101 */
98 */
102 void QChartView::removeAllSeries()
99 void QChartView::removeAllSeries()
103 {
100 {
104 m_chart->removeAllSeries();
101 m_chart->removeAllSeries();
105 }
102 }
106
103
107 /*!
104 /*!
108 Zooms in the view by a factor of 2
105 Zooms in the view by a factor of 2
109 */
106 */
110 void QChartView::zoomIn()
107 void QChartView::zoomIn()
111 {
108 {
112 m_chart->zoomIn();
109 m_chart->zoomIn();
113 }
110 }
114
111
115 /*!
112 /*!
116 Zooms in the view to a maximum level at which \a rect is still fully visible.
113 Zooms in the view to a maximum level at which \a rect is still fully visible.
117 */
114 */
118 void QChartView::zoomIn(const QRect& rect)
115 void QChartView::zoomIn(const QRect& rect)
119 {
116 {
120 m_chart->zoomIn(rect);
117 m_chart->zoomIn(rect);
121 }
118 }
122
119
123 /*!
120 /*!
124 Restores the view zoom level to the previous one.
121 Restores the view zoom level to the previous one.
125 */
122 */
126 void QChartView::zoomOut()
123 void QChartView::zoomOut()
127 {
124 {
128 m_chart->zoomOut();
125 m_chart->zoomOut();
129 }
126 }
130
127
131 /*!
128 /*!
132 Sets the chart \a title. A description text that is drawn above the chart.
129 Sets the chart \a title. A description text that is drawn above the chart.
133 */
130 */
134 void QChartView::setChartTitle(const QString& title)
131 void QChartView::setChartTitle(const QString& title)
135 {
132 {
136 m_chart->setTitle(title);
133 m_chart->setTitle(title);
137 }
134 }
138
135
139 /*!
136 /*!
140 Returns the chart's title. A description text that is drawn above the chart.
137 Returns the chart's title. A description text that is drawn above the chart.
141 */
138 */
142 QString QChartView::chartTitle() const
139 QString QChartView::chartTitle() const
143 {
140 {
144 return m_chart->title();
141 return m_chart->title();
145 }
142 }
146
143
147 /*!
144 /*!
148 Sets the \a font that is used for rendering the description text that is rendered above the chart.
145 Sets the \a font that is used for rendering the description text that is rendered above the chart.
149 */
146 */
150 void QChartView::setChartTitleFont(const QFont& font)
147 void QChartView::setChartTitleFont(const QFont& font)
151 {
148 {
152 m_chart->setTitleFont(font);
149 m_chart->setTitleFont(font);
153 }
150 }
154
151
155 /*!
152 /*!
156 Sets the \a brush used for rendering the title text.
153 Sets the \a brush used for rendering the title text.
157 */
154 */
158 void QChartView::setChartTitleBrush(const QBrush &brush)
155 void QChartView::setChartTitleBrush(const QBrush &brush)
159 {
156 {
160 m_chart->setTitleBrush(brush);
157 m_chart->setTitleBrush(brush);
161 }
158 }
162
159
163 /*!
160 /*!
164 Returns the brush used for rendering the title text.
161 Returns the brush used for rendering the title text.
165 */
162 */
166 QBrush QChartView::chartTitleBrush()
163 QBrush QChartView::chartTitleBrush()
167 {
164 {
168 return m_chart->titleBrush();
165 return m_chart->titleBrush();
169 }
166 }
170
167
171 /*!
168 /*!
172 Sets the \a brush that is used for painting the background of the chart area of the QChartView widget.
169 Sets the \a brush that is used for painting the background of the chart area of the QChartView widget.
173 */
170 */
174 void QChartView::setChartBackgroundBrush(const QBrush& brush)
171 void QChartView::setChartBackgroundBrush(const QBrush& brush)
175 {
172 {
176 m_chart->setBackgroundBrush(brush);
173 m_chart->setBackgroundBrush(brush);
177 }
174 }
178
175
179 /*!
176 /*!
180 Sets the \a pen that is used for painting the background of the chart area of the QChartView widget.
177 Sets the \a pen that is used for painting the background of the chart area of the QChartView widget.
181 */
178 */
182 void QChartView::setChartBackgroundPen(const QPen& pen)
179 void QChartView::setChartBackgroundPen(const QPen& pen)
183 {
180 {
184 m_chart->setBackgroundPen(pen);
181 m_chart->setBackgroundPen(pen);
185 }
182 }
186
183
187 /*!
184 /*!
188 Sets the RubberBandPlicy to \a policy. Selected policy determines the way zooming is performed.
185 Sets the RubberBandPlicy to \a policy. Selected policy determines the way zooming is performed.
189 */
186 */
190 void QChartView::setRubberBandPolicy(const RubberBandPolicy policy)
187 void QChartView::setRubberBandPolicy(const RubberBandPolicy policy)
191 {
188 {
192 switch(policy) {
189 switch(policy) {
193 case VerticalRubberBand:
190 case VerticalRubberBand:
194 m_verticalRubberBand = true;
191 m_verticalRubberBand = true;
195 m_horizonalRubberBand = false;
192 m_horizonalRubberBand = false;
196 break;
193 break;
197 case HorizonalRubberBand:
194 case HorizonalRubberBand:
198 m_verticalRubberBand = false;
195 m_verticalRubberBand = false;
199 m_horizonalRubberBand = true;
196 m_horizonalRubberBand = true;
200 break;
197 break;
201 case RectangleRubberBand:
198 case RectangleRubberBand:
202 m_verticalRubberBand = true;
199 m_verticalRubberBand = true;
203 m_horizonalRubberBand = true;
200 m_horizonalRubberBand = true;
204 break;
201 break;
205 case NoRubberBand:
202 case NoRubberBand:
206 default:
203 default:
207 delete m_rubberBand;
204 delete m_rubberBand;
208 m_rubberBand=0;
205 m_rubberBand=0;
209 m_horizonalRubberBand = false;
206 m_horizonalRubberBand = false;
210 m_verticalRubberBand = false;
207 m_verticalRubberBand = false;
211 return;
208 return;
212 }
209 }
213 if(!m_rubberBand) {
210 if(!m_rubberBand) {
214 m_rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
211 m_rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
215 m_rubberBand->setEnabled(true);
212 m_rubberBand->setEnabled(true);
216 }
213 }
217 }
214 }
218
215
219 /*!
216 /*!
220 Returns the RubberBandPolicy that is currently being used by the widget.
217 Returns the RubberBandPolicy that is currently being used by the widget.
221 */
218 */
222 QChartView::RubberBandPolicy QChartView::rubberBandPolicy() const
219 QChartView::RubberBandPolicy QChartView::rubberBandPolicy() const
223 {
220 {
224 if(m_horizonalRubberBand && m_verticalRubberBand) return RectangleRubberBand;
221 if(m_horizonalRubberBand && m_verticalRubberBand) return RectangleRubberBand;
225 if(m_horizonalRubberBand) return HorizonalRubberBand;
222 if(m_horizonalRubberBand) return HorizonalRubberBand;
226 if(m_verticalRubberBand) return VerticalRubberBand;
223 if(m_verticalRubberBand) return VerticalRubberBand;
227 return NoRubberBand;
224 return NoRubberBand;
228 }
225 }
229
226
230 /*!
227 /*!
231 If Left mouse button is pressed and the RubberBandPolicy is enabled the \a event is accepted and the rubber band is displayed on the screen allowing the user to select the zoom area.
228 If Left mouse button is pressed and the RubberBandPolicy is enabled the \a event is accepted and the rubber band is displayed on the screen allowing the user to select the zoom area.
232 If different mouse button is pressed and/or the RubberBandPolicy is disabled then the \a event is passed to QGraphicsView::mousePressEvent() implementation.
229 If different mouse button is pressed and/or the RubberBandPolicy is disabled then the \a event is passed to QGraphicsView::mousePressEvent() implementation.
233 */
230 */
234 void QChartView::mousePressEvent(QMouseEvent *event)
231 void QChartView::mousePressEvent(QMouseEvent *event)
235 {
232 {
236 if(m_rubberBand && m_rubberBand->isEnabled() && event->button() == Qt::LeftButton) {
233 if(m_rubberBand && m_rubberBand->isEnabled() && event->button() == Qt::LeftButton) {
237
234
238 int padding = m_chart->padding();
235 int padding = m_chart->padding();
239 QRect rect(padding, padding, width() - 2 * padding, height() - 2 * padding);
236 QRect rect(padding, padding, width() - 2 * padding, height() - 2 * padding);
240
237
241 if (rect.contains(event->pos())) {
238 if (rect.contains(event->pos())) {
242 m_rubberBandOrigin = event->pos();
239 m_rubberBandOrigin = event->pos();
243 m_rubberBand->setGeometry(QRect(m_rubberBandOrigin, QSize()));
240 m_rubberBand->setGeometry(QRect(m_rubberBandOrigin, QSize()));
244 m_rubberBand->show();
241 m_rubberBand->show();
245 event->accept();
242 event->accept();
246 }
243 }
247 }
244 }
248 else {
245 else {
249 QGraphicsView::mousePressEvent(event);
246 QGraphicsView::mousePressEvent(event);
250 }
247 }
251 }
248 }
252
249
253 /*!
250 /*!
254 If RubberBand rectange specification has been initiated in pressEvent then \a event data is used to update RubberBand geometry.
251 If RubberBand rectange specification has been initiated in pressEvent then \a event data is used to update RubberBand geometry.
255 In other case the defualt QGraphicsView::mouseMoveEvent implementation is called.
252 In other case the defualt QGraphicsView::mouseMoveEvent implementation is called.
256 */
253 */
257 void QChartView::mouseMoveEvent(QMouseEvent *event)
254 void QChartView::mouseMoveEvent(QMouseEvent *event)
258 {
255 {
259 if(m_rubberBand && m_rubberBand->isVisible()) {
256 if(m_rubberBand && m_rubberBand->isVisible()) {
260 int padding = m_chart->padding();
257 int padding = m_chart->padding();
261 QRect rect(padding, padding, width() - 2 * padding, height() - 2 * padding);
258 QRect rect(padding, padding, width() - 2 * padding, height() - 2 * padding);
262 int width = event->pos().x() - m_rubberBandOrigin.x();
259 int width = event->pos().x() - m_rubberBandOrigin.x();
263 int height = event->pos().y() - m_rubberBandOrigin.y();
260 int height = event->pos().y() - m_rubberBandOrigin.y();
264 if(!m_verticalRubberBand) {
261 if(!m_verticalRubberBand) {
265 m_rubberBandOrigin.setY(rect.top());
262 m_rubberBandOrigin.setY(rect.top());
266 height = rect.height();
263 height = rect.height();
267 }
264 }
268 if(!m_horizonalRubberBand) {
265 if(!m_horizonalRubberBand) {
269 m_rubberBandOrigin.setX(rect.left());
266 m_rubberBandOrigin.setX(rect.left());
270 width= rect.width();
267 width= rect.width();
271 }
268 }
272 m_rubberBand->setGeometry(QRect(m_rubberBandOrigin.x(),m_rubberBandOrigin.y(), width,height).normalized());
269 m_rubberBand->setGeometry(QRect(m_rubberBandOrigin.x(),m_rubberBandOrigin.y(), width,height).normalized());
273 }
270 }
274 else {
271 else {
275 QGraphicsView::mouseMoveEvent(event);
272 QGraphicsView::mouseMoveEvent(event);
276 }
273 }
277 }
274 }
278
275
279 /*!
276 /*!
280 If left mouse button is release and RubberBand is enabled then \a event is accepted and the view is zoomed in to rect specified by RubberBand
277 If left mouse button is release and RubberBand is enabled then \a event is accepted and the view is zoomed in to rect specified by RubberBand
281 If it is the right mouse button \a event then RubberBand is dissmissed and zoom is canceled.
278 If it is the right mouse button \a event then RubberBand is dissmissed and zoom is canceled.
282 */
279 */
283 void QChartView::mouseReleaseEvent(QMouseEvent *event)
280 void QChartView::mouseReleaseEvent(QMouseEvent *event)
284 {
281 {
285 if(m_rubberBand) {
282 if(m_rubberBand) {
286 if (event->button() == Qt::LeftButton && m_rubberBand->isVisible()) {
283 if (event->button() == Qt::LeftButton && m_rubberBand->isVisible()) {
287 m_rubberBand->hide();
284 m_rubberBand->hide();
288 QRect rect = m_rubberBand->geometry();
285 QRect rect = m_rubberBand->geometry();
289 m_chart->zoomIn(rect);
286 m_chart->zoomIn(rect);
290 event->accept();
287 event->accept();
291 }
288 }
292
289
293 if(event->button()==Qt::RightButton){
290 if(event->button()==Qt::RightButton){
294 m_chart->zoomOut();
291 m_chart->zoomOut();
295 event->accept();
292 event->accept();
296 }
293 }
297 }
294 }
298 else {
295 else {
299 QGraphicsView::mouseReleaseEvent(event);
296 QGraphicsView::mouseReleaseEvent(event);
300 }
297 }
301 }
298 }
302
299
303 /*!
300 /*!
304 Pressing + and - keys performs zoomIn() and zoomOut() respectivly.
301 Pressing + and - keys performs zoomIn() and zoomOut() respectivly.
305 In other \a event is passed to the QGraphicsView::keyPressEvent() implementation
302 In other \a event is passed to the QGraphicsView::keyPressEvent() implementation
306 */
303 */
307 void QChartView::keyPressEvent(QKeyEvent *event)
304 void QChartView::keyPressEvent(QKeyEvent *event)
308 {
305 {
309 switch (event->key()) {
306 switch (event->key()) {
310 case Qt::Key_Plus:
307 case Qt::Key_Plus:
311 zoomIn();
308 zoomIn();
312 break;
309 break;
313 case Qt::Key_Minus:
310 case Qt::Key_Minus:
314 zoomOut();
311 zoomOut();
315 break;
312 break;
316 default:
313 default:
317 QGraphicsView::keyPressEvent(event);
314 QGraphicsView::keyPressEvent(event);
318 break;
315 break;
319 }
316 }
320 }
317 }
321
318
322 /*!
319 /*!
323 Sets the \a theme used by the chart for rendering the graphical representation of the data
320 Sets the \a theme used by the chart for rendering the graphical representation of the data
324 \sa QChart::ChartTheme, chartTheme()
321 \sa QChart::ChartTheme, chartTheme()
325 */
322 */
326 void QChartView::setChartTheme(QChart::ChartTheme theme)
323 void QChartView::setChartTheme(QChart::ChartTheme theme)
327 {
324 {
328 m_chart->setChartTheme(theme);
325 m_chart->setChartTheme(theme);
329 }
326 }
330
327
331 /*!
328 /*!
332 Returns the theme enum used by the chart.
329 Returns the theme enum used by the chart.
333 \sa setChartTheme()
330 \sa setChartTheme()
334 */
331 */
335 QChart::ChartTheme QChartView::chartTheme() const
332 QChart::ChartTheme QChartView::chartTheme() const
336 {
333 {
337 return m_chart->chartTheme();
334 return m_chart->chartTheme();
338 }
335 }
339
336
340 /*!
337 /*!
341 Returns the pointer to the x axis object of the chart
338 Returns the pointer to the x axis object of the chart
342 */
339 */
343 QChartAxis* QChartView::axisX() const
340 QChartAxis* QChartView::axisX() const
344 {
341 {
345 return m_chart->axisX();
342 return m_chart->axisX();
346 }
343 }
347
344
348 /*!
345 /*!
349 Returns the pointer to the y axis object of the chart
346 Returns the pointer to the y axis object of the chart
350 */
347 */
351 QChartAxis* QChartView::axisY() const
348 QChartAxis* QChartView::axisY() const
352 {
349 {
353 return m_chart->axisY();
350 return m_chart->axisY();
354 }
351 }
355
352
356 /*!
353 /*!
357 Returns the pointer to legend object of the chart
354 Returns the pointer to legend object of the chart
358 */
355 */
359 QLegend& QChartView::legend() const
356 QLegend& QChartView::legend() const
360 {
357 {
361 return m_chart->legend();
358 return m_chart->legend();
362 }
359 }
363
360
364 /*!
361 /*!
365 Gives ownership of legend to user.
362 Gives ownership of legend to user.
366 */
363 */
367 QLegend* QChartView::takeLegend()
364 QLegend* QChartView::takeLegend()
368 {
365 {
369 return m_chart->takeLegend();
366 return m_chart->takeLegend();
370 }
367 }
371
368
372 /*!
369 /*!
373 Gives ownership of legend back to chart. QChart takes ownership of \a legend and deletes existing one
370 Gives ownership of legend back to chart. QChart takes ownership of \a legend and deletes existing one
374 */
371 */
375 void QChartView::giveLegend(QLegend* legend)
372 void QChartView::giveLegend(QLegend* legend)
376 {
373 {
377 m_chart->giveLegend(legend);
374 m_chart->giveLegend(legend);
378 }
375 }
379
376
380 /*!
377 /*!
381 Sets animation \a options for the chart
378 Sets animation \a options for the chart
382 */
379 */
383 void QChartView::setAnimationOptions(QChart::AnimationOptions options)
380 void QChartView::setAnimationOptions(QChart::AnimationOptions options)
384 {
381 {
385 m_chart->setAnimationOptions(options);
382 m_chart->setAnimationOptions(options);
386 }
383 }
387
384
388 /*!
385 /*!
389 Returns animation options for the chart
386 Returns animation options for the chart
390 */
387 */
391 QChart::AnimationOptions QChartView::animationOptions() const
388 QChart::AnimationOptions QChartView::animationOptions() const
392 {
389 {
393 return m_chart->animationOptions();
390 return m_chart->animationOptions();
394 }
391 }
395
392
396 void QChartView::scrollLeft()
393 void QChartView::scrollLeft()
397 {
394 {
398 m_chart->scrollLeft();
395 m_chart->scrollLeft();
399 }
396 }
400
397
401 void QChartView::scrollRight()
398 void QChartView::scrollRight()
402 {
399 {
403 m_chart->scrollRight();
400 m_chart->scrollRight();
404 }
401 }
405
402
406 void QChartView::scrollUp()
403 void QChartView::scrollUp()
407 {
404 {
408 m_chart->scrollUp();
405 m_chart->scrollUp();
409 }
406 }
410
407
411 void QChartView::scrollDown()
408 void QChartView::scrollDown()
412 {
409 {
413 m_chart->scrollDown();
410 m_chart->scrollDown();
414 }
411 }
415
412
416
413
417 #include "moc_qchartview.cpp"
414 #include "moc_qchartview.cpp"
418
415
419 QTCOMMERCIALCHART_END_NAMESPACE
416 QTCOMMERCIALCHART_END_NAMESPACE
General Comments 0
You need to be logged in to leave comments. Login now