Kig Python Scripting API Documentation

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
27class 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;
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
An Object representing a circle.
Definition circle_imp.h:29
static const ObjectType * stype()
Returns the ObjectType representing the Circle type.
const Coordinate center() const
Return the center of this circle.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
TQString cartesianEquationString(const KigDocument &w) const
Return a string containing the cartesian equation of this circle.
Coordinate focus1() const
The first focus of a circle is simply its center.
const ConicPolarData polarData() const
Return the polar representation of this conic.
double circumference() const
Return the circumference of this circle.
Circle * copy() const
Returns a copy of this Object.
const ConicCartesianData cartesianData() const
Return the cartesian representation of this conic.
double squareRadius() const
Return the square radius of this circle.
TQString polarEquationString(const KigDocument &w) const
Return a string containing the polar equation of this circle.
int conicType() const
Always returns 1, since a circle always is an ellipse.
Coordinate focus2() const
The second focus of a circle is simply its center.
double radius() const
Return the radius of this circle.
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
TQString simplyCartesianEquationString(const KigDocument &w) const
Return a string containing the cartesian equation of this circle.
double surface() const
Return the surface of this circle.
Circle(const Coordinate &center, double radius)
Construct a Circle with a given center and radius.
Cartesian Conic Data.
Definition conic-common.h:38
This class represents an equation of a conic in the form .
Definition conic-common.h:86
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
Instances of this class represent a certain Object type.
Definition object_imp.h:89
The Object class represents the behaviour of an object after it is calculated.
Definition object_imp.h:219
Class representing a transformation.
Definition kigtransform.h:38
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Mon Apr 15 2024 01:00:46 by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2001