19#ifndef SML_CONNECTOR_H
20#define SML_CONNECTOR_H
23#include "kivio_arrowhead.h"
24#include "kivio_connector_point.h"
25#include "kivio_custom_drag_data.h"
26#include "kivio_intra_stencil_data.h"
27#include "kiviostencilfactory.h"
28#include "kivio_text_style.h"
29#include "kivio_point.h"
30#include "kivio_stencil.h"
34#include <tqstringlist.h>
38#include "kivio_1d_stencil.h"
41class KivioSMLConnector : public Kivio1DStencil
44 bool loadPath( const TQString &file);
47 TQPtrList<KivioConnectorPoint> m_PointList;
52 KivioArrowHead *m_startAH;
53 KivioArrowHead *m_endAH;
55 bool loadArrowHeads( const TQDomElement & );
56 TQDomElement saveArrowHeads( TQDomDocument & );
57 virtual bool loadCustom( const TQDomElement & );
58 virtual bool saveCustom( TQDomElement &, TQDomDocument & );
61 KivioSMLConnector( const TQString& name);
62 virtual ~KivioSMLConnector();
64 virtual void setStartPoint( double, double );
65 virtual void setEndPoint( double, double );
67 virtual KivioCollisionType checkForCollision( KivioPoint *, double );
69 virtual KivioStencil* duplicate();
71 virtual void paint( KivioIntraStencilData * );
72 virtual void paintOutline( KivioIntraStencilData * );
77 virtual void setStartAHType( int i ) { m_startAH->setType(i); }
78 virtual void setStartAHWidth( double f ) { m_startAH->setWidth(f); }
79 virtual void setStartAHLength( double f ) { m_startAH->setLength(f); }
80 virtual void setEndAHType( int i ) { m_endAH->setType(i); }
81 virtual void setEndAHWidth( double f ) { m_endAH->setWidth(f); }
82 virtual void setEndAHLength( double f ) { m_endAH->setLength(f); }
84 virtual int startAHType() { return m_startAH->type(); }
85 virtual double startAHWidth() { return m_startAH->width(); }
86 virtual double startAHLength() { return m_startAH->length(); }
87 virtual int endAHType() { return m_endAH->type(); }
88 virtual double endAHWidth() { return m_endAH->width(); }
89 virtual double endAHLength() { return m_endAH->length(); }
93class KivioSMLConnectorFactory : public KivioStencilFactory
98 KivioSMLConnectorFactory(TQObject *parent=0, const char* name=0, const TQStringList& args = TQStringList());
99 KivioStencil *NewStencil( const TQString& name);
100 KivioStencil *NewStencil();
102 KivioStencilSpawnerInfo *GetSpawnerInfo();
|