Kig Python Scripting API Documentation

point_imp.h
1 // Copyright (C) 2002 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_POINT_IMP_H
19 #define KIG_OBJECTS_POINT_IMP_H
20 
21 #include "object_imp.h"
22 #include "../misc/coordinate.h"
23 
27 class PointImp
28  : public ObjectImp
29 {
30  Coordinate mc;
31 public:
32  typedef ObjectImp Parent;
36  static const ObjectImpType* stype();
37 
41  PointImp( const Coordinate& c );
42  ~PointImp();
43 
44  Rect surroundingRect() const;
46 
50  const Coordinate& coordinate() const { return mc; }
54  void setCoordinate( const Coordinate& c );
55 
56  void draw( KigPainter& p ) const;
57  bool contains( const Coordinate& p, int width, const KigWidget& ) const;
58  bool inRect( const Rect& r, int width, const KigWidget& ) const;
59 
60  const uint numberOfProperties() const;
61  const QCStringList properties() const;
62  const QCStringList propertiesInternalNames() const;
63  ObjectImp* property( uint which, const KigDocument& d ) const;
64  const char* iconForProperty( uint which ) const;
65  const ObjectImpType* impRequirementForProperty( uint which ) const;
66  bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
67 
68  ObjectImp* transform( const Transformation& ) const;
69 
70  PointImp* copy() const;
71 
72  const ObjectImpType* type() const;
73  void visit( ObjectImpVisitor* vtor ) const;
74 
75  void fillInNextEscape( TQString& s, const KigDocument& ) const;
76  bool canFillInNextEscape() const;
77 
78  bool equals( const ObjectImp& rhs ) const;
79 };
80 
81 class BogusPointImp
82  : public PointImp
83 {
84 public:
85  BogusPointImp( const Coordinate& c );
86  ~BogusPointImp();
87  static const ObjectImpType* stype();
88  const ObjectImpType* type() const;
89 };
90 
91 #endif
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition: coordinate.h:34
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:219
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
void setCoordinate(const Coordinate &c)
Set the coordinate of this Point.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
Point * copy() const
Returns a copy of this Object.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
const Coordinate & coordinate() const
Get the coordinate of this Point.
Definition: point_imp.h:50
static const ObjectType * stype()
Returns the ObjectType representing Point's.
Coordinate attachPoint() const
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachme...
Class representing a transformation.
Definition: kigtransform.h:38
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed May 15 2024 03:39:42 by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2001