Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportRuler.cpp
Show First 20 Lines • Show All 656 Lines • ▼ Show 20 Line(s) | 647 | { | |||
---|---|---|---|---|---|
657 | QListIterator<qreal> i(points); | 657 | QListIterator<qreal> i(points); | ||
658 | i.next(); | 658 | i.next(); | ||
659 | while (i.hasNext() && i.hasPrevious()) { | 659 | while (i.hasNext() && i.hasPrevious()) { | ||
660 | drawDistanceLine(d, painter, i.peekPrevious(), i.peekNext()); | 660 | drawDistanceLine(d, painter, i.peekPrevious(), i.peekNext()); | ||
661 | i.next(); | 661 | i.next(); | ||
662 | } | 662 | } | ||
663 | } | 663 | } | ||
664 | 664 | | |||
665 | KReportRulerPrivate::KReportRulerPrivate(KReportRuler *parent, const KReportZoomHandler *vc, Qt::Orientation o) | 665 | KReportRulerPrivate::KReportRulerPrivate(KReportRuler *parent, | ||
666 | const KReportZoomHandler &zoomHandler, Qt::Orientation o) | ||||
666 | : unit(KReportUnit(KReportUnit::Point)), | 667 | : unit(KReportUnit(KReportUnit::Point)), | ||
667 | orientation(o), | 668 | orientation(o), | ||
668 | viewConverter(vc), | 669 | viewConverter(&zoomHandler), | ||
669 | offset(0), | 670 | offset(0), | ||
670 | rulerLength(0), | 671 | rulerLength(0), | ||
671 | activeRangeStart(0), | 672 | activeRangeStart(0), | ||
672 | activeRangeEnd(0), | 673 | activeRangeEnd(0), | ||
673 | activeOverrideRangeStart(0), | 674 | activeOverrideRangeStart(0), | ||
674 | activeOverrideRangeEnd(0), | 675 | activeOverrideRangeEnd(0), | ||
675 | mouseCoordinate(-1), | 676 | mouseCoordinate(-1), | ||
676 | showMousePosition(0), | 677 | showMousePosition(0), | ||
▲ Show 20 Lines • Show All 139 Lines • ▼ Show 20 Line(s) | |||||
816 | { | 817 | { | ||
817 | KReportRuler::Tab tab; | 818 | KReportRuler::Tab tab; | ||
818 | if (currentIndex >= 0) | 819 | if (currentIndex >= 0) | ||
819 | tab = tabs[currentIndex]; | 820 | tab = tabs[currentIndex]; | ||
820 | emit ruler->tabChanged(originalIndex, currentIndex >= 0 ? &tab : 0); | 821 | emit ruler->tabChanged(originalIndex, currentIndex >= 0 ? &tab : 0); | ||
821 | } | 822 | } | ||
822 | 823 | | |||
823 | 824 | | |||
824 | KReportRuler::KReportRuler(QWidget* parent, Qt::Orientation orientation, const KReportZoomHandler* viewConverter) | 825 | KReportRuler::KReportRuler(QWidget* parent, Qt::Orientation orientation, | ||
826 | const KReportZoomHandler &zoomHandler) | ||||
825 | : QWidget(parent) | 827 | : QWidget(parent) | ||
826 | , d( new KReportRulerPrivate( this, viewConverter, orientation) ) | 828 | , d(new KReportRulerPrivate(this, zoomHandler, orientation)) | ||
827 | { | 829 | { | ||
828 | setMouseTracking( true ); | 830 | setMouseTracking( true ); | ||
829 | } | 831 | } | ||
830 | 832 | | |||
831 | KReportRuler::~KReportRuler() | 833 | KReportRuler::~KReportRuler() | ||
832 | { | 834 | { | ||
833 | delete d; | 835 | delete d; | ||
834 | } | 836 | } | ||
▲ Show 20 Lines • Show All 489 Lines • Show Last 20 Lines |