#include <Wt/WTableView>

Public Member Functions | |
| WTableView (WContainerWidget *parent=0) | |
| Constructor. | |
| virtual | ~WTableView () |
| Destructor. | |
| void | setModel (WAbstractItemModel *model) |
| Sets the model. | |
| void | setItemDelegate (WAbstractItemDelegate *delegate) |
| Sets the default item delegate. | |
| WAbstractItemDelegate * | itemDelegate () const |
| Returns the default item delegate. | |
| void | setItemDelegateForColumn (int column, WAbstractItemDelegate *delegate) |
| Sets the delegate for a column. | |
| WAbstractItemDelegate * | itemDelegateForColumn (int column) const |
| Returns the delegate for a column. | |
| WAbstractItemDelegate * | itemDelegate (const WModelIndex &index) const |
| Returns the delegate for rendering an item. | |
Protected Member Functions | |
| WTable * | table () |
| Returns the table used for rendering the model. | |
The WTableView operates on a WAbstractItemModel provided via setModel(). Data in the model is rendered using an HTML <table>, and the model reacts to any model changes. You may use CSS stylesheets for <table>, <tr>, and <td> elements to provide style to the table.
<table> element will still be used. | void Wt::WTableView::setModel | ( | WAbstractItemModel * | model | ) |
Sets the model.
If a previous model was set, it is not deleted.
| void Wt::WTableView::setItemDelegate | ( | WAbstractItemDelegate * | delegate | ) |
Sets the default item delegate.
The previous delegate is removed but not deleted.
The default item delegate is a WItemDelegate.
| WAbstractItemDelegate* Wt::WTableView::itemDelegate | ( | ) | const [inline] |
| void Wt::WTableView::setItemDelegateForColumn | ( | int | column, | |
| WAbstractItemDelegate * | delegate | |||
| ) |
Sets the delegate for a column.
The previous delegate is removed but not deleted.
| WAbstractItemDelegate * Wt::WTableView::itemDelegateForColumn | ( | int | column | ) | const |
| WAbstractItemDelegate * Wt::WTableView::itemDelegate | ( | const WModelIndex & | index | ) | const |
1.5.6