libyui  3.0.10
YGraph Class Reference
Inheritance diagram for YGraph:
Collaboration diagram for YGraph:

List of all members.

Public Member Functions

virtual ~YGraph ()
virtual const char * widgetClass () const
virtual bool setProperty (const std::string &propertyName, const YPropertyValue &val)
virtual YPropertyValue getProperty (const std::string &propertyName)
virtual const YPropertySetpropertySet ()
std::string filename () const
virtual void setFilename (const std::string &filename)
std::string layoutAlgorithm () const
virtual void setLayoutAlgorithm (const std::string &filename)
virtual void setGraph (void *graph)
virtual std::string activatedNode () const

Protected Member Functions

 YGraph (YWidget *parent, const std::string &filename, const std::string &layoutAlgorithm)
 YGraph (YWidget *parent, void *graph)
virtual void renderGraph (const std::string &filename, const std::string &layoutAlgorithm)=0
virtual void renderGraph (void *graph)=0

Detailed Description

Definition at line 43 of file YGraph.h.


Constructor & Destructor Documentation

YGraph::YGraph ( YWidget parent,
const std::string &  filename,
const std::string &  layoutAlgorithm 
) [protected]

Constructor.

Loads a graph in DOT format from filename and uses the layout algorithm layoutAlgorithm to layout and then render the graph. The layout algorithm can be any string accepted by the function gvLayout from graphviz, e.g. "dot" or "neato".

Definition at line 44 of file YGraph.cc.

Here is the call graph for this function:

YGraph::YGraph ( YWidget parent,
void *  graph 
) [protected]

Constructor.

Renders the graph. The graph must already contain layout information.

Definition at line 53 of file YGraph.cc.

Here is the call graph for this function:

YGraph::~YGraph ( ) [virtual]

Destructor.

Definition at line 62 of file YGraph.cc.


Member Function Documentation

std::string YGraph::activatedNode ( ) const [virtual]

Return name of activated node. Activation can happen due to e.g. single right mouse click (context menu) or double left mouse click.

Definition at line 106 of file YGraph.cc.

std::string YGraph::filename ( ) const

Return the filename that describes the graph.

Definition at line 69 of file YGraph.cc.

YPropertyValue YGraph::getProperty ( const std::string &  propertyName) [virtual]

Get a property. Reimplemented from YWidget.

This method may throw YUIPropertyExceptions.

Reimplemented from YWidget.

Definition at line 151 of file YGraph.cc.

Here is the call graph for this function:

std::string YGraph::layoutAlgorithm ( ) const

Return the layout-algorithm used for the graph.

Definition at line 84 of file YGraph.cc.

const YPropertySet & YGraph::propertySet ( ) [virtual]

Return this class's property set. This also initializes the property upon the first call.

Reimplemented from YWidget.

Reimplemented from YWidget.

Definition at line 113 of file YGraph.cc.

Here is the call graph for this function:

virtual void YGraph::renderGraph ( const std::string &  filename,
const std::string &  layoutAlgorithm 
) [protected, pure virtual]

Render the graph from the filename. Derived classes are required to implement this.

virtual void YGraph::renderGraph ( void *  graph) [protected, pure virtual]

Render the graph. Derived classes are required to implement this.

void YGraph::setFilename ( const std::string &  filename) [virtual]

Set the filename that describes the graph and render the graph. Derived classes can reimplent this, but they should call this base class method in the new implementation. Most derived classes only need to implement renderGraph().

Definition at line 76 of file YGraph.cc.

Here is the call graph for this function:

void YGraph::setGraph ( void *  graph) [virtual]

Render the graph. Derived classes can reimplent this, but they should call this base class method in the new implementation. Most derived classes only need to implement renderGraph().

Definition at line 91 of file YGraph.cc.

Here is the call graph for this function:

void YGraph::setLayoutAlgorithm ( const std::string &  filename) [virtual]

Set the layout-algorithm used for the graph. Derived classes can reimplent this, but they should call this base class method in the new implementation.

Definition at line 99 of file YGraph.cc.

Here is the call graph for this function:

bool YGraph::setProperty ( const std::string &  propertyName,
const YPropertyValue val 
) [virtual]

Set a property. Reimplemented from YWidget.

This function may throw YUIPropertyExceptions.

This function returns 'true' if the value was successfully set and 'false' if that value requires special handling (not in error cases: those are covered by exceptions).

Reimplemented from YWidget.

Definition at line 135 of file YGraph.cc.

Here is the call graph for this function:

virtual const char* YGraph::widgetClass ( ) const [inline, virtual]

Returns a descriptive name of this widget class for logging, debugging etc.

Reimplemented from YWidget.

Definition at line 75 of file YGraph.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Friends