Public Slots | |
void | saveSlot () |
Called when the user clicked on the File|Save menu item. | |
void | redrawSlot () |
Repaints the contents of the Canvas object, then recalulates the window size (if the 'window fits structure size' option is turned on). | |
void | toggleFitSlot (void) |
Toggles the 'window fits structure size' option, then repaints the window. | |
void | toggleShowHiddenSlot (void) |
Toggles the 'show hidden nodes' option, then repaints the window. | |
void | toggleHighlightSlot (void) |
Toggles the 'highlight structures' option, then repaints the window. | |
void | expandReentranciesSlot () |
Calls expandReentrancies , then repaints the window. | |
void | quitWindowSlot () |
Closes the window. | |
void | showTreeSlot () |
Switches the display mode to show a tree (if tree data is available. | |
void | showStructureSlot () |
Switches the display mode to show a structure. | |
void | showStructureNewWindowSlot () |
Opens a new ViewCanvas window, then shows the document displayed in the current window in the new window as a structure. | |
void | showTreeNewWindowSlot () |
Opens a new ViewCanvas window, then shows the document displayed in the current window in the new window as a tree (if tree data is available. | |
void | printSlot () |
Prints the contents of this window. | |
void | searchSlot () |
Opens a find dialog. | |
void | findSlot () |
Starts a new search with the argument entered in the find dialog. | |
void | findNextSlot () |
Finds the next occurence of a search term. | |
void | cancelSearchSlot () |
Closes the find dialog and deletes the current Finder isnatnce. | |
void | resetStructureSlot () |
Resets the structure so that it is displayed in the way it was sent by the backend (with respect to expanded nodes, hidden nodes etc.). | |
void | hideUnhidePopupSlot () |
Called in response to a user's hide/unhide node request in a popup menu. | |
void | expandLocalPopupSlot () |
Called in response to a user's expand reentrancy request in a popup menu. | |
void | optionsSlot () |
Shows the options dialog. | |
void | raiseMainWindowSlot (void) |
Raises the main window (shows the main window on top of all other windows). | |
void | previousStructureSlot (void) |
Shows the previous document in the list of available documents. | |
void | nextStructureSlot (void) |
Shows the previous document in the list of available documents. | |
void | renderLatexSlot (void) |
Writes the currently selected data package to a LaTeX file. | |
Signals | |
void | redrawSignal () |
This signal is emitted when the window must be repainted. | |
void | previousStructureSignal (ViewCanvas *replace) |
This signal is raised when the previous available structure is to be shown on user request. | |
void | nextStructureSignal (ViewCanvas *replace) |
This signal is raised when the next available structure is to be shown on user request. | |
void | closing (ViewCanvas *thisWindow) |
Emitted when this window closes. | |
Public Member Functions | |
ViewCanvas (Document *d, int what, Options *op, QWidget *parent=0, const char *name=0) | |
The constructor sets up the view window. | |
~ViewCanvas () | |
Destroys this window, and all dependent windows (find dialogs, for example). | |
virtual void | resizeEvent (QResizeEvent *ev) |
Called in reponse to a resize event. | |
void | redraw () |
Redraws this window. | |
void | expandReentrancies (GenericNode *node, NodeAddress addr, QList< int > *expRef) |
Expands the first occurrence of any reentrancy within a structure. | |
void | expandReentranciesTreeNode (TreeNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a TreeNode. | |
void | expandReentranciesStrucNode (StrucNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a StrucNode. | |
void | expandReentranciesFeatvalNode (FeatvalNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a FeatvalNode. | |
void | expandReentranciesListNode (ListNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a ListNode. | |
void | expandReentranciesTailNode (TailNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a TailNode. | |
void | expandReentranciesSetNode (SetNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a SetNode. | |
void | expandReentranciesRestNode (RestNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a RestNode. | |
void | expandReentranciesRefNode (RefNode *node, NodeAddress addr, QList< int > *expRef) |
Expands a RefNode. | |
void | expandReentranciesFunctionNode (FunctionNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a FunctionNode. | |
void | expandReentranciesRelationNode (RelationNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a RelationNode. | |
void | expandReentranciesDisjunctionNode (DisjunctionNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a DisjunctionNode. | |
void | expandReentranciesConjunctionNode (ConjunctionNode *node, NodeAddress addr, QList< int > *expRef) |
Expands all RefNodes that occur in operands of a ConjunctionNode. | |
bool | showsDoc (Document *doc) |
Tests whether this windows displays the given document. | |
void | contextMenuSearch (char *searchTerm, const NodeAddress addr) |
Called when the user issued a search command from a context menu. | |
void | setStatusBarMessage (const char *message) |
Changes the status bar message. | |
Public Attributes | |
Canvas * | canvas |
A pointer to the Canvas that does the actual drawing. | |
ScrollCanvas * | scrollCanvas |
Takes care of scrollbars. | |
int | showing |
The current display mode of the data (structure or tree). | |
KStatusBar * | statusBar |
The status bar. | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *ce) |
Closes this window and emits a closing signal. | |
Private Member Functions | |
void | saveStructure (void) |
Saves the current structure or tree after prompting the user for the file name. | |
Private Attributes | |
Q_OBJECT Document * | document |
The document displayed in this ViewCanvas. | |
Options * | options |
An instance of the Options class that specifies the user-set visible properties. | |
Finder * | finder |
An instance of a Finder instance, if the user issued a "find structure" command. | |
KMenuBar * | menuBar |
The main menu. | |
QPopupMenu * | fileMenu |
The file menu. | |
QPopupMenu * | editMenu |
The edit menu. | |
QPopupMenu * | dataMenu |
The data menu. | |
QPopupMenu * | optionsMenu |
The options menu. | |
QPopupMenu * | windowMenu |
The window menu. | |
KToolBar * | mainToolBar |
The main toolbar. | |
StrucFindDialog * | findDlg |
If a structure find dialog was opened by the user, this points to the instance of the dialog, otherwise NULL . |
The ViewCanvas class is one of the two central user interface classes in Grisu. The secondary windows that display feature structures or trees are instances of ViewCanvas. All user interactions with menus and toolbars are handled in this class.
|
The constructor sets up the view window. It initializes the menus and toolbars and creates a ScrollCanvas which in turn contains a Canvas, which takes care of the actual displaying of structures and trees.
|
|
Destroys this window, and all dependent windows (find dialogs, for example).
|
|
Closes the find dialog and deletes the current
|
|
Closes this window and emits a
|
|
Emitted when this window closes. This is used to notify Grisu's main window, which maintains a list of all open ViewCanvas windows, that this window was closed.
|
|
Called when the user issued a search command from a context menu. This will start a search beginning at the node the user clicked on.
|
|
Called in response to a user's expand reentrancy request in a popup menu.
|
|
Expands the first occurrence of any reentrancy within a structure.
|
|
Expands all RefNodes that occur in operands of a ConjunctionNode.
|
|
Expands all RefNodes that occur in operands of a DisjunctionNode.
|
|
Expands all RefNodes that occur in operands of a FeatvalNode.
|
|
Expands all RefNodes that occur in operands of a FunctionNode.
|
|
Expands all RefNodes that occur in operands of a ListNode.
|
|
Expands a RefNode.
If the node ID of this RefNode isn't in the
|
|
Expands all RefNodes that occur in operands of a RelationNode.
|
|
Expands all RefNodes that occur in operands of a RestNode.
|
|
Expands all RefNodes that occur in operands of a SetNode.
|
|
Calls
|
|
Expands all RefNodes that occur in operands of a StrucNode.
|
|
Expands all RefNodes that occur in operands of a TailNode.
|
|
Expands all RefNodes that occur in operands of a TreeNode.
|
|
Finds the next occurence of a search term.
|
|
Starts a new search with the argument entered in the find dialog.
|
|
Called in response to a user's hide/unhide node request in a popup menu.
|
|
This signal is raised when the next available structure is to be shown on user request.
|
|
Shows the previous document in the list of available documents.
If tree data is available, the document is displayed as a tree, otherwise as a structure (unless the document explictly overrides this by specifying |
|
Shows the options dialog.
|
|
This signal is raised when the previous available structure is to be shown on user request.
|
|
Shows the previous document in the list of available documents.
If tree data is available, the document is displayed as a tree, otherwise as a structure (unless the document explictly overrides this by specifying |
|
Prints the contents of this window.
|
|
Closes the window.
|
|
Raises the main window (shows the main window on top of all other windows).
|
|
Redraws this window.
Does nothing but emit a |
|
This signal is emitted when the window must be repainted.
|
|
Repaints the contents of the Canvas object, then recalulates the window size (if the 'window fits structure size' option is turned on).
|
|
Writes the currently selected data package to a LaTeX file.
|
|
Resets the structure so that it is displayed in the way it was sent by the backend (with respect to expanded nodes, hidden nodes etc.).
|
|
Called in reponse to a resize event.
|
|
Called when the user clicked on the File|Save menu item.
|
|
Saves the current structure or tree after prompting the user for the file name.
|
|
Opens a find dialog.
|
|
Changes the status bar message.
|
|
Tests whether this windows displays the given document.
|
|
Opens a new ViewCanvas window, then shows the document displayed in the current window in the new window as a structure.
|
|
Switches the display mode to show a structure.
|
|
Opens a new ViewCanvas window, then shows the document displayed in the current window in the new window as a tree (if tree data is available. If there is no tree data, a structure is displayed instead). |
|
Switches the display mode to show a tree (if tree data is available. If there is no tree data, a structure is displayed instead). |
|
Toggles the 'window fits structure size' option, then repaints the window.
|
|
Toggles the 'highlight structures' option, then repaints the window.
|
|
Toggles the 'show hidden nodes' option, then repaints the window.
|
|
A pointer to the Canvas that does the actual drawing.
|
|
The data menu.
|
|
The document displayed in this ViewCanvas.
|
|
The edit menu.
|
|
The file menu.
|
|
If a structure find dialog was opened by the user, this points to the instance of the dialog, otherwise
|
|
An instance of a Finder instance, if the user issued a "find structure" command.
Otherwise, this is |
|
The main toolbar.
|
|
The main menu.
|
|
An instance of the Options class that specifies the user-set visible properties.
|
|
The options menu.
|
|
Takes care of scrollbars.
|
|
The current display mode of the data (structure or tree).
|
|
The status bar.
|
|
The window menu.
|