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.
- ItemTreeNode
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. - ItemTreeModel
AstBrowserWidget which uses RoseTreeView
Call Graph View
If you are planning to implement widgets which use Tree/Graph drawing on a QGraphicsView the following classes may help you:
- DisplayNode
Class for drawing a Node on a QGraphicsScene each node may have a caption and an SgNode associated to it.
DisplayEdge
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
- DisplayGraphNode
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
- DisplayTreeNode
A DisplayNode used to manage a tree.
A DisplayTreeNode is a DisplayGraphNode which has only outputEdges (children) and a dedicated inputEdge (parent)
Filtering mechanism for AST's which is supported in many ROSE widgets, to display only certain parts of the AST.
For a documentation of the filter interface have a look at the following classes
- AbstractFilterInterface
Abstract Base class for all AstFilters\.
A 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.
- AstFilterAll
AstFilter which always displays all node's (no-filter). - AstFilterAnd
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
- AstFilterFileByName
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)
- AstFilterFileById
Filters an AST by FileId.
Filters out all SgNode's which have a different file-id than the given one
- AstFilterMetricAttributeByThreshold
Filtering by MetricAttribute.
There are script for automatic Makefile.am generation in src/roseExtension/qtWidgets/scripts
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 src/roseExtension/qtWidgets/cmakeEnvironment
Generated on Tue Sep 15 14:48:47 2009 for RoseQtWidgets by
1.4.7