Wt::WTableView Class Reference

A container widget which provides a view implementation of a WTable. More...

#include <Wt/WTableView>

Inheritance diagram for Wt::WTableView:

Inheritance graph
[legend]

List of all members.

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.
WAbstractItemDelegateitemDelegate () const
 Returns the default item delegate.
void setItemDelegateForColumn (int column, WAbstractItemDelegate *delegate)
 Sets the delegate for a column.
WAbstractItemDelegateitemDelegateForColumn (int column) const
 Returns the delegate for a column.
WAbstractItemDelegateitemDelegate (const WModelIndex &index) const
 Returns the delegate for rendering an item.

Protected Member Functions

WTabletable ()
 Returns the table used for rendering the model.


Detailed Description

A container widget which provides a view implementation of a WTable.

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.

Note:
This view widget is a work-in-progress. Support for column resizing, smart rendering, and proper vertical scroll bar support is still lacking. When support for these features is added in the future, an HTML <table> element will still be used.

Member Function Documentation

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]

Returns the default item delegate.

See also:
setItemDelegate()

void Wt::WTableView::setItemDelegateForColumn ( int  column,
WAbstractItemDelegate delegate 
)

Sets the delegate for a column.

The previous delegate is removed but not deleted.

See also:
setItemDelegate()

WAbstractItemDelegate * Wt::WTableView::itemDelegateForColumn ( int  column  )  const

Returns the delegate for a column.

See also:
setItemDelegateForColumn()

WAbstractItemDelegate * Wt::WTableView::itemDelegate ( const WModelIndex index  )  const

Returns the delegate for rendering an item.

See also:
setItemDelegateForColumn(), setItemDelegate()


Generated on Tue Nov 3 15:34:33 2009 for Wt by doxygen 1.5.6