UiItem — Base class for the elements of the user interface.
class UiItem (RefCountedWrappedObjectSernaApi::RefCountedWrappedObject) : # construct/copy/destruct __init__(SernaApiBase * = 0) __del__() # public member functions SString name() const UiAction action() const SString itemClass() const SString widgetClass() const QWidget * widget() const PropertyNode property(const SString &) const PropertyNode itemProps(bool = false) PropertyNode currActionProp() const SString get(const SString &) const SString getTranslated(const SString &) const bool getBool(const SString &) const int getInt(const SString &) const double getDouble(const SString &) const None set(const SString &, const SString &) None setBool(const SString &, bool) None setInt(const SString &, int) None setDouble(const SString &, double) None setVisible(bool) bool isVisible() const None attach(bool = false) None detach(bool = false) None dispatch() None grabFocus() const None releaseFocus() const UiAction findAction(const SString &) const UiItem findItemByName(const SString &) const UiItem findItemByClass(const SString &) const UiItem findItemByAction(const UiAction &) const None showContextMenu(int, int) UiItem firstChild() const UiItem lastChild() const UiItem getChild(int) const int countChildren() const None appendChild(const UiItem &) None removeAllChildren() UiItem nextSibling() const UiItem prevSibling() const UiItem parent() const UiItem root() const None remove() None insertBefore(const UiItem &) None insertAfter(const UiItem &) None removeGroup(const UiItem &) int siblingIndex() const SString getTreelocString(const UiItem & = UiItem()) const UiItem getByTreelocString(const SString &) const SernaDoc asSernaDoc() const # public static functions SString translate(const char *, const SString &)
UiItem
public member functionsSString name() const
Returns the name of item instance.
UiAction action() const
Returns the assotiated Action.
SString itemClass() const
Returns type of item instance.
SString widgetClass() const
Returns widget made by this item.
PropertyNode property(const SString & prop) const
Returns requested property from this item, or from its action if property does not exist in this item
PropertyNode itemProps(bool update = false)
Updates item properties (if asked) and returns them.
PropertyNode currActionProp() const
For MultiAction items - returns the current subaction root property.
SString get(const SString & propName) const
Returns string property value.
SString getTranslated(const SString & propName) const
Returns string property value.
Returns boolean property value.
Returns integer property value.
Returns double property value.
Sets string property value.
Sets boolean property value.
Sets integer property value.
Sets double property value.
Sets visible state.
Returns visible state.
Attaches UI item.
Detaches UI item.
Dispatch Item command if any.
Set the focus to the widget corresponding to this UI item.
Set the focus back to the document editor.
UiAction findAction(const SString & name) const
Finds UI command by name.
UiItem findItemByName(const SString & name) const
Finds UiItem by name.
UiItem findItemByClass(const SString & name) const
Look up UiItem by class.
UiItem findItemByAction(const UiAction & name) const
Finds UiItem by UiActions.
Shows context menu for this liquid item at global pos (x,y).
UiItem firstChild() const
UiItem lastChild() const
UiItem getChild(int n) const
UiItem nextSibling() const
UiItem prevSibling() const
UiItem parent() const
UiItem root() const
SString getTreelocString(const UiItem & = UiItem()) const
UiItem getByTreelocString(const SString & ) const
SernaDoc asSernaDoc() const
Downcasts UiItem to SernaDoc.
UiItem
public static functionsSString translate(const char * context, const SString & str)
Translate string str in given context.