18#ifndef KIG_OBJECTS_OBJECT_IMP_H
19#define KIG_OBJECTS_OBJECT_IMP_H
28class TransformationImp;
56 virtual ~ObjectImpVisitor();
57 void visit(
const ObjectImp* imp );
58 virtual void visit(
const IntImp* imp );
59 virtual void visit(
const DoubleImp* imp );
60 virtual void visit(
const StringImp* imp );
61 virtual void visit(
const InvalidImp* imp );
62 virtual void visit(
const HierarchyImp* imp );
63 virtual void visit(
const TransformationImp* imp );
64 virtual void visit(
const TestResultImp* imp );
65 virtual void visit(
const LineImp* imp );
66 virtual void visit(
const PointImp* imp );
67 virtual void visit(
const TextImp* imp );
68 virtual void visit(
const AngleImp* imp );
69 virtual void visit(
const VectorImp* imp );
70 virtual void visit(
const LocusImp* imp );
71 virtual void visit(
const CircleImp* imp );
72 virtual void visit(
const ConicImp* imp );
73 virtual void visit(
const CubicImp* imp );
74 virtual void visit(
const SegmentImp* imp );
75 virtual void visit(
const RayImp* imp );
76 virtual void visit(
const ArcImp* imp );
77 virtual void visit(
const PolygonImp* imp );
80typedef unsigned int uint;
90 const ObjectImpType* mparent;
91 const char* minternalname;
92 const char* mtranslatedname;
93 const char* mselectstatement;
94 const char* mselectnamestatement;
95 const char* mremoveastatement;
96 const char* maddastatement;
97 const char* mmoveastatement;
98 const char* mattachtothisstatement;
99 const char* mshowastatement;
100 const char* mhideastatement;
102 static StaticPrivate* sd();
134 const ObjectImpType* parent,
const char* internalname,
135 const char* translatedname,
136 const char* selectstatement,
137 const char* selectnamestatement,
138 const char* removeastatement,
139 const char* addastatement,
140 const char* moveastatement,
141 const char* attachtothisstatement,
142 const char* showastatement,
143 const char* hideastatement );
227 static const ObjectImpType*
stype();
229 virtual ~ObjectImp();
270 virtual void draw( KigPainter& p )
const = 0;
271 virtual bool contains(
const Coordinate& p,
int width,
272 const KigWidget& si )
const = 0;
273 virtual bool inRect(
const Rect& r,
int width,
274 const KigWidget& si )
const = 0;
275 virtual Rect surroundingRect()
const = 0;
284 virtual const uint numberOfProperties()
const;
287 virtual const QCStringList properties()
const;
291 virtual const QCStringList propertiesInternalNames()
const;
292 virtual ObjectImp* property( uint which,
const KigDocument& d )
const;
296 virtual const ObjectImpType* impRequirementForProperty( uint which )
const;
300 virtual bool isPropertyDefinedOnOrThroughThisImp( uint which )
const;
302 virtual const char* iconForProperty( uint which )
const;
319 virtual const ObjectImpType*
type()
const = 0;
320 virtual void visit( ObjectImpVisitor* vtor )
const = 0;
327 virtual ObjectImp*
copy()
const = 0;
338 virtual bool canFillInNextEscape()
const;
339 virtual void fillInNextEscape( TQString& s,
const KigDocument& )
const;
348 virtual bool equals(
const ObjectImp& rhs )
const = 0;
358 virtual bool isCache()
const;
An Object representing an angle.
Definition other_imp.h:30
An Object representing an arc.
Definition other_imp.h:165
An Object representing a circle.
Definition circle_imp.h:29
An Object representing a conic.
Definition conic_imp.h:40
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition coordinate.h:34
An Object representing a cubic.
Definition cubic_imp.h:32
This class represents a curve: something which is composed of points, like a line,...
Definition curve_imp.h:29
This Object is a BogusObject containing only a double value.
Definition bogus_imp.h:91
This Object is a BogusObject containing only an int value.
Definition bogus_imp.h:130
This Object represents an invalid object.
Definition bogus_imp.h:63
An Object representing a line.
Definition line_imp.h:179
Instances of this class represent a certain Object type.
Definition object_imp.h:89
TQString showAStatement() const
Returns a translated string of the form "Show a xxx".
const char * selectNameStatement() const
Returns a translatable string of the form "Select point %1".
const char * internalName() const
Returns an internal name for this Object type.
static const ObjectType * typeFromInternalName(const char *n)
Returns the type with name n.
TQString translatedName() const
The name of this type, translated to the currently used language.
TQString addAStatement() const
Returns a translated string of the form "Add a xxx".
bool inherits(const ObjectType *t) const
Does the Object type represented by this instance inherit the Object type represented by t ?
TQString hideAStatement() const
Returns a translated string of the form "Hide a xxx".
const char * selectStatement() const
Returns a translatable string of the form "Select this %1".
TQString moveAStatement() const
Returns a translated string of the form "Move a xxx".
TQString attachToThisStatement() const
Returns a translated string of the form "Attach to this xxx".
TQString removeAStatement() const
Returns a translated string of the form "Remove a xxx".
The Object class represents the behaviour of an object after it is calculated.
Definition object_imp.h:219
bool valid() const
Returns true if this is a valid Object.
bool inherits(const ObjectType *t) const
Returns true if this Object inherits the Object type represented by t.
static const ObjectType * stype()
The ObjectType representing the base Object class.
virtual Object * copy() const =0
Returns a copy of this Object.
virtual Coordinate attachPoint() const =0
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachme...
virtual bool equals(const Object &rhs) const =0
Returns true if this Object is equal to rhs.
virtual const ObjectType * type() const =0
Returns the lowermost ObjectType that this object is an instantiation of.
virtual Object * transform(const Transformation &t) const =0
Return this Object, transformed by the transformation t.
An Object representing a point.
Definition point_imp.h:29
An Object representing a ray.
Definition line_imp.h:138
An Object representing a segment.
Definition line_imp.h:83
This Object is a BogusObject containing only a string value.
Definition bogus_imp.h:169
An Object representing a vector.
Definition other_imp.h:95