QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RGrid Class Reference

Abstract base class for grid implementations. More...

#include <RGrid.h>

Inheritance diagram for RGrid:
ROrthoGrid

List of all members.

Public Member Functions

virtual void clearCache ()
RDocumentgetDocument () const
virtual QString getInfoText ()=0
int getViewportNumber () const
 Copyright (c) 2011-2013 by Andrew Mustun.
bool isVisible () const
virtual void paint ()=0
 This is called by the graphics view this grid is attached to whenever the grid should be painted.
virtual void paintCursor (const RVector &pos)=0
virtual void paintMetaGrid ()=0
 This is called by the graphics view this grid is attached to whenever the meta grid should be painted.
virtual void paintRuler (RRuler &ruler)=0
 RGrid (RGraphicsView &view)
void setVisible (bool on)
virtual RVector snapToGrid (const RVector &positionUcs)=0
 Snaps the given UCS position to the grid.
virtual void update (bool force=false)=0
 This is called by the graphics view this grid is attached to whenever the view port changes and the grid needs to be updated.
virtual ~RGrid ()

Protected Attributes

RGraphicsViewview
int visible

Detailed Description

Abstract base class for grid implementations.

A grid class can for example implement an orthogonal grid or a polar grid.

Scriptable:
This class is wrapped for script environments.

Constructor & Destructor Documentation

RGrid::RGrid ( RGraphicsView view)
inline
virtual RGrid::~RGrid ( )
inlinevirtual

Member Function Documentation

void RGrid::clearCache ( )
virtual

Reimplemented in ROrthoGrid.

RDocument * RGrid::getDocument ( ) const
virtual QString RGrid::getInfoText ( )
pure virtual

Implemented in ROrthoGrid.

int RGrid::getViewportNumber ( ) const

Copyright (c) 2011-2013 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

bool RGrid::isVisible ( ) const
virtual void RGrid::paint ( )
pure virtual

This is called by the graphics view this grid is attached to whenever the grid should be painted.

Implemented in ROrthoGrid.

virtual void RGrid::paintCursor ( const RVector pos)
pure virtual

Implemented in ROrthoGrid.

virtual void RGrid::paintMetaGrid ( )
pure virtual

This is called by the graphics view this grid is attached to whenever the meta grid should be painted.

Implemented in ROrthoGrid.

virtual void RGrid::paintRuler ( RRuler ruler)
pure virtual

Implemented in ROrthoGrid.

void RGrid::setVisible ( bool  on)
virtual RVector RGrid::snapToGrid ( const RVector positionUcs)
pure virtual

Snaps the given UCS position to the grid.

Implemented in ROrthoGrid.

virtual void RGrid::update ( bool  force = false)
pure virtual

This is called by the graphics view this grid is attached to whenever the view port changes and the grid needs to be updated.

Implemented in ROrthoGrid.


Member Data Documentation

RGraphicsView& RGrid::view
protected
int RGrid::visible
mutableprotected

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