# class toTemplateItem

This is an item that is contained in a template. More...

Definition | `#include <totemplate.h>`
Inherits | toResultViewItem [public ]
Inherited by | toTemplateSQL, toTemplateText
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toTemplateItem (toTemplateProvider &prov,QListView *parent,const QString &name)
- toTemplateItem (toTemplateItem *parent,const QString &name,QListViewItem *after=NULL)
- toTemplateProvider & provider (void)
- virtual void expand (void)
- virtual void selected (void)
- virtual void collapse (void)
- virtual QWidget * selectedWidget (QWidget *parent)
- virtual void setSelected (bool sel)

## Detailed Description

This is an item that is contained in a template. It is different in the expand and collapse methods that are called when this item is expanded or collapsed from the template widget.

toTemplateItem (toTemplateProvider &prov,QListView *parent,const QString &name)

### toTemplateItem

Create an item.

Parameters:

prov | Provider for this item.
parent | Parent of this item.
name | Contents of the first column of the item.

toTemplateItem (toTemplateItem *parent,const QString &name,QListViewItem *after=NULL)

### toTemplateItem

Create an item.

Parameters:

parent | Parent of this item.
name | Contents of the first column of the item.
after | The item to put this item after.

toTemplateProvider & provider (void)

### provider

Get a reference to the provider of this item.

Returns: Reference to provider.

void expand (void)

### expand

[virtual]

This function is called when the item is expanded and can be used to fill up the list when needed.

void selected (void)

### selected

[virtual]

This function is called when the item is selected by doubleclicking or pressing return.

void collapse (void)

### collapse

[virtual]

This function is called when the item is collapsed.

QWidget * selectedWidget (QWidget *parent)

### selectedWidget

[virtual]

This function can be used to return a widget that is displays extra information for this item. Return NULL if no widget is to be displayed. The widget will be deleted when this item is no longer shown.

void setSelected (bool sel)

### setSelected

[virtual]

Reimplemented for internal reasons.

Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.