This PR discard the original design of gridcontrol, and use the controller to receive the commands from the front-end, and then call stack to deal with the requests. The purpose is to solve the previous sync problem. We don't need to sync the datagrid belonging to the gridcontrol and another one belonging to the layerdata. The front-end will directly get the state of the datagrid in the layerdate to set the props of the UI elements.
Details:
There are some commands still not be transferred (related to the color setting) so the definition of gridcontrol is left as a reference.
The transferred commands can be found in the commit description. The left commands also can be found in the comment of controller.
The related part in the python interface is disabled/commented.
Most of the 'set' function in the datagrid are replaces by the '_setState()', the function will directly set the state value of the datagrid and return the updated state string. Something noticeable is that the setState won't check the value. The check should be done in the front-end. Besides, the '_setState' function doesn't handle exception, which should be added in the future. The original 'set' functions are also left as references.
In the PR, the setDataGridState method in LayerGroup will change the datagrid states of all the LayerData members and return the datagrid state of the current layerdata. The behavior should be discussed further.
This PR discard the original design of gridcontrol, and use the controller to receive the commands from the front-end, and then call stack to deal with the requests. The purpose is to solve the previous sync problem. We don't need to sync the datagrid belonging to the gridcontrol and another one belonging to the layerdata. The front-end will directly get the state of the datagrid in the layerdate to set the props of the UI elements. Details: