1 // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA
18 #ifndef KIG_OBJECTS_POINT_IMP_H
19 #define KIG_OBJECTS_POINT_IMP_H
21 #include "object_imp.h"
22 #include "../misc/coordinate.h"
25 * An ObjectImp representing a point..
32 typedef ObjectImp Parent
;
34 * Returns the ObjectImpType representing PointImp's.
36 static const ObjectImpType
* stype();
39 * Construct a PointImp with coordinate c.
41 PointImp( const Coordinate
& c
);
44 Rect
surroundingRect() const;
45 Coordinate
attachPoint() const;
48 * Get the coordinate of this PointImp.
50 const Coordinate
& coordinate() const { return mc
; };
52 * Set the coordinate of this PointImp.
54 void setCoordinate( const Coordinate
& c
);
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;
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;
68 ObjectImp
* transform( const Transformation
& ) const;
70 PointImp
* copy() const;
72 const ObjectImpType
* type() const;
73 void visit( ObjectImpVisitor
* vtor
) const;
75 void fillInNextEscape( QString
& s
, const KigDocument
& ) const;
76 bool canFillInNextEscape() const;
78 bool equals( const ObjectImp
& rhs
) const;
85 BogusPointImp( const Coordinate
& c
);
87 static const ObjectImpType
* stype();
88 const ObjectImpType
* type() const;