QGIS API Documentation
2.0.1-Dufour
|
A class to show paper scale and the current cursor position. More...
#include <qgscomposerruler.h>
Public Types | |
enum | Direction { Horizontal = 0, Vertical } |
Public Member Functions | |
QgsComposerRuler (QgsComposerRuler::Direction d) | |
~QgsComposerRuler () | |
QSize | minimumSizeHint () const |
void | setSceneTransform (const QTransform &transform) |
void | updateMarker (const QPointF &pos) |
void | setComposition (QgsComposition *c) |
QgsComposition * | composition () |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
Private Member Functions | |
void | setSnapLinePosition (const QPointF &pos) |
Private Attributes | |
Direction | mDirection |
QTransform | mTransform |
QPointF | mMarkerPos |
QgsComposition * | mComposition |
QGraphicsLineItem * | mLineSnapItem |
QList< QPair< QgsComposerItem *, QgsComposerItem::ItemPositionMode > > | mSnappedItems |
A class to show paper scale and the current cursor position.
Definition at line 10 of file qgscomposerruler.h.
Definition at line 13 of file qgscomposerruler.h.
QgsComposerRuler::QgsComposerRuler | ( | QgsComposerRuler::Direction | d | ) |
Definition at line 11 of file qgscomposerruler.cpp.
QgsComposerRuler::~QgsComposerRuler | ( | ) |
Definition at line 16 of file qgscomposerruler.cpp.
|
inline |
Definition at line 28 of file qgscomposerruler.h.
QSize QgsComposerRuler::minimumSizeHint | ( | ) | const |
Definition at line 20 of file qgscomposerruler.cpp.
References RULER_MIN_SIZE.
|
protected |
Definition at line 130 of file qgscomposerruler.cpp.
References setSnapLinePosition(), and updateMarker().
|
protected |
Definition at line 161 of file qgscomposerruler.cpp.
References QgsComposition::addSnapLine(), Horizontal, mComposition, mDirection, mLineSnapItem, mSnappedItems, mTransform, and QgsComposition::nearestSnapLine().
|
protected |
Definition at line 137 of file qgscomposerruler.cpp.
References Horizontal, mComposition, mDirection, mLineSnapItem, mSnappedItems, mTransform, and QgsComposition::removeSnapLine().
|
protected |
Definition at line 25 of file qgscomposerruler.cpp.
References Horizontal, mComposition, mDirection, mMarkerPos, mTransform, QgsComposition::numPages(), QgsComposition::paperHeight(), qgsDoubleNear(), RULER_MIN_SIZE, and QgsComposition::spaceBetweenPages().
|
inline |
Definition at line 27 of file qgscomposerruler.h.
Referenced by QgsComposerView::setComposition().
void QgsComposerRuler::setSceneTransform | ( | const QTransform & | transform | ) |
Definition at line 122 of file qgscomposerruler.cpp.
References mTransform.
Referenced by QgsComposerView::updateRulers().
|
private |
Definition at line 187 of file qgscomposerruler.cpp.
References Horizontal, QgsComposerItem::LowerLeft, mComposition, mDirection, QgsComposerItem::Middle, QgsComposerItem::MiddleLeft, mLineSnapItem, mSnappedItems, mTransform, QgsComposition::numPages(), QgsComposition::paperHeight(), QgsComposition::paperWidth(), QgsComposition::spaceBetweenPages(), QgsComposerItem::UpperLeft, QgsComposerItem::UpperMiddle, and QgsComposerItem::UpperRight.
Referenced by mouseMoveEvent().
|
inline |
Definition at line 25 of file qgscomposerruler.h.
Referenced by mouseMoveEvent(), and QgsComposerView::mouseMoveEvent().
|
private |
Definition at line 40 of file qgscomposerruler.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), paintEvent(), and setSnapLinePosition().
|
private |
Definition at line 37 of file qgscomposerruler.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), paintEvent(), and setSnapLinePosition().
|
private |
Definition at line 41 of file qgscomposerruler.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), and setSnapLinePosition().
|
private |
Definition at line 39 of file qgscomposerruler.h.
Referenced by paintEvent().
|
private |
Definition at line 43 of file qgscomposerruler.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), and setSnapLinePosition().
|
private |
Definition at line 38 of file qgscomposerruler.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), paintEvent(), setSceneTransform(), and setSnapLinePosition().