kivio
kivio_connector_target.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIVIO_CONNECTOR_TARGET_H
00020 #define KIVIO_CONNECTOR_TARGET_H
00021
00022 #include <qdom.h>
00023 #include <qptrlist.h>
00024
00025 #include <KoPoint.h>
00026
00027 class KivioIntraStencilData;
00028 class KivioPainter;
00029 class KivioStencil;
00030 class KivioConnectorPoint;
00031
00032 class KivioConnectorTarget
00033 {
00034 protected:
00035 KoPoint m_position;
00036 double m_xOffset, m_yOffset;
00037 int m_id;
00038 QPtrList<KivioConnectorPoint> *m_pConnectors;
00039
00040 public:
00041 KivioConnectorTarget();
00042 KivioConnectorTarget( double, double );
00043 KivioConnectorTarget( double, double, double, double );
00044 virtual ~KivioConnectorTarget();
00045
00046 bool loadXML( const QDomElement & );
00047 QDomElement saveXML( QDomDocument & );
00048
00049 KivioConnectorTarget *duplicate();
00050
00051 inline float x() { return m_position.x(); }
00052 inline float y() { return m_position.y(); }
00053 inline KoPoint position() { return m_position; }
00054
00055 void setId( int id );
00056 inline int id() { return m_id; }
00057
00058 void setX( float );
00059 void setY( float );
00060 void setPosition( float, float );
00061
00062 void addConnectorPointToList( KivioConnectorPoint * );
00063 bool removeConnectorPointFromList( KivioConnectorPoint * );
00064
00065 void paintOutline( KivioIntraStencilData * );
00066
00067 void disconnectPoint( KivioConnectorPoint * );
00068
00069 bool hasConnections();
00070
00071 void setOffsets(double x, double y);
00072 double xOffset() { return m_xOffset; }
00073 double yOffset() { return m_yOffset; }
00074 };
00075
00076 #endif
00077
|