Controller for exporting records using templates.
More...
#include <exportcontroller.h>
|
|
void | exportTemplatesChanged () |
| | Available record export templates have changed.
|
| |
| void | progressChanged (const QString title, const QString text, const int currentValue, const int maximumValue) const |
| | Progress of the current record export operation has changed. More...
|
| |
Controller for exporting records using templates.
◆ ExportController()
Constructs a new controller for exporting records using templates.
- Parameters
-
| facetsController | Controller for validating type facets. |
| fieldDefinitionsController | Controller for adding, updating and removing field definitions. |
| recordsController | Controller for adding, updating and removing records. |
| typesController | Controller for adding, updating and removing custom types. |
◆ addRecordExportTemplate()
Adds a new template for exporting records to the project.
- Parameters
-
| exportTemplate | Record export template to add. |
◆ exportRecords() [1/2]
| void ExportController::exportRecords |
( |
const RecordExportTemplate & |
exportTemplate, |
|
|
const QString & |
filePath |
|
) |
| const |
Exports all records using the passed export template to a file at the specified path.
- Exceptions
-
| std::runtime_error | if the file at the specified path could not be written. |
- Parameters
-
| exportTemplate | Template to apply when exporting the records. |
| filePath | Path of the file to write the exported data to. |
◆ exportRecords() [2/2]
| void ExportController::exportRecords |
( |
const RecordExportTemplate & |
exportTemplate, |
|
|
QIODevice & |
device |
|
) |
| const |
Exports all records using the passed export template to the specified device.
- Parameters
-
| exportTemplate | Template to apply when exporting the records. |
| device | Device to write the exported data to. |
◆ getRecordExportTemplate()
Gets the record export template with the specified name.
- Exceptions
-
| std::out_of_range | if the export template could not be found. |
- See also
- hasRecordExportTemplate for checking whether a record export template exists.
- Parameters
-
| name | Name of the record export template to get. |
- Returns
- Record export template with the specified name.
◆ getRecordExportTemplates()
| const RecordExportTemplateList ExportController::getRecordExportTemplates |
( |
| ) |
const |
Gets a list of all available record export templates of the project.
- Returns
- List of all available record export templates of the project.
◆ hasRecordExportTemplate()
| bool ExportController::hasRecordExportTemplate |
( |
const QString & |
name | ) |
const |
Checks whether the project has a record export template with the specified name.
- Parameters
-
| name | Name of the record export template to look for. |
- Returns
- true, if a record export template with the specified name exists, and false otherwise.
◆ progressChanged
| void Tome::ExportController::progressChanged |
( |
const QString |
title, |
|
|
const QString |
text, |
|
|
const int |
currentValue, |
|
|
const int |
maximumValue |
|
) |
| const |
|
signal |
Progress of the current record export operation has changed.
- Parameters
-
| title | Title of the current export operation step. |
| text | Details of the current export operation step. |
| currentValue | Current progress value of the current record export operation step. |
| maximumValue | Maximum progress value of the current record export operation step. |
◆ removeExportTemplate()
| bool ExportController::removeExportTemplate |
( |
const QString & |
name | ) |
|
Removes the record export template with the specified name from the project.
- Parameters
-
| name | Name of the record export template to remove. |
- Returns
- true, if the export template has been removed, and false otherwise.
◆ setRecordExportTemplates()
| void ExportController::setRecordExportTemplates |
( |
RecordExportTemplateList & |
exportTemplates | ) |
|
Uses the specified list of record export templates as model for this controller.
- Parameters
-
| exportTemplates | New list of record export templates to use as model for this controller. |
The documentation for this class was generated from the following files:
- Source/Tome/Features/Export/Controller/exportcontroller.h
- Source/Tome/Features/Export/Controller/exportcontroller.cpp