An image, 3D model or tabular data describing a snapshot. More...
Public Types | |
enum | SnapshotType { OBJECT_IMAGE = 1, OBJECT_VTFX = 2, OBJECT_TABLE = 3 } |
Type of data for this snapshot. Can be either an image, a 3D model or a table. More... | |
Public Member Functions | |
Snapshot (SnapshotType type) | |
Creates an empty snapshot with the specified snapshot type. More... | |
Str | name () const |
Returns the name of the snapshot. More... | |
void | setName (const Str &name) |
Sets the name of the snapshot. More... | |
SnapshotType | type () const |
Returns the snapshot type (image, 3D model or table) More... | |
Str | title () const |
Returns the title of this snapshot. More... | |
void | setTitle (const Str &title) |
Sets the title of the snapshot. More... | |
Str | description () const |
Returns the snapshot description. More... | |
void | setDescription (const Str &description) |
Sets the snapshot description. More... | |
Str | expandedDescription () const |
Returns the snapshot description expanded with the actual values of the field values. More... | |
std::map< Str, Str > | fieldValues () const |
Returns the field values for this snapshot. More... | |
void | setFieldValues (const std::map< Str, Str > &fieldValues) |
Sets the field values for this snapshot. More... | |
Str | cloudViewerUrl () const |
Returns the url to the model if it has been uploaded to Ceetron Cloud. More... | |
void | setCloudViewerUrl (const Str &url) |
Sets the url to the model on Ceetron Cloud. More... | |
Str | originalModelPath () const |
Returns the path to the original model file. More... | |
void | setOriginalModelPath (const Str &path) |
Sets the path to the original model file. More... | |
const Image * | image () const |
Returns the image from this image snapshot. More... | |
void | setImage (Image *image) |
Sets the image for a image snapshot. More... | |
const ug::VTFxMemoryFile * | modelVTFx () const |
Gets the VTFx model. More... | |
void | setModelVTFx (ug::VTFxMemoryFile *memoryFile) |
Sets the VTFx model. More... | |
bool | setModelVTFxFromFile (const Str &vtfxFileName) |
Sets the VTFx model from a file. More... | |
const Table * | table () const |
Returns the tabular data for a table snapshot. More... | |
void | setTable (Table *table) |
Sets the tabular data for a table snapshot. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
An image, 3D model or tabular data describing a snapshot.
There are three types of snapshots that can be used in reports:
In addition to the snapshot object itself, each snapshot has the following attributes:
Field values: Field values are a user specified array of field name and field value string pairs belonging to a snapshot. Typical field values can be:
Field value names should, by convention, be in capital letters (i.e. DATABASE_NAME). Field values can be used in the report template, or directly into the snapshot description above.
The snapshot type (image, 3D model or table) is set upon creation of the snapshot. The corresponding media must be set using setImage(), setTable() or setModelVTFx(). Media that don't match the given snapshot type is ignored. (For instance if the snapshots type is OBJECT_IMAGE, the existence of a table will be ignored.)
Note! In PowerPoint and Word, the VTFx file is embedded into the .pptx/.docx file. But for HTML reports, we put the VTFx in the cloud using Ceetron Cloud (https://cloud.ceetron.com) and reference this in the report. To enable the cloud integration, the user need to specify the url to the VTFx model in the Snapshot object using Snapshot::setCloudViewerUrl() instead of (or in addition to) Snapshot::setModelVtfx(). See Ceetron Cloud - Add a Send-To-Cloud button to your app for how to upload the VTFx to cloud. The QtReposityoryManager and WinFormsReport examples provided in the distribution has example code for this.
Snapshots are added to a repository and the repository is used by the report creator.
See more about snapshots on: Ceetron Report: Snapshots
Type of data for this snapshot. Can be either an image, a 3D model or a table.
Enumerator | |
---|---|
OBJECT_IMAGE |
Image snapshot. Can be, for instance, a snapshot of the view or a image plot. |
OBJECT_VTFX |
3D model from a view. Can contain an animation. Can be viewed in Ceetron 3D Plugin for Word and PowerPoint or directly in the browser through the Ceetron Cloud feature. |
OBJECT_TABLE |
Tabular data. Can be, for instance, a series of picking information or plot data. |
cee::rep::Snapshot::Snapshot | ( | SnapshotType | type | ) |
Creates an empty snapshot with the specified snapshot type.
Str cee::rep::Snapshot::cloudViewerUrl | ( | ) | const |
Returns the url to the model if it has been uploaded to Ceetron Cloud.
Str cee::rep::Snapshot::description | ( | ) | const |
Returns the snapshot description.
cee::Str cee::rep::Snapshot::expandedDescription | ( | ) | const |
Returns the snapshot description expanded with the actual values of the field values.
Returns the field values for this snapshot.
const cee::Image * cee::rep::Snapshot::image | ( | ) | const |
Returns the image from this image snapshot.
const ug::VTFxMemoryFile * cee::rep::Snapshot::modelVTFx | ( | ) | const |
Gets the VTFx model.
Str cee::rep::Snapshot::name | ( | ) | const |
Returns the name of the snapshot.
cee::Str cee::rep::Snapshot::originalModelPath | ( | ) | const |
Returns the path to the original model file.
For instance if you want to reopen the file this snapshot was captured from.
void cee::rep::Snapshot::setCloudViewerUrl | ( | const Str & | url | ) |
Sets the url to the model on Ceetron Cloud.
Note! Does not do the actual upload, this has to be done in app code.
void cee::rep::Snapshot::setDescription | ( | const Str & | description | ) |
Sets the snapshot description.
Sets the field values for this snapshot.
void cee::rep::Snapshot::setImage | ( | cee::Image * | image | ) |
Sets the image for a image snapshot.
void cee::rep::Snapshot::setModelVTFx | ( | ug::VTFxMemoryFile * | memoryFile | ) |
Sets the VTFx model.
Note! Special handling for HTML. For HTML reports, we put the VTFx in the cloud using Ceetron Cloud (https://cloud.ceetron.com) and reference this in the report. To enable the cloud integration in a HTML, the user need to specify the url to the VTFx model in the Snapshot object using Snapshot::setCloudViewerUrl(), in stead (or in addition) to Snapshot::setModelVtfx(). See Ceetron Cloud - Add a Send-To-Cloud button to your app for how to upload the VTFx to cloud. The QtRepositoryManager and WinFormsReport examples provided in the distribution has example code for this.
Note! Only used by ReportCreatorPowerPoint and ReportCreatorWord!
bool cee::rep::Snapshot::setModelVTFxFromFile | ( | const Str & | vtfxFileName | ) |
Sets the VTFx model from a file.
A ug::VTFxMemoryFile will be created and inserted into the snapshot.
Note! Special handling for HTML. For HTML reports, we put the VTFx in the cloud using Ceetron Cloud (https://cloud.ceetron.com) and reference this in the report. To enable the cloud integration in a HTML, the user need to specify the url to the VTFx model in the Snapshot object using Snapshot::setCloudViewerUrl(), in stead (or in addition) to Snapshot::setModelVtfx(). See Ceetron Cloud - Add a Send-To-Cloud button to your app for how to upload the VTFx to cloud. The QtReposityoryManager and WinFormsReport examples provided in the distribution has example code for this.
Note! Only used by ReportCreatorPowerPoint and ReportCreatorWord!
void cee::rep::Snapshot::setName | ( | const Str & | name | ) |
Sets the name of the snapshot.
This is for internal use and naming when saving the repository. If no name is specified, a default name will be generated. The snapshot name must be unique. If it's not, it will be appended with a number when added to the repository to make sure it's unique.
void cee::rep::Snapshot::setOriginalModelPath | ( | const Str & | path | ) |
Sets the path to the original model file.
void cee::rep::Snapshot::setTable | ( | Table * | table | ) |
Sets the tabular data for a table snapshot.
void cee::rep::Snapshot::setTitle | ( | const Str & | title | ) |
Sets the title of the snapshot.
const cee::rep::Table * cee::rep::Snapshot::table | ( | ) | const |
Returns the tabular data for a table snapshot.
Str cee::rep::Snapshot::title | ( | ) | const |
Returns the title of this snapshot.
Snapshot::SnapshotType cee::rep::Snapshot::type | ( | ) | const |
Returns the snapshot type (image, 3D model or table)