RGrid
Class in Core Module
Header: #include <src/core/RGrid.h>
Inherited by: ROrthoGrid
Description
Section titled “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 available in script environments.
Public Functions
Section titled “Public Functions”RGrid(RGraphicsView &view) |
|
| virtual | ~RGrid() |
| virtual void | clearCache() |
| RDocument * | getDocument() const |
| virtual QString | getInfoText()=0 = 0 |
| virtual RS::IsoProjectionType | getProjection() const |
| int | getViewportNumber() const |
| virtual bool | isIsometric() const |
| bool | isVisible() const |
| virtual void | paint()=0 = 0This is called by the graphics view this grid is attached to whenever the grid should be painted. |
| virtual void | paintCursor(const RVector &pos)=0 = 0 |
| virtual void | paintMetaGrid()=0 = 0This is called by the graphics view this grid is attached to whenever the meta grid should be painted. |
| virtual void | paintRuler(RRuler &ruler, qreal devicePixelRatio=1.0)=0 = 0 |
| void | setVisible(bool on) |
| virtual RVector | snapToGrid(const RVector &positionUcs)=0 = 0Snaps the given UCS position to the grid. |
| virtual void | update(bool force=false)=0 = 0This is called by the graphics view this grid is attached to whenever the view port changes and the grid needs to be updated. |
Protected Attributes
Section titled “Protected Attributes”| RGraphicsView & | view |
| int | visible |
Member Documentation
Section titled “Member Documentation”RGrid::RGrid(RGraphicsView &view)inline
~RGrid
Section titled “~RGrid”virtual RGrid::~RGrid()virtual inline
clearCache
Section titled “clearCache”virtual void RGrid::clearCache()virtual
Reimplemented in clearCache.
getDocument
Section titled “getDocument”RDocument * RGrid::getDocument() constconst
getInfoText
Section titled “getInfoText”virtual QString RGrid::getInfoText()=0 = 0pure virtual
Reimplemented in getInfoText.
getProjection
Section titled “getProjection”virtual RS::IsoProjectionType RGrid::getProjection() constvirtual inline const
Reimplemented in getProjection.
getViewportNumber
Section titled “getViewportNumber”int RGrid::getViewportNumber() constconst
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.
isIsometric
Section titled “isIsometric”virtual bool RGrid::isIsometric() constvirtual inline const
Reimplemented in isIsometric.
isVisible
Section titled “isVisible”bool RGrid::isVisible() constconst
virtual void RGrid::paint()=0 = 0pure virtual
This is called by the graphics view this grid is attached to whenever the grid should be painted.
Reimplemented in paint.
paintCursor
Section titled “paintCursor”virtual void RGrid::paintCursor(const RVector &pos)=0 = 0pure virtual
Reimplemented in paintCursor.
paintMetaGrid
Section titled “paintMetaGrid”virtual void RGrid::paintMetaGrid()=0 = 0pure virtual
This is called by the graphics view this grid is attached to whenever the meta grid should be painted.
Reimplemented in paintMetaGrid.
paintRuler
Section titled “paintRuler”virtual void RGrid::paintRuler(RRuler &ruler, qreal devicePixelRatio=1.0)=0 = 0pure virtual
Reimplemented in paintRuler.
setVisible
Section titled “setVisible”void RGrid::setVisible(bool on)snapToGrid
Section titled “snapToGrid”virtual RVector RGrid::snapToGrid(const RVector &positionUcs)=0 = 0pure virtual
Snaps the given UCS position to the grid.
Reimplemented in snapToGrid.
update
Section titled “update”virtual void RGrid::update(bool force=false)=0 = 0pure 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.
Reimplemented in update.
RGraphicsView& RGrid::viewprotected
visible
Section titled “visible”int RGrid::visibleprotected