kig
#include <kig_document.h>
Public Member Functions | |
KigDocument () | |
KigDocument (std::set< ObjectHolder * > objects, CoordinateSystem *coordsystem, bool showgrid=true, bool showaxes=true, bool nv=false) | |
~KigDocument () | |
void | addObject (ObjectHolder *oObject) |
void | addObjects (const std::vector< ObjectHolder * > &os) |
bool | axes () const |
const CoordinateSystem & | coordinateSystem () const |
void | delObject (ObjectHolder *o) |
void | delObjects (const std::vector< ObjectHolder * > &os) |
std::vector< ObjectCalcer * > | findIntersectionPoints (const ObjectCalcer *c1, const ObjectCalcer *c2) const |
int | getCoordinatePrecision () const |
bool | getNightVision () const |
bool | grid () const |
bool | isUserSpecifiedCoordinatePrecision () const |
const std::vector< ObjectHolder * > | objects () const |
const std::set< ObjectHolder * > & | objectsSet () const |
void | setAxes (bool showaxes) |
void | setCoordinatePrecision (int precision) |
void | setCoordinateSystem (CoordinateSystem *s) |
void | setGrid (bool showgrid) |
void | setNightVision (bool nv) |
Rect | suggestedRect () const |
CoordinateSystem * | switchCoordinateSystem (CoordinateSystem *s) |
std::vector< ObjectHolder * > | whatAmIOn (const Coordinate &p, const KigWidget &w) const |
std::vector< ObjectHolder * > | whatIsInHere (const Rect &p, const KigWidget &) |
Public Attributes | |
double | mcachedparam |
Detailed Description
KigDocument is the class holding the real data in a Kig document.
It owns a set of Objects, and a CoordinateSystem, which comprise the entire content of a Kig document.
Definition at line 36 of file kig_document.h.
Constructor & Destructor Documentation
KigDocument::KigDocument | ( | ) |
Definition at line 163 of file kig_document.cc.
KigDocument::KigDocument | ( | std::set< ObjectHolder * > | objects, |
CoordinateSystem * | coordsystem, | ||
bool | showgrid = true , |
||
bool | showaxes = true , |
||
bool | nv = false |
||
) |
Definition at line 33 of file kig_document.cc.
KigDocument::~KigDocument | ( | ) |
Definition at line 172 of file kig_document.cc.
Member Function Documentation
void KigDocument::addObject | ( | ObjectHolder * | oObject | ) |
Add the objects o
to the document.
Definition at line 138 of file kig_document.cc.
void KigDocument::addObjects | ( | const std::vector< ObjectHolder * > & | os | ) |
Add the objects os
to the document.
Definition at line 143 of file kig_document.cc.
bool KigDocument::axes | ( | ) | const |
Definition at line 206 of file kig_document.cc.
const CoordinateSystem & KigDocument::coordinateSystem | ( | ) | const |
Definition at line 40 of file kig_document.cc.
void KigDocument::delObject | ( | ObjectHolder * | o | ) |
Remove the object o
from the document.
Definition at line 151 of file kig_document.cc.
void KigDocument::delObjects | ( | const std::vector< ObjectHolder * > & | os | ) |
Remove the objects os
from the document.
Definition at line 156 of file kig_document.cc.
std::vector< ObjectCalcer * > KigDocument::findIntersectionPoints | ( | const ObjectCalcer * | c1, |
const ObjectCalcer * | c2 | ||
) | const |
Return all the points that belong (by construction) on both the given curves.
This is useful when the user asks for an intersection point between a conic and a line (or two circles) and one is already there.
Definition at line 248 of file kig_document.cc.
int KigDocument::getCoordinatePrecision | ( | ) | const |
Definition at line 221 of file kig_document.cc.
bool KigDocument::getNightVision | ( | ) | const |
Definition at line 211 of file kig_document.cc.
bool KigDocument::grid | ( | ) | const |
Definition at line 186 of file kig_document.cc.
bool KigDocument::isUserSpecifiedCoordinatePrecision | ( | ) | const |
Definition at line 216 of file kig_document.cc.
const std::vector< ObjectHolder * > KigDocument::objects | ( | ) | const |
Get a hold of the objects of this KigDocument.
Definition at line 46 of file kig_document.cc.
const std::set< ObjectHolder * > & KigDocument::objectsSet | ( | ) | const |
Definition at line 51 of file kig_document.cc.
void KigDocument::setAxes | ( | bool | showaxes | ) |
set to show/hide the grid.
Definition at line 191 of file kig_document.cc.
void KigDocument::setCoordinatePrecision | ( | int | precision | ) |
Definition at line 201 of file kig_document.cc.
void KigDocument::setCoordinateSystem | ( | CoordinateSystem * | s | ) |
sets the coordinate system to s
, and deletes the old one.
Definition at line 56 of file kig_document.cc.
void KigDocument::setGrid | ( | bool | showgrid | ) |
set to show/hide the grid.
Definition at line 181 of file kig_document.cc.
void KigDocument::setNightVision | ( | bool | nv | ) |
set to enable/disable night-vision (visibility of hidden objects)
Definition at line 196 of file kig_document.cc.
Rect KigDocument::suggestedRect | ( | ) | const |
Return a rect containing most of the objects, which would be a fine suggestion to map to the widget...
Definition at line 106 of file kig_document.cc.
CoordinateSystem * KigDocument::switchCoordinateSystem | ( | CoordinateSystem * | s | ) |
sets the coordinate system to s
, and returns the old one.
Definition at line 61 of file kig_document.cc.
std::vector< ObjectHolder * > KigDocument::whatAmIOn | ( | const Coordinate & | p, |
const KigWidget & | w | ||
) | const |
Return a vector of objects that contain the given point.
Definition at line 68 of file kig_document.cc.
std::vector< ObjectHolder * > KigDocument::whatIsInHere | ( | const Rect & | p, |
const KigWidget & | w | ||
) |
Return a vector of objects that are in the given Rect.
Definition at line 91 of file kig_document.cc.
Member Data Documentation
|
mutable |
Definition at line 71 of file kig_document.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.