Overview     Modules     Class Hierarchy     Classes     Members  

GlMainWidget Class Reference
[Tulip_Widgets]

#include <GlMainWidget.h>

List of all members.

Public Slots

Signals

Public Member Functions

  • GlMainWidget (QWidget *parent=NULL, const char *name=NULL)
  • ~GlMainWidget ()
  • void doSelect (const int x, const int y, const int width, const int height, std::vector< tlp::node > &sNode, std::vector< tlp::edge > &sEdge, tlp::GlLayer *layer=NULL)
    select nodes and edges in a region of the screen
  • bool doSelect (const int x, const int y, tlp::ElementType &type, tlp::node &, tlp::edge &, tlp::GlLayer *layer=NULL)
    select a node or edge at a point select either a node or edge at point (x,y)
  • unsigned char * getImage ()
  • bool outputEPS (int size, int doSort, const char *filename)
  • bool outputSVG (int size, const char *filename)
  • bool isDrawing ()
  • void stopDrawing ()
  • void waitDrawing ()
  • bool selectGlEntities (const int x, const int y, const int width, const int height, std::vector< tlp::GlEntity * > &pickedEntities, tlp::GlLayer *layer=NULL)
  • bool selectGlEntities (const int x, const int y, std::vector< tlp::GlEntity * > &pickedEntities, tlp::GlLayer *layer=NULL)
  • tlp::Iterator
    < tlp::GWInteractor * > * getInteractors () const
  • virtual QImage grabFrameBuffer (bool withAlpha=false)
  • tlp::GlScene * getScene ()
  • void setViewLabel (bool viewLabel)
  • virtual void makeCurrent ()
  • GlMainWidget (QWidget *parent=NULL, const char *name=NULL)
  • ~GlMainWidget ()
  • void doSelect (const int x, const int y, const int width, const int height, std::vector< tlp::node > &sNode, std::vector< tlp::edge > &sEdge, tlp::GlLayer *layer=NULL)
    select nodes and edges in a region of the screen
  • bool doSelect (const int x, const int y, tlp::ElementType &type, tlp::node &, tlp::edge &, tlp::GlLayer *layer=NULL)
    select a node or edge at a point select either a node or edge at point (x,y)
  • unsigned char * getImage ()
  • bool outputEPS (int size, int doSort, const char *filename)
  • bool outputSVG (int size, const char *filename)
  • bool isDrawing ()
  • void stopDrawing ()
  • void waitDrawing ()
  • bool selectGlEntities (const int x, const int y, const int width, const int height, std::vector< tlp::GlEntity * > &pickedEntities, tlp::GlLayer *layer=NULL)
  • bool selectGlEntities (const int x, const int y, std::vector< tlp::GlEntity * > &pickedEntities, tlp::GlLayer *layer=NULL)
  • tlp::Iterator
    < tlp::GWInteractor * > * getInteractors () const
  • virtual QImage grabFrameBuffer (bool withAlpha=false)
  • tlp::GlScene * getScene ()
  • void setViewLabel (bool viewLabel)
  • virtual void makeCurrent ()

Protected Slots


Constructor & Destructor Documentation

GlMainWidget::GlMainWidget ( QWidget *  parent = NULL,
const char *  name = NULL 
)

GlMainWidget::~GlMainWidget (  ) 

GlMainWidget::GlMainWidget ( QWidget *  parent = NULL,
const char *  name = NULL 
)

GlMainWidget::~GlMainWidget (  ) 


Member Function Documentation

void GlMainWidget::doSelect ( const int  x,
const int  y,
const int  width,
const int  height,
std::vector< tlp::node > &  sNode,
std::vector< tlp::edge > &  sEdge,
tlp::GlLayer *  layer = NULL 
)

select nodes and edges in a region of the screen

select all nodes and edges lying in the area of the screen of given width and height, and with its upper-left corner at (x,y)

Parameters:
sNode filled by the method with the nodes found in the region
sEdge filled by the method with the edges found in the region

bool GlMainWidget::doSelect ( const int  x,
const int  y,
tlp::ElementType &  type,
tlp::node &  ,
tlp::edge &  ,
tlp::GlLayer *  layer = NULL 
)

select a node or edge at a point select either a node or edge at point (x,y)

Parameters:
type tells what has been found: NODE, EDGE
Returns:
true if something has been found, false otherwise

unsigned char* GlMainWidget::getImage (  ) 

Take a snapshot of the Widget

Returns:
an array of dimension width*height*3 char (8bits per color RGB). The pointer has to be freed after (with free, not delete)

bool GlMainWidget::outputEPS ( int  size,
int  doSort,
const char *  filename 
)

bool GlMainWidget::outputSVG ( int  size,
const char *  filename 
)

bool GlMainWidget::isDrawing (  ) 

void GlMainWidget::stopDrawing (  ) 

void GlMainWidget::waitDrawing (  ) 

bool GlMainWidget::selectGlEntities ( const int  x,
const int  y,
const int  width,
const int  height,
std::vector< tlp::GlEntity * > &  pickedEntities,
tlp::GlLayer *  layer = NULL 
)

Function to do picking on entities. It just calls selectEntities on the GlScene instance.

bool GlMainWidget::selectGlEntities ( const int  x,
const int  y,
std::vector< tlp::GlEntity * > &  pickedEntities,
tlp::GlLayer *  layer = NULL 
)

Function to do picking on entities. It just calls selectEntities on the GlScene instance with a small window of twelve pixels.

tlp::Iterator<tlp::GWInteractor *>* GlMainWidget::getInteractors (  )  const

return list of interactor installed on this widget

virtual QImage GlMainWidget::grabFrameBuffer ( bool  withAlpha = false  )  [virtual]

Grab the image of this widget

tlp::GlScene* GlMainWidget::getScene (  )  [inline]

return the scene of this glMainWidget

void GlMainWidget::setViewLabel ( bool  viewLabel  )  [inline]

set if the label is rendered in this widget

virtual void GlMainWidget::makeCurrent (  )  [virtual]

reimplement makeCuurent function of QGLWidget to inform TextureManager and DisplayListManager of context changement

void GlMainWidget::draw (  )  [slot]

Draw the graph, the augmented dispaly and the interactors

void GlMainWidget::redraw (  )  [slot]

That function is given for optimisation purpose. If the hardware enable it, it enables to redraw only the Augmented display and the interactors and not the graph it is really usefull for interactors such as zoom box etc.. Warning, if you change the graph or the porperties of element (Colors, size, etc...) applying that fonction will not display the change, in that case, use the draw function.

void GlMainWidget::closeEvent ( QCloseEvent *  e  )  [slot]

tlp::GWInteractor::ID GlMainWidget::pushInteractor ( tlp::GWInteractor interactor  )  [slot]

install a clone of the interactor as event filter and assign the returned id

void GlMainWidget::popInteractor (  )  [slot]

remove the last added interactor from the event filters list and delete it

void GlMainWidget::removeInteractor ( tlp::GWInteractor::ID  id  )  [slot]

remove the interactor with id from the event filters list and delete it

tlp::GWInteractor::ID GlMainWidget::resetInteractors ( tlp::GWInteractor interactor = NULL  )  [slot]

remove all interactors and delete them, push a new one if any

std::vector<tlp::GWInteractor::ID> GlMainWidget::resetInteractors ( const std::vector< tlp::GWInteractor * > &  interactors  )  [slot]

remove all iteractors and delete them, then install clones of the interactors

void GlMainWidget::closing ( GlMainWidget ,
QCloseEvent *   
) [signal]

void GlMainWidget::graphRedrawn ( GlMainWidget glWidget  )  [signal]

void GlMainWidget::paintEvent ( QPaintEvent *   )  [protected, slot]

void GlMainWidget::doSelect ( const int  x,
const int  y,
const int  width,
const int  height,
std::vector< tlp::node > &  sNode,
std::vector< tlp::edge > &  sEdge,
tlp::GlLayer *  layer = NULL 
)

select nodes and edges in a region of the screen

select all nodes and edges lying in the area of the screen of given width and height, and with its upper-left corner at (x,y)

Parameters:
sNode filled by the method with the nodes found in the region
sEdge filled by the method with the edges found in the region

bool GlMainWidget::doSelect ( const int  x,
const int  y,
tlp::ElementType &  type,
tlp::node &  ,
tlp::edge &  ,
tlp::GlLayer *  layer = NULL 
)

select a node or edge at a point select either a node or edge at point (x,y)

Parameters:
type tells what has been found: NODE, EDGE
Returns:
true if something has been found, false otherwise

unsigned char* GlMainWidget::getImage (  ) 

Take a snapshot of the Widget

Returns:
an array of dimension width*height*3 char (8bits per color RGB). The pointer has to be freed after (with free, not delete)

bool GlMainWidget::outputEPS ( int  size,
int  doSort,
const char *  filename 
)

bool GlMainWidget::outputSVG ( int  size,
const char *  filename 
)

bool GlMainWidget::isDrawing (  ) 

void GlMainWidget::stopDrawing (  ) 

void GlMainWidget::waitDrawing (  ) 

bool GlMainWidget::selectGlEntities ( const int  x,
const int  y,
const int  width,
const int  height,
std::vector< tlp::GlEntity * > &  pickedEntities,
tlp::GlLayer *  layer = NULL 
)

Function to do picking on entities. It just calls selectEntities on the GlScene instance.

bool GlMainWidget::selectGlEntities ( const int  x,
const int  y,
std::vector< tlp::GlEntity * > &  pickedEntities,
tlp::GlLayer *  layer = NULL 
)

Function to do picking on entities. It just calls selectEntities on the GlScene instance with a small window of twelve pixels.

tlp::Iterator<tlp::GWInteractor *>* GlMainWidget::getInteractors (  )  const

return list of interactor installed on this widget

virtual QImage GlMainWidget::grabFrameBuffer ( bool  withAlpha = false  )  [virtual]

Grab the image of this widget

tlp::GlScene* GlMainWidget::getScene (  )  [inline]

return the scene of this glMainWidget

void GlMainWidget::setViewLabel ( bool  viewLabel  )  [inline]

set if the label is rendered in this widget

virtual void GlMainWidget::makeCurrent (  )  [virtual]

reimplement makeCuurent function of QGLWidget to inform TextureManager and DisplayListManager of context changement

void GlMainWidget::draw (  )  [slot]

Draw the graph, the augmented dispaly and the interactors

void GlMainWidget::redraw (  )  [slot]

That function is given for optimisation purpose. If the hardware enable it, it enables to redraw only the Augmented display and the interactors and not the graph it is really usefull for interactors such as zoom box etc.. Warning, if you change the graph or the porperties of element (Colors, size, etc...) applying that fonction will not display the change, in that case, use the draw function.

void GlMainWidget::closeEvent ( QCloseEvent *  e  )  [slot]

tlp::GWInteractor::ID GlMainWidget::pushInteractor ( tlp::GWInteractor interactor  )  [slot]

install a clone of the interactor as event filter and assign the returned id

void GlMainWidget::popInteractor (  )  [slot]

remove the last added interactor from the event filters list and delete it

void GlMainWidget::removeInteractor ( tlp::GWInteractor::ID  id  )  [slot]

remove the interactor with id from the event filters list and delete it

tlp::GWInteractor::ID GlMainWidget::resetInteractors ( tlp::GWInteractor interactor = NULL  )  [slot]

remove all interactors and delete them, push a new one if any

std::vector<tlp::GWInteractor::ID> GlMainWidget::resetInteractors ( const std::vector< tlp::GWInteractor * > &  interactors  )  [slot]

remove all iteractors and delete them, then install clones of the interactors

void GlMainWidget::closing ( GlMainWidget ,
QCloseEvent *   
) [signal]

void GlMainWidget::graphRedrawn ( GlMainWidget glWidget  )  [signal]

void GlMainWidget::paintEvent ( QPaintEvent *   )  [protected, slot]



Tulip Software by LaBRI Visualization Team    2001 - 2008