GlGraphWidget Class Reference
[Tulip_Widgets]
#include <GlGraphWidget.h>
List of all members. Public Slots
Signals
Public Member Functions
- GlGraphWidget (QWidget *parent=NULL, const char *name=NULL)
- ~GlGraphWidget ()
- void doSelect (const int x, const int y, const int width, const int height, std::vector< node > &sNode, std::vector< edge > &sEdge)
- select nodes and edges in a region of the screen
- bool doSelect (const int x, const int y, tlp::ElementType &type, node &, edge &)
- 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 ()
- void addGlAugmentedDisplay (tlp::GlAugmentedDisplay *augmentedDisplay, const string &name)
- void removeGlAugmentedDisplay (tlp::GlAugmentedDisplay *augmentedDisplay)
- void removeGlAugmentedDisplay (const string &name)
- tlp::GlAugmentedDisplay * findGlAugmentedDisplay (const std::string &name)
- bool doSelectAugmentedDisplay (const int x, const int y, const int width, const int height, std::vector< std::pair< string, tlp::GlAugmentedDisplay * > > &pickedAugmentedDisplays)
- bool doSelectAugmentedDisplay (const int x, const int y, std::vector< std::pair< string, tlp::GlAugmentedDisplay * > > &pickedAugmentedDisplays)
- const stdext::hash_map< std::string,
GlAugmentedDisplay * > * getAugmentedDisplays ()
- Iterator< GWInteractor * > * getInteractors () const
- virtual QImage grabFrameBuffer (bool withAlpha=false)
Protected Slots
Constructor & Destructor Documentation
| GlGraphWidget::GlGraphWidget |
( |
QWidget * |
parent = NULL, |
|
|
const char * |
name = NULL |
|
) |
|
|
| GlGraphWidget::~GlGraphWidget |
( |
|
) |
|
|
Member Function Documentation
| void GlGraphWidget::addGlAugmentedDisplay |
( |
tlp::GlAugmentedDisplay * |
augmentedDisplay, |
|
|
const string & |
name |
|
) |
|
|
| void GlGraphWidget::closeEvent |
( |
QCloseEvent * |
e |
) |
[slot] |
|
| void GlGraphWidget::closing |
( |
GlGraphWidget * |
, |
|
|
QCloseEvent * |
|
|
) |
[signal] |
|
| bool GlGraphWidget::doSelect |
( |
const int |
x, |
|
|
const int |
y, |
|
|
tlp::ElementType & |
type, |
|
|
node & |
, |
|
|
edge & |
|
|
) |
|
|
|
|
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
|
| void GlGraphWidget::doSelect |
( |
const int |
x, |
|
|
const int |
y, |
|
|
const int |
width, |
|
|
const int |
height, |
|
|
std::vector< node > & |
sNode, |
|
|
std::vector< edge > & |
sEdge |
|
) |
|
|
|
|
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 GlGraphWidget::doSelectAugmentedDisplay |
( |
const int |
x, |
|
|
const int |
y, |
|
|
std::vector< std::pair< string, tlp::GlAugmentedDisplay * > > & |
pickedAugmentedDisplays |
|
) |
|
|
|
|
Function to do picking on augmented displays. It just calls doSelect on the GlADComposite instance with a small window of twelve pixels. |
| bool GlGraphWidget::doSelectAugmentedDisplay |
( |
const int |
x, |
|
|
const int |
y, |
|
|
const int |
width, |
|
|
const int |
height, |
|
|
std::vector< std::pair< string, tlp::GlAugmentedDisplay * > > & |
pickedAugmentedDisplays |
|
) |
|
|
|
|
Function to do picking on augmented displays. It just calls doSelect on the GlADComposite instance. |
| void GlGraphWidget::draw |
( |
|
) |
[slot] |
|
|
|
Draw the graph, the augmented dispaly and the interactors |
| tlp::GlAugmentedDisplay* GlGraphWidget::findGlAugmentedDisplay |
( |
const std::string & |
name |
) |
|
|
| const stdext::hash_map<std::string, GlAugmentedDisplay*>* GlGraphWidget::getAugmentedDisplays |
( |
|
) |
|
|
|
|
Gets the list of augmented displays. |
| unsigned char* GlGraphWidget::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)
|
| Iterator<GWInteractor *>* GlGraphWidget::getInteractors |
( |
|
) |
const |
|
| virtual QImage GlGraphWidget::grabFrameBuffer |
( |
bool |
withAlpha = false |
) |
[virtual] |
|
| void GlGraphWidget::graphRedrawn |
( |
GlGraphWidget * |
glWidget |
) |
[signal] |
|
| bool GlGraphWidget::isDrawing |
( |
|
) |
|
|
| bool GlGraphWidget::outputEPS |
( |
int |
size, |
|
|
int |
doSort, |
|
|
const char * |
filename |
|
) |
|
|
| bool GlGraphWidget::outputSVG |
( |
int |
size, |
|
|
const char * |
filename |
|
) |
|
|
| void GlGraphWidget::paintEvent |
( |
QPaintEvent * |
|
) |
[protected, slot] |
|
| void GlGraphWidget::popInteractor |
( |
|
) |
[slot] |
|
|
|
remove the last added interactor from the event filters list and delete it
|
| GWInteractor::ID GlGraphWidget::pushInteractor |
( |
tlp::GWInteractor * |
interactor |
) |
[slot] |
|
|
|
install a clone of the interactor as event filter and assign the returned id
|
| void GlGraphWidget::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 GlGraphWidget::removeGlAugmentedDisplay |
( |
const string & |
name |
) |
|
|
| void GlGraphWidget::removeGlAugmentedDisplay |
( |
tlp::GlAugmentedDisplay * |
augmentedDisplay |
) |
|
|
|
|
remove the interactor with id from the event filters list and delete it
|
| vector<GWInteractor::ID> GlGraphWidget::resetInteractors |
( |
const std::vector< tlp::GWInteractor * > & |
interactors |
) |
[slot] |
|
|
|
remove all iteractors and delete them, then install clones of the interactors
|
| GWInteractor::ID GlGraphWidget::resetInteractors |
( |
tlp::GWInteractor * |
interactor = NULL |
) |
[slot] |
|
|
|
remove all interactors and delete them, push a new one if any
|
| void GlGraphWidget::stopDrawing |
( |
|
) |
|
|
| void GlGraphWidget::waitDrawing |
( |
|
) |
|
|
|