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

Controller for runnings tasks on all records. More...

#include <taskscontroller.h>

Inheritance diagram for Tome::TasksController:

Signals

void progressChanged (const QString title, const QString text, const int currentValue, const int maximumValue) const
 Progress of the current tasks operation has changed. More...
 

Public Member Functions

 TasksController (const ComponentsController &componentsController, const FacetsController &facetsController, const FieldDefinitionsController &fieldDefinitionsController, const ProjectController &projectController, const RecordsController &recordsController, const TypesController &typesController)
 Constructs a new controller for runnings tasks on all records. More...
 
void addTask (Task *task)
 Adds the specified task to the list of automated tasks that can be performed by this controller. More...
 
const MessageList runAllTasks () const
 Runs all registered automated tasks. More...
 

Detailed Description

Controller for runnings tasks on all records.

Constructor & Destructor Documentation

◆ TasksController()

TasksController::TasksController ( const ComponentsController componentsController,
const FacetsController facetsController,
const FieldDefinitionsController fieldDefinitionsController,
const ProjectController projectController,
const RecordsController recordsController,
const TypesController typesController 
)

Constructs a new controller for runnings tasks on all records.

Parameters
componentsControllerController for adding and removing components.
facetsControllerController for validating type facets.
fieldDefinitionsControllerController for adding, updating and removing field definitions.
projectControllerController for creating, loading and saving projects.
recordsControllerController for adding, updating and removing records.
typesControllerController for adding, updating and removing custom types.

Member Function Documentation

◆ addTask()

void TasksController::addTask ( Task task)

Adds the specified task to the list of automated tasks that can be performed by this controller.

Parameters
taskTask to add.

◆ progressChanged

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

Progress of the current tasks operation has changed.

Parameters
titleTitle of the current task.
textDetails of the current task.
currentValueCurrent progress value of the tasks operation.
maximumValueMaximum progress value of the tasks operation.

◆ runAllTasks()

const MessageList TasksController::runAllTasks ( ) const

Runs all registered automated tasks.

Returns
List of messages, warnings and errors generated by all tasks.

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