An open API service indexing awesome lists of open source software.

https://github.com/junaidsalim/graph_visualization_qt_gui_cpp

This program takes density and no of vertices in a graph and then displays the graph.
https://github.com/junaidsalim/graph_visualization_qt_gui_cpp

cpp dsa graphs gui qt-cpp qt-gui qtcreator

Last synced: 2 months ago
JSON representation

This program takes density and no of vertices in a graph and then displays the graph.

Awesome Lists containing this project

README

        

# Graph_Visualization_Qt_GUI_Cpp
This program takes density and no of vertices in a graph and then displays the graph.

**Introduction:**
This C++ program is designed as a graph analysis and visualization tool, featuring a graphical user interface (GUI) built using the Qt C++ framework. The tool generates a random graph based on user-defined parameters and provides functionalities for analyzing the graph, including degree calculation, identification of nodes with maximum and minimum degrees, display of the raw adjacency matrix, and finding neighbors of a given node.

**Features:**
1. **Graph Generation:**
- The program generates a random undirected graph based on user-specified parameters: the number of nodes and density.

2. **Degree Analysis:**
- Users can inquire about the degree of a specific node, find the node with the maximum degree, and find the node with the minimum degree.

3. **Adjacency Matrix Display:**
- The raw adjacency matrix of the generated graph can be displayed, providing a comprehensive view of the graph structure.

4. **Neighborhood Identification:**
- Users can find the neighbors of a specified node, gaining insights into the connectivity of the graph.

5. **Graphical User Interface (GUI):**
- The program incorporates a user-friendly GUI built with the Qt framework, enhancing the overall user experience.

**Usage:**
1. **Graph Generation:**
- Enter the number of nodes and desired density when prompted.
- The program will generate a random graph based on the provided parameters.

2. **Degree Analysis:**
- Choose from options (a to e) to perform various degree-related analyses:
- a) Show Degree of a Node
- b) Find Node with Maximum Degree
- c) Find Node with Minimum Degree
- d) Display the Raw Adjacency Matrix
- e) Find Neighbors of a Given Node

3. **Graphical User Interface:**
- The GUI enhances the visual representation and user interaction with the graph analysis tool.

**Execution:**
1. **GUI Mode:**
- Ensure that the Qt framework is properly installed.
- Compile and run the program to access the GUI.
- Use the GUI controls to interact with the graph and perform analyses.

2. **Console Mode:**
- For console-based interaction, follow the prompts to enter the number of nodes and density.
- Use the console menu (a to e) for various analyses.

**Note:**
- This program utilizes the `conio.h` library for getch() to capture user inputs in the console.

**Example:**
- An example run of the program is provided to illustrate its functionalities and outputs.

**Dependencies:**
- Qt framework for GUI (ensure proper installation).

![g1](https://github.com/JunaidSalim/Graph_Visualization_Qt_GUI_Cpp/assets/115392538/cc141697-b75e-43fb-a6b3-1741e3a1bda0)
![g3](https://github.com/JunaidSalim/Graph_Visualization_Qt_GUI_Cpp/assets/115392538/3f84fea1-d194-4836-a56b-e2a5f082bd40)
![g2](https://github.com/JunaidSalim/Graph_Visualization_Qt_GUI_Cpp/assets/115392538/853bb126-eb07-46d5-a565-50b13d72b5f3)