18 #ifndef KIG_OBJECTS_LINE_IMP_H
19 #define KIG_OBJECTS_LINE_IMP_H
21 #include "curve_imp.h"
23 #include "../misc/common.h"
36 AbstractLineImp(
const LineData& d );
45 static const ObjectImpType* stype();
49 bool inRect(
const Rect& r,
int width,
const KigWidget& )
const;
51 const uint numberOfProperties()
const;
52 const QCStringList properties()
const;
53 const QCStringList propertiesInternalNames()
const;
54 ObjectImp* property( uint which,
const KigDocument& d )
const;
55 const char* iconForProperty( uint which )
const;
56 const ObjectImpType* impRequirementForProperty( uint which )
const;
57 bool isPropertyDefinedOnOrThroughThisImp( uint which )
const;
69 const TQString equationString()
const;
75 bool equals(
const ObjectImp& rhs )
const;
82 :
public AbstractLineImp
85 typedef AbstractLineImp
Parent;
90 static const ObjectImpType* stype();
101 void draw( KigPainter& p )
const;
102 bool contains(
const Coordinate& p,
int width,
const KigWidget& si )
const;
103 Rect surroundingRect()
const;
107 const Coordinate getPoint(
double param,
const KigDocument& )
const;
108 double getParam(
const Coordinate&,
const KigDocument& )
const;
110 const uint numberOfProperties()
const;
111 const QCStringList properties()
const;
112 const QCStringList propertiesInternalNames()
const;
113 ObjectImp* property( uint which,
const KigDocument& d )
const;
114 const char* iconForProperty( uint which )
const;
115 const ObjectImpType* impRequirementForProperty( uint which )
const;
117 SegmentImp* copy()
const;
122 double length()
const;
124 const ObjectImpType* type()
const;
125 void visit( ObjectImpVisitor* vtor )
const;
127 bool containsPoint(
const Coordinate& p,
const KigDocument& doc )
const;
128 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
137 :
public AbstractLineImp
140 typedef AbstractLineImp
Parent;
145 static const ObjectImpType* stype();
156 void draw( KigPainter& p )
const;
157 bool contains(
const Coordinate& p,
int width,
const KigWidget& si )
const;
158 Rect surroundingRect()
const;
162 const Coordinate getPoint(
double param,
const KigDocument& )
const;
163 double getParam(
const Coordinate&,
const KigDocument& )
const;
165 RayImp* copy()
const;
167 const ObjectImpType* type()
const;
168 void visit( ObjectImpVisitor* vtor )
const;
170 bool containsPoint(
const Coordinate& p,
const KigDocument& doc )
const;
171 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
178 :
public AbstractLineImp
181 typedef AbstractLineImp
Parent;
187 static const ObjectImpType* stype();
197 void draw( KigPainter& p )
const;
198 bool contains(
const Coordinate& p,
int width,
const KigWidget& si )
const;
199 Rect surroundingRect()
const;
203 const Coordinate getPoint(
double param,
const KigDocument& )
const;
204 double getParam(
const Coordinate&,
const KigDocument& )
const;
206 LineImp* copy()
const;
208 const ObjectImpType* type()
const;
209 void visit( ObjectImpVisitor* vtor )
const;
211 bool containsPoint(
const Coordinate& p,
const KigDocument& doc )
const;
212 bool internalContainsPoint(
const Coordinate& p,
double threshold )
const;
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
static const ObjectType * stype()
Returns the ObjectType representing the AbstractLine type.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
Line * copy() const
Returns a copy of this Object.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
static const ObjectType * stype()
Returns the ObjectType representing the Line type.
Line(const Coordinate &a, const Coordinate &b)
Construct a Line going through points a and b.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
This class represents a curve: something which is composed of points, like a line,...
Definition: curve_imp.h:27
An Object representing a segment.
Definition: line_imp.h:81
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:218
Instances of this class represent a certain Object type.
Definition: object_imp.h:88
Ray * copy() const
Returns a copy of this Object.
double length() const
Get the length of this segment.
const TQString equationString() const
Get a string containing the equation of this line in the form "y = a * x + b ".
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
LineData data() const
Get the LineData for this AbstractLine.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
Segment * copy() const
Returns a copy of this Object.
static const ObjectType * stype()
Returns the ObjectType representing the Segment type.
An Object representing a line.
Definition: line_imp.h:177
An Object representing a ray.
Definition: line_imp.h:136
Segment(const Coordinate &a, const Coordinate &b)
Construct a new segment from point a to point b.
Simple class representing a line.
Definition: common.h:60
Ray(const Coordinate &a, const Coordinate &b)
Construct a ray, starting at a, and going through b.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
static const ObjectType * stype()
Returns the ObjectType representing the Ray type.
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition: coordinate.h:33
double slope() const
Get the slope of this AbstractLine.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
An Object class that is the base of the line-like Object's: Segment, Line and Ray.
Definition: line_imp.h:31
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Mon Sep 19 2022 02:09:14 by
doxygen 1.8.17 written by
Dimitri van Heesch, © 1997-2001