|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
DEBUG-ONLY live control channel. More...
#include <QApplication>Go to the source code of this file.
Functions | |
| void | startDebugServer () |
DEBUG-ONLY live control channel.
A tiny newline-delimited-JSON server on 127.0.0.1:8766 that lets an external tool drive and inspect the running app: send verbs (navigate, open a mon, click, set a property, screenshot) and ask for information (current title, a property value, matching objectNames).
Protocol: send one JSON object per line, get one JSON reply per line: -> {"cmd":"ping"} <- {"ok":true,"result":"pong"} -> {"cmd":"screen","arg":"trainerCard"} navigate; reply = new title -> {"cmd":"party","arg":0} open party mon 0's details -> {"cmd":"back"} / {"cmd":"home"} pop / go home -> {"cmd":"sav","arg":"C:/.../x.sav"} load a save -> {"cmd":"shot","arg":"C:/.../out.png"} grab the view to a PNG -> {"cmd":"title"} <- current screen title -> {"cmd":"get","obj":"trainerMoneyField","prop":"text"} read a property -> {"cmd":"set","obj":"...","prop":"...","val":...} write a property -> {"cmd":"click","obj":"..."} emit a control's clicked() -> {"cmd":"list","arg":"substr"} <- matching objectNames
All handling runs on the GUI thread (QTcpServer/QTcpSocket signals fire there), so it is safe to touch QML/widgets directly. Compiled to a no-op in release (guarded by QT_DEBUG) – the server does not exist in shipped binaries.
Definition in file debugserver.cpp.
| void startDebugServer | ( | ) |
Definition at line 217 of file debugserver.cpp.
Referenced by boot().