conic_imp.h Source File (Kig Python Scripting API)

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

conic_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_CONIC_IMP_H
19#define KIG_OBJECTS_CONIC_IMP_H
20
21#include "curve_imp.h"
22
23#include "../misc/conic-common.h"
24
38 class ConicImp
39 : public CurveImp
40{
41protected:
42 ConicImp();
43 ~ConicImp();
44public:
45 typedef CurveImp Parent;
49 static const ObjectImpType* stype();
50
51 ObjectImp* transform( const Transformation& ) const;
52
53 void draw( KigPainter& p ) const;
54 bool contains( const Coordinate& p, int width, const KigWidget& ) const;
55 bool inRect( const Rect& r, int width, const KigWidget& ) const;
56 bool valid() const;
57 Rect surroundingRect() const;
58
59 const uint numberOfProperties() const;
60 const ObjectImpType* impRequirementForProperty( uint which ) const;
61 bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
62 const QCStringList properties() const;
63 const QCStringList propertiesInternalNames() const;
64 const char* iconForProperty( uint which ) const;
65 ObjectImp* property( uint which, const KigDocument& w ) const;
66
67 double getParam( const Coordinate& point, const KigDocument& ) const;
68 const Coordinate getPoint( double param, const KigDocument& ) const;
69
70 // information about ourselves.. These are all virtual, because a
71 // trivial subclass like CircleImp can override these with trivial
72 // versions..
73
81 virtual int conicType() const;
85 virtual TQString conicTypeString() const;
90 virtual TQString cartesianEquationString( const KigDocument& w ) const;
96 virtual TQString polarEquationString( const KigDocument& w ) const;
100 virtual const ConicCartesianData cartesianData() const;
104 virtual const ConicPolarData polarData() const = 0;
108 virtual Coordinate focus1() const;
112 virtual Coordinate focus2() const;
113
114 const ObjectImpType* type() const;
115 void visit( ObjectImpVisitor* vtor ) const;
116
117 bool equals( const ObjectImp& rhs ) const;
118
119 bool containsPoint( const Coordinate& p, const KigDocument& doc ) const;
120 bool internalContainsPoint( const Coordinate& p, double threshold ) const;
121};
122
127 class ConicImpCart
128 : public ConicImp
129{
130 ConicCartesianData mcartdata;
131 ConicPolarData mpolardata;
132public:
133 ConicImpCart( const ConicCartesianData& data );
134 ~ConicImpCart();
135 ConicImpCart* copy() const;
136
137 const ConicCartesianData cartesianData() const;
138 const ConicPolarData polarData() const;
139};
140
145 class ConicImpPolar
146 : public ConicImp
147{
148 ConicPolarData mdata;
149public:
150 ConicImpPolar( const ConicPolarData& data );
151 ~ConicImpPolar();
152 ConicImpPolar* copy() const;
153
154 const ConicPolarData polarData() const;
155};
156
157#endif
ConicCart::polarData
const ConicPolarData polarData() const
Return the polar representation of this conic.
ConicCart::copy
ConicCart * copy() const
Returns a copy of this Object.
ConicCart::cartesianData
const ConicCartesianData cartesianData() const
Return the cartesian representation of this conic.
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
ConicPolar::polarData
const ConicPolarData polarData() const
Return the polar representation of this conic.
ConicPolar::copy
ConicPolar * copy() const
Returns a copy of this Object.
Conic::conicTypeString
virtual TQString conicTypeString() const
A string containing "Hyperbola", "Parabola" or "Ellipse".
Conic::conicType
virtual int conicType() const
Type of conic.
Conic::focus2
virtual Coordinate focus2() const
Return the second focus of this conic.
Conic::polarData
virtual const ConicPolarData polarData() const =0
Return the polar representation of this conic.
Conic::polarEquationString
virtual TQString polarEquationString(const KigDocument &w) const
A string containing the polar equation of the conic.
Conic::transform
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
Conic::cartesianEquationString
virtual TQString cartesianEquationString(const KigDocument &w) const
A string containing the cartesian equation of the conic.
Conic::containsPoint
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
Conic::equals
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
Conic::focus1
virtual Coordinate focus1() const
Return the first focus of this conic.
Conic::cartesianData
virtual const ConicCartesianData cartesianData() const
Return the cartesian representation of this conic.
Conic::stype
static const ObjectType * stype()
Returns the ObjectType representing the Conic type.
Conic::type
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition coordinate.h:34
Curve
This class represents a curve: something which is composed of points, like a line,...
Definition curve_imp.h:29
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