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;
65 ObjectImp* copy()
const;
70 const double size()
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;
128 VectorImp* copy()
const;
145 const double length()
const;
151 const ObjectImpType* type()
const;
152 void visit( ObjectImpVisitor* vtor )
const;
154 bool equals(
const ObjectImp& rhs )
const;
156 bool containsPoint(
const Coordinate& p,
const KigDocument& doc )
const;
157 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
175 static const ObjectImpType* stype();
181 ArcImp(
const Coordinate& center,
const double radius,
182 const double startangle,
const double angle );
184 ArcImp* copy()
const;
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;
215 double radius()
const;
219 double startAngle()
const;
223 double angle()
const;
235 const double sectorSurface()
const;
237 bool equals(
const ObjectImp& rhs )
const;
239 bool containsPoint(
const Coordinate& p,
const KigDocument& doc )
const;
240 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
Arc(const Coordinate ¢er, const double radius, const double startangle, const double angle)
Construct an Arc with a given center, radius, start angle and dimension (both in radians).
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
const Coordinate point() const
Return the center of this angle.
Definition: other_imp.h:77
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
Coordinate secondEndPoint() const
Return the end point of this arc.
LineData data() const
Get the LineData for this vector.
static const ObjectType * stype()
Returns the ObjectType representing the Vector type.
An Object representing an arc.
Definition: other_imp.h:163
Object * transform(const Transformation &t) const
Return this Object, transformed by the transformation t.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
double startAngle() const
Return the start angle in radians of this arc.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
const double length() const
Return the length of this vector.
const Coordinate dir() const
Return the direction of this vector.
Angle(const Coordinate &pt, double start_angle_in_radials, double angle_in_radials)
Construct an Angle with a given center, start angle and dimension (both in radians).
This class represents a curve: something which is composed of points, like a line,...
Definition: curve_imp.h:27
An Object representing an angle.
Definition: other_imp.h:28
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
const double startAngle() const
Return the start angle in radians of this angle.
Definition: other_imp.h:81
const double angle() const
Return the dimension in radians of this angle.
Definition: other_imp.h:85
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:218
const Coordinate center() const
Return the center of this arc.
Object * copy() const
Returns a copy of this Object.
Vector(const Coordinate &a, const Coordinate &b)
Construct a Vector with a given start point and end point.
Instances of this class represent a certain Object type.
Definition: object_imp.h:88
Vector * copy() const
Returns a copy of this Object.
const double sectorSurface() const
Return the size of the sector surface of this arc.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
double radius() const
Return the radius of this arc.
const Coordinate a() const
Return the start point of this vector.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
Arc * copy() const
Returns a copy of this Object.
Simple class representing a line.
Definition: common.h:60
Coordinate attachPoint() const
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachme...
static const ObjectType * stype()
Returns the ObjectType representing the Angle type.
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition: coordinate.h:33
const Coordinate b() const
Return the end point of this vector.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
An Object representing a vector.
Definition: other_imp.h:93
Coordinate firstEndPoint() const
Return the start point of this arc.
const double size() const
Return the size in radians of this angle.
static const ObjectType * stype()
Returns the ObjectType representing the Arc type.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
double angle() const
Return the dimension in radians of this arc.
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed May 15 2024 09:48:27 by
doxygen 1.8.17 written by
Dimitri van Heesch, © 1997-2001