hpp-plot: hpp::plot::HppNativeGraphWidget Class Reference

hpp-plot 9.0.2 Plotting tools for HPP

Loading...
Searching...
No Matches
Classes | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
hpp::plot::HppNativeGraphWidget Class Reference

Constraint graph viewer using native C++ API. More...

`#include <hpp/plot/hpp-native-graph.hh>`

Inheritance diagram for hpp::plot::HppNativeGraphWidget:
[legend]
Collaboration diagram for hpp::plot::HppNativeGraphWidget:
[legend]

## Public Slots
void | displayStateConstraints (std::size_t id)
| Display detailed state constraints in the constraint panel.
void | displayEdgeConstraints (std::size_t id)
| Display detailed edge constraints in the constraint panel.
void | displayEdgeTargetConstraints (std::size_t id)
| Display edge target constraints in the constraint panel.
Public Slots inherited from hpp::plot::GraphWidget
void | updateGraph ()
void | updateEdges ()
void | saveDotFile ()

## Signals
void | nodeContextMenuAboutToShow (std::size_t nodeId, QString nodeName, QMenu *menu)
| Emitted before showing node context menu, allows external code to add actions.
void | edgeContextMenuAboutToShow (std::size_t edgeId, QString edgeName, QMenu *menu)
| Emitted before showing edge context menu, allows external code to add actions.

## Public Member Functions
| HppNativeGraphWidget (hpp::manipulation::graph::GraphPtr_t graph=nullptr, QWidget *parent=nullptr)
| Constructor.
| ~HppNativeGraphWidget ()
| Destructor.
void | setGraph (hpp::manipulation::graph::GraphPtr_t graph)
| Set graph object and refresh display.
const std::string & | graphName () const
| Get the graph name.
bool | selectionID (std::size_t &id)
| Get currently selected element ID.
void | highlightNode (long nodeId)
| Highlight a specific node (e.g., for current configuration)
void | highlightEdge (long edgeId)
| Highlight a specific edge.
Public Member Functions inherited from hpp::plot::GraphWidget
| GraphWidget (QString name=QString(), QWidget *parent=NULL)
| ~GraphWidget ()

## Protected Slots
void | nodeContextMenu (QGVNode *node) override
void | nodeDoubleClick (QGVNode *node) override
void | edgeContextMenu (QGVEdge *edge) override
void | edgeDoubleClick (QGVEdge *edge) override
void | selectionChanged ()
Protected Slots inherited from hpp::plot::GraphWidget
virtual void | nodeContextMenu (QGVNode *node)
virtual void | nodeDoubleClick (QGVNode *node)
virtual void | edgeContextMenu (QGVEdge *edge)
virtual void | edgeDoubleClick (QGVEdge *edge)

## Protected Member Functions
void | fillScene () override
| Fill scene from Graph object Reads nodes and edges directly from the C++ graph structure.

## Additional Inherited Members
Protected Attributes inherited from hpp::plot::GraphWidget
QGVScene * | scene_
QWidget * | buttonBox_
QTextEdit * | elmtInfo_
QTextEdit * | loggingInfo_
QTextEdit * | constraintInfo_

## Detailed Description

Constraint graph viewer using native C++ API.

This widget displays constraint graphs from hpp-manipulation without requiring CORBA. It reads graph structure directly from the C++ Graph object using the same visualization style as HppManipulationGraphWidget.

## Constructor & Destructor Documentation

## ◆ HppNativeGraphWidget()

hpp::plot::HppNativeGraphWidget::HppNativeGraphWidget | ( | hpp::manipulation::graph::GraphPtr_t | graph = `nullptr`,
|  | QWidget * | parent = `nullptr`
| ) |  |

Constructor.

Parameters

  graph | Shared pointer to manipulation graph (can be nullptr)
  parent | Parent widget

## ◆ ~HppNativeGraphWidget()

hpp::plot::HppNativeGraphWidget::~HppNativeGraphWidget | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ displayEdgeConstraints

void hpp::plot::HppNativeGraphWidget::displayEdgeConstraints | ( | std::size_t | id | ) |
| slot

Display detailed edge constraints in the constraint panel.

## ◆ displayEdgeTargetConstraints

void hpp::plot::HppNativeGraphWidget::displayEdgeTargetConstraints | ( | std::size_t | id | ) |
| slot

Display edge target constraints in the constraint panel.

## ◆ displayStateConstraints

void hpp::plot::HppNativeGraphWidget::displayStateConstraints | ( | std::size_t | id | ) |
| slot

Display detailed state constraints in the constraint panel.

## ◆ edgeContextMenu

void hpp::plot::HppNativeGraphWidget::edgeContextMenu | ( | QGVEdge * | edge | ) |
| overrideprotectedslot

## ◆ edgeContextMenuAboutToShow

void hpp::plot::HppNativeGraphWidget::edgeContextMenuAboutToShow | ( | std::size_t | edgeId,
|  | QString | edgeName,
|  | QMenu * | menu
| ) |  |
| signal

Emitted before showing edge context menu, allows external code to add actions.

Parameters

  edgeId | The ID of the edge
  edgeName | The name of the edge (transition)
  menu | Pointer to the context menu (can add actions before it's shown)

## ◆ edgeDoubleClick

void hpp::plot::HppNativeGraphWidget::edgeDoubleClick | ( | QGVEdge * | edge | ) |
| overrideprotectedslot

## ◆ fillScene()

void hpp::plot::HppNativeGraphWidget::fillScene | ( |  | ) |
| overrideprotectedvirtual

Fill scene from Graph object Reads nodes and edges directly from the C++ graph structure.

Reimplemented from hpp::plot::GraphWidget.

## ◆ graphName()

const std::string & hpp::plot::HppNativeGraphWidget::graphName | ( |  | ) | const
| inline

Get the graph name.

## ◆ highlightEdge()

void hpp::plot::HppNativeGraphWidget::highlightEdge | ( | long | edgeId | ) |

Highlight a specific edge.

Parameters

  edgeId | The ID of the edge to highlight, or -1 to clear

## ◆ highlightNode()

void hpp::plot::HppNativeGraphWidget::highlightNode | ( | long | nodeId | ) |

Highlight a specific node (e.g., for current configuration)

Parameters

  nodeId | The ID of the node to highlight, or -1 to clear

## ◆ nodeContextMenu

void hpp::plot::HppNativeGraphWidget::nodeContextMenu | ( | QGVNode * | node | ) |
| overrideprotectedslot

## ◆ nodeContextMenuAboutToShow

void hpp::plot::HppNativeGraphWidget::nodeContextMenuAboutToShow | ( | std::size_t | nodeId,
|  | QString | nodeName,
|  | QMenu * | menu
| ) |  |
| signal

Emitted before showing node context menu, allows external code to add actions.

Parameters

  nodeId | The ID of the node
  nodeName | The name of the node (state)
  menu | Pointer to the context menu (can add actions before it's shown)

## ◆ nodeDoubleClick

void hpp::plot::HppNativeGraphWidget::nodeDoubleClick | ( | QGVNode * | node | ) |
| overrideprotectedslot

## ◆ selectionChanged

void hpp::plot::HppNativeGraphWidget::selectionChanged | ( |  | ) |
| protectedslot

## ◆ selectionID()

bool hpp::plot::HppNativeGraphWidget::selectionID | ( | std::size_t & | id | ) |

Get currently selected element ID.

Parameters

  [out] | id | The ID of the selected element

Returns
  true if an element is selected, false otherwise

## ◆ setGraph()

void hpp::plot::HppNativeGraphWidget::setGraph | ( | hpp::manipulation::graph::GraphPtr_t | graph | ) |

Set graph object and refresh display.

Parameters

  graph | Shared pointer to manipulation graph

The documentation for this class was generated from the following files:

- include/hpp/plot/hpp-native-graph.hh
- include/hpp/plot/moc_hpp-native-graph.cpp
- src/hpp-native-graph.cc