• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • objects
cubic_imp.h
Go to the documentation of this file.
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_CUBIC_IMP_H
19 #define KIG_OBJECTS_CUBIC_IMP_H
20 
21 #include "curve_imp.h"
22 
23 #include "../misc/cubic-common.h"
24 
25 
29 class CubicImp
30  : public CurveImp
31 {
32  const CubicCartesianData mdata;
33 public:
34  typedef CurveImp Parent;
35  static const ObjectImpType* stype();
36 
37  CubicImp( const CubicCartesianData& data );
38  ~CubicImp();
39 
40  ObjectImp* transform( const Transformation& ) const;
41  void draw( KigPainter& p ) const;
42  bool contains( const Coordinate& p, int width, const KigWidget& ) const;
43  bool inRect( const Rect& r, int width, const KigWidget& ) const;
44  Rect surroundingRect() const;
45  QString cartesianEquationString( const KigDocument& ) const;
46 
47  int numberOfProperties() const;
48  const QByteArrayList properties() const;
49  const QByteArrayList propertiesInternalNames() const;
50  ObjectImp* property( int which, const KigDocument& w ) const;
51  const char* iconForProperty( int which ) const;
52  const ObjectImpType* impRequirementForProperty( int which ) const;
53  bool isPropertyDefinedOnOrThroughThisImp( int which ) const;
54 
55  CubicImp* copy() const;
56 
57  double getParam( const Coordinate& point, const KigDocument& ) const;
58 
59  // The getPoint function doesn't need the KigDocument argument, the
60  // first getPoint function is identical to the other one. It is
61  // only provided for implementing the CurveImp interface.
62  const Coordinate getPoint( double param, const KigDocument& ) const;
63  const Coordinate getPoint( double param ) const;
64 
65 public:
69  const CubicCartesianData data() const;
70 
71  const ObjectImpType* type() const;
72  void visit( ObjectImpVisitor* vtor ) const;
73 
74  bool equals( const ObjectImp& rhs ) const;
75 
76  bool containsPoint( const Coordinate& p, const KigDocument& doc ) const;
77  bool internalContainsPoint( const Coordinate& p, double threshold ) const;
78  bool isVerticalCubic() const;
79 };
80 
81 #endif
CubicImp::getParam
double getParam(const Coordinate &point, const KigDocument &) const
Definition: cubic_imp.cc:72
CubicImp
An ObjectImp representing a cubic.
Definition: cubic_imp.h:29
ObjectImpType
Instances of this class represent a certain ObjectImp type.
Definition: object_imp.h:95
CubicImp::type
const ObjectImpType * type() const
Returns the lowermost ObjectImpType that this object is an instantiation of.
Definition: cubic_imp.cc:347
Rect
This file is part of Kig, a KDE program for Interactive Geometry...
Definition: rect.h:34
CubicImp::property
ObjectImp * property(int which, const KigDocument &w) const
Definition: cubic_imp.cc:318
CubicImp::impRequirementForProperty
const ObjectImpType * impRequirementForProperty(int which) const
Definition: cubic_imp.cc:299
CubicImp::inRect
bool inRect(const Rect &r, int width, const KigWidget &) const
Definition: cubic_imp.cc:61
CubicImp::properties
const QByteArrayList properties() const
Definition: cubic_imp.cc:290
CubicImp::equals
bool equals(const ObjectImp &rhs) const
Returns true if this ObjectImp is equal to rhs.
Definition: cubic_imp.cc:341
CubicImp::copy
CubicImp * copy() const
Returns a copy of this ObjectImp.
Definition: cubic_imp.cc:67
Coordinate
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
CubicImp::propertiesInternalNames
const QByteArrayList propertiesInternalNames() const
Definition: cubic_imp.cc:277
CubicImp::isVerticalCubic
bool isVerticalCubic() const
Definition: cubic_imp.cc:405
CubicImp::~CubicImp
~CubicImp()
Definition: cubic_imp.cc:38
CubicImp::getPoint
const Coordinate getPoint(double param, const KigDocument &) const
Definition: cubic_imp.cc:154
KigPainter
KigPainter is an extended QPainter.
Definition: kigpainter.h:51
CubicImp::CubicImp
CubicImp(const CubicCartesianData &data)
Definition: cubic_imp.cc:33
Transformation
Class representing a transformation.
Definition: kigtransform.h:37
CubicImp::cartesianEquationString
QString cartesianEquationString(const KigDocument &) const
Definition: cubic_imp.cc:423
KigWidget
This class is the real widget showing the document.
Definition: kig_view.h:50
CubicImp::transform
ObjectImp * transform(const Transformation &) const
Return this ObjectImp, transformed by the transformation t.
Definition: cubic_imp.cc:42
CubicCartesianData
This class represents an equation of a cubic in the form (in homogeneous coordinates, ), .
Definition: cubic-common.h:31
CubicImp::Parent
CurveImp Parent
Definition: cubic_imp.h:34
CubicImp::visit
void visit(ObjectImpVisitor *vtor) const
Definition: cubic_imp.cc:336
CubicImp::data
const CubicCartesianData data() const
Return the cartesian representation of this cubic.
Definition: cubic_imp.cc:331
CubicImp::internalContainsPoint
bool internalContainsPoint(const Coordinate &p, double threshold) const
Definition: cubic_imp.cc:374
CubicImp::isPropertyDefinedOnOrThroughThisImp
bool isPropertyDefinedOnOrThroughThisImp(int which) const
Definition: cubic_imp.cc:400
KigDocument
KigDocument is the class holding the real data in a Kig document.
Definition: kig_document.h:36
CubicImp::numberOfProperties
int numberOfProperties() const
Definition: cubic_imp.cc:272
CubicImp::containsPoint
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
Definition: cubic_imp.cc:369
CubicImp::draw
void draw(KigPainter &p) const
Definition: cubic_imp.cc:51
QByteArrayList
QList< QByteArray > QByteArrayList
Definition: objects/common.h:50
ObjectImp
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
CubicImp::contains
bool contains(const Coordinate &p, int width, const KigWidget &) const
Definition: cubic_imp.cc:56
curve_imp.h
CubicImp::stype
static const ObjectImpType * stype()
Definition: cubic_imp.cc:352
CubicImp::iconForProperty
const char * iconForProperty(int which) const
Definition: cubic_imp.cc:306
ObjectImpVisitor
Definition: object_imp.h:56
CubicImp::surroundingRect
Rect surroundingRect() const
Definition: cubic_imp.cc:416
CurveImp
This class represents a curve: something which is composed of points, like a line, a circle, a locus.
Definition: curve_imp.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal