00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KIG_OBJECTS_POINT_IMP_H
00019 #define KIG_OBJECTS_POINT_IMP_H
00020
00021 #include "object_imp.h"
00022 #include "../misc/coordinate.h"
00023
00027 class PointImp
00028 : public ObjectImp
00029 {
00030 Coordinate mc;
00031 public:
00032 typedef ObjectImp Parent;
00036 static const ObjectImpType* stype();
00037
00041 PointImp( const Coordinate& c );
00042 ~PointImp();
00043
00044 Rect surroundingRect() const;
00045 Coordinate attachPoint() const;
00046
00050 const Coordinate& coordinate() const { return mc; }
00054 void setCoordinate( const Coordinate& c );
00055
00056 void draw( KigPainter& p ) const;
00057 bool contains( const Coordinate& p, int width, const KigWidget& ) const;
00058 bool inRect( const Rect& r, int width, const KigWidget& ) const;
00059
00060 const uint numberOfProperties() const;
00061 const QCStringList properties() const;
00062 const QCStringList propertiesInternalNames() const;
00063 ObjectImp* property( uint which, const KigDocument& d ) const;
00064 const char* iconForProperty( uint which ) const;
00065 const ObjectImpType* impRequirementForProperty( uint which ) const;
00066 bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
00067
00068 ObjectImp* transform( const Transformation& ) const;
00069
00070 PointImp* copy() const;
00071
00072 const ObjectImpType* type() const;
00073 void visit( ObjectImpVisitor* vtor ) const;
00074
00075 void fillInNextEscape( TQString& s, const KigDocument& ) const;
00076 bool canFillInNextEscape() const;
00077
00078 bool equals( const ObjectImp& rhs ) const;
00079 };
00080
00081 class BogusPointImp
00082 : public PointImp
00083 {
00084 public:
00085 BogusPointImp( const Coordinate& c );
00086 ~BogusPointImp();
00087 static const ObjectImpType* stype();
00088 const ObjectImpType* type() const;
00089 };
00090
00091 #endif