circle_imp.h Source File (Kig Python Scripting API)

| # Kig Python Scripting API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members

circle_imp.h
1// Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
2
3// This program is free software; you can redistribute it and/or
4// modify it under the terms of the GNU General Public License
5// as published by the Free Software Foundation; either version 2
6// of the License, or (at your option) any later version.
7
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12
13// You should have received a copy of the GNU General Public License
14// along with this program; if not, write to the Free Software
15// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16// 02110-1301, USA.
17
18#ifndef KIG_OBJECTS_CIRCLE_IMP_H
19#define KIG_OBJECTS_CIRCLE_IMP_H
20
21#include "conic_imp.h"
22
27 class CircleImp
28 : public ConicImp
29{
30 Coordinate mcenter;
31 double mradius;
32public:
33 typedef ConicImp Parent;
37 static const ObjectImpType* stype();
38
42 CircleImp( const Coordinate& center, double radius );
43 ~CircleImp();
44 CircleImp* copy() const;
45
46 ObjectImp* transform( const Transformation& ) const;
47
48 void draw( KigPainter& p ) const;
49 bool contains( const Coordinate& p, int width, const KigWidget& ) const;
50 bool inRect( const Rect& r, int width, const KigWidget& ) const;
51 bool valid() const;
52 Rect surroundingRect() const;
53
54 double getParam( const Coordinate& point, const KigDocument& ) const;
55 const Coordinate getPoint( double param, const KigDocument& ) const;
56
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;
64
65 const ObjectImpType* type() const;
66 void visit( ObjectImpVisitor* vtor ) const;
67
71 const Coordinate center() const;
75 double radius() const;
80 double squareRadius() const;
84 double surface() const;
88 double circumference() const;
89
90 // trivial versions of the conic information functions..
94 int conicType() const;
95 const ConicCartesianData cartesianData() const;
96 const ConicPolarData polarData() const;
100 Coordinate focus1() const;
104 Coordinate focus2() const;
105
110 TQString cartesianEquationString( const KigDocument& w ) const;
115 TQString simplyCartesianEquationString( const KigDocument& w ) const;
120 TQString polarEquationString( const KigDocument& w ) const;
121
122 bool equals( const ObjectImp& rhs ) const;
123};
124
125#endif
Circle::stype
static const ObjectType * stype()
Returns the ObjectType representing the Circle type.
Circle::center
const Coordinate center() const
Return the center of this circle.
Circle::type
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
Circle::equals
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
Circle::cartesianEquationString
TQString cartesianEquationString(const KigDocument &w) const
Return a string containing the cartesian equation of this circle.
Circle::focus1
Coordinate focus1() const
The first focus of a circle is simply its center.
Circle::polarData
const ConicPolarData polarData() const
Return the polar representation of this conic.
Circle::circumference
double circumference() const
Return the circumference of this circle.
Circle::copy
Circle * copy() const
Returns a copy of this Object.
Circle::cartesianData
const ConicCartesianData cartesianData() const
Return the cartesian representation of this conic.
Circle::squareRadius
double squareRadius() const
Return the square radius of this circle.
Circle::polarEquationString
TQString polarEquationString(const KigDocument &w) const
Return a string containing the polar equation of this circle.
Circle::conicType
int conicType() const
Always returns 1, since a circle always is an ellipse.
Circle::focus2
Coordinate focus2() const
The second focus of a circle is simply its center.
Circle::radius
double radius() const
Return the radius of this circle.
Circle::transform
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
Circle::simplyCartesianEquationString
TQString simplyCartesianEquationString(const KigDocument &w) const
Return a string containing the cartesian equation of this circle.
Circle::surface
double surface() const
Return the surface of this circle.
Circle::Circle
Circle(const Coordinate &center, double radius)
Construct a Circle with a given center and radius.
ConicCartesianData
Cartesian Conic Data.
Definition conic-common.h:38
ConicPolarData
This class represents an equation of a conic in the form .
Definition conic-common.h:86
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition coordinate.h:34
ObjectType
Instances of this class represent a certain Object type.
Definition object_imp.h:89
Object::valid
bool valid() const
Returns true if this is a valid Object.
Transformation
Class representing a transformation.
Definition kigtransform.h:38
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on by doxygen 1.16.1 written by Dimitri van Heesch, © 1997-2001