
WZ2100JsonEditor
A C++/Qt5 desktop app that visualizes the Warzone 2100 research tree as a draggable graph and lets you edit each node's JSON stats in a table view.
WZ2100JsonEditor is a C++/Qt5 desktop application that provides a graphical editor for the JSON game-stat files of Warzone 2100. The defining feature is the research-tree graph view: it parses research.json, builds an in-memory directed graph of research nodes and their requiredResearch prerequisites, and renders every research item as a draggable QGraphicsItem (with the original in-game icon) on a pannable/zoomable QGraphicsScene.
Right-clicking a node opens a property editor dialog where the node's JSON fields (name, id, stats, etc.) can be edited in a table view backed by a QAbstractTableModel. The whole document can then be saved back to disk as JSON. An EmitterObject relays signals from non-QObject QGraphicsItems — a pragmatic workaround for Qt's signal/slot inheritance requirement.
The CMake build splits the codebase into a logic static library (model/controller layer, depends only on Qt5::Core) and a ui executable (view layer, depends on Qt5::Widgets + logic). The graph model (ConnectionGraph + ConnectionsNode) is a pure data structure with no QGraphicsItem dependency, bridged to the view by Qt signals — a clean observer pattern that keeps the model ignorant of the view.
Key features
- Research-tree graph view: parse research.json → directed graph of nodes + requiredResearch edges.
- Draggable QGraphicsItem nodes with original in-game icons on a pannable/zoomable scene.
- Right-click → property editor (QAbstractTableModel table view of a node's JSON fields).
- logic/ui CMake split: Core-only library (JSON + graph model) vs. Widgets UI — model is testable headlessly.
- EmitterObject signal relay for non-QObject QGraphicsItems.
- ConnectionGraph emits nodesConnected during construction; view wires visual nodes — observer pattern.
- All ~395 WZ2100 research icons bundled in the QRC so nodes render with real in-game art.