Template class to store a list of items for an item view and to call the item view update routines automatically where possible.
More...
#include <viewitems.h>
|
| ViewItems (ItemView *v=0) |
| Construct the view items. More...
|
|
void | view (ItemView *v) |
| Set view for the items.
|
|
unsigned int | size () const |
| Return size of items.
|
|
void | item (unsigned int index, const T &item) |
| Set the item at a specified index.
|
|
const T & | item (unsigned int index) const |
| Get the item at the specified index.
|
|
const T & | operator[] (unsigned int index) const |
| Get item at specified index.
|
|
void | changing (unsigned int index, unsigned int how_many=1) |
| If the items contain method and fields that can be changed call this function prior to a change to inform the view that a change is about to occur. More...
|
|
void | changed (unsigned int index, unsigned int how_many=1) |
| If the items contain method and fields that can be changed call this function after a change to inform the view that a change has occurred. More...
|
|
void | add (const T &item) |
| Add an item to the end of the list. More...
|
|
void | insert (unsigned int index, const T &item) |
| Insert an item in the list. More...
|
|
void | erase (unsigned int index) |
| Delete an item from a list.
|
|
void | clear () |
| Clear the whole list.
|
|
template<class T>
class tbx::view::ViewItems< T >
Template class to store a list of items for an item view and to call the item view update routines automatically where possible.
Construct the view items.
- Parameters
-
v | view for items (default to 0 so view will be set later) |
Add an item to the end of the list.
- Parameters
-
If the items contain method and fields that can be changed call this function after a change to inform the view that a change has occurred.
- Parameters
-
index | first index of item changed |
how_many | number of items changed |
If the items contain method and fields that can be changed call this function prior to a change to inform the view that a change is about to occur.
- Parameters
-
index | first index of item changed |
how_many | number of items changed |
Insert an item in the list.
- Parameters
-
index | for insert (if the same as size() will add to the end of the list) |
item | item to insert |
The documentation for this class was generated from the following file: