18 #ifndef KIG_OBJECTS_OTHER_IMP_H
19 #define KIG_OBJECTS_OTHER_IMP_H
21 #include "curve_imp.h"
22 #include "../misc/common.h"
23 #include "../misc/coordinate.h"
32 const double mstartangle;
39 static const ObjectImpType*
stype();
45 AngleImp(
const Coordinate& pt,
double start_angle_in_radials,
46 double angle_in_radials );
51 void draw( KigPainter& p )
const;
52 bool contains(
const Coordinate& p,
int width,
const KigWidget& )
const;
53 bool inRect(
const Rect& r,
int width,
const KigWidget& )
const;
54 Rect surroundingRect()
const;
57 const uint numberOfProperties()
const;
58 const QCStringList properties()
const;
59 const QCStringList propertiesInternalNames()
const;
60 ObjectImp* property( uint which,
const KigDocument& w )
const;
61 const char* iconForProperty( uint which )
const;
62 const ObjectImpType* impRequirementForProperty( uint which )
const;
63 bool isPropertyDefinedOnOrThroughThisImp( uint which )
const;
71 const ObjectImpType*
type()
const;
72 void visit( ObjectImpVisitor* vtor )
const;
85 const double angle()
const {
return mangle; }
87 bool equals(
const ObjectImp& rhs )
const;
102 static const ObjectImpType*
stype();
112 const Coordinate getPoint(
double param,
const KigDocument& )
const;
113 double getParam(
const Coordinate&,
const KigDocument& )
const;
115 void draw( KigPainter& p )
const;
116 bool contains(
const Coordinate& p,
int width,
const KigWidget& )
const;
117 bool inRect(
const Rect& r,
int width,
const KigWidget& )
const;
118 Rect surroundingRect()
const;
120 const uint numberOfProperties()
const;
121 const QCStringList properties()
const;
122 const QCStringList propertiesInternalNames()
const;
123 ObjectImp* property( uint which,
const KigDocument& w )
const;
124 const char* iconForProperty( uint which )
const;
125 const ObjectImpType* impRequirementForProperty( uint which )
const;
126 bool isPropertyDefinedOnOrThroughThisImp( uint which )
const;
151 const ObjectImpType*
type()
const;
152 void visit( ObjectImpVisitor* vtor )
const;
154 bool equals(
const ObjectImp& rhs )
const;
157 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
175 static const ObjectImpType*
stype();
182 const double startangle,
const double angle );
188 void draw( KigPainter& p )
const;
189 bool contains(
const Coordinate& p,
int width,
const KigWidget& w )
const;
190 bool inRect(
const Rect& r,
int width,
const KigWidget& si )
const;
191 Rect surroundingRect()
const;
194 const uint numberOfProperties()
const;
195 const QCStringList properties()
const;
196 const QCStringList propertiesInternalNames()
const;
197 ObjectImp* property( uint which,
const KigDocument& d )
const;
198 const char* iconForProperty( uint which )
const;
199 const ObjectImpType* impRequirementForProperty( uint which )
const;
200 bool isPropertyDefinedOnOrThroughThisImp( uint which )
const;
202 const ObjectImpType*
type()
const;
203 void visit( ObjectImpVisitor* vtor )
const;
205 double getParam(
const Coordinate& c,
const KigDocument& d )
const;
206 const Coordinate getPoint(
double p,
const KigDocument& d )
const;
237 bool equals(
const ObjectImp& rhs )
const;
240 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
Object * copy() const
Returns a copy of this Object.
const Coordinate point() const
Return the center of this angle.
Definition: other_imp.h:77
const double size() const
Return the size in radians of this angle.
static const ObjectType * stype()
Returns the ObjectType representing the Angle type.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
Coordinate attachPoint() const
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachme...
const double angle() const
Return the dimension in radians of this angle.
Definition: other_imp.h:85
const double startAngle() const
Return the start angle in radians of this angle.
Definition: other_imp.h:81
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
Arc * copy() const
Returns a copy of this Object.
double radius() const
Return the radius of this arc.
double angle() const
Return the dimension in radians of this arc.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
const Coordinate center() const
Return the center of this arc.
static const ObjectType * stype()
Returns the ObjectType representing the Arc type.
Object * transform(const Transformation &t) const
Return this Object, transformed by the transformation t.
Coordinate firstEndPoint() const
Return the start point of this arc.
Coordinate secondEndPoint() const
Return the end point of this arc.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
double startAngle() const
Return the start angle in radians of this arc.
const double sectorSurface() const
Return the size of the sector surface of this arc.
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition: coordinate.h:34
Simple class representing a line.
Definition: common.h:60
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:219
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
Vector * copy() const
Returns a copy of this Object.
const Coordinate dir() const
Return the direction of this vector.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
LineData data() const
Get the LineData for this vector.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
static const ObjectType * stype()
Returns the ObjectType representing the Vector type.
const Coordinate b() const
Return the end point of this vector.
const double length() const
Return the length of this vector.
const Coordinate a() const
Return the start point of this vector.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.