@@ -310,16 +310,21 QChart::AnimationOptions QChart::animationOptions() const | |||
|
310 | 310 | return m_presenter->animationOptions(); |
|
311 | 311 | } |
|
312 | 312 | |
|
313 |
void QChart::scroll( |
|
|
313 | void QChart::scrollLeft() | |
|
314 | 314 | { |
|
315 | //temporary | |
|
316 | if(dx>0) | |
|
317 | m_presenter->scroll(m_presenter->geometry().width()/(axisX()->ticksCount()-1),0); | |
|
318 | if(dx<0) | |
|
319 | 315 |
|
|
320 | if(dy>0) | |
|
316 | } | |
|
317 | ||
|
318 | void QChart::scrollRight() | |
|
319 | { | |
|
320 | m_presenter->scroll(m_presenter->geometry().width()/(axisX()->ticksCount()-1),0); | |
|
321 | } | |
|
322 | void QChart::scrollUp() | |
|
323 | { | |
|
321 | 324 |
|
|
322 | if(dy<0) | |
|
325 | } | |
|
326 | void QChart::scrollDown() | |
|
327 | { | |
|
323 | 328 | m_presenter->scroll(0,-m_presenter->geometry().width()/(axisY()->ticksCount()-1)); |
|
324 | 329 | } |
|
325 | 330 |
@@ -73,7 +73,10 public: | |||
|
73 | 73 | void zoomIn(const QRectF& rect); |
|
74 | 74 | void zoomOut(); |
|
75 | 75 | void zoomReset(); |
|
76 |
void scroll( |
|
|
76 | void scrollLeft(); | |
|
77 | void scrollRight(); | |
|
78 | void scrollUp(); | |
|
79 | void scrollDown(); | |
|
77 | 80 | |
|
78 | 81 | QChartAxis* axisX() const; |
|
79 | 82 | QChartAxis* axisY() const; |
@@ -380,11 +380,27 QChart::AnimationOptions QChartView::animationOptions() const | |||
|
380 | 380 | return m_chart->animationOptions(); |
|
381 | 381 | } |
|
382 | 382 | |
|
383 |
void QChartView::scroll( |
|
|
383 | void QChartView::scrollLeft() | |
|
384 | 384 | { |
|
385 |
|
|
|
385 | m_chart->scrollLeft(); | |
|
386 | 386 | } |
|
387 | 387 | |
|
388 | void QChartView::scrollRight() | |
|
389 | { | |
|
390 | m_chart->scrollRight(); | |
|
391 | } | |
|
392 | ||
|
393 | void QChartView::scrollUp() | |
|
394 | { | |
|
395 | m_chart->scrollUp(); | |
|
396 | } | |
|
397 | ||
|
398 | void QChartView::scrollDown() | |
|
399 | { | |
|
400 | m_chart->scrollDown(); | |
|
401 | } | |
|
402 | ||
|
403 | ||
|
388 | 404 | #include "moc_qchartview.cpp" |
|
389 | 405 | |
|
390 | 406 | QTCOMMERCIALCHART_END_NAMESPACE |
@@ -43,8 +43,10 public: | |||
|
43 | 43 | void zoomIn(); |
|
44 | 44 | void zoomIn(const QRect& rect); |
|
45 | 45 | void zoomOut(); |
|
46 | ||
|
47 |
void scroll( |
|
|
46 | void scrollLeft(); | |
|
47 | void scrollRight(); | |
|
48 | void scrollUp(); | |
|
49 | void scrollDown(); | |
|
48 | 50 | |
|
49 | 51 | void setRubberBandPolicy(const RubberBandPolicy ); |
|
50 | 52 | RubberBandPolicy rubberBandPolicy() const; |
General Comments 0
You need to be logged in to leave comments.
Login now