GraphTool
1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
|
#include <graph_model_item.h>
Public Types | |
enum | column_index { NAME, DEPENDENCIES, DEPENDENTS, MODULES, FILES, DEGREE, CIRCULAR, SELF_REF, XPOS, YPOS, ABSOLUTE, IN_RUN_BLOCK, MEM_TYPE, COLOR, OPACITY, EDGE_COLOR, EDGE_OPACITY, NUM_COLS } |
Public Member Functions | |
GraphModelItem (GraphModelItem *parent=0) | |
If this is not in a tree, you can leave the parent as 0. | |
void | appendChild (GraphModelItem *child) |
Append a child to this node. | |
GraphModelItem * | child (int row) |
Returns a specific child (the one identified by row number row) of this node. | |
GraphModelItem * | parent () |
Returns the parent of this node. | |
int | childCount () const |
Return the number of child columns in this node. | |
int | columnCount () const |
Return the number of columns in this node (see the num above. | |
int | row () const |
Return the row number this node has. | |
virtual QVariant | data (int column) const |
Fetch a specific property (column, see the Enum above) for this node. | |
void | set_xy (int x, int y) |
Set the x,y coordinate properties for this node. | |
void | set_circular (bool circular) |
bool | circular () const |
void | set_num_of_modules (uint) |
Set the number of modules for this item. | |
void | set_degree (uint) |
Set the degree of this item. | |
void | set_num_of_files (uint) |
Set the number of files for this item. | |
void | set_opacity (int opacity) |
void | set_color (QColor color) |
void | set_edge_opacity (int opacity) |
void | set_edge_color (QColor color) |
void | set_mem_type (std::string type) |
Protected Attributes | |
GraphModelItem * | parent_item_ |
An item representing a single vertex in the graph model.
In QT speak a single vertex represents a single row in the matrix of the data model.
The model can hold either a general graph vertices or tree vertices, all depending on how the model is instantiated. If in "tree mode" a vertex has a parent (and possibly children). See individual method documentation for tree or non-tree usage.
These are the "columns" of the data item (row). These are the fields that we currently expose to the GUI via the data model. Any GUI element can request these fields and retrieve the data back.
bool GraphModelItem::circular | ( | ) | const |
Retrieve whether this node has been seen before in the tree or in the graph.
void GraphModelItem::set_circular | ( | bool | circular | ) |
In our model the circular property is set whenever we have seen this node before.
void GraphModelItem::set_mem_type | ( | std::string | type | ) |
If this item represents a dependency, used to set dependency type.
type | the type of dependency this item represents (Dependency::DependencyType enum value) |