src/UI/pages/graphPage.h
GraphPage [Class]
Description
The GraphPage class provides a UI for generating and visualizing social network graphs
from XML data.
It supports both Graphviz-based rendering and a fallback Qt-based rendering system.
Public Methods
explicit GraphPage(QWidget *parent = nullptr)
Constructor initializes the graph page.
~GraphPage()
Destructor cleans up resources.
Slots
void onBrowseFile()
Opens a file dialog to select an XML file.
void onGenerateGraph()
Triggers graph generation from the loaded XML data.
void onDownloadGraph()
Saves the generated graph image to a file.
void onBackToOperations()
Emits the backClicked signal.
Private Methods
void generateGraphImage()
Generates the graph visualization using Graphviz (if available).
void generateFallbackGraphImage(const Graph& graph)
Generates a fallback graph visualization using Qt graphics when
Graphviz is unavailable.
int countTotalEdges(const GRAPH& graphData) const
Counts the total number of edges in the graph.
Signals
void backClicked()
Emitted when navigating back.