Added cutter.refresh() to jupyter API

This commit is contained in:
xarkes 2018-04-04 16:30:30 +02:00
parent 0b5b514c0b
commit 6f14b3c0e3

View File

@ -52,6 +52,14 @@ PyObject *api_cmdj(PyObject *self, PyObject *args)
return Py_None; return Py_None;
} }
PyObject *api_refresh(PyObject *self, PyObject *args)
{
Q_UNUSED(self);
Q_UNUSED(args);
Core()->triggerRefreshAll();
return Py_None;
}
PyMethodDef CutterMethods[] = { PyMethodDef CutterMethods[] = {
{ {
"version", api_version, METH_NOARGS, "version", api_version, METH_NOARGS,
@ -65,6 +73,10 @@ PyMethodDef CutterMethods[] = {
"cmdj", api_cmdj, METH_VARARGS, "cmdj", api_cmdj, METH_VARARGS,
"Execute a JSON command and return the result as a dictionnary" "Execute a JSON command and return the result as a dictionnary"
}, },
{
"refresh", api_refresh, METH_NOARGS,
"Refresh Cutter widgets"
},
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };