![]() |
Tome
A generic data editor for games supporting arbitrary input and output formats.
|
Window for adding a new record or editing an existing one. More...
#include <recordwindow.h>
Public Slots | |
| void | accept () |
| Validates all data and closes this window if successful. | |
Public Member Functions | |
| RecordWindow (QWidget *parent=0) | |
| Constructs a new window for adding a new record or editing an existing one. More... | |
| QString | getRecordDisplayName () const |
| Gets the display name of the record. More... | |
| QString | getRecordEditorIconFieldId () const |
| Gets the id of the field to use as editor icon for the record. More... | |
| QVariant | getRecordId () const |
| Gets the unique id of the record. More... | |
| QMap< QString, Tome::RecordFieldState::RecordFieldState > | getRecordFields () const |
| Gets which fields are used by the record. More... | |
| QString | getRecordSetName () const |
| Gets the name of the set the record belongs to. More... | |
| void | setDisallowedRecordIds (const QVariantList disallowedRecordIds) |
| Sets the list of record ids that are prohibited (e.g. because other records with the same id exist). More... | |
| void | setRecordDisplayName (const QString &displayName) |
| Sets the display name of the record. More... | |
| void | setRecordId (const QVariant &id) |
| Sets the unique id of the record. More... | |
| void | setRecordIdLocked (const bool recordIdLocked) |
| Sets whether to automatically update the record id to reflect the display name, or not. More... | |
| void | setRecordIdType (const Tome::RecordIdType::RecordIdType recordIdType) |
| Sets the type of the id of the record. More... | |
| void | setRecordEditorIconFieldId (const QString &editorIconFieldId) |
| Sets the id of the field to use as editor icon for the record. More... | |
| void | setRecordFields (const Tome::FieldDefinitionList &fieldDefinitions) |
| Sets the list of available record fields, initially disabling all of them. More... | |
| void | setRecordFields (const Tome::FieldDefinitionList &fieldDefinitions, const Tome::ComponentList &componentDefinitions, const Tome::RecordFieldValueMap &ownFieldValues, const Tome::RecordFieldValueMap &inheritedFieldValues) |
| Sets the list of fields used by the record. More... | |
| void | setRecordComponents (const Tome::ComponentList &components) |
| Sets the list of available components. More... | |
| void | setRecordSetName (const QString &recordSetName) |
| Sets the name of the set the record belongs to. More... | |
| void | setRecordSetNames (const QStringList &recordSetNames) |
| Sets the list of available record sets. More... | |
Protected Member Functions | |
| void | showEvent (QShowEvent *event) |
| Sets up this window, e.g. by setting the focus on the first widget. More... | |
Window for adding a new record or editing an existing one.
|
explicit |
Constructs a new window for adding a new record or editing an existing one.
| parent | Optional owner widget. |
| QString RecordWindow::getRecordDisplayName | ( | ) | const |
Gets the display name of the record.
| QString RecordWindow::getRecordEditorIconFieldId | ( | ) | const |
Gets the id of the field to use as editor icon for the record.
| QMap< QString, RecordFieldState::RecordFieldState > RecordWindow::getRecordFields | ( | ) | const |
Gets which fields are used by the record.
| QVariant RecordWindow::getRecordId | ( | ) | const |
Gets the unique id of the record.
| QString RecordWindow::getRecordSetName | ( | ) | const |
Gets the name of the set the record belongs to.
| void RecordWindow::setDisallowedRecordIds | ( | const QVariantList | disallowedRecordIds | ) |
Sets the list of record ids that are prohibited (e.g. because other records with the same id exist).
| disallowedRecordIds | List of record ids that are prohibited. |
| void RecordWindow::setRecordComponents | ( | const Tome::ComponentList & | components | ) |
Sets the list of available components.
| components | List of available components. |
| void RecordWindow::setRecordDisplayName | ( | const QString & | displayName | ) |
Sets the display name of the record.
| displayName | Display name of the record. |
| void RecordWindow::setRecordEditorIconFieldId | ( | const QString & | editorIconFieldId | ) |
Sets the id of the field to use as editor icon for the record.
| editorIconFieldId | Id of the field to use as editor icon for the record. |
| void RecordWindow::setRecordFields | ( | const Tome::FieldDefinitionList & | fieldDefinitions | ) |
Sets the list of available record fields, initially disabling all of them.
| fieldDefinitions | List of available record fields. |
| void RecordWindow::setRecordFields | ( | const Tome::FieldDefinitionList & | fieldDefinitions, |
| const Tome::ComponentList & | componentDefinitions, | ||
| const Tome::RecordFieldValueMap & | ownFieldValues, | ||
| const Tome::RecordFieldValueMap & | inheritedFieldValues | ||
| ) |
Sets the list of fields used by the record.
| fieldDefinitions | List of available record fields. |
| componentDefinitions | List of available components. |
| ownFieldValues | Fields used by the record. |
| inheritedFieldValues | Fields used by ancestors of the record. |
| void RecordWindow::setRecordId | ( | const QVariant & | id | ) |
Sets the unique id of the record.
| id | Unique id of the record. |
| void RecordWindow::setRecordIdLocked | ( | const bool | recordIdLocked | ) |
Sets whether to automatically update the record id to reflect the display name, or not.
| recordIdLocked | Whether to automatically update the record id to reflect the display name, or not. |
| void RecordWindow::setRecordIdType | ( | const Tome::RecordIdType::RecordIdType | recordIdType | ) |
Sets the type of the id of the record.
| recordIdType | Type of the id of the record. |
| void RecordWindow::setRecordSetName | ( | const QString & | recordSetName | ) |
Sets the name of the set the record belongs to.
| recordSetName | Name of the new set the record belongs to. |
| void RecordWindow::setRecordSetNames | ( | const QStringList & | recordSetNames | ) |
Sets the list of available record sets.
| recordSetNames | List of available record sets. |
|
protected |
Sets up this window, e.g. by setting the focus on the first widget.
| event | Event for showing this window. |
1.8.13