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 
27 class CircleImp
28  : public ConicImp
29 {
30  Coordinate mcenter;
31  double mradius;
32 public:
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
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:218
Cartesian Conic Data.
Definition: conic-common.h:37
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
Class representing a transformation.
Definition: kigtransform.h:37
This class represents an equation of a conic in the form .
Definition: conic-common.h:85
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Tue Feb 25 2025 13:46:37 by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001