QCAD
Open Source 2D CAD
|
Grid representation. More...
#include <ROrthoGrid.h>
Public Member Functions | |
virtual void | clearCache () |
QList< RVector > | getIdealSpacing (int minPixelSpacing, const RVector &minSpacing, const RVector &minMetaSpacing) |
virtual QString | getInfoText () |
virtual RS::IsoProjectionType | getProjection () const |
virtual bool | isIsometric () const |
virtual void | paint () |
This is called by the graphics view this grid is attached to whenever the grid should be painted. More... | |
virtual void | paintCursor (const RVector &pos) |
virtual void | paintGridLines (const RVector &space, const RBox &box, bool meta) |
virtual void | paintGridPoints (const RVector &space, const RBox &box) |
virtual void | paintMetaGrid () |
This is called by the graphics view this grid is attached to whenever the meta grid should be painted. More... | |
virtual void | paintRuler (RRuler &ruler, qreal devicePixelRatio=1.0) |
ROrthoGrid (RGraphicsView &view) | |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
void | setIsometric (bool on) |
void | setProjection (RS::IsoProjectionType p) |
RVector | snapToGrid (const RVector &positionUcs) |
Maps the given model position to the grid. More... | |
virtual void | update (bool force=false) |
Updates the grid information, in particular the grid spacing and grid region to the current view port. More... | |
virtual | ~ROrthoGrid () |
Public Member Functions inherited from RGrid | |
RDocument * | getDocument () const |
int | getViewportNumber () const |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
bool | isVisible () const |
RGrid (RGraphicsView &view) | |
void | setVisible (bool on) |
virtual | ~RGrid () |
Static Public Member Functions | |
static QList< RVector > | getIdealGridSpacing (RGraphicsView &view, int minPixelSpacing, const RVector &minSpacing, const RVector &minMetaSpacing) |
static bool | isFractionalFormat (RS::LinearFormat linearFormat) |
Static Private Member Functions | |
static double | inchAutoscale (double value, double idealSpacing, RS::Unit unit) |
Private Attributes | |
RVector | autoMetaSpacing |
RVector | autoSpacing |
RBox | gridBox |
QString | infoText |
int | isometric |
RBox | metaGridBox |
RVector | metaSpacing |
RVector | minMetaSpacing |
int | minPixelSpacing |
RVector | minSpacing |
int | projection |
RVector | spacing |
RBox | viewBox |
Additional Inherited Members | |
Protected Attributes inherited from RGrid | |
RGraphicsView & | view |
int | visible |
Grid representation.
This class is responsible for updating the grid and snapping to the grid.
ROrthoGrid::ROrthoGrid | ( | RGraphicsView & | view | ) |
Copyright (c) 2011-2018 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.
|
virtual |
|
virtual |
Reimplemented from RGrid.
|
static |
QList< RVector > ROrthoGrid::getIdealSpacing | ( | int | minPixelSpacing, |
const RVector & | minSpacing, | ||
const RVector & | minMetaSpacing | ||
) |
|
virtual |
Implements RGrid.
|
virtual |
Reimplemented from RGrid.
|
staticprivate |
|
static |
|
virtual |
Reimplemented from RGrid.
|
virtual |
This is called by the graphics view this grid is attached to whenever the grid should be painted.
Implements RGrid.
|
virtual |
This is called by the graphics view this grid is attached to whenever the meta grid should be painted.
Implements RGrid.
|
virtual |
Implements RGrid.
void ROrthoGrid::setIsometric | ( | bool | on | ) |
void ROrthoGrid::setProjection | ( | RS::IsoProjectionType | p | ) |
Maps the given model position to the grid.
Implements RGrid.
|
virtual |
Updates the grid information, in particular the grid spacing and grid region to the current view port.
Implements RGrid.
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |