Kig Python Scripting API Documentation

circle_imp.h

00001 // Copyright (C)  2003  Dominique Devriese <devriese@kde.org>
00002 
00003 // This program is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU General Public License
00005 // as published by the Free Software Foundation; either version 2
00006 // of the License, or (at your option) any later version.
00007 
00008 // This program is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 // GNU General Public License for more details.
00012 
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016 // 02110-1301, USA.
00017 
00018 #ifndef KIG_OBJECTS_CIRCLE_IMP_H
00019 #define KIG_OBJECTS_CIRCLE_IMP_H
00020 
00021 #include "conic_imp.h"
00022 
00027 class CircleImp
00028   : public ConicImp
00029 {
00030   Coordinate mcenter;
00031   double mradius;
00032 public:
00033   typedef ConicImp Parent;
00037   static const ObjectImpType* stype();
00038 
00042   CircleImp( const Coordinate& center, double radius );
00043   ~CircleImp();
00044   CircleImp* copy() const;
00045 
00046   ObjectImp* transform( const Transformation& ) const;
00047 
00048   void draw( KigPainter& p ) const;
00049   bool contains( const Coordinate& p, int width, const KigWidget& ) const;
00050   bool inRect( const Rect& r, int width, const KigWidget& ) const;
00051   bool valid() const;
00052   Rect surroundingRect() const;
00053 
00054   double getParam( const Coordinate& point, const KigDocument& ) const;
00055   const Coordinate getPoint( double param, const KigDocument& ) const;
00056 
00057   const uint numberOfProperties() const;
00058   const QCStringList properties() const;
00059   const QCStringList propertiesInternalNames() const;
00060   ObjectImp* property( uint which, const KigDocument& w ) const;
00061   const char* iconForProperty( uint which ) const;
00062   const ObjectImpType* impRequirementForProperty( uint which ) const;
00063   bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
00064 
00065   const ObjectImpType* type() const;
00066   void visit( ObjectImpVisitor* vtor ) const;
00067 
00071   const Coordinate center() const;
00075   double radius() const;
00080   double squareRadius() const;
00084   double surface() const;
00088   double circumference() const;
00089 
00090   // trivial versions of the conic information functions..
00094   int conicType() const;
00095   const ConicCartesianData cartesianData() const;
00096   const ConicPolarData polarData() const;
00100   Coordinate focus1() const;
00104   Coordinate focus2() const;
00105 
00110   QString cartesianEquationString( const KigDocument& w ) const;
00115   QString simplyCartesianEquationString( const KigDocument& w ) const;
00120   QString polarEquationString( const KigDocument& w ) const;
00121 
00122   bool equals( const ObjectImp& rhs ) const;
00123 };
00124 
00125 #endif
KDE Logo
This file is part of the documentation for kdelibs 0.10.7.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Mon Jun 30 08:20:27 2008 by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2001