diff --git a/src/scripting/python/iconloader.sip b/src/scripting/python/iconloader.sip index 45e2c7cb7..c1cd94bb2 100644 --- a/src/scripting/python/iconloader.sip +++ b/src/scripting/python/iconloader.sip @@ -4,8 +4,34 @@ class IconLoader { #include "ui/iconloader.h" %End +%Docstring +Singleton class that loads icons from the system theme if possible, falling +back on Clementine's builtin icons otherwise. + +You can access the IconLoader directly, there is no need to create an instance +of the class first. + + >>> clementine.IconLoader.Load("media-pause") + +Icons are identified by their name without any extension, and they follow the +U{Freedesktop icon naming specification}. +You can find the list of icons bundled with Clementine in the +U{data/icons/} +directory in Clementine's source tree. +%End + public: static QIcon Load(const QString& name); +%Docstring +Load(name) -> QIcon + +Tries to load an icon with the given name. + +@param name: The name of an icon from the Freedesktop icon naming specification. +@type name: C{str} +@return: If the icon was loaded successfully then a valid QIcon is returned. + Otherwise a null QIcon is returned (C{.isNull()} will return C{True}). +%End private: IconLoader();