Tome
A generic data editor for games supporting arbitrary input and output formats.
Public Member Functions | List of all members
Tome::ListWidget Class Reference

Allows adding, editing, re-ordering and removing list items. More...

#include <listwidget.h>

Inheritance diagram for Tome::ListWidget:

Public Member Functions

 ListWidget (FacetsController &facetsController, ProjectController &projectController, RecordsController &recordsController, TypesController &typesController, QWidget *parent=0)
 Constructs a new widget for adding, editing, re-ordering and removing list items. More...
 
QString getItemType () const
 Gets the type of the list items. More...
 
QVariantList getItems () const
 Gets all current list items. More...
 
void setItemType (const QString &itemType)
 Sets the type of the list items. More...
 
void setItems (const QVariantList &items)
 Sets all current list items. More...
 

Detailed Description

Allows adding, editing, re-ordering and removing list items.

Constructor & Destructor Documentation

◆ ListWidget()

ListWidget::ListWidget ( FacetsController facetsController,
ProjectController projectController,
RecordsController recordsController,
TypesController typesController,
QWidget *  parent = 0 
)
explicit

Constructs a new widget for adding, editing, re-ordering and removing list items.

Parameters
facetsControllerController for validating type facets.
projectControllerController for creating, loading and saving projects.
recordsControllerController for adding, updating and removing records.
typesControllerController for adding, updating and removing custom types.
parentOptional owner widget.

Member Function Documentation

◆ getItems()

QVariantList ListWidget::getItems ( ) const

Gets all current list items.

Returns
All current list items.

◆ getItemType()

QString ListWidget::getItemType ( ) const

Gets the type of the list items.

Returns
Type of the list items.

◆ setItems()

void ListWidget::setItems ( const QVariantList &  items)

Sets all current list items.

Parameters
itemsAll current list items.

◆ setItemType()

void ListWidget::setItemType ( const QString &  itemType)

Sets the type of the list items.

Parameters
itemTypeType of the list items.

The documentation for this class was generated from the following files: