Qt provides a powerful Model-View Framework. You should read the documentation for that before looking at the ROSE specific implementations of it: http://doc.qtsoftware.com/4.5/model-view-programming.html
The following two classes are helper classes for implementing the QAbstractItemModel for a tree like datastructure.
Node for building a tree which can be used to implement QAbstractItemModel For usage example see on of the many derived classes.
A similar class is provided now by Qt in the QTreeWidget - consider using QTreeWidget instead of QTreeView.
AstBrowserWidget which uses RoseTreeView
If you are planning to implement widgets which use Tree/Graph drawing on a QGraphicsView the following classes may help you:
Call Graph View
Class for drawing a Node on a QGraphicsScene each node may have a caption and an SgNode associated to it.
Display information for an edge.
used to render a edge, each edge has a source and destination node The nodes notifiy the edge when they have changed position Each edge may have a caption which is printed at the "center" of the edge
Filtering mechanism for AST's which is supported in many ROSE widgets, to display only certain parts of the AST.
Display Information for a Graph Node.
This class currently is used to display CallGraphs Every node is responsible for deleting it's outgoing edges, so that a graph can be cleaned up in a clean way without double free's
A DisplayNode used to manage a tree.
A DisplayTreeNode is a DisplayGraphNode which has only outputEdges (children) and a dedicated inputEdge (parent)
For a documentation of the filter interface have a look at the following classes
There are script for automatic Makefile.am generation in
Abstract Base class for all AstFilters\.
AstFilter can determine which SgNode's should be displayed. Therefore the
displayNode() has to be implemented in each subclass. This function is called by the view's. If it returns false this node and all it's children are not displayed.
AstFilter which always displays all node's (no-filter).
Class to combine two AstFilter's with logical AND.
Pass the two arguments of the AND operation in the constructor this class takes ownership of them, and deletes them when they are not needed any more
Filters an AST by FileName.
Filters out all SgNode's which are not in given file if possible use AstFilterFileById, it uses an int-id instead of the string (faster)
Filters an AST by FileId.
Filters out all SgNode's which have a different file-id than the given one
Filtering by MetricAttribute.
roseQtWidgets can also be build with cmake. Therefore you have to configure ROSE without Qt, install it and build the qtWidgets and the RoseGUI separatly in the folder
Generated on Tue Sep 15 14:48:47 2009 for RoseQtWidgets by