QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
QgsComposerRuler Class Reference

A class to show paper scale and the current cursor position. More...

#include <qgscomposerruler.h>

Collaboration diagram for QgsComposerRuler:
Collaboration graph
[legend]

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)
QgsCompositioncomposition ()

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
QgsCompositionmComposition
QGraphicsLineItem * mLineSnapItem
QList< QPair< QgsComposerItem
*, QgsComposerItem::ItemPositionMode > > 
mSnappedItems

Detailed Description

A class to show paper scale and the current cursor position.

Definition at line 10 of file qgscomposerruler.h.

Member Enumeration Documentation

Enumerator:
Horizontal 
Vertical 

Definition at line 13 of file qgscomposerruler.h.

Constructor & Destructor Documentation

QgsComposerRuler::QgsComposerRuler ( QgsComposerRuler::Direction  d)

Definition at line 11 of file qgscomposerruler.cpp.

QgsComposerRuler::~QgsComposerRuler ( )

Definition at line 16 of file qgscomposerruler.cpp.

Member Function Documentation

QgsComposition* QgsComposerRuler::composition ( )
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.

void QgsComposerRuler::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 130 of file qgscomposerruler.cpp.

References setSnapLinePosition(), and updateMarker().

void QgsComposerRuler::mousePressEvent ( QMouseEvent *  event)
protected
void QgsComposerRuler::mouseReleaseEvent ( QMouseEvent *  event)
protected
void QgsComposerRuler::paintEvent ( QPaintEvent *  event)
protected
void QgsComposerRuler::setComposition ( QgsComposition c)
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().

void QgsComposerRuler::setSnapLinePosition ( const QPointF &  pos)
private
void QgsComposerRuler::updateMarker ( const QPointF &  pos)
inline

Definition at line 25 of file qgscomposerruler.h.

Referenced by mouseMoveEvent(), and QgsComposerView::mouseMoveEvent().

Member Data Documentation

QgsComposition* QgsComposerRuler::mComposition
private
Direction QgsComposerRuler::mDirection
private
QGraphicsLineItem* QgsComposerRuler::mLineSnapItem
private

Definition at line 41 of file qgscomposerruler.h.

Referenced by mousePressEvent(), mouseReleaseEvent(), and setSnapLinePosition().

QPointF QgsComposerRuler::mMarkerPos
private

Definition at line 39 of file qgscomposerruler.h.

Referenced by paintEvent().

QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > > QgsComposerRuler::mSnappedItems
private

Definition at line 43 of file qgscomposerruler.h.

Referenced by mousePressEvent(), mouseReleaseEvent(), and setSnapLinePosition().

QTransform QgsComposerRuler::mTransform
private

The documentation for this class was generated from the following files: