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

Window for editing the value of a record field. More...

#include <fieldvaluewindow.h>

Inheritance diagram for FieldValueWindow:

Public Slots

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

Signals

void revert ()
 Field should be reverted to its original value.
 

Public Member Functions

 FieldValueWindow (Tome::FacetsController &facetsController, Tome::ProjectController &projectController, Tome::RecordsController &recordsController, Tome::TypesController &typesController, QWidget *parent=0)
 Constructs a new window for editing the value of a record field. More...
 
QVariant getFieldValue () const
 Gets the current value of the field. More...
 
void setFieldCount (const int fieldCount)
 Sets the number of field values that are simultaneously edited. More...
 
void setFieldDescription (const QString &description)
 Sets the textual description of the field to be shown. More...
 
void setFieldDisplayName (const QString &displayName)
 Sets the display name of the field to be shown. More...
 
void setFieldValue (const QVariant &fieldValue)
 Sets the current value of the field. More...
 
void setFieldType (const QString &fieldType) const
 Sets the type of the edited field. 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 editing the value of a record field.

Constructor & Destructor Documentation

◆ FieldValueWindow()

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

Constructs a new window for editing the value of a record field.

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

◆ getFieldValue()

QVariant FieldValueWindow::getFieldValue ( ) const

Gets the current value of the field.

Returns
Current value of the field.

◆ setFieldCount()

void FieldValueWindow::setFieldCount ( const int  fieldCount)

Sets the number of field values that are simultaneously edited.

Parameters
fieldCountNumber of field values that are simultaneously edited.

◆ setFieldDescription()

void FieldValueWindow::setFieldDescription ( const QString &  description)

Sets the textual description of the field to be shown.

Parameters
descriptionTextual description of the field.

◆ setFieldDisplayName()

void FieldValueWindow::setFieldDisplayName ( const QString &  displayName)

Sets the display name of the field to be shown.

Parameters
displayNameDisplay name of the field.

◆ setFieldType()

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

Sets the type of the edited field.

Parameters
fieldTypeType of the edited field.

◆ setFieldValue()

void FieldValueWindow::setFieldValue ( const QVariant &  fieldValue)

Sets the current value of the field.

Parameters
fieldValueCurrent value of the field.

◆ showEvent()

void FieldValueWindow::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: