| 388 | } |
| 389 | |
| 390 | PyObject* EditableDatumLabelPy::startEdit(PyObject* args, PyObject* kwds) |
| 391 | { |
| 392 | static const std::array<const char*, 4> keywords {"value", "eventFilter", "visibleToMouse", nullptr}; |
| 393 | |
| 394 | double value = 0.0; |
| 395 | PyObject* pyFilter = Py_None; |
| 396 | PyObject* pyVisible = Py_False; |
| 397 | if ( |
| 398 | !Base::Wrapped_ParseTupleAndKeywords(args, kwds, "d|OO", keywords, &value, &pyFilter, &pyVisible) |
| 399 | ) { |
| 400 | return nullptr; |
| 401 | } |
| 402 | |
| 403 | QObject* filter = nullptr; |
| 404 | if (pyFilter != Py_None) { |
| 405 | PythonWrapper wrap; |
| 406 | wrap.loadWidgetsModule(); |
| 407 | filter = wrap.toQObject(Py::Object(pyFilter, false)); |
| 408 | if (!filter) { |
| 409 | PyErr_SetString(PyExc_TypeError, "eventFilter must be a QObject or None"); |
| 410 | return nullptr; |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | asLabel(this)->startEdit(value, filter, asBool(pyVisible)); |
| 415 | Py_Return; |
| 416 | } |
| 417 | |
| 418 | PyObject* EditableDatumLabelPy::stopEdit(PyObject* args) |
| 419 | { |
nothing calls this directly
no test coverage detected