A plugin for CubeGUI that visualizes system tree data in JSON format.
To build the plugin, make sure you have Qt 5.15.18 installed, as cubegui-4.8.2 is not compatible with Qt 6.
To build the plugin, simply run the build.sh script located in the project directory:
bash ./build.shThe ParseToJSONPlugin provides functionality to parse and display system tree data from .cubex files in JSON format within the CubeGUI application. Key features:
-
Plugin Initialization:
- The plugin sets up a
QPlainTextEditwidget to display the indented JSON data. - It initializes the widget with a fixed-width font and disables word wrapping for better readability.
- The plugin sets up a
-
System Tree Parsing:
- When a
.cubexfile is opened, the plugin reads the file and parses the system tree using the Cube library. - It recursively traverses the
SystemTreeNodestructure, extracting properties (e.g., name, ID, description, class), child nodes, and location groups. - The parsed data is converted into a structured JSON format using
QJsonObjectandQJsonArray.
- When a
-
Integration with CubeGUI:
- The plugin adds a tab to the CubeGUI interface when a
.cubexfile is opened. - It displays the JSON representation of the system tree in the
QPlainTextEditwidget. - When the file is closed, the displayed JSON is cleared.
- The plugin adds a tab to the CubeGUI interface when a
- Better testing to identify and fix existing bugs. Plugin works with all the tested
.cubexfiles, however this testing was not comprehensive. - Add more visualization options to enhance user experience.
- Add features to download, collapse, expand and sort the json.