UiItem — Base class for the elements of the user interface.
class UiItem : : public RefCountedWrappedObjectSernaApi::RefCountedWrappedObject { public: // construct/copy/destruct UiItem(SernaApiBase * = 0); ~UiItem(); // 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; void set(const SString &, const SString &) ; void setBool(const SString &, bool) ; void setInt(const SString &, int) ; void setDouble(const SString &, double) ; void setVisible(bool) ; bool isVisible() const; void attach(bool = false) ; void detach(bool = false) ; void dispatch() ; void grabFocus() const; void releaseFocus() const; UiAction findAction(const SString &) const; UiItem findItemByName(const SString &) const; UiItem findItemByClass(const SString &) const; UiItem findItemByAction(const UiAction &) const; void showContextMenu(int, int) ; UiItem firstChild() const; UiItem lastChild() const; UiItem getChild(int) const; int countChildren() const; void appendChild(const UiItem &) ; void removeAllChildren() ; UiItem nextSibling() const; UiItem prevSibling() const; UiItem parent() const; UiItem root() const; void remove() ; void insertBefore(const UiItem &) ; void insertAfter(const UiItem &) ; void 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.