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

kig

Public Member Functions | List of all members
ObjectConstructor Class Referenceabstract

#include <object_constructor.h>

Inheritance diagram for ObjectConstructor:
Inheritance graph
[legend]

Public Member Functions

virtual ~ObjectConstructor ()
 
virtual BaseConstructMode * constructMode (KigPart &doc)
 
virtual const QString description () const =0
 
virtual const QString descriptiveName () const =0
 
virtual void handleArgs (const std::vector< ObjectCalcer * > &os, KigPart &d, KigWidget &v) const =0
 
virtual void handlePrelim (KigPainter &p, const std::vector< ObjectCalcer * > &sel, const KigDocument &d, const KigWidget &v) const =0
 
virtual const QByteArray iconFileName (const bool canBeNull=false) const =0
 
virtual bool isAlreadySelectedOK (const std::vector< ObjectCalcer * > &os, const uint &) const =0
 
virtual bool isIntersection () const
 
virtual bool isTest () const
 
virtual bool isTransform () const =0
 
virtual void plug (KigPart *doc, KigGUIAction *kact)=0
 
virtual QString selectStatement (const std::vector< ObjectCalcer * > &sel, const KigDocument &d, const KigWidget &w) const =0
 
virtual QString useText (const ObjectCalcer &o, const std::vector< ObjectCalcer * > &sel, const KigDocument &d, const KigWidget &v) const =0
 
virtual int wantArgs (const std::vector< ObjectCalcer * > &os, const KigDocument &d, const KigWidget &v) const =0
 

Detailed Description

This class represents a way to construct a set of objects from a set of other objects.

There are some important child classes, like MacroConstructor, StandardObjectConstructor etc. ( see below ) Actually, it is more generic than that, it provides a way to do something with a set of objects, but for now, i only use it to construct objects. Maybe some day, i'll find something more interesting to do with it, who knows... ;)

Definition at line 44 of file object_constructor.h.

Constructor & Destructor Documentation

ObjectConstructor::~ObjectConstructor ( )
virtual

Definition at line 231 of file object_constructor.cc.

Member Function Documentation

BaseConstructMode * ObjectConstructor::constructMode ( KigPart &  doc)
virtual

Which construct mode should be used for this ObjectConstructor.

In fact, this is not a pretty design. The Kig GUIAction-ObjectConstructor stuff should be reworked into a general GUIAction, which just models something which can be executed given a certain number of arguments. The code for drawPrelim and such should all be in the ConstructMode, and the new GUIAction should just start the correct KigMode with the correct arguments.

This function is only overridden in TestConstructor.

Reimplemented in TestConstructor.

Definition at line 592 of file object_constructor.cc.

virtual const QString ObjectConstructor::description ( ) const
pure virtual

Implemented in MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, and PointSequenceConstructor.

virtual const QString ObjectConstructor::descriptiveName ( ) const
pure virtual

Implemented in MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, and PointSequenceConstructor.

virtual void ObjectConstructor::handleArgs ( const std::vector< ObjectCalcer * > &  os,
KigPart &  d,
KigWidget &  v 
) const
pure virtual

do something fun with os .

. This func is only called if wantArgs returned Complete.. handleArgs should not do any drawing.. after somebody calls this function, he should redrawScreen() himself..

Implemented in MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, and PointSequenceConstructor.

virtual void ObjectConstructor::handlePrelim ( KigPainter &  p,
const std::vector< ObjectCalcer * > &  sel,
const KigDocument &  d,
const KigWidget &  v 
) const
pure virtual

show a preliminary version of what you would do when handleArgs would be called.

. E.g. if this constructor normally constructs a locus through some 5 points, then it will try to draw a locus through whatever number of points it gets..

Implemented in MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, and PointSequenceConstructor.

virtual const QByteArray ObjectConstructor::iconFileName ( const bool  canBeNull = false) const
pure virtual

Implemented in MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, and PointSequenceConstructor.

virtual bool ObjectConstructor::isAlreadySelectedOK ( const std::vector< ObjectCalcer * > &  os,
const uint &   
) const
pure virtual

the following function is called in case of duplication of arguments and returns true if this is acceptable; this will return false for typical objects

Implemented in GenericProjectivityConstructor, GenericAffinityConstructor, MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, BezierCurveTypeConstructor, PolygonBCVConstructor, OpenPolygonTypeConstructor, StandardConstructorBase, and PolygonBNPTypeConstructor.

bool ObjectConstructor::isIntersection ( ) const
virtual

Reimplemented in GenericIntersectionConstructor.

Definition at line 531 of file object_constructor.cc.

bool ObjectConstructor::isTest ( ) const
virtual

Reimplemented in TestConstructor.

Definition at line 587 of file object_constructor.cc.

virtual bool ObjectConstructor::isTransform ( ) const
pure virtual

Implemented in TestConstructor, MidPointOfTwoPointsConstructor, MacroConstructor, LocusConstructor, ConicRadicalConstructor, MergeObjectConstructor, MeasureTransportConstructor, MultiObjectTypeConstructor, RationalBezierCurveTypeConstructor, PropertyObjectConstructor, PolygonBCVConstructor, SimpleObjectTypeConstructor, PointSequenceConstructor, PolygonSideTypeConstructor, PolygonVertexTypeConstructor, ThreeTwoOneIntersectionConstructor, and TwoOrOneIntersectionConstructor.

virtual void ObjectConstructor::plug ( KigPart *  doc,
KigGUIAction *  kact 
)
pure virtual

Implemented in TestConstructor, MidPointOfTwoPointsConstructor, MacroConstructor, LocusConstructor, ConicRadicalConstructor, MergeObjectConstructor, MeasureTransportConstructor, MultiObjectTypeConstructor, RationalBezierCurveTypeConstructor, PropertyObjectConstructor, PolygonBCVConstructor, SimpleObjectTypeConstructor, PointSequenceConstructor, PolygonSideTypeConstructor, PolygonVertexTypeConstructor, ThreeTwoOneIntersectionConstructor, and TwoOrOneIntersectionConstructor.

virtual QString ObjectConstructor::selectStatement ( const std::vector< ObjectCalcer * > &  sel,
const KigDocument &  d,
const KigWidget &  w 
) const
pure virtual

return a string describing what argument you want next, if the given selection of objects were selected.

Implemented in GenericIntersectionConstructor, MacroConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, BezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, OpenPolygonTypeConstructor, and PolygonBNPTypeConstructor.

virtual QString ObjectConstructor::useText ( const ObjectCalcer &  o,
const std::vector< ObjectCalcer * > &  sel,
const KigDocument &  d,
const KigWidget &  v 
) const
pure virtual

return a string describing what you would use o for if it were selected...

o should be part of sel .

Implemented in CocConstructor, TangentConstructor, GenericIntersectionConstructor, MacroConstructor, LocusConstructor, ConicRadicalConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, BezierCurveTypeConstructor, PolygonBCVConstructor, StandardConstructorBase, OpenPolygonTypeConstructor, and PolygonBNPTypeConstructor.

virtual int ObjectConstructor::wantArgs ( const std::vector< ObjectCalcer * > &  os,
const KigDocument &  d,
const KigWidget &  v 
) const
pure virtual

can this constructor do something useful with os ? return ArgsParser::Complete, Valid or NotGood

Implemented in TestConstructor, MacroConstructor, LocusConstructor, MergeObjectConstructor, MeasureTransportConstructor, RationalBezierCurveTypeConstructor, BezierCurveTypeConstructor, PolygonBCVConstructor, OpenPolygonTypeConstructor, StandardConstructorBase, and PolygonBNPTypeConstructor.


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