hpp-plot 7.0.0
Plotting tools for HPP
Loading...
Searching...
No Matches
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:
Collaboration diagram for hpp::plot::HppNativeGraphWidget:

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_tgraph = nullptr,
QWidget *parent = nullptr )

Constructor.

Parameters
graphShared pointer to manipulation graph (can be nullptr)
parentParent widget

◆ ~HppNativeGraphWidget()

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

Destructor.

Member Function Documentation

◆ displayEdgeConstraints

void hpp::plot::HppNativeGraphWidget::displayEdgeConstraints(std::size_tid)
slot

Display detailed edge constraints in the constraint panel.

◆ displayEdgeTargetConstraints

void hpp::plot::HppNativeGraphWidget::displayEdgeTargetConstraints(std::size_tid)
slot

Display edge target constraints in the constraint panel.

◆ displayStateConstraints

void hpp::plot::HppNativeGraphWidget::displayStateConstraints(std::size_tid)
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_tedgeId,
QStringedgeName,
QMenu *menu )
signal

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

Parameters
edgeIdThe ID of the edge
edgeNameThe name of the edge (transition)
menuPointer 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(longedgeId)

Highlight a specific edge.

Parameters
edgeIdThe ID of the edge to highlight, or -1 to clear

◆ highlightNode()

void hpp::plot::HppNativeGraphWidget::highlightNode(longnodeId)

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

Parameters
nodeIdThe 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_tnodeId,
QStringnodeName,
QMenu *menu )
signal

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

Parameters
nodeIdThe ID of the node
nodeNameThe name of the node (state)
menuPointer 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]idThe ID of the selected element
Returns
true if an element is selected, false otherwise

◆ setGraph()

void hpp::plot::HppNativeGraphWidget::setGraph(hpp::manipulation::graph::GraphPtr_tgraph)

Set graph object and refresh display.

Parameters
graphShared pointer to manipulation graph

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