Skip to content

RGrid

Class in Core Module
Header: #include <src/core/RGrid.h>
Inherited by: ROrthoGrid

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.

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 = 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 = 0
virtual void paintMetaGrid()=0 = 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, qreal devicePixelRatio=1.0)=0 = 0
void setVisible(bool on)
virtual RVector snapToGrid(const RVector &positionUcs)=0 = 0
Snaps the given UCS position to the grid.
virtual void update(bool force=false)=0 = 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.
RGraphicsView & view
int visible

RGrid::RGrid(RGraphicsView &view)

inline

virtual RGrid::~RGrid()

virtual inline

virtual void RGrid::clearCache()

virtual

Reimplemented in clearCache.

RDocument * RGrid::getDocument() const

const

virtual QString RGrid::getInfoText()=0 = 0

pure virtual

Reimplemented in getInfoText.

virtual RS::IsoProjectionType RGrid::getProjection() const

virtual inline const

Reimplemented in getProjection.

int RGrid::getViewportNumber() const

const

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.

virtual bool RGrid::isIsometric() const

virtual inline const

Reimplemented in isIsometric.

bool RGrid::isVisible() const

const

virtual void RGrid::paint()=0 = 0

pure virtual

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

Reimplemented in paint.

virtual void RGrid::paintCursor(const RVector &pos)=0 = 0

pure virtual

Reimplemented in paintCursor.

virtual void RGrid::paintMetaGrid()=0 = 0

pure virtual

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

Reimplemented in paintMetaGrid.

virtual void RGrid::paintRuler(RRuler &ruler, qreal devicePixelRatio=1.0)=0 = 0

pure virtual

Reimplemented in paintRuler.

void RGrid::setVisible(bool on)

virtual RVector RGrid::snapToGrid(const RVector &positionUcs)=0 = 0

pure virtual

Snaps the given UCS position to the grid.

Reimplemented in snapToGrid.

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

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.

Reimplemented in update.

RGraphicsView& RGrid::view

protected

int RGrid::visible

protected