summaryrefslogtreecommitdiffstats
path: root/src/connector.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/connector.h
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
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
Diffstat (limited to 'src/connector.h')
-rw-r--r--src/connector.h49
1 files changed, 25 insertions, 24 deletions
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 <qcanvas.h>
-#include <qguardedptr.h>
-#include <qvaluevector.h>
+#include <tqcanvas.h>
+#include <tqguardedptr.h>
+#include <tqvaluevector.h>
class Cell;
class ConnectorData;
@@ -25,20 +25,21 @@ class Node;
class NodeGroup;
class Wire;
-typedef QValueList<ConnectorLine*> ConnectorLineList;
-typedef QValueList<QPoint> QPointList;
-typedef QValueVector<QGuardedPtr<Wire> > WireVector;
+typedef TQValueList<ConnectorLine*> ConnectorLineList;
+typedef TQValueList<TQPoint> TQPointList;
+typedef TQValueVector<TQGuardedPtr<Wire> > 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<QPointList> splitConnectorPoints( const QPoint &pos ) const;
+ TQValueList<TQPointList> 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<Node> m_startNode;
- QGuardedPtr<Node> m_endNode;
+ TQGuardedPtr<Node> m_startNode;
+ TQGuardedPtr<Node> 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<QGuardedPtr<Connector> > ConnectorList;
+typedef TQValueList<TQGuardedPtr<Connector> > 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: