From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: TQt4 port ktechlab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/connector.h | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'src/connector.h') diff --git a/src/connector.h b/src/connector.h index 357fde9..57fc378 100644 --- a/src/connector.h +++ b/src/connector.h @@ -11,9 +11,9 @@ #ifndef CONNECTOR_H #define CONNECTOR_H -#include -#include -#include +#include +#include +#include class Cell; class ConnectorData; @@ -25,20 +25,21 @@ class Node; class NodeGroup; class Wire; -typedef QValueList ConnectorLineList; -typedef QValueList QPointList; -typedef QValueVector > WireVector; +typedef TQValueList ConnectorLineList; +typedef TQValueList TQPointList; +typedef TQValueVector > WireVector; /** @short Represents a connection between two Nodes on a ICNDocument @author David Saxton */ -class Connector : public QObject, public QCanvasPolygon +class Connector : public TQObject, public TQCanvasPolygon { Q_OBJECT + TQ_OBJECT public: - Connector( Node * startNode, Node * endNode, ICNDocument *_ICNDocument, QString *id = 0L ); + Connector( Node * startNode, Node * endNode, ICNDocument *_ICNDocument, TQString *id = 0L ); ~Connector(); virtual int rtti() const; @@ -65,7 +66,7 @@ public: /** * Connected id */ - QString id() const { return m_id; } + TQString id() const { return m_id; } /** * Update the list of lines and connetion-points that the connector uses for * drawing. @@ -95,7 +96,7 @@ public: * @param setManual if true then the connector will change to a manual route one * @param checkEndPoints if true then will check to see if the end points are at the nodes, and adds them if not */ - void setRoutePoints( QPointList pointList, bool setManual, bool checkEndPoints = false ); + void setRoutePoints( TQPointList pointList, bool setManual, bool checkEndPoints = false ); /** * Call this function (e.g. when moving a CNItem connected to the connector) * to make the connector partially hidden - probably grayed out - if semiHidden @@ -103,13 +104,13 @@ public: */ void setSemiHidden( bool semiHidden ); /** - * Sets the container parent (i.e. the container of the parent item) + * Sets the container tqparent (i.e. the container of the tqparent item) */ - void setParentContainer( const QString &cnItemId ); + void setParentContainer( const TQString &cnItemId ); /** - * Returns a pointer to the parent item container + * Returns a pointer to the tqparent item container */ - CNItem *parentContainer() const { return p_parentContainer; } + CNItem *tqparentContainer() const { return p_parentContainer; } /** * @returns whether the points have been set by the user manually defining them */ @@ -118,7 +119,7 @@ public: * Returns two sets of points (in canvas-reference) that define the connector * from start to finish, when it is split at the given point (in canvas-reference) */ - QValueList splitConnectorPoints( const QPoint &pos ) const; + TQValueList splitConnectorPoints( const TQPoint &pos ) const; /** * @returns pointer to ICNDocument that this connector is a member of */ @@ -127,13 +128,13 @@ public: * Looks at the set of canvas points and tries to determine whether they are * in the reverse order from start to end node */ - bool pointsAreReverse( const QPointList &pointList ) const; + bool pointsAreReverse( const TQPointList &pointList ) const; /** * Returns the points, given in canvas-reference, in order of start node to * end node if reverse is false * @param reverse whether or not to reverse the points from start node to end node */ - QPointList connectorPoints( bool reverse = false ) const; + TQPointList connectorPoints( bool reverse = false ) const; /** * Reroute the connector. Note that if this connector is controlled by a * NodeGroup, it will do nothing (other than print out a warning) @@ -167,29 +168,29 @@ protected: bool m_bIsSyncingWires; bool b_semiHidden; - QGuardedPtr m_startNode; - QGuardedPtr m_endNode; + TQGuardedPtr m_startNode; + TQGuardedPtr m_endNode; NodeGroup *p_nodeGroup; CNItem *p_parentContainer; ICNDocument *p_icnDocument; ConRouter *m_conRouter; - QString m_id; + TQString m_id; ConnectorLineList m_connectorLineList; - QRect m_oldBoundRect; + TQRect m_oldBoundRect; WireVector m_wires; bool b_deleted; bool b_manualPoints; bool b_pointsAdded; }; -typedef QValueList > ConnectorList; +typedef TQValueList > ConnectorList; //BEGIN ConnectorLine things -class ConnectorLine : public QObject, public QCanvasLine +class ConnectorLine : public TQObject, public TQCanvasLine { public: ConnectorLine( Connector *connector ); - Connector *parent() const { return p_connector; } + Connector *tqparent() const { return p_connector; } virtual int rtti() const; protected: -- cgit v1.2.1