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

Controller for finding usages of fields, records and custom types. More...

#include <findusagescontroller.h>

Inheritance diagram for Tome::FindUsagesController:

Signals

void progressChanged (const QString title, const QString text, const int currentValue, const int maximumValue) const
 Progress of the current search operation has changed. More...
 
void searchResultChanged (const QString &title, const Tome::SearchResultList results) const
 A search has been completed. More...
 

Public Member Functions

 FindUsagesController (const FieldDefinitionsController &fieldDefinitionsController, const RecordsController &recordsController, const TypesController &typesController)
 Constructs a new controller for finding usages of fields, records and custom types. More...
 
const SearchResultList findUsagesOfField (const QString &fieldId) const
 Searches for records who are using the field with the specified id. More...
 
const SearchResultList findUsagesOfRecord (const QVariant &recordId) const
 Searches for records whose field values are referencing the record with the specified id. More...
 
const SearchResultList findUsagesOfType (const QString &typeName) const
 Searches for records whose fields are of the type with the specified name. More...
 

Detailed Description

Controller for finding usages of fields, records and custom types.

Constructor & Destructor Documentation

◆ FindUsagesController()

FindUsagesController::FindUsagesController ( const FieldDefinitionsController fieldDefinitionsController,
const RecordsController recordsController,
const TypesController typesController 
)

Constructs a new controller for finding usages of fields, records and custom types.

Parameters
fieldDefinitionsControllerController for adding, updating and removing field definitions.
recordsControllerController for adding, updating and removing records.
typesControllerController for adding, updating and removing custom types.

Member Function Documentation

◆ findUsagesOfField()

const SearchResultList FindUsagesController::findUsagesOfField ( const QString &  fieldId) const

Searches for records who are using the field with the specified id.

Parameters
fieldIdId of the field to search for.
Returns
Records who are using the field with the specified id.

◆ findUsagesOfRecord()

const SearchResultList FindUsagesController::findUsagesOfRecord ( const QVariant &  recordId) const

Searches for records whose field values are referencing the record with the specified id.

Parameters
recordIdId of the record to find all references of.
Returns
Records whose field values are referencing the record with the specified id.

◆ findUsagesOfType()

const SearchResultList FindUsagesController::findUsagesOfType ( const QString &  typeName) const

Searches for records whose fields are of the type with the specified name.

Parameters
typeNameName of the type to find all usages of.
Returns
Records whose fields are of the type with the specified name.

◆ progressChanged

void Tome::FindUsagesController::progressChanged ( const QString  title,
const QString  text,
const int  currentValue,
const int  maximumValue 
) const
signal

Progress of the current search operation has changed.

Parameters
titleTitle of the current search operation step.
textDetails of the current search operation step.
currentValueCurrent progress value of the current search operation step.
maximumValueMaximum progress value of the current search operation step.

◆ searchResultChanged

void Tome::FindUsagesController::searchResultChanged ( const QString &  title,
const Tome::SearchResultList  results 
) const
signal

A search has been completed.

Parameters
titleTitle of the search operation.
resultsResults of the search operation.

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