• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

Public Member Functions | Static Public Member Functions | List of all members
ObjectFactory Class Reference

#include <object_factory.h>

Public Member Functions

ObjectHolder * attachedLabel (const QString &s, ObjectCalcer *locationparent, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
 
ObjectTypeCalcer * attachedLabelCalcer (const QString &s, ObjectCalcer *locationparent, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
 
ObjectHolder * constrainedPoint (ObjectCalcer *curve, double param) const
 
ObjectHolder * constrainedPoint (ObjectCalcer *curve, const Coordinate &c, const KigDocument &) const
 
ObjectTypeCalcer * constrainedPointCalcer (ObjectCalcer *curve, double param) const
 
ObjectTypeCalcer * constrainedPointCalcer (ObjectCalcer *curve, const Coordinate &c, const KigDocument &) const
 
ObjectTypeCalcer * constrainedRelativePointCalcer (ObjectCalcer *curve, double param) const
 
ObjectTypeCalcer * cursorPointCalcer (const Coordinate &c) const
 
ObjectHolder * fixedPoint (const Coordinate &c) const
 
ObjectTypeCalcer * fixedPointCalcer (const Coordinate &c) const
 
ObjectCalcer * getAttachPoint (ObjectCalcer *locationparent, const Coordinate &loc, const KigDocument &doc) const
 
ObjectHolder * label (const QString &s, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
 
ObjectTypeCalcer * labelCalcer (const QString &s, const Coordinate &loc, bool needframe, const std::vector< ObjectCalcer * > &parents, const KigDocument &doc) const
 
ObjectHolder * locus (ObjectCalcer *a, ObjectCalcer *b) const
 
ObjectTypeCalcer * locusCalcer (ObjectCalcer *a, ObjectCalcer *b) const
 
ObjectHolder * numericValue (const double value, const Coordinate &loc, const KigDocument &doc) const
 
ObjectTypeCalcer * numericValueCalcer (const double value, const Coordinate &loc, const KigDocument &doc) const
 
ObjectHolder * propertyObject (ObjectCalcer *o, const char *p) const
 
ObjectPropertyCalcer * propertyObjectCalcer (ObjectCalcer *o, const char *p) const
 
void redefinePoint (ObjectTypeCalcer *point, const Coordinate &c, KigDocument &d, const KigWidget &w) const
 
ObjectTypeCalcer * relativePointCalcer (ObjectCalcer *o, const Coordinate &loc) const
 
ObjectHolder * sensiblePoint (const Coordinate &c, const KigDocument &d, const KigWidget &w) const
 
ObjectTypeCalcer * sensiblePointCalcer (const Coordinate &c, const KigDocument &d, const KigWidget &w) const
 

Static Public Member Functions

static const ObjectFactory * instance ()
 

Detailed Description

Definition at line 23 of file object_factory.h.

Member Function Documentation

ObjectHolder * ObjectFactory::attachedLabel ( const QString &  s,
ObjectCalcer *  locationparent,
const Coordinate &  loc,
bool  needframe,
const std::vector< ObjectCalcer * > &  parents,
const KigDocument &  doc 
) const

Definition at line 474 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::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 non-null.

Definition at line 402 of file object_factory.cc.

ObjectHolder * ObjectFactory::constrainedPoint ( ObjectCalcer *  curve,
double  param 
) const

this returns a constrained point.

Note that the returned object is not added to the document.

Definition at line 323 of file object_factory.cc.

ObjectHolder * ObjectFactory::constrainedPoint ( ObjectCalcer *  curve,
const Coordinate &  c,
const KigDocument &  d 
) const

Definition at line 337 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::constrainedPointCalcer ( ObjectCalcer *  curve,
double  param 
) const

Definition at line 313 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::constrainedPointCalcer ( ObjectCalcer *  curve,
const Coordinate &  c,
const KigDocument &  d 
) const

Definition at line 329 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::constrainedRelativePointCalcer ( ObjectCalcer *  curve,
double  param 
) const

Definition at line 343 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::cursorPointCalcer ( const Coordinate &  c) const

this returns a CursorPointType; this is used during special constructions (e.g.

regular polygons) where the constructor wants to use the cursor position without actually generating an object depending on a new point there.

Definition at line 81 of file object_factory.cc.

ObjectHolder * ObjectFactory::fixedPoint ( const Coordinate &  c) const

this returns a fixed point.

Note that the returned object is not added to the document.

Definition at line 44 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::fixedPointCalcer ( const Coordinate &  c) const

Definition at line 50 of file object_factory.cc.

ObjectCalcer * ObjectFactory::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 for getting an attach point from the method above

Definition at line 421 of file object_factory.cc.

const ObjectFactory * ObjectFactory::instance ( )
static

Definition at line 90 of file object_factory.cc.

ObjectHolder * ObjectFactory::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 .

. It ( and its parents ) is calced already.

Definition at line 386 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::labelCalcer ( const QString &  s,
const Coordinate &  loc,
bool  needframe,
const std::vector< ObjectCalcer * > &  parents,
const KigDocument &  doc 
) const

Definition at line 394 of file object_factory.cc.

ObjectHolder * ObjectFactory::locus ( ObjectCalcer *  a,
ObjectCalcer *  b 
) const

Definition at line 381 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::locusCalcer ( ObjectCalcer *  a,
ObjectCalcer *  b 
) const

return a locus, defined by the two points ( one constrained, and one following ) a and b .

a should be the constrained point, and thus, it has to be of type ObjectTypeCalcer where a->type() is of type ConstrainedPointType. The semantics of LocusType are a bit weird ( but I believe correct :) ), so this function takes care of the complication there.

Definition at line 355 of file object_factory.cc.

ObjectHolder * ObjectFactory::numericValue ( const double  value,
const Coordinate &  loc,
const KigDocument &  doc 
) const

this returns a numeric label with the value value at the position loc .

Note that the returned object is not added to the document but calced already.

Definition at line 59 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::numericValueCalcer ( const double  value,
const Coordinate &  loc,
const KigDocument &  doc 
) const

Definition at line 65 of file object_factory.cc.

ObjectHolder * ObjectFactory::propertyObject ( ObjectCalcer *  o,
const char *  p 
) const

Definition at line 491 of file object_factory.cc.

ObjectPropertyCalcer * ObjectFactory::propertyObjectCalcer ( ObjectCalcer *  o,
const char *  p 
) const

returns a property object for the property p of object o .

Note
o should have already been calc'd, or this will fail and return 0. The returned object also needs to be calced after this.

Definition at line 483 of file object_factory.cc.

void ObjectFactory::redefinePoint ( ObjectTypeCalcer *  point,
const Coordinate &  c,
KigDocument &  d,
const KigWidget &  w 
) const

set point to what sensiblePoint would have returned.

Definition at line 497 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::relativePointCalcer ( ObjectCalcer *  o,
const Coordinate &  loc 
) const

this returns a relative point (to an object).

Note that the returned object is not added to the document.

Definition at line 292 of file object_factory.cc.

ObjectHolder * ObjectFactory::sensiblePoint ( const Coordinate &  c,
const KigDocument &  d,
const KigWidget &  w 
) const

Definition at line 286 of file object_factory.cc.

ObjectTypeCalcer * ObjectFactory::sensiblePointCalcer ( const Coordinate &  c,
const KigDocument &  d,
const KigWidget &  w 
) const

this returns a "sensible point".

By a "sensible point", I mean a point that would be about what the user expects when he asks for a point at point c . This is a constrained point if c is on a curve, and otherwise a fixed point. I might add the possibility for an intersection point sometime. Note that the returned object is not added to the document.

Definition at line 96 of file object_factory.cc.


The documentation for this class was generated from the following files:
  • object_factory.h
  • object_factory.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal