List of Widgets and Usage


Signal and Slot interface

Each widget which is described in the next section is designed such that it can be used like any other standard Qt-Widget.
Some widgets use ROSE data structures ( see ROSE specific widgets), some don't ( General widgets ). These general widgets are used as super-classes for the ROSE-widgets.

All ROSE-specific widgets can handle/display SgNode's and have some common signals and slots. There are two SgNode "input"-functions (slots) and two "output"-functions (signals) which every ROSE-widget should have. The link mechanism (see MDI-Widget-Creator Interface) uses these signals/slots to connect two ROSE-widgets together.

Normally setNode() is connected with nodeActivated() and gotoNode() with nodeActivatedAlt()

Drag & Drop Interface

Additionally to the signal and slot mechanism, the SgNode's can be exchanged from window-to window by drag & drop. The exchange of data via D&D is handled by mime-data. There are some convenience functions to build QMimeData objects out of SgNode's in the file SageMimeData.h
Theses functions can use the annotations created by the AsmToSourceMapper to put also the associated SgNode's of the linked Binary/Source Tree in the QMimeData object.
see also Implementation Guide for own ROSE-widgets

Filter for SgNode's

Some of the widgets have a function called setFilter() which can be used to show only part's of the AST. For a more detailed documentation see AstFilterInterface and the derived classes.
To set a filter for a widget, create a new AstFilter on the heap (possibly combine them with AstFilterAnd, and pass the pointer to the filter to setFilter(). The class should take ownership of the filter and free it when it's not needed any more.

General widgets

Widgets which are used as base-classes for ROSE specific widgets

ROSE specific widgets

MDI-Widget-Creator Interface

There is a common mechanism for creating all these ROSE-specific widgets and give the user the possibility to link them together. As an example you can look at the MdiView of the RoseQt GUI which uses this mechanism. The Mechanism described below is responsible for creating new widgets, and the custom link-menu in the top-left of each sub-widget.

You can use this mechanism in your GUI by creating a SubWindowFactory which is a QMdiArea. For a more detailed description see the documentation of SubWindowFactory and WidgetCreatorInterface.

Generated on Tue Sep 15 14:48:47 2009 for RoseQtWidgets by  doxygen 1.4.7