Name

UiLiquidItemBase — Implementations of custom liquid items should inherit from this class.

Synopsis

class UiLiquidItemBase
  :  : public SimpleWrappedObjectSernaApi::SimpleWrappedObject
 {
public:
  

  enum Type { WIDGET =  0x01, UNDOCKED_TOOL =  0x02, VERTICAL_TOOL =  0x04, HORIZONTAL_TOOL =  0x08 };
  // construct/copy/destruct
  UiLiquidItemBase(SernaApiBase * = 0);
  ~UiLiquidItemBase();

  // public member functions

  UiItem item() const;
  SString itemClass() const;
  SString widgetClass() const;
  void showContextMenu(int, int) ;
  void releaseFocus() const;
  void grabFocus() const;
  bool doAttach() ;
  bool doDetach() ;
  void propertyChanged(const PropertyNode &) ;
  void escapePressed() ;
  void widgetFocusChanged(bool) ;
  QWidget * makeWidget(QWidget *, Type) ;
};

Description

UiLiquidItemBase construct/copy/destruct

  1. UiLiquidItemBase(SernaApiBase * = 0);


  2. ~UiLiquidItemBase();


UiLiquidItemBase public member functions

  1. UiItem item() const;


  2. SString itemClass() const;


  3. SString widgetClass() const;


  4. void showContextMenu(int x, int y) ;

    Shows context menu for this liquid item at global pos (x,y).


  5. void releaseFocus() const;

    Releases input focus and passes it back to the editor.


  6. void grabFocus() const;

    Set the focus to the widget corresponding to this UI item.


  7. bool doAttach() ;

    may be reimplemented for custom attach


  8. bool doDetach() ;

    may be reimplemented for custom detach


  9. void propertyChanged(const PropertyNode & prop) ;

    Called when item property changes.


  10. void escapePressed() ;

    invoked when escape button is pressed


  11. void widgetFocusChanged(bool ) ;

    May be reimplemented in custom item to indicate active focus.


  12. QWidget * makeWidget(QWidget * parent, Type type) ;

    Widget factory - must be implemented in custom item, and should return QWidget instance