| 1586 | } |
| 1587 | |
| 1588 | PyObject* ApplicationPy::sGetIcon(PyObject* /*self*/, PyObject* args) |
| 1589 | { |
| 1590 | char* iconName = nullptr; |
| 1591 | if (!PyArg_ParseTuple(args, "s", &iconName)) { |
| 1592 | return nullptr; |
| 1593 | } |
| 1594 | |
| 1595 | PythonWrapper wrap; |
| 1596 | wrap.loadGuiModule(); |
| 1597 | wrap.loadWidgetsModule(); |
| 1598 | auto pixmap = BitmapFactory().pixmap(iconName); |
| 1599 | if (!pixmap.isNull()) { |
| 1600 | return Py::new_reference_to(wrap.fromQIcon(new QIcon(pixmap))); |
| 1601 | } |
| 1602 | |
| 1603 | Py_Return; |
| 1604 | } |
| 1605 | |
| 1606 | PyObject* ApplicationPy::sIsIconCached(PyObject* /*self*/, PyObject* args) |
| 1607 | { |
nothing calls this directly
no test coverage detected