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

Window for adding a new derived type or editing an existing one. More...

#include <derivedtypewindow.h>

Inheritance diagram for DerivedTypeWindow:

Public Slots

void accept () Q_DECL_OVERRIDE
 Validates all data and closes this window if successful.
 

Public Member Functions

 DerivedTypeWindow (Tome::TypesController &typesController, Tome::FacetsController &facetsController, Tome::RecordsController &recordsController, QWidget *parent=0)
 Constructs a new window for adding a new derived type or editing an existing one. More...
 
QString getBaseType () const
 Gets the name of the type the type is derived from. More...
 
QVariantMap getFacets () const
 Gets the values of all constraining facets of the type. More...
 
QString getTypeName () const
 Gets the name of the type. More...
 
QString getTypeSetName () const
 Gets the name of the set the custom type should belong to. More...
 
void init ()
 Fills all combo boxes of this window with current data.
 
void setBaseType (const QString &baseType) const
 Sets the name of the type the type is derived from. More...
 
void setFacets (const QVariantMap &facets)
 Sets the values of all constraining facets of the type. More...
 
void setTypeName (const QString &typeName)
 Sets the name of the type. More...
 
void setTypeSetName (const QString &typeSetName)
 Sets the name of the set the custom type should belong to. More...
 
void setTypeSetNames (const QStringList &typeSetNames)
 Sets the list of names of available custom type sets. More...
 

Protected Member Functions

virtual void showEvent (QShowEvent *event) Q_DECL_OVERRIDE
 Sets up this window, e.g. by setting the focus on the first widget. More...
 

Detailed Description

Window for adding a new derived type or editing an existing one.

Constructor & Destructor Documentation

◆ DerivedTypeWindow()

DerivedTypeWindow::DerivedTypeWindow ( Tome::TypesController typesController,
Tome::FacetsController facetsController,
Tome::RecordsController recordsController,
QWidget *  parent = 0 
)
explicit

Constructs a new window for adding a new derived type or editing an existing one.

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

Member Function Documentation

◆ getBaseType()

QString DerivedTypeWindow::getBaseType ( ) const

Gets the name of the type the type is derived from.

Returns
Name of the type the type is derived from.

◆ getFacets()

QVariantMap DerivedTypeWindow::getFacets ( ) const

Gets the values of all constraining facets of the type.

Returns
Values of all constraining facets of the type.

◆ getTypeName()

QString DerivedTypeWindow::getTypeName ( ) const

Gets the name of the type.

Returns
Name of the type.

◆ getTypeSetName()

QString DerivedTypeWindow::getTypeSetName ( ) const

Gets the name of the set the custom type should belong to.

Returns
Name of the set the custom type should belong to.

◆ setBaseType()

void DerivedTypeWindow::setBaseType ( const QString &  baseType) const

Sets the name of the type the type is derived from.

Parameters
baseTypeName of the type the type is derived from.

◆ setFacets()

void DerivedTypeWindow::setFacets ( const QVariantMap &  facets)

Sets the values of all constraining facets of the type.

Parameters
facetsValues of all constraining facets of the type.

◆ setTypeName()

void DerivedTypeWindow::setTypeName ( const QString &  typeName)

Sets the name of the type.

Parameters
typeNameName of the type.

◆ setTypeSetName()

void DerivedTypeWindow::setTypeSetName ( const QString &  typeSetName)

Sets the name of the set the custom type should belong to.

Parameters
typeSetNameName of the set the custom type should belong to.

◆ setTypeSetNames()

void DerivedTypeWindow::setTypeSetNames ( const QStringList &  typeSetNames)

Sets the list of names of available custom type sets.

Parameters
typeSetNamesList of names of available custom type sets.

◆ showEvent()

void DerivedTypeWindow::showEvent ( QShowEvent *  event)
protectedvirtual

Sets up this window, e.g. by setting the focus on the first widget.

Parameters
eventEvent for showing this window.

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