Kig Python Scripting API Documentation

cubic_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_CUBIC_IMP_H
00019 #define KIG_OBJECTS_CUBIC_IMP_H
00020 
00021 #include "curve_imp.h"
00022 
00023 #include "../misc/cubic-common.h"
00024 
00025 class LineData;
00026 
00030 class CubicImp
00031   : public CurveImp
00032 {
00033   const CubicCartesianData mdata;
00034 public:
00035   typedef CurveImp Parent;
00036   static const ObjectImpType* stype();
00037 
00038   CubicImp( const CubicCartesianData& data );
00039   ~CubicImp();
00040 
00041   ObjectImp* transform( const Transformation& ) const;
00042   void draw( KigPainter& p ) const;
00043   bool contains( const Coordinate& p, int width, const KigWidget& ) const;
00044   bool inRect( const Rect& r, int width, const KigWidget& ) const;
00045   Rect surroundingRect() const;
00046   TQString cartesianEquationString( const KigDocument& ) const;
00047 
00048   const uint numberOfProperties() const;
00049   const QCStringList properties() const;
00050   const QCStringList propertiesInternalNames() const;
00051   ObjectImp* property( uint which, const KigDocument& w ) const;
00052   const char* iconForProperty( uint which ) const;
00053   const ObjectImpType* impRequirementForProperty( uint which ) const;
00054   bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
00055 
00056   CubicImp* copy() const;
00057 
00058   double getParam( const Coordinate& point, const KigDocument& ) const;
00059 
00060   // The getPoint function doesn't need the KigDocument argument, the
00061   // first getPoint function is identical to the other one.  It is
00062   // only provided for implementing the CurveImp interface.
00063   const Coordinate getPoint( double param, const KigDocument& ) const;
00064   const Coordinate getPoint( double param ) const;
00065 
00066 public:
00070   const CubicCartesianData data() const;
00071 
00072   const ObjectImpType* type() const;
00073   void visit( ObjectImpVisitor* vtor ) const;
00074 
00075   bool equals( const ObjectImp& rhs ) const;
00076 
00077   bool containsPoint( const Coordinate& p, const KigDocument& doc ) const;
00078   bool internalContainsPoint( const Coordinate& p, double threshold ) const;
00079 };
00080 
00081 #endif
KDE Logo
This file is part of the documentation for kdelibs 0.10.7.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Thu Jun 13 2013 18:36:00 by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001