diff options
Diffstat (limited to 'src/icndocument.h')
-rw-r--r-- | src/icndocument.h | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/src/icndocument.h b/src/icndocument.h index 7a5b126..c463bb1 100644 --- a/src/icndocument.h +++ b/src/icndocument.h @@ -23,10 +23,10 @@ class FlowContainer; class Node; class NodeGroup; -typedef QValueList<QGuardedPtr<Connector> > ConnectorList; -typedef QValueList<QGuardedPtr<Node> > NodeList; -typedef QValueList<NodeGroup*> NodeGroupList; -typedef QValueList<QGuardedPtr<NodeGroup> > GuardedNodeGroupList; +typedef TQValueList<TQGuardedPtr<Connector> > ConnectorList; +typedef TQValueList<TQGuardedPtr<Node> > NodeList; +typedef TQValueList<NodeGroup*> NodeGroupList; +typedef TQValueList<TQGuardedPtr<NodeGroup> > GuardedNodeGroupList; /** @author David Saxton @@ -34,8 +34,9 @@ typedef QValueList<QGuardedPtr<NodeGroup> > GuardedNodeGroupList; class ICNDocument : public ItemDocument { Q_OBJECT + TQ_OBJECT public: - ICNDocument( const QString &caption, KTechlab *ktechlab, const char *name ); + ICNDocument( const TQString &caption, KTechlab *ktechlab, const char *name ); virtual ~ICNDocument(); enum hit_score @@ -52,47 +53,47 @@ public: * (such as PIC/START) have restrictions, and can only have one instance of * themselves on the canvas, and adds the operation to the undo list */ - virtual Item* addItem( const QString &id, const QPoint &p, bool newItem ); + virtual Item* addItem( const TQString &id, const TQPoint &p, bool newItem ); /** * Creates a connector between two nodes, and returns a pointer to it * and adds the operation to the undo list */ - Connector* createConnector( const QString &startNodeId, const QString &endNodeId, QPointList *pointList = 0L ); + Connector* createConnector( const TQString &startNodeId, const TQString &endNodeId, TQPointList *pointList = 0L ); /** * short for casting whatever itemWithID(id) returns */ - CNItem* cnItemWithID( const QString &id ); + CNItem* cnItemWithID( const TQString &id ); /** * Returns a pointer to a node on the canvas with the given id, * or NULL if no such node exists */ - Node* nodeWithID( const QString &id ); + Node* nodeWithID( const TQString &id ); /** * Returns a pointer to a Connector on the canvas with the given id, * or NULL if no such Connector exists */ - Connector* connectorWithID( const QString &id ); + Connector* connectorWithID( const TQString &id ); /** - * Adds a QCanvasItem to the delete list to be deleted, + * Adds a TQCanvasItem to the delete list to be deleted, * when flushDeleteList() is called */ - virtual void appendDeleteList( QCanvasItem *qcanvasItem ); + virtual void appendDeleteList( TQCanvasItem *qcanvasItem ); /** * Permantly deletes all items that have been added to the delete list with - * the appendDeleteList( QCanvasItem *qcanvasItem ) function. + * the appendDeleteList( TQCanvasItem *qcanvasItem ) function. */ virtual void flushDeleteList(); /** * Reinherit this function to perform special checks on whether the two - * given QCanvasItems (either nodes or connectors or both) can be + * given TQCanvasItems (either nodes or connectors or both) can be * connected together. */ - virtual bool canConnect( QCanvasItem *qcanvasItem1, QCanvasItem *qcanvasItem2 ) const; + virtual bool canConnect( TQCanvasItem *qcanvasItem1, TQCanvasItem *qcanvasItem2 ) const; virtual void copy(); virtual void selectAll(); - virtual bool registerItem( QCanvasItem *qcanvasItem ); + virtual bool registerItem( TQCanvasItem *qcanvasItem ); /** * Returns a pointer to the 2-dimension array of ICNDocument cells. */ @@ -118,13 +119,13 @@ public: */ bool joinConnectors( Node *node ); static int gridSnap( int pos ); /// Returns 'pos' when snapped to grid - static QPoint gridSnap( const QPoint &pos ); + static TQPoint gridSnap( const TQPoint &pos ); /** * Returns true if the CNItem is valid - e.g. will return true for a * component in a circuit, but not in a pic program */ virtual bool isValidItem( Item *item ) = 0; - virtual bool isValidItem( const QString &itemId ) = 0; + virtual bool isValidItem( const TQString &itemId ) = 0; ConnectorList getCommonConnectors( const ItemList &list ); NodeList getCommonNodes( const ItemList &list ); const NodeList & nodeList() const { return m_nodeList; } @@ -135,24 +136,24 @@ public: * Creates a connector from node1 to node2. If pointList is non-null, then the * connector will be assigned those points */ - Connector * createConnector( Node *node1, Node *node2, QPointList *pointList = 0L ); + Connector * createConnector( Node *node1, Node *node2, TQPointList *pointList = 0L ); /** * Splits Connector con into two connectors at point pos2, and creates a connector from the node * to the intersection of the two new connectors. If pointList is non-null, then the new connector * from the node will be assigned those points */ - Connector * createConnector( Node *node, Connector *con, const QPoint &pos2, QPointList *pointList = 0L ); + Connector * createConnector( Node *node, Connector *con, const TQPoint &pos2, TQPointList *pointList = 0L ); /** * Splits con1 and con2 into two new connectors each at points pos1 and pos2, and creates a new connector * between the two points of intersection given by pos1 and pos2. If pointList is non-null, then the new * connector between the two points will be assigned those points */ - Connector * createConnector( Connector *con1, Connector *con2, const QPoint &pos1, const QPoint &pos2, QPointList *pointList = 0L ); + Connector * createConnector( Connector *con1, Connector *con2, const TQPoint &pos1, const TQPoint &pos2, TQPointList *pointList = 0L ); /** * Returns the flowcontainer at the given position at the highest level that * is not in the current select list, or 0l if there isn't one */ - FlowContainer *flowContainer( const QPoint &pos ); + FlowContainer *flowContainer( const TQPoint &pos ); /** * Sets the drag (e.g. horizontal arrow) cursor for resizing a CNItem, depending on the corner clicked on */ @@ -160,7 +161,7 @@ public: void getTranslatable( const ItemList & itemList, ConnectorList * fixedConnectors = 0l, ConnectorList * translatableConnectors = 0l, NodeGroupList * translatableNodeGroups = 0l ); /** - * Reroutes invalidated directors. You shouldn't call this function + * Reroutes tqinvalidated directors. You shouldn't call this function * directly - instead use ItemDocument::requestEvent. */ void rerouteInvalidatedConnectors(); @@ -208,7 +209,7 @@ protected: * This only needs to be called when connector(s) need routing. */ void addAllItemConnectorPoints(); - virtual void fillContextMenu( const QPoint &pos ); + virtual void fillContextMenu( const TQPoint &pos ); /** * Creates a new NodeGroup to control the node, if there does not already * exist a NodeGroup containing the given node. The associated nodes will @@ -232,7 +233,7 @@ protected: GuardedNodeGroupList m_nodeGroupList; private: - QCanvasItemList m_itemDeleteList; // List of canvas items to be deleted + TQCanvasItemList m_itemDeleteList; // List of canvas items to be deleted }; @@ -245,22 +246,22 @@ public: static DirCursor* self(); ~DirCursor(); - static QPixmap leftArrow() + static TQPixmap leftArrow() { return self()->m_leftArrow; } - static QPixmap rightArrow() + static TQPixmap rightArrow() { return self()->m_rightArrow; } - static QPixmap upArrow() + static TQPixmap upArrow() { return self()->m_upArrow; } - static QPixmap downArrow() + static TQPixmap downArrow() { return self()->m_downArrow; } @@ -270,10 +271,10 @@ protected: void initCursors(); static DirCursor *m_self; - QPixmap m_leftArrow; - QPixmap m_rightArrow; - QPixmap m_upArrow; - QPixmap m_downArrow; + TQPixmap m_leftArrow; + TQPixmap m_rightArrow; + TQPixmap m_upArrow; + TQPixmap m_downArrow; }; |