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

kig

Public Types | Public Member Functions | Protected Member Functions | List of all members
ObjectType Class Referenceabstract

#include <object_type.h>

Inheritance diagram for ObjectType:
Inheritance graph
[legend]

Public Types

enum  { ID_ConstrainedPointType, ID_LocusType, ID_FixedPointType }
 

Public Member Functions

virtual ~ObjectType ()
 
virtual ObjectImp * calc (const Args &parents, const KigDocument &d) const =0
 
virtual bool canMove (const ObjectTypeCalcer &ourobj) const
 
virtual void executeAction (int i, ObjectHolder &o, ObjectTypeCalcer &t, KigPart &d, KigWidget &w, NormalMode &m) const
 
const char * fullName () const
 
virtual const ObjectImpType * impRequirement (const ObjectImp *o, const Args &parents) const =0
 
virtual bool inherits (int type) const
 
virtual bool isDefinedOnOrThrough (const ObjectImp *o, const Args &parents) const =0
 
virtual bool isFreelyTranslatable (const ObjectTypeCalcer &ourobj) const
 
virtual bool isTransform () const
 
virtual std::vector
< ObjectCalcer * > 
movableParents (const ObjectTypeCalcer &ourobj) const
 
virtual void move (ObjectTypeCalcer &ourobj, const Coordinate &to, const KigDocument &d) const
 
virtual const Coordinate moveReferencePoint (const ObjectTypeCalcer &ourobj) const
 
virtual const ObjectImpType * resultId () const =0
 
virtual std::vector
< ObjectCalcer * > 
sortArgs (const std::vector< ObjectCalcer * > &args) const =0
 
virtual Args sortArgs (const Args &args) const =0
 
virtual QStringList specialActions () const
 

Protected Member Functions

 ObjectType (const char fulltypename[])
 

Detailed Description

The ObjectType class is a thing that represents the "behaviour" for a certain type.

This basically means that it decides what ObjectImp the object gets in the calc() function, how the object move()'s etc.

Definition at line 32 of file object_type.h.

Member Enumeration Documentation

anonymous enum
Enumerator
ID_ConstrainedPointType 
ID_LocusType 
ID_FixedPointType 

Definition at line 40 of file object_type.h.

Constructor & Destructor Documentation

ObjectType::ObjectType ( const char  fulltypename[])
protected

Definition at line 40 of file object_type.cc.

ObjectType::~ObjectType ( )
virtual

Definition at line 36 of file object_type.cc.

Member Function Documentation

virtual ObjectImp* ObjectType::calc ( const Args &  parents,
const KigDocument &  d 
) const
pure virtual

Implemented in SimilitudeType, ApplyTransformationObjectType, CastShadowType, ConvexHullType, ProjectivityGI4PType, ProjectedPointType, PolygonSideType, PointByCoordsType, ProjectivityB2QuType, PolygonVertexType, ConicRadicalType, MeasureTransportTypeOld, PolygonPolygonIntersectionType, AffinityGI3PType, ConicAsymptoteType, AffinityB2TrType, MeasureTransportType, HarmonicHomologyType, ArcLineIntersectionType, RationalBezierCurveType, PolygonLineIntersectionType, ConicDirectrixType, ProjectiveRotationType, CircleCircleIntersectionType, ConicPolarLineType, ConstrainedPointType, RationalBezierCubicType, ScalingOverLine2Type, LineCubicIntersectionType, ConicPolarPointType, ExistenceTestType, LineLineIntersectionType, EquilateralHyperbolaB4PType, ScalingOverLineType, HalflineByVectorType, PolygonBCVType, VectorEqualityTestType, CursorPointType, RationalBezierQuadricType, CircleCircleOtherIntersectionType, ParabolaBTPType, InvertArcType, LineByVectorType, ScalingOverCenter2Type, ConicArcB5PType, SameDistanceType, ConicBDFPType, CubicLineTwoIntersectionType, InvertCircleType, ConstrainedRelativePointType, ConvexPolygonTestType, ScalingOverCenterType, OpenPolygonType, TangentCurveType, ConicArcBCTPType, BezierCurveType, InvertSegmentType, InPolygonTestType, CubicLineOtherIntersectionType, RotationType, CircleBTPType, CocCurveType, TangentCubicType, VerticalCubicB4PType, ContainsTestType, InvertLineType, RelativePointType, LineReflectionType, ArcBCPAType, BezierCubicType, PolygonBNPType, ConicLineOtherIntersectionType, ObjectLPType, CopyObjectType, ConicBFFPType, CubicCuspB4PType, AreCollinearType, InvertPointType, CocCubicType, CircleBPRType, TangentArcType, PythonExecuteType, HalfAngleType, PointReflectionType, ConicBAAPType, CubicNodeB6PType, AreOrthogonalType, VectorSumType, ConicLineIntersectionType, FixedPointType, ArcBTPType, CircularInversionType, GenericTextType, ObjectABType, BezierQuadricType, CocConicType, TriangleB3PType, TangentConicType, LocusType, TranslatedType, AngleType, PythonCompileType, ConicB5PType, CubicB9PType, and AreParallelType.

bool ObjectType::canMove ( const ObjectTypeCalcer &  ourobj) const
virtual

Reimplemented in RationalBezierCurveType, ConstrainedPointType, RationalBezierCubicType, PolygonBCVType, CursorPointType, RationalBezierQuadricType, OpenPolygonType, ConstrainedRelativePointType, BezierCurveType, RelativePointType, PolygonBNPType, BezierCubicType, GenericTextType, FixedPointType, BezierQuadricType, TriangleB3PType, and ObjectABType.

Definition at line 46 of file object_type.cc.

void ObjectType::executeAction ( int  i,
ObjectHolder &  o,
ObjectTypeCalcer &  t,
KigPart &  d,
KigWidget &  w,
NormalMode &  m 
) const
virtual

execute the i 'th action from the specialActions above.

Reimplemented in ConicRadicalType, ConstrainedPointType, NumericTextType, TextType, GenericTextType, FixedPointType, SegmentABType, and AngleType.

Definition at line 96 of file object_type.cc.

const char * ObjectType::fullName ( ) const

Definition at line 31 of file object_type.cc.

virtual const ObjectImpType* ObjectType::impRequirement ( const ObjectImp *  o,
const Args &  parents 
) const
pure virtual

Supposing that parents would be given as parents to this type's calc function, this function returns the ObjectImp id that o should at least have.

( o should be part of parents )

Implemented in MeasureTransportType, RationalBezierCurveType, ArgsParserObjectType, PolygonBCVType, CursorPointType, OpenPolygonType, BezierCurveType, ArcBCPAType, PolygonBNPType, CopyObjectType, PythonExecuteType, ArcBTPType, LocusType, PythonCompileType, and GenericTextType.

bool ObjectType::inherits ( int  type) const
virtual

Reimplemented in ConstrainedPointType, ArcBCPAType, CopyObjectType, ArcBTPType, LocusType, and FixedPointType.

Definition at line 64 of file object_type.cc.

virtual bool ObjectType::isDefinedOnOrThrough ( const ObjectImp *  o,
const Args &  parents 
) const
pure virtual

Supposing that parents would be given as parents to this type's calc function, this function returns whether the returned ObjectImp will be, by construction, on o ( if o is a curve ), or through o ( if o is a point ).

Implemented in MeasureTransportType, RationalBezierCurveType, ArgsParserObjectType, PolygonBCVType, CursorPointType, OpenPolygonType, BezierCurveType, PolygonBNPType, CopyObjectType, PythonExecuteType, PythonCompileType, and GenericTextType.

bool ObjectType::isFreelyTranslatable ( const ObjectTypeCalcer &  ourobj) const
virtual

Reimplemented in RationalBezierCurveType, ConstrainedPointType, RationalBezierCubicType, PolygonBCVType, RationalBezierQuadricType, OpenPolygonType, ConstrainedRelativePointType, BezierCurveType, RelativePointType, PolygonBNPType, BezierCubicType, GenericTextType, FixedPointType, BezierQuadricType, TriangleB3PType, and ObjectABType.

Definition at line 51 of file object_type.cc.

bool ObjectType::isTransform ( ) const
virtual

is this object type a transformation type.

We want to know this cause transform types are shown separately in an object's RMB menu.

Reimplemented in SimilitudeType, ApplyTransformationObjectType, CastShadowType, ProjectivityGI4PType, ProjectivityB2QuType, AffinityGI3PType, AffinityB2TrType, HarmonicHomologyType, ProjectiveRotationType, ScalingOverLine2Type, ScalingOverLineType, ScalingOverCenter2Type, ScalingOverCenterType, RotationType, LineReflectionType, PointReflectionType, and TranslatedType.

Definition at line 86 of file object_type.cc.

std::vector< ObjectCalcer * > ObjectType::movableParents ( const ObjectTypeCalcer &  ourobj) const
virtual

Reimplemented in RationalBezierCurveType, ConstrainedPointType, RationalBezierCubicType, PolygonBCVType, RationalBezierQuadricType, OpenPolygonType, ConstrainedRelativePointType, BezierCurveType, RelativePointType, PolygonBNPType, BezierCubicType, GenericTextType, FixedPointType, BezierQuadricType, TriangleB3PType, and ObjectABType.

Definition at line 118 of file object_type.cc.

void ObjectType::move ( ObjectTypeCalcer &  ourobj,
const Coordinate &  to,
const KigDocument &  d 
) const
virtual

Reimplemented in RationalBezierCurveType, ConstrainedPointType, RationalBezierCubicType, PolygonBCVType, CursorPointType, RationalBezierQuadricType, OpenPolygonType, ConstrainedRelativePointType, BezierCurveType, RelativePointType, PolygonBNPType, BezierCubicType, GenericTextType, FixedPointType, BezierQuadricType, TriangleB3PType, and ObjectABType.

Definition at line 56 of file object_type.cc.

const Coordinate ObjectType::moveReferencePoint ( const ObjectTypeCalcer &  ourobj) const
virtual

Reimplemented in RationalBezierCurveType, RationalBezierCubicType, ConstrainedPointType, PolygonBCVType, RationalBezierQuadricType, OpenPolygonType, ConstrainedRelativePointType, BezierCurveType, PolygonBNPType, RelativePointType, BezierCubicType, GenericTextType, BezierQuadricType, FixedPointType, TriangleB3PType, and ObjectABType.

Definition at line 102 of file object_type.cc.

virtual const ObjectImpType* ObjectType::resultId ( ) const
pure virtual

returns the ObjectImp id of the ObjectImp's produced by this ObjectType.

if the ObjectType can return different sorts of ObjectImp's, it should return the biggest common id, or ID_AnyImp.

Implemented in SimilitudeType, ApplyTransformationObjectType, CastShadowType, ConvexHullType, ProjectivityGI4PType, ProjectedPointType, PolygonSideType, PointByCoordsType, ProjectivityB2QuType, PolygonVertexType, ConicRadicalType, MeasureTransportTypeOld, PolygonPolygonIntersectionType, AffinityGI3PType, ConicAsymptoteType, CPolygonalLineIntersectionType, AffinityB2TrType, MeasureTransportType, ParabolaBDPType, OPolygonalLineIntersectionType, HarmonicHomologyType, MidPointType, ArcLineIntersectionType, RationalBezierCurveType, PolygonLineIntersectionType, ConicDirectrixType, ProjectiveRotationType, CircleCircleIntersectionType, ConicPolarLineType, ConstrainedPointType, RationalBezierCubicType, ScalingOverLine2Type, LineCubicIntersectionType, ConicPolarPointType, ExistenceTestType, LineLineIntersectionType, CursorPointType, EquilateralHyperbolaB4PType, ScalingOverLineType, HalflineByVectorType, PolygonBCVType, VectorEqualityTestType, RationalBezierQuadricType, CircleCircleOtherIntersectionType, ParabolaBTPType, InvertArcType, ConicArcB5PType, LineByVectorType, ScalingOverCenter2Type, SameDistanceType, ConstrainedRelativePointType, ConicBDFPType, CubicLineTwoIntersectionType, InvertCircleType, LineParallelLPType, ConvexPolygonTestType, ScalingOverCenterType, OpenPolygonType, TangentCurveType, ConicArcBCTPType, BezierCurveType, InvertSegmentType, LinePerpendLPType, InPolygonTestType, CubicLineOtherIntersectionType, RotationType, RelativePointType, CircleBTPType, CocCurveType, TangentCubicType, VerticalCubicB4PType, ContainsTestType, InvertLineType, RayABType, ArcBCPAType, LineReflectionType, ConicBFFPType, BezierCubicType, CopyObjectType, PolygonBNPType, ConicLineOtherIntersectionType, CubicCuspB4PType, AreCollinearType, PythonExecuteType, LineABType, InvertPointType, CocCubicType, CircleBPRType, TangentArcType, HalfAngleType, PointReflectionType, FixedPointType, ConicBAAPType, CubicNodeB6PType, AreOrthogonalType, VectorSumType, ArcBTPType, ConicLineIntersectionType, LocusType, CircularInversionType, BezierQuadricType, CocConicType, CircleBCPType, TriangleB3PType, TangentConicType, PythonCompileType, SegmentABType, GenericTextType, TranslatedType, AngleType, ConicB5PType, CubicB9PType, AreParallelType, and VectorType.

virtual std::vector<ObjectCalcer*> ObjectType::sortArgs ( const std::vector< ObjectCalcer * > &  args) const
pure virtual

Implemented in MeasureTransportType, RationalBezierCurveType, ArgsParserObjectType, PolygonBCVType, CursorPointType, OpenPolygonType, BezierCurveType, PolygonBNPType, CopyObjectType, PythonExecuteType, LocusType, GenericTextType, and PythonCompileType.

virtual Args ObjectType::sortArgs ( const Args &  args) const
pure virtual

Implemented in MeasureTransportType, RationalBezierCurveType, ArgsParserObjectType, PolygonBCVType, CursorPointType, OpenPolygonType, BezierCurveType, PolygonBNPType, CopyObjectType, PythonExecuteType, LocusType, GenericTextType, and PythonCompileType.

QStringList ObjectType::specialActions ( ) const
virtual

return i18n'd names for the special actions.

Reimplemented in ConicRadicalType, ConstrainedPointType, NumericTextType, TextType, GenericTextType, FixedPointType, SegmentABType, and AngleType.

Definition at line 91 of file object_type.cc.


The documentation for this class was generated from the following files:
  • object_type.h
  • object_type.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