Wt examples  3.3.0
Public Member Functions | List of all members
ContactSuggestions Class Reference

A suggestion popup suggesting contacts from an addressbook. More...

#include <ContactSuggestions.h>

Inheritance diagram for ContactSuggestions:
Inheritance graph
[legend]

Public Member Functions

 ContactSuggestions (WContainerWidget *parent=0)
 Create a new ContactSuggestions popup. More...
 
void setAddressBook (const std::vector< Contact > &contacts)
 Set the address book. More...
 
- Public Member Functions inherited from Wt::WSuggestionPopup
 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)
 
WAbstractItemModelmodel () 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)
 
- Public Member Functions inherited from Wt::WPopupWidget
virtual void setHidden (bool hidden, const WAnimation &animation=WAnimation())
 

Additional Inherited Members

- Public Types inherited from Wt::WSuggestionPopup
enum  PopupTrigger
 
- Static Public Member Functions inherited from Wt::WSuggestionPopup
static std::string generateMatcherJS (const Options &options)
 
static std::string generateReplacerJS (const Options &options)
 
- Public Attributes inherited from Wt::WSuggestionPopup
 Editing
 
 DropDownIcon
 
- Protected Member Functions inherited from Wt::WSuggestionPopup
virtual void render (WFlags< RenderFlag > flags)
 

Detailed Description

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.

Constructor & Destructor Documentation

ContactSuggestions::ContactSuggestions ( WContainerWidget parent = 0)

Create a new ContactSuggestions popup.

Definition at line 26 of file ContactSuggestions.C.

27  : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
28  WSuggestionPopup::generateReplacerJS(contactOptions),
29  parent)
30 { }

Member Function Documentation

void ContactSuggestions::setAddressBook ( const std::vector< Contact > &  contacts)

Set the address book.

Definition at line 32 of file ContactSuggestions.C.

33 {
35 
36  for (unsigned i = 0; i < contacts.size(); ++i)
37  addSuggestion(contacts[i].formatted(), contacts[i].formatted());
38 }

The documentation for this class was generated from the following files:

Generated on Fri May 31 2013 for the C++ Web Toolkit (Wt) by doxygen 1.8.3.1