cee::rep::Snapshot Class Reference

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, StrfieldValues () 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 Imageimage () const
 Returns the image from this image snapshot. More...
 
void setImage (Image *image)
 Sets the image for a image snapshot. More...
 
const ug::VTFxMemoryFilemodelVTFx () 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 Tabletable () const
 Returns the tabular data for a table snapshot. More...
 
void setTable (Table *table)
 Sets the tabular data for a table snapshot. More...
 
- Public Member Functions inherited from cee::RefCountedObject
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...
 
Inheritance diagram for cee::rep::Snapshot:
cee::RefCountedObject

Detailed Description

An image, 3D model or tabular data describing a snapshot.

There are three types of snapshots that can be used in reports:

  • Images: Snapshot or other image data.
  • 3D model data: 3D models, results and feature extractions are handled through the VTFx file format from Ceetron enabling the use of 3D directly into the Word/PowerPoint/HTML document.
  • Tabular data: All table data is represented as strings. The first row of data will be column headers. Use this for simple tabular listings or for input data to a chart.

In addition to the snapshot object itself, each snapshot has the following attributes:

  • Name: Each snapshot can have a name. This is just for internal help and will not be used in the reports.
  • Title: Each snapshot has a title. This can be inserted in the generated reports.
  • Description: This is a more exhaustive description available for each snapshot and simple html formatting can be applied. The description can be inserted in the generated reports. The description can also contain field values (see below). The syntax for inserting field values is $('field name'). For instance: . These will then be replaced with the belonging field value upon creating a report.
  • 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:

    • Database name
    • Database type
    • Number of parts
    • Number of elements
    • Number of nodes
    • Current scalar result name
    • Current vector result name
    • Maximum result values
    • Minimum result values

    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

See also
Repository
Table
ReportCreatorWord
ReportCreatorPowerPoint
ReportCreatorHtml

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

cee::rep::Snapshot::Snapshot ( SnapshotType  type)

Creates an empty snapshot with the specified snapshot type.

Member Function Documentation

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.

std::map< Str, Str > cee::rep::Snapshot::fieldValues ( ) const

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.

See also
setModelVtfx()
void cee::rep::Snapshot::setDescription ( const Str description)

Sets the snapshot description.

void cee::rep::Snapshot::setFieldValues ( const std::map< Str, Str > &  fieldValues)

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)

See also
SnapshotObjectType