Wt examples
3.3.8
|
A suggestion popup suggesting contacts from an addressbook. More...
#include <ContactSuggestions.h>
Public Member Functions | |
ContactSuggestions (WObject *parent=0) | |
Create a new ContactSuggestions popup. More... | |
void | setAddressBook (const std::vector< Contact > &contacts) |
Set the address book. More... | |
![]() | |
WSuggestionPopup (const Options &options, WObject *parent=0) | |
WSuggestionPopup (const std::string &matcherJS, const std::string &replacerJS, WObject *parent=0) | |
void | forEdit (WFormWidget *edit, WFlags< PopupTrigger > popupTriggers=Editing) |
void | removeEdit (WFormWidget *edit) |
void | showAt (WFormWidget *edit) |
void | clearSuggestions () |
void | addSuggestion (const WString &suggestionText, const WString &suggestionValue=WString::Empty) |
void | setModel (WAbstractItemModel *model) |
WAbstractItemModel * | model () const |
void | setModelColumn (int index) |
void | setDefaultIndex (int row) |
int | defaultIndex () const |
void | setFilterLength (int count) |
int | filterLength () const |
Signal< WString > & | filterModel () |
Signal< int, WFormWidget * > & | activated () |
void | setGlobalPopup (bool global) |
void | setDropDownIconUnfiltered (bool isUnfiltered) |
int | currentItem () const |
void | setEditRole (int role) |
int | editRole () const |
![]() | |
WPopupWidget (WWidget *impl, WObject *parent=0) | |
virtual | ~WPopupWidget () |
void | setAnchorWidget (WWidget *widget, Orientation orientation=Vertical) |
Orientation | orientation () const |
void | setTransient (bool transient, int autoHideDelay=0) |
bool | isTransient () const |
int | autoHideDelay () const |
void | setDeleteWhenHidden (bool enabled) |
bool | isDeleteWhenHidden () const |
virtual void | setHidden (bool hidden, const WAnimation &animation=WAnimation()) |
Signal & | hidden () |
Signal & | shown () |
![]() | |
WCompositeWidget (WContainerWidget *parent=0) | |
WCompositeWidget (WWidget *implementation, WContainerWidget *parent) | |
virtual void | setObjectName (const std::string &name) |
virtual std::string | objectName () const |
virtual const std::string | id () const |
virtual void | setPositionScheme (PositionScheme scheme) |
virtual PositionScheme | positionScheme () const |
virtual void | setOffsets (const WLength &offset, WFlags< Side > sides=All) |
virtual WLength | offset (Side s) const |
virtual void | resize (const WLength &width, const WLength &height) |
virtual WLength | width () const |
virtual WLength | height () const |
virtual void | setMinimumSize (const WLength &width, const WLength &height) |
virtual WLength | minimumWidth () const |
virtual WLength | minimumHeight () const |
virtual void | setMaximumSize (const WLength &width, const WLength &height) |
virtual WLength | maximumWidth () const |
virtual WLength | maximumHeight () const |
virtual void | setLineHeight (const WLength &height) |
virtual WLength | lineHeight () const |
virtual void | setFloatSide (Side s) |
virtual Side | floatSide () const |
virtual void | setClearSides (WFlags< Side > sides) |
virtual WFlags< Side > | clearSides () const |
virtual void | setMargin (const WLength &margin, WFlags< Side > sides=All) |
virtual WLength | margin (Side side) const |
virtual void | setHiddenKeepsGeometry (bool enabled) |
virtual bool | hiddenKeepsGeometry () const |
virtual bool | isHidden () const |
virtual bool | isVisible () const |
virtual void | setDisabled (bool disabled) |
virtual bool | isDisabled () const |
virtual bool | isEnabled () const |
virtual void | setPopup (bool popup) |
virtual bool | isPopup () const |
virtual void | setInline (bool isInline) |
virtual bool | isInline () const |
virtual void | setDecorationStyle (const WCssDecorationStyle &style) |
virtual WCssDecorationStyle & | decorationStyle () |
virtual void | setStyleClass (const WString &styleClass) |
virtual WString | styleClass () const |
virtual void | addStyleClass (const WString &styleClass, bool force=false) |
virtual void | removeStyleClass (const WString &styleClass, bool force=false) |
virtual bool | hasStyleClass (const WString &styleClass) const |
virtual void | setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength::Auto) |
virtual AlignmentFlag | verticalAlignment () const |
virtual WLength | verticalAlignmentLength () const |
virtual void | setToolTip (const WString &text, TextFormat textFormat=PlainText) |
virtual WString | toolTip () const |
virtual void | setDeferredToolTip (bool enable, TextFormat textFormat=PlainText) |
virtual void | refresh () |
virtual void | setAttributeValue (const std::string &name, const WString &value) |
virtual WString | attributeValue (const std::string &name) const |
virtual void | setJavaScriptMember (const std::string &name, const std::string &value) |
virtual std::string | javaScriptMember (const std::string &name) const |
virtual void | callJavaScriptMember (const std::string &name, const std::string &args) |
virtual void | load () |
virtual bool | loaded () const |
virtual void | setCanReceiveFocus (bool enabled) |
virtual bool | canReceiveFocus () const |
virtual void | setFocus (bool focus) |
virtual bool | setFirstFocus () |
virtual bool | hasFocus () const |
virtual void | setTabIndex (int index) |
virtual int | tabIndex () const |
virtual void | setId (const std::string &id) |
virtual WWidget * | find (const std::string &name) |
virtual WWidget * | findById (const std::string &name) |
virtual void | setSelectable (bool selectable) |
virtual void | doJavaScript (const std::string &js) |
virtual void | propagateSetEnabled (bool enabled) |
virtual bool | scrollVisibilityEnabled () const WT_CXX11ONLY(finaloverride) |
virtual void | setScrollVisibilityEnabled (bool enabled) WT_CXX11ONLY(finaloverride) |
virtual int | scrollVisibilityMargin () const WT_CXX11ONLY(finaloverride) |
virtual void | setScrollVisibilityMargin (int margin) WT_CXX11ONLY(finaloverride) |
virtual Signal< bool > & | scrollVisibilityChanged () WT_CXX11ONLY(finaloverride) |
virtual bool | isScrollVisible () const WT_CXX11ONLY(finaloverride) |
virtual void | setThemeStyleEnabled (bool enabled) |
virtual bool | isThemeStyleEnabled () const |
![]() | |
virtual | ~WWidget () |
WWidget * | parent () const |
virtual void | removeChild (WObject *child) |
void | setWidth (const WLength &width) |
void | setHeight (const WLength &height) |
virtual void | positionAt (const WWidget *widget, Orientation orientation=Vertical) |
virtual void | toggleStyleClass (const WString &styleClass, bool add, bool force=false) |
std::string | jsRef () const |
void | setFocus () |
virtual void | acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString()) |
virtual void | stopAcceptDrops (const std::string &mimeType) |
virtual void | htmlText (std::ostream &out) |
bool | isRendered () const |
void | hide () |
void | animateHide (const WAnimation &animation) |
void | show () |
void | animateShow (const WAnimation &animation) |
void | enable () |
void | disable () |
bool | layoutSizeAware () const |
![]() | |
WObject (WObject *parent=0) | |
virtual | ~WObject () |
void | resetLearnedSlots () |
void | resetLearnedSlot (void(T::*method)()) |
WStatelessSlot * | implementStateless (void(T::*method)()) |
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
void | isNotStateless () |
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
void | addChild (WObject *child) |
const std::vector< WObject * > & | children () const |
WObject * | parent () const |
Additional Inherited Members | |
![]() | |
enum | PopupTrigger |
![]() | |
typedef void(WObject::* | Method) () |
![]() | |
static std::string | generateMatcherJS (const Options &options) |
static std::string | generateReplacerJS (const Options &options) |
![]() | |
static WString | tr (const char *key) |
![]() | |
Editing | |
DropDownIcon | |
![]() | |
virtual void | render (WFlags< RenderFlag > flags) |
![]() | |
virtual void | enableAjax () |
void | setImplementation (WWidget *widget) |
WWidget * | implementation () |
virtual int | boxPadding (Orientation orientation) const |
virtual int | boxBorder (Orientation orientation) const |
![]() | |
void | setLayoutSizeAware (bool sizeAware) |
virtual void | layoutSizeChanged (int width, int height) |
WWidget (WContainerWidget *parent=0) | |
virtual void | dropEvent (WDropEvent dropEvent) |
void | scheduleRender (WFlags< RepaintFlag > flags=0) |
virtual WStatelessSlot * | getStateless (Method method) |
![]() | |
static WObject * | sender () |
A suggestion popup suggesting contacts from an addressbook.
This popup provides suggestions from a list of contact, by matching parts of the name or email adress with the current value being edited. It also supports editing a list of email addresses.
The popup is only available when JavaScript is available, and is implemented entirely on the client-side.
Definition at line 32 of file ContactSuggestions.h.
ContactSuggestions::ContactSuggestions | ( | WObject * | parent = 0 | ) |
Create a new ContactSuggestions popup.
Definition at line 26 of file ContactSuggestions.C.
void ContactSuggestions::setAddressBook | ( | const std::vector< Contact > & | contacts | ) |
Set the address book.
Definition at line 32 of file ContactSuggestions.C.