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
FieldDefinitionWindow Class Reference

Window for adding a new field definition or editing an existing one. More...

#include <fielddefinitionwindow.h>

Inheritance diagram for FieldDefinitionWindow:

Public Slots

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

Public Member Functions

 FieldDefinitionWindow (Tome::FieldDefinitionsController &fieldDefinitionsController, Tome::ComponentsController &componentsController, Tome::FacetsController &facetsController, Tome::ProjectController &projectController, Tome::RecordsController &recordsController, Tome::TypesController &typesController, QWidget *parent=0)
 Constructs a new window for adding a new field definition or editing an existing one. More...
 
Tome::Component getFieldComponent () const
 Gets the component the field should belong to. More...
 
QString getFieldDefinitionSetName () const
 Gets the name of the set the field should belong to. More...
 
QString getFieldDescription () const
 Gets the textual description of the field. More...
 
QString getFieldDisplayName () const
 Gets the display name of the field. More...
 
QString getFieldId () const
 Gets the unique id of the field. More...
 
QVariant getDefaultValue () const
 Gets the default value of the field. More...
 
QString getFieldType () const
 Gets the type of the values of the field. More...
 
void init ()
 Fills all combo boxes of this window with current data.
 
void setFieldComponent (const QString &component) const
 Sets the component the field should belong to. More...
 
void setFieldDefinitionSetName (const QString &fieldDefinitionSetName)
 Sets the name of the set the field should belong to. More...
 
void setFieldDefinitionSetNames (const QStringList &fieldDefinitionSetNames)
 Sets the list of names of available field definition sets. More...
 
void setFieldDescription (const QString &description)
 Sets the textual description of the field. More...
 
void setFieldDisplayName (const QString &displayName)
 Sets the display name of the field. More...
 
void setFieldId (const QString &fieldId)
 Sets the unique id of the field. More...
 
void setDefaultValue (const QVariant &defaultValue)
 Sets the default value of the field. More...
 
void setFieldType (const QString &fieldType) const
 Sets the type of the values of the field. More...
 

Protected Member Functions

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

Detailed Description

Window for adding a new field definition or editing an existing one.

Constructor & Destructor Documentation

◆ FieldDefinitionWindow()

FieldDefinitionWindow::FieldDefinitionWindow ( Tome::FieldDefinitionsController fieldDefinitionsController,
Tome::ComponentsController componentsController,
Tome::FacetsController facetsController,
Tome::ProjectController projectController,
Tome::RecordsController recordsController,
Tome::TypesController typesController,
QWidget *  parent = 0 
)
explicit

Constructs a new window for adding a new field definition or editing an existing one.

Parameters
fieldDefinitionsControllerController for adding, updating and removing field definitions.
componentsControllerController for adding and removing components.
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

◆ getDefaultValue()

QVariant FieldDefinitionWindow::getDefaultValue ( ) const

Gets the default value of the field.

Returns
Default value of the field.

◆ getFieldComponent()

Component FieldDefinitionWindow::getFieldComponent ( ) const

Gets the component the field should belong to.

Returns
Component the field should belong to.

◆ getFieldDefinitionSetName()

QString FieldDefinitionWindow::getFieldDefinitionSetName ( ) const

Gets the name of the set the field should belong to.

Returns
Name of the set the field should belong to.

◆ getFieldDescription()

QString FieldDefinitionWindow::getFieldDescription ( ) const

Gets the textual description of the field.

Returns
Textual description of the field.

◆ getFieldDisplayName()

QString FieldDefinitionWindow::getFieldDisplayName ( ) const

Gets the display name of the field.

Returns
Display name of the field.

◆ getFieldId()

QString FieldDefinitionWindow::getFieldId ( ) const

Gets the unique id of the field.

Returns
Unique id of the field.

◆ getFieldType()

QString FieldDefinitionWindow::getFieldType ( ) const

Gets the type of the values of the field.

Returns
Type of the values of the field.

◆ setDefaultValue()

void FieldDefinitionWindow::setDefaultValue ( const QVariant &  defaultValue)

Sets the default value of the field.

Parameters
defaultValueDefault value of the field.

◆ setFieldComponent()

void FieldDefinitionWindow::setFieldComponent ( const QString &  component) const

Sets the component the field should belong to.

Parameters
componentComponent the field should belong to.

◆ setFieldDefinitionSetName()

void FieldDefinitionWindow::setFieldDefinitionSetName ( const QString &  fieldDefinitionSetName)

Sets the name of the set the field should belong to.

Parameters
fieldDefinitionSetNameName of the set the field should belong to.

◆ setFieldDefinitionSetNames()

void FieldDefinitionWindow::setFieldDefinitionSetNames ( const QStringList &  fieldDefinitionSetNames)

Sets the list of names of available field definition sets.

Parameters
fieldDefinitionSetNamesList of names of available field definition sets.

◆ setFieldDescription()

void FieldDefinitionWindow::setFieldDescription ( const QString &  description)

Sets the textual description of the field.

Parameters
descriptionTextual description of the field.

◆ setFieldDisplayName()

void FieldDefinitionWindow::setFieldDisplayName ( const QString &  displayName)

Sets the display name of the field.

Parameters
displayNameDisplay name of the field.

◆ setFieldId()

void FieldDefinitionWindow::setFieldId ( const QString &  fieldId)

Sets the unique id of the field.

Parameters
fieldIdUnique id of the field.

◆ setFieldType()

void FieldDefinitionWindow::setFieldType ( const QString &  fieldType) const

Sets the type of the values of the field.

Parameters
fieldTypeType of the values of the field.

◆ showEvent()

void FieldDefinitionWindow::showEvent ( QShowEvent *  event)
protected

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: