kig
object_factory.cc
Go to the documentation of this file.
480 return new ObjectHolder( attachedLabelCalcer( s, locationparent, loc, needframe, parents, doc ) );
ObjectHolder * sensiblePoint(const Coordinate &c, const KigDocument &d, const KigWidget &w) const
Definition: object_factory.cc:286
void move(const Coordinate &to, const KigDocument &doc)
This is the method that does the real moving work.
Definition: object_calcer.cc:296
bool inherits(const ObjectImpType *t) const
Returns true if this ObjectImp inherits the ObjectImp type represented by t.
Definition: object_imp.cc:279
Definition: object_hierarchy.h:30
void setParents(const std::vector< ObjectCalcer * > np)
Set the parents of this ObjectTypeCalcer to np.
Definition: object_calcer.cc:246
std::vector< ObjectCalcer * > removeDuplicatedPoints(std::vector< ObjectCalcer * > points)
Definition: special_constructors.cc:115
An ObjectImp class that is the base of the line-like ObjectImp's: SegmentImp, LineImp and RayImp...
Definition: line_imp.h:31
This is an ObjectCalcer that keeps an ObjectImp, and never calculates a new one.
Definition: object_calcer.h:232
static const CircleCircleOtherIntersectionType * instance()
Definition: intersection_types.cc:323
ObjectTypeCalcer * fixedPointCalcer(const Coordinate &c) const
Definition: object_factory.cc:50
static const ObjectImpType * stype()
Returns the ObjectImpType representing the DoubleImp type.
Definition: bogus_imp.cc:270
static const CircleCircleIntersectionType * instance()
Definition: intersection_types.cc:490
ObjectCalcer * getAttachPoint(ObjectCalcer *locationparent, const Coordinate &loc, const KigDocument &doc) const
this has been added because it comes handy when redefining a text label, we move here all the code fo...
Definition: object_factory.cc:421
ObjectTypeCalcer * locusCalcer(ObjectCalcer *a, ObjectCalcer *b) const
return a locus, defined by the two points ( one constrained, and one following ) a and b ...
Definition: object_factory.cc:355
static const ObjectImpType * stype()
Returns the ObjectImpType representing the IntImp type.
Definition: bogus_imp.cc:278
virtual const QByteArrayList propertiesInternalNames() const
Definition: object_imp.cc:63
This is an ObjectCalcer that uses one of the various ObjectType's to calculate its ObjectImp...
Definition: object_calcer.h:183
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
int indexOf(const T &value, int from) const
ObjectHolder * propertyObject(ObjectCalcer *o, const char *p) const
Definition: object_factory.cc:491
ObjectTypeCalcer * labelCalcer(const QString &s, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
Definition: object_factory.cc:394
const Coordinate calcConicLineIntersect(const ConicCartesianData &c, const LineData &l, double knownparam, int which)
This function calculates the intersection of a given line ( l ) and a given conic ( c )...
Definition: conic-common.cpp:367
ObjectHolder * label(const QString &s, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
returns a label with text s at point c .
Definition: object_factory.cc:386
static const LineLineIntersectionType * instance()
Definition: intersection_types.cc:374
void redefinePoint(ObjectTypeCalcer *point, const Coordinate &c, KigDocument &d, const KigWidget &w) const
set point to what sensiblePoint would have returned.
Definition: object_factory.cc:497
Coordinate calcCircleRadicalStartPoint(const Coordinate &ca, const Coordinate &cb, double sqra, double sqrb)
Definition: common.cpp:335
An ObjectHolder represents an object as it is known to the document.
Definition: object_holder.h:40
static const ConstrainedRelativePointType * instance()
Definition: point_type.cc:566
An ObjectCalcer is an object that represents an algorithm for calculating an ObjectImp from other Obj...
Definition: object_calcer.h:66
ObjectTypeCalcer * attachedLabelCalcer(const QString &s, ObjectCalcer *locationparent, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
this one does the same as the above, only that the new label is attached to locationparent if it is n...
Definition: object_factory.cc:402
ObjectHolder * fixedPoint(const Coordinate &c) const
this returns a fixed point.
Definition: object_factory.cc:44
std::vector< ObjectCalcer * > sideOfTreePath(const std::vector< ObjectCalcer * > &from, const ObjectCalcer *to)
This function returns all objects on the side of the path through the dependency tree from from down ...
Definition: calcpaths.cc:222
const LineData calcConicRadical(const ConicCartesianData &cequation1, const ConicCartesianData &cequation2, int which, int zeroindex, bool &valid)
This function calculates the radical line of two conics.
Definition: conic-common.cpp:544
ObjectTypeCalcer * constrainedPointCalcer(ObjectCalcer *curve, double param) const
Definition: object_factory.cc:313
ObjectHolder * constrainedPoint(ObjectCalcer *curve, double param) const
this returns a constrained point.
Definition: object_factory.cc:323
std::vector< ObjectHolder * > whatAmIOn(const Coordinate &p, const KigWidget &w) const
Return a vector of objects that contain the given point.
Definition: kig_document.cc:68
ObjectTypeCalcer * constrainedRelativePointCalcer(ObjectCalcer *curve, double param) const
Definition: object_factory.cc:343
virtual void calc(const KigDocument &)=0
Makes the ObjectCalcer recalculate its ObjectImp from its parents.
Definition: bogus_imp.h:203
This is an ObjectCalcer that has a single parent, and gets a certain property from it in its calc() m...
Definition: object_calcer.h:276
ObjectPropertyCalcer * propertyObjectCalcer(ObjectCalcer *o, const char *p) const
returns a property object for the property p of object o .
Definition: object_factory.cc:483
virtual Coordinate attachPoint() const =0
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachme...
ObjectTypeCalcer * cursorPointCalcer(const Coordinate &c) const
this returns a CursorPointType; this is used during special constructions (e.g.
Definition: object_factory.cc:81
static const ObjectImpType * stype()
Returns the ObjectImpType representing the CircleImp type.
Definition: circle_imp.cc:342
ObjectTypeCalcer * sensiblePointCalcer(const Coordinate &c, const KigDocument &d, const KigWidget &w) const
this returns a "sensible point".
Definition: object_factory.cc:96
static const ObjectImpType * stype()
Returns the ObjectImpType representing PointImp's.
Definition: point_imp.cc:159
virtual const ConicCartesianData cartesianData() const
Return the cartesian representation of this conic.
Definition: conic_imp.cc:285
std::vector< ObjectCalcer * > findIntersectionPoints(const ObjectCalcer *c1, const ObjectCalcer *c2) const
Return all the points that belong (by construction) on both the given curves.
Definition: kig_document.cc:248
ObjectHolder * attachedLabel(const QString &s, ObjectCalcer *locationparent, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
Definition: object_factory.cc:474
ObjectTypeCalcer * numericValueCalcer(const double value, const Coordinate &loc, const KigDocument &doc) const
Definition: object_factory.cc:65
static const ObjectImpType * stype()
Returns the ObjectImpType representing the CurveImp type.
Definition: curve_imp.cc:27
static const ObjectImpType * stype()
Returns the ObjectImpType representing the ConicImp type.
Definition: conic_imp.cc:380
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
static const ObjectImpType * stype()
Returns the ObjectImpType representing the AbstractLineImp type.
Definition: line_imp.cc:520
static const ConicLineIntersectionType * instance()
Definition: intersection_types.cc:54
virtual const ObjectImp * imp() const =0
Returns the ObjectImp of this ObjectCalcer.
std::vector< ObjectCalcer * > parents() const
Returns the parent ObjectCalcer's of this ObjectCalcer.
Definition: object_calcer.cc:105
void calc(const KigDocument &doc)
Makes the ObjectCalcer recalculate its ObjectImp from its parents.
Definition: object_calcer.cc:32
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
ObjectTypeCalcer * relativePointCalcer(ObjectCalcer *o, const Coordinate &loc) const
this returns a relative point (to an object).
Definition: object_factory.cc:292
const Coordinate calcCircleLineIntersect(const Coordinate &c, const double sqr, const LineData &l, int side)
this calcs the intersection points of the circle with center c and radius sqrt( r )...
Definition: common.cpp:262
virtual std::vector< ObjectCalcer * > parents() const =0
Returns the parent ObjectCalcer's of this ObjectCalcer.
static const ConstrainedPointType * instance()
Definition: point_type.cc:298
ObjectHolder * numericValue(const double value, const Coordinate &loc, const KigDocument &doc) const
this returns a numeric label with the value value at the position loc .
Definition: object_factory.cc:59
std::set< ObjectCalcer * > getAllChildren(ObjectCalcer *obj)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: calcpaths.cc:281
static const ConicLineOtherIntersectionType * instance()
Definition: intersection_types.cc:118
virtual double getParam(const Coordinate &point, const KigDocument &) const
Definition: curve_imp.cc:149
Definition: object_factory.h:23
This class represents a curve: something which is composed of points, like a line, a circle, a locus.
Definition: curve_imp.h:27
ObjectHolder * locus(ObjectCalcer *a, ObjectCalcer *b) const
Definition: object_factory.cc:381
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.