Overview     Modules     Class Hierarchy     Classes     Members  

tlp::BaseGraphicsViewComponent Class Reference

#include <BaseGraphicsViewComponent.h>

Inheritance diagram for tlp::BaseGraphicsViewComponent:
Collaboration diagram for tlp::BaseGraphicsViewComponent:

List of all members.

Public Slots

  • virtual void setGraph (Graph *graph)
    Sets the Graph on this View.
  • virtual void draw ()
    Draws the View from scratch, i.e. reading the Graph, and drawind all the nodes and edges depending on their position, colors, etc... This drawing is then stored to be re-used when a refresh is all you need. Then, the interactors are drawn. This is pretty resource-hungry, if you just need to redraw the interactors or only the selection changed, use refresh.
  • virtual void refresh ()
    Refreshes the view, using the backed up drawing that draw stored. Then the interactors are drawn. This is usefull when the selection changed, but nothing else in the Graph changed (color, size, layout, ...), or when an interactor changed and needs re-drawing. This is way less resource-hungry than draw().
  • virtual void init ()
    Centers and draws the view. Calls centerview() [where applicable], then draw(). This might be removed in a future version (3.6 or later) as all this does is calling centerview on the GlMainWidget if this is a GlMainView. Adding a centerView function in View would allow to remove this function.
  • virtual void elementSelectedSlot (unsigned int, bool)

Public Member Functions

Protected Slots

Protected Attributes


Constructor & Destructor Documentation

tlp::BaseGraphicsViewComponent::BaseGraphicsViewComponent ( const std::string &  realViewName  ) 
virtual tlp::BaseGraphicsViewComponent::~BaseGraphicsViewComponent (  )  [virtual]

Member Function Documentation

virtual QWidget* tlp::BaseGraphicsViewComponent::construct ( QWidget *  parent  )  [virtual]

Construct the abstract view

Warning:
If you want to inherit from it, you must call AbstractView::construct(QWidget *) in your new construct function

Reimplemented from tlp::AbstractView.

virtual bool tlp::BaseGraphicsViewComponent::createPicture ( const std::string &  pictureName,
int  width,
int  height,
bool  center,
int  zoom = 1,
int  xOffset = 0,
int  yOffset = 0 
) [inline, virtual]

Take a snapshot of the view, and save it to a picture on disk.

Deprecated:
In Tulip 4.x.y this function will be replaced by bool savePicture(const string &pictureName,int width, int height, bool center, int zoom, int xOffset, int yOffset).
Parameters:
pictureName : filename to use for the picture, with extension (extension is used to infer image type).
width : width of the picture
height : height of the picture
center : whether we should center the view before creating the picture, or use the current zoom and pan.
zoom : creates a picture of a sub part of the view. With zoom=1 creates only one picture with entire view; with zoom=N : the view is cut into 2^(N-1) part in width and height. Defaults to 1.
xOffset : which part of the view to render if zoom!=1. xOffset must be 0 <= xOffset < 2^(zoom-1). Defaults to 0.
yOffset : which part of the view to render if zoom!=1. yOffset must be 0 <= yOffset < 2^(zoom-1). Defaults to 0.
Returns:
bool : Whether the picture can be created or not.

Reimplemented from tlp::View.

virtual void tlp::BaseGraphicsViewComponent::createPicture ( const std::string &  pictureName,
int  width = 0,
int  height = 0 
) [inline, virtual]

Take a snapshot of the view and put it in a picture.

Deprecated:
In Tulip 4.x.y this function will be replaced by void createPicture(const string &pictureName,int width, int height, bool center, int zoom, int xOffset, int yOffset)
Parameters:
pictureName filename to use for the picture, with extension (extension is used to infer image type).
width width of the picture Defaults to 0.
height height of the picture Defaults to 0.
Returns:
void

Reimplemented from tlp::View.

virtual void tlp::BaseGraphicsViewComponent::draw (  )  [virtual, slot]

Draws the View from scratch, i.e. reading the Graph, and drawind all the nodes and edges depending on their position, colors, etc... This drawing is then stored to be re-used when a refresh is all you need. Then, the interactors are drawn. This is pretty resource-hungry, if you just need to redraw the interactors or only the selection changed, use refresh.

Returns:
void

Implements tlp::View.

virtual void tlp::BaseGraphicsViewComponent::elementSelectedSlot ( unsigned  int,
bool   
) [virtual, slot]
virtual void tlp::BaseGraphicsViewComponent::getData ( Graph **  graph,
DataSet *  dataSet 
) [inline, virtual]

Gets the Graph and DataSet of the view.

Parameters:
graph A pointer whose value will be modified to point to the Graph* of the view.
dataSet A pointer whose value will be modified to point to the DataSet of the view.
Returns:
void

Implements tlp::View.

virtual Graph* tlp::BaseGraphicsViewComponent::getGraph (  )  [inline, virtual]

A getter on this view's Graph.

Returns:
:Graph* The Graph this View displays.

Implements tlp::View.

virtual std::list<Interactor *> tlp::BaseGraphicsViewComponent::getInteractors (  )  [inline, virtual]

Return interactors of this view

Reimplemented from tlp::AbstractView.

virtual std::string tlp::BaseGraphicsViewComponent::getRealViewName (  )  const [virtual]

Return the real view name (if "" the real name is the name given by the plugin).

Returns:
:string the View's real name.

Reimplemented from tlp::View.

void tlp::BaseGraphicsViewComponent::hideOverview ( bool   )  [protected, slot]
virtual void tlp::BaseGraphicsViewComponent::init (  )  [virtual, slot]

Centers and draws the view. Calls centerview() [where applicable], then draw(). This might be removed in a future version (3.6 or later) as all this does is calling centerview on the GlMainWidget if this is a GlMainView. Adding a centerView function in View would allow to remove this function.

Returns:
void

Implements tlp::View.

virtual void tlp::BaseGraphicsViewComponent::refresh (  )  [virtual, slot]

Refreshes the view, using the backed up drawing that draw stored. Then the interactors are drawn. This is usefull when the selection changed, but nothing else in the Graph changed (color, size, layout, ...), or when an interactor changed and needs re-drawing. This is way less resource-hungry than draw().

Returns:
void

Implements tlp::View.

virtual void tlp::BaseGraphicsViewComponent::setActiveInteractor ( Interactor interactor  )  [inline, virtual]

Set active interactor on this view

Reimplemented from tlp::AbstractView.

virtual void tlp::BaseGraphicsViewComponent::setData ( Graph *  graph,
DataSet  dataSet 
) [inline, virtual]

Set the View's Graph and DataSet.

Parameters:
graph The view's new Graph.
dataSet The view's new DataSet.
Returns:
void

Implements tlp::View.

virtual void tlp::BaseGraphicsViewComponent::setGraph ( Graph *  graph  )  [inline, virtual, slot]

Sets the Graph on this View.

Parameters:
graph the new Graph to be displayed by this View.
Returns:
void

Implements tlp::View.

virtual void tlp::BaseGraphicsViewComponent::setInteractors ( const std::list< Interactor * > &  interactorsList  )  [inline, virtual]

Set all interactors available forthis view Interactors are create (allocate) but now view have responsibility of her destruction

Reimplemented from tlp::AbstractView.

void tlp::BaseGraphicsViewComponent::setVisibleOverview ( bool   )  [protected, slot]

Member Data Documentation



Tulip Software by LaBRI Visualization Team    2001 - 2011