A suggestion popup suggesting contacts from an addressbook. More...
#include <ContactSuggestions.h>
Inherits Wt::WSuggestionPopup.
Public Member Functions | |
ContactSuggestions (WContainerWidget *parent=0) | |
Create a new ContactSuggestions popup. | |
void | setAddressBook (const std::vector< Contact > &contacts) |
Set the address book. |
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 | ( | WContainerWidget * | parent = 0 |
) |
Create a new ContactSuggestions popup.
Definition at line 24 of file ContactSuggestions.C.
00025 : WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions), 00026 WSuggestionPopup::generateReplacerJS(contactOptions), 00027 parent) 00028 { }
void ContactSuggestions::setAddressBook | ( | const std::vector< Contact > & | contacts | ) |
Set the address book.
Definition at line 30 of file ContactSuggestions.C.
00031 { 00032 clearSuggestions(); 00033 00034 for (unsigned i = 0; i < contacts.size(); ++i) 00035 addSuggestion(contacts[i].formatted(), contacts[i].formatted()); 00036 }