Public Slots | |
| void | scrollingSlot (int) |
| Called when the user is scrolling. | |
| void | scrollLineDownSlot (void) |
| Scrolls one line down. | |
| void | scrollLineUpSlot (void) |
| Scrolls one line up. | |
| void | scrollLineRightSlot (void) |
| Scrolls one line right. | |
| void | scrollLineLeftSlot (void) |
| Scrolls one line left. | |
| void | scrollPageDownSlot (void) |
| Scrolls one page down. | |
| void | scrollPageUpSlot (void) |
| Scrolls one page up. | |
| void | scrollPageRightSlot (void) |
| Scrolls one page right. | |
| void | scrollPageLeftSlot (void) |
| Scrolls one page left. | |
| void | hideLevelPopupSlot (void) |
| Hides all placeholders of hidden attributes and the type of a feature structure. | |
| void | unhideLevelPopupSlot (void) |
| Shows all placeholders of hidden attributes and the type of a feature structure. | |
| void | hideNodePopupSlot (void) |
| Hides a node. | |
Signals | |
| void | redrawSignal () |
| Emitted when the canvas needs to be redrawn. | |
Public Member Functions | |
| Canvas (Options *, MyScrollBar *, MyScrollBar *, Document *, GenericNode *rootNode, QWidget *parent=0, const char *name=0) | |
| Creates a new canvas that displays a structure or a tree. | |
| ~Canvas () | |
| Destroys the canvas. | |
| virtual void | paintEvent (QPaintEvent *) |
| Called when the window needs to be painted. | |
| virtual void | repaint (bool erase=true) |
| Called when the window needs to be repainted. | |
| virtual void | repaint (int, int, int, int, bool erase=true) |
| Called when the window needs to be painted. | |
| void | printToPrinter (QPrinter &p) |
| Prints the current structure or tree. | |
| QSize | getNodeDimensions (GenericNode *nd, const NodeAddress &addrParent, int dx, int dy) |
Calculates the dimensions of a given node (by executing the drawing routines with realDraw set to false). | |
| QSize | drawGenericNode (GenericNode *nd, const NodeAddress &addrParent, int dx, int dy, unsigned short flags=0) |
| Draws a node by delegating the work to be done to one of the specialized drawing routines depending on the node's type. | |
| QSize | drawHiddenNode (DisplayableNode *dnd, char *text, int dx, int dy) |
| Draws a placeholder of a hidden node. | |
| QSize | drawTypeNode (TypeNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a type node. | |
| QSize | drawFeatvalNode (FeatvalNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a feature and its value. | |
| QSize | drawListNode (ListNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a list node. | |
| QSize | drawSetNode (SetNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a set node. | |
| QSize | drawStrucNode (StrucNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a feature structure. | |
| QSize | drawFunctionNode (FunctionNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a function node. | |
| QSize | drawRelationNode (RelationNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a relation node. | |
| QSize | drawRefNode (RefNode *nd, const NodeAddress &addrParent, int dx, int dy, unsigned short flags=0) |
| Draws a tag (a number in a little box). | |
| QSize | drawAtomNode (AtomNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws an atom node. | |
| QSize | drawTreeNode (TreeNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a tree node. | |
| QSize | drawTailNode (TailNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a tail node. | |
| QSize | drawRestNode (RestNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a rest node. | |
| QSize | drawDisjunctionNode (DisjunctionNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a DisjunctionNode. | |
| QSize | drawConjunctionNode (ConjunctionNode *nd, const NodeAddress &addrParent, int dx, int dy) |
| Draws a ConjunctionNode. | |
| void | setRootNode (GenericNode *node) |
| Selects a new root node. | |
| void | updateOptions (const Options &op) |
| Updates the options in this canvas to match the application wide options. | |
| void | addToClick (const NodeAddress &addr, int nodetype, QRect bounds) |
| Adds a click region to the list of click regions. | |
| void | hideUnhide (DisplayableNode *nd, bool redraw=true) |
| Toggles the hide flag on a displayable node. | |
| void | expandCollapse (DisplayableNode *nd, bool redraw=true) |
| Toggles the expanded flag on a displayable node. | |
| void | resetScrollbar () |
| Updates the scrollbars after the window has been resized or the data has changed. | |
| QSize | getMaxSize () |
| Returns the total size of the currently displayed structure or tree. | |
| int | getOffsetX () |
| Returns the current X offset. | |
| int | getOffsetY () |
| Returns the current X offset. | |
| KlickBox * | getKlickedOn () |
| Returns the click region of the node last clicked on. | |
| KlickBox * | whereKlicked (const QPoint &p) |
| Returns the click region which contains the given point, if any. | |
| IdTree * | getDispNodes (void) |
| Returns the tree of node ids. | |
| void | reset () |
| Resets the currently displayed structure or tree. | |
| void | ensureVisible (const NodeAddress *addr) |
| Make sure that the given node is visible. | |
| void | markFound (const NodeAddress *addr) |
| Move the found marker to a new node and scroll to that position. | |
| Document * | getDocument (void) const |
| Returns the document displayed in this Canvas. | |
Protected Member Functions | |
| void | mousePressEvent (QMouseEvent *) |
| Called when the user clicks with the mouse. | |
| void | mouseMoveEvent (QMouseEvent *) |
| Called when the user moves the mouse. | |
| void | mouseReleaseEvent (QMouseEvent *) |
| Called when the user releases a mouse button. | |
| virtual void | wheelEvent (QWheelEvent *we) |
| Called when a wheel event occurs (wheel mice only). | |
Private Slots | |
| void | expandCollapseSlot () |
| Collapses or expands the node the user clicked on (if this operation is supported for the type of the node). | |
Private Member Functions | |
| void | drawFoundMark (int x, int y, int w, int h) |
| Draws a rectangle around a node indicated that it was found in a search operation. | |
| QStringList | typeAndFeatsList (StrucNode *node) |
Returns a list that contains the type and all attributes of a feature structure (a StrucNode). | |
| QStringList | namesOfHiddenChildNodes (NodeAddress &addr) |
| Returns a list that contains the names of all hidden child nodes. | |
| void | drawText (int, int, const char *, int width=0) |
Draws text if realDraw is set to true. | |
| void | drawLine (int, int, int, int) |
Draws a line if realDraw is set to true. | |
| void | drawRect (int, int, int, int) |
Draws a rectangle if realDraw is set to true. | |
| void | drawAndOperator (int x, int width, int yu, int yd) |
Draws an AND operator, but only if realDraw is set. | |
| void | drawOrOperator (int x, int width, int yu, int yd) |
Draws an OR operator, but only if realDraw is set. | |
| void | resetToClick (void) |
| Clears the list of current click regions. | |
| QPoint | nodeOrigin (const NodeAddress *addr) |
| Returns the top left coordinate of a node. | |
Private Attributes | |
| Options * | options |
| The local (window-specifc) copy of the application options. | |
| KlickBox * | klickedOn |
| The node the user clicked on last. | |
| QList< KlickBox > | toKlick |
| All click regions are kept in this list to allow mapping between click regions and nodes. | |
| QPainter * | paint |
| The painter object. | |
| QSize | maxSize |
| The total size of a structure or a tree. | |
| int | offsetX |
| The current X offset to the top left corner of the structure. | |
| int | offsetY |
| The current Y offset to the top left corner of the structure. | |
| int | oldOffsetX |
| The old X offset (used during dragging of a structure). | |
| int | oldOffsetY |
| The old Y offset (used during dragging of a structure). | |
| int | dragX |
| The current X coordinate of the mouse cursor during dragging. | |
| int | dragY |
| The current Y coordinate of the mouse cursor during dragging. | |
| bool | realDraw |
| Determines whether nodes should actually drawn or not. | |
| GenericNode * | rootNode |
| The root node of the structure or the tree. | |
| Document * | document |
| A pointer to the document containing the node data. | |
| MyScrollBar * | v_scroll |
| Pointer to the vertical scrollbar. | |
| MyScrollBar * | h_scroll |
| Pointer to the horizontal scrollbar. | |
| KPopupMenu * | popup |
Pointer to the popup menu currently open (or NULL if there is none). | |
| bool | dragging |
true if the user is currently dragging the structure or tree with the mouse. | |
| DisplayableNode * | highlight |
| Pointer to the currently highlighted node. | |
| DisplayableNode * | foundMark |
| Pointer to the node that is currently marked by the finder. | |
| IdTree * | dispNodes |
| A search tree of node addresses. | |
|
||||||||||||||||||||||||||||||||
|
Creates a new canvas that displays a structure or a tree.
|
|
|
Destroys the canvas.
|
|
||||||||||||||||
|
Adds a click region to the list of click regions.
|
|
||||||||||||||||||||
|
Draws an AND operator, but only if
|
|
||||||||||||||||||||
|
Draws an atom node.
|
|
||||||||||||||||||||
|
Draws a ConjunctionNode. ConjunctionNodes represent the infix conjunction operator.
|
|
||||||||||||||||||||
|
Draws a DisjunctionNode. DisjunctionNodes represent the infix disjunction operator.
|
|
||||||||||||||||||||
|
Draws a feature and its value.
|
|
||||||||||||||||||||
|
Draws a rectangle around a node indicated that it was found in a search operation.
|
|
||||||||||||||||||||
|
Draws a function node.
|
|
||||||||||||||||||||||||
|
Draws a node by delegating the work to be done to one of the specialized drawing routines depending on the node's type. Drawing is done recursively, top to bottom, left to right.
|
|
||||||||||||||||||||
|
Draws a placeholder of a hidden node.
|
|
||||||||||||||||||||
|
Draws a line if
|
|
||||||||||||||||||||
|
Draws a list node.
|
|
||||||||||||||||||||
|
Draws an OR operator, but only if
|
|
||||||||||||||||||||
|
Draws a rectangle if
|
|
||||||||||||||||||||||||
|
Draws a tag (a number in a little box).
|
|
||||||||||||||||||||
|
Draws a relation node.
|
|
||||||||||||||||||||
|
Draws a rest node.
|
|
||||||||||||||||||||
|
Draws a set node.
|
|
||||||||||||||||||||
|
Draws a feature structure.
|
|
||||||||||||||||||||
|
Draws a tail node.
|
|
||||||||||||||||||||
|
Draws text if
|
|
||||||||||||||||||||
|
Draws a tree node.
|
|
||||||||||||||||||||
|
Draws a type node.
|
|
|
Make sure that the given node is visible.
|
|
||||||||||||
|
Toggles the expanded flag on a displayable node.
|
|
|
Collapses or expands the node the user clicked on (if this operation is supported for the type of the node).
|
|
|
Returns the tree of node ids.
|
|
|
Returns the document displayed in this Canvas.
|
|
|
Returns the click region of the node last clicked on.
|
|
|
Returns the total size of the currently displayed structure or tree.
|
|
||||||||||||||||||||
|
Calculates the dimensions of a given node (by executing the drawing routines with
|
|
|
Returns the current X offset.
|
|
|
Returns the current X offset.
|
|
|
Hides all placeholders of hidden attributes and the type of a feature structure.
|
|
|
Hides a node.
|
|
||||||||||||
|
Toggles the hide flag on a displayable node.
|
|
|
Move the found marker to a new node and scroll to that position.
|
|
|
Called when the user moves the mouse.
|
|
|
Called when the user clicks with the mouse.
|
|
|
Called when the user releases a mouse button.
|
|
|
Returns a list that contains the names of all hidden child nodes. Only works for nodes of type StrucNode, where all hidden attributes are returned.
|
|
|
Returns the top left coordinate of a node.
|
|
|
Called when the window needs to be painted.
|
|
|
Prints the current structure or tree.
|
|
|
Emitted when the canvas needs to be redrawn.
|
|
||||||||||||||||||||||||
|
Called when the window needs to be painted.
|
|
|
Called when the window needs to be repainted.
|
|
|
Resets the currently displayed structure or tree. Everything is reset to the initial state. |
|
|
Updates the scrollbars after the window has been resized or the data has changed.
|
|
|
Clears the list of current click regions.
|
|
|
Called when the user is scrolling.
|
|
|
Scrolls one line down.
|
|
|
Scrolls one line left.
|
|
|
Scrolls one line right.
|
|
|
Scrolls one line up.
|
|
|
Scrolls one page down.
|
|
|
Scrolls one page left.
|
|
|
Scrolls one page right.
|
|
|
Scrolls one page up.
|
|
|
Selects a new root node.
|
|
|
Returns a list that contains the type and all attributes of a feature structure (a
|
|
|
Shows all placeholders of hidden attributes and the type of a feature structure.
|
|
|
Updates the options in this canvas to match the application wide options. This is called when the user changes a font, for example.
|
|
|
Called when a wheel event occurs (wheel mice only).
|
|
|
Returns the click region which contains the given point, if any.
|
|
|
A search tree of node addresses.
|
|
|
A pointer to the document containing the node data.
|
|
|
|
|
|
The current X coordinate of the mouse cursor during dragging.
|
|
|
The current Y coordinate of the mouse cursor during dragging.
|
|
|
Pointer to the node that is currently marked by the finder.
|
|
|
Pointer to the horizontal scrollbar. Note: The scrollbar is managed by the parent widget. |
|
|
Pointer to the currently highlighted node.
|
|
|
The node the user clicked on last.
|
|
|
The total size of a structure or a tree.
|
|
|
The current X offset to the top left corner of the structure.
|
|
|
The current Y offset to the top left corner of the structure.
|
|
|
The old X offset (used during dragging of a structure).
|
|
|
The old Y offset (used during dragging of a structure).
|
|
|
The local (window-specifc) copy of the application options. This allows users to change some options without affecting other windows. |
|
|
The painter object.
|
|
|
Pointer to the popup menu currently open (or
|
|
|
Determines whether nodes should actually drawn or not. This way, the actual drawing routines can be used to determine the size of a node (and all its subnodes), without actually drawing the node. |
|
|
The root node of the structure or the tree.
|
|
|
All click regions are kept in this list to allow mapping between click regions and nodes.
|
|
|
Pointer to the vertical scrollbar. Note: The scrollbar is managed by the parent widget. |
1.3