DbScript
Public Slots | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ControlCentre Class Reference

The ControlCentre class is the main interface to all Control Center methods. THIS CLASS IS THE ONLY INTERFACE THAT MODIFIES THE DATABASE. All other interfaces simply define objects, and are used as arguments to the ControlCentre methods. More...

#include <scriptinterface.h>

Inheritance diagram for ControlCentre:
Inheritance graph
[legend]
Collaboration diagram for ControlCentre:
Collaboration graph
[legend]

Public Slots

StringList messagesForConsole ()
 
Utility methods
String messageLog ()
 retrieve the Control Centre message log
 
void printToConsole (const String &contents)
 print back to the telnet console over the network connection
 
String realDbPath (const String &logicalPath)
 Convert to a real database path, as long as the logicalPath can be resolved.
 
Users
QVector< QObject * > users ()
 Retrieve a list of all users.
 
bool addUser (User *user)
 Add a new user.
 
bool deleteUser (User *user)
 Delete an existing user.
 
bool modifyUser (User *user)
 Modify a user Current supported modifications are changes to the name, firstname and last name.
 
bool verifyUser (User *user)
 Verify if a user exists in the database.
 
Environments
QVector< QObject * > environments ()
 Retrieve a list of all environments.
 
bool addEnvironment (Environment *env)
 add a new environment
 
bool deleteEnvironment (Environment *env)
 delete a existing environment
 
bool verifyEnvironment (Environment *env)
 verify if an environment exists in the database
 
bool modifyEnvironment (Environment *env)
 Modify a environment Current supported modifications are changes to the assetLock.
 
Jobs

Verify if a job exists in the database

QVector< QObject * > jobs (Environment *env)
 Retrieve a list of all jobs in a given environment.
 
bool addJob (Job *job)
 Add a job to an environment.
 
bool deleteJob (Job *job)
 delete a job
 
bool modifyJob (Job *job)
 Modify a job to an environment Current supported modifications are changes to the priority, approval policy and stage.
 
bool verifyJob (Job *job)
 Verify if a job exists in the database.
 
Scenes
QVector< QObject * > scenes (Job *job)
 Retrieve a list of all scenes in a given job.
 
QVector< QObject * > lockedScenes (Job *job)
 Retrieve a list of all locked scenes in a given job.
 
QVector< QObject * > lockedSceneVersions (Scene *scene)
 Retrieve a list of all locked scene versions in a given scene.
 
bool addScene (Scene *scene, int addPos)
 Add a new scene to an existing job.
 
bool deleteScene (Scene *scene)
 Delete an existing scene.
 
bool forceUnlockScene (Scene *scene, const String &username)
 Force unlock a scene.
 
bool forceUnlockSceneVersion (SceneVersion *scene, const String &username)
 Force unlock a scene version.
 
bool renameScene (Scene *scene, const String &newName)
 rename a scene
 
bool copyScene (Scene *fromScene, Scene *toScene, bool allData)
 copy a scene
 
bool moveScene (Scene *scene, const String &fileSystem, bool override)
 move a scene
 
bool preMoveSceneValidate (Scene *scene, const String &fileSystem)
 
bool fileSystemHasDirectory (Scene *scene, const String &fileSystem)
 
int sceneSize (Scene *scene)
 get the size of a scene in Mbytes
 
bool clearScene (Scene *scene)
 clear a scene
 
bool sceneHasXsheet (Scene *scene)
 Does a scene have an xsheet?
 
bool changeSceneStage (Scene *scene, const String &stage)
 Change the stage of a scene.
 
bool changeScenePriority (Scene *scene, int priority)
 Change the priority of a scene.
 
Import /Export
bool importScene (ImportData *import)
 Import a scene into the database.
 
StringList availableFileSystems ()
 Get list of filesystems exposed to the database.
 
bool exportScene (ExportData *exportData)
 Export a scene from the database.
 
QObject calculateSizeOfExport (ExportData *exportData)
 Calculate size of export package - Calculates all fields of the ExportSize based on job and sceneNames of exportData.
 
Render and Vectorize Queues
QVector< QObject * > getRenderJobs (Environment *env)
 Retrieve a list of all render jobs within a given environment.
 
QVector< QObject * > getVectorJobs (Environment *env)
 Retrieve a list of all vectorize jobs within a given environment.
 
bool renderScene (Environment *env, RenderData *renderData)
 Send a scene to the render queue.
 
StringList namedResolutions ()
 Returns list of defined resolutions.
 
bool vectorizeElement (Environment *env, VectorData *renderData, const String &vectorizeStyle)
 Send a scene/element/drawing to the vectorize queue If no element is specified, all elements of the given scene will be sent. If no drawing is specified, all drawings of the given element will be sent. See VectorData for details.
 
StringList vectorizationStyles ()
 Retrieve a list of the available vectorization styles ( found in etc/VectOptions.conf )
 
void reReadVectFile ()
 Force Control Centre to reread the list of the available vectorization styles ( found in etc/VectOptions.conf )
 
bool unVectorizeElement (Environment *env, VectorData *renderData, const String &procOptions, const String &suffix)
 Send a scene/element/drawing to the unVectorize queue If no element is specified, all elements of the given scene will be sent. If no drawing is specified, all drawings of the given element will be sent. See VectorData for details.
 
StringList pixmapFormatList ()
 Retrieve the list of supported pixmap formats ( for unvectorize )
 
Elements, Drawings and Versions
QVector< QObject * > elements (Scene *scene)
 Retrieve all elements within a scene.
 
QVector< QObject * > versions (Scene *scene)
 Retrieve all versions of a scene.
 
QVector< QObject * > drawings (Element *element)
 Retrieve all drawings within a element within a scene.
 
Locked Drawings and Palettes
StringList lockedAssets (Scene *scene)
 Retrieve a list of all locked drawings and palettes within the scene.
 
bool forceUnlockAsset (const String &asset)
 Force unlock a given drawing or palette ( as found in the call to lockedAssets )
 

Public Member Functions

 ControlCentre (QObject *, TUDbSelect *dbSelector, DBS_Mediator *mediator, WHO_AppInfo *_appInfo)
 
 ~ControlCentre ()
 

Private Member Functions

void getCurrentProcessStrings (TUDbAccess::dba_queueEntry_struct *)
 

Private Attributes

TUDbSelect * _dbSelector
 
DBS_Mediator * _mediator
 
WHO_AppInfo * _appInfo
 
StringList _messagesForConsole
 
String _stateStr
 
String _userStr
 
String _machineStr
 
String _dateStr
 
String _timeStr
 
DBS_VectOptionList * _vectOptions
 

Detailed Description

The ControlCentre class is the main interface to all Control Center methods. THIS CLASS IS THE ONLY INTERFACE THAT MODIFIES THE DATABASE. All other interfaces simply define objects, and are used as arguments to the ControlCentre methods.

Constructor & Destructor Documentation

ControlCentre::ControlCentre ( QObject *  ,
TUDbSelect *  dbSelector,
DBS_Mediator *  mediator,
WHO_AppInfo *  _appInfo 
)
ControlCentre::~ControlCentre ( )

Member Function Documentation

bool ControlCentre::addEnvironment ( Environment env)
slot

add a new environment

Parameters
envenvironment data
bool ControlCentre::addJob ( Job job)
slot

Add a job to an environment.

Parameters
jobjob data
bool ControlCentre::addScene ( Scene scene,
int  addPos 
)
slot

Add a new scene to an existing job.

Parameters
scenenew scene
addPosenumerated type of AddPositionType
bool ControlCentre::addUser ( User user)
slot

Add a new user.

Parameters
useruser data
StringList ControlCentre::availableFileSystems ( )
slot

Get list of filesystems exposed to the database.

QObject ControlCentre::calculateSizeOfExport ( ExportData exportData)
slot

Calculate size of export package - Calculates all fields of the ExportSize based on job and sceneNames of exportData.

Parameters
exportDataExport Data - see ExportData for details
bool ControlCentre::changeScenePriority ( Scene scene,
int  priority 
)
slot

Change the priority of a scene.

Parameters
sceneExisting scene in the database
prioritynew priority
bool ControlCentre::changeSceneStage ( Scene scene,
const String &  stage 
)
slot

Change the stage of a scene.

Parameters
sceneExisting scene in the database
stagenew stage
bool ControlCentre::clearScene ( Scene scene)
slot

clear a scene

Parameters
fromSceneExisting scene in the database
bool ControlCentre::copyScene ( Scene fromScene,
Scene toScene,
bool  allData 
)
slot

copy a scene

Parameters
fromSceneExisting scene in the database
toSceneExisting scene in the database
allDatacopy all data or not
bool ControlCentre::deleteEnvironment ( Environment env)
slot

delete a existing environment

Parameters
envenvironment data
bool ControlCentre::deleteJob ( Job job)
slot

delete a job

Parameters
jobjob data
bool ControlCentre::deleteScene ( Scene scene)
slot

Delete an existing scene.

Parameters
sceneExisting scene in the database
bool ControlCentre::deleteUser ( User user)
slot

Delete an existing user.

Parameters
userExisting user in the database
QVector<QObject *> ControlCentre::drawings ( Element element)
slot

Retrieve all drawings within a element within a scene.

Parameters
elementExisting element within the database
QVector<QObject *> ControlCentre::elements ( Scene scene)
slot

Retrieve all elements within a scene.

Parameters
sceneExisting Scene within the database
QVector<QObject *> ControlCentre::environments ( )
slot

Retrieve a list of all environments.

bool ControlCentre::exportScene ( ExportData exportData)
slot

Export a scene from the database.

Parameters
exportDataExport Data - see ExportData for details
bool ControlCentre::fileSystemHasDirectory ( Scene scene,
const String &  fileSystem 
)
slot
bool ControlCentre::forceUnlockAsset ( const String &  asset)
slot

Force unlock a given drawing or palette ( as found in the call to lockedAssets )

bool ControlCentre::forceUnlockScene ( Scene scene,
const String &  username 
)
slot

Force unlock a scene.

Parameters
sceneExisting scene in the database
usernameThe user performing the force unlock scene. Needed to determine permissions (Added in Harmony 11.0)
bool ControlCentre::forceUnlockSceneVersion ( SceneVersion scene,
const String &  username 
)
slot

Force unlock a scene version.

Parameters
sceneExisting scene version in the database
usernameThe user performing the force unlock scene version. Needed to determine permissions (Added in Harmony 11.0)
void ControlCentre::getCurrentProcessStrings ( TUDbAccess::dba_queueEntry_struct *  )
private
QVector<QObject *> ControlCentre::getRenderJobs ( Environment env)
slot

Retrieve a list of all render jobs within a given environment.

Parameters
envExisting Environment within the database
QVector<QObject *> ControlCentre::getVectorJobs ( Environment env)
slot

Retrieve a list of all vectorize jobs within a given environment.

Parameters
envExisting Environment within the database
bool ControlCentre::importScene ( ImportData import)
slot

Import a scene into the database.

Parameters
importImport Data - see ImportData for details
QVector<QObject *> ControlCentre::jobs ( Environment env)
slot

Retrieve a list of all jobs in a given environment.

Parameters
envExisting environment in the database
StringList ControlCentre::lockedAssets ( Scene scene)
slot

Retrieve a list of all locked drawings and palettes within the scene.

Parameters
sceneExisting Scene within the database
QVector<QObject *> ControlCentre::lockedScenes ( Job job)
slot

Retrieve a list of all locked scenes in a given job.

Parameters
jobExisting job in the database
QVector<QObject *> ControlCentre::lockedSceneVersions ( Scene scene)
slot

Retrieve a list of all locked scene versions in a given scene.

Parameters
sceneExisting scene in the database
String ControlCentre::messageLog ( )
slot

retrieve the Control Centre message log

StringList ControlCentre::messagesForConsole ( )
inlineslot
bool ControlCentre::modifyEnvironment ( Environment env)
slot

Modify a environment Current supported modifications are changes to the assetLock.

Parameters
envenv data
bool ControlCentre::modifyJob ( Job job)
slot

Modify a job to an environment Current supported modifications are changes to the priority, approval policy and stage.

Parameters
jobjob data
bool ControlCentre::modifyUser ( User user)
slot

Modify a user Current supported modifications are changes to the name, firstname and last name.

Parameters
userExisting user in the database
bool ControlCentre::moveScene ( Scene scene,
const String &  fileSystem,
bool  override 
)
slot

move a scene

Parameters
sceneExisting scene in the database
fileSystemExisting fileSystem recognized by database
StringList ControlCentre::namedResolutions ( )
slot

Returns list of defined resolutions.

StringList ControlCentre::pixmapFormatList ( )
slot

Retrieve the list of supported pixmap formats ( for unvectorize )

bool ControlCentre::preMoveSceneValidate ( Scene scene,
const String &  fileSystem 
)
slot
void ControlCentre::printToConsole ( const String &  contents)
slot

print back to the telnet console over the network connection

Parameters
contentsString to print
String ControlCentre::realDbPath ( const String &  logicalPath)
slot

Convert to a real database path, as long as the logicalPath can be resolved.

returns empty string if the path does not exist

Parameters
logicalPathpath relative to /USA_DB
bool ControlCentre::renameScene ( Scene scene,
const String &  newName 
)
slot

rename a scene

Parameters
sceneExisting scene in the database
newNamenew name of scene
bool ControlCentre::renderScene ( Environment env,
RenderData renderData 
)
slot

Send a scene to the render queue.

Parameters
envExisting Environment within the database
renderDataObject containing all paramaters for the render
void ControlCentre::reReadVectFile ( )
slot

Force Control Centre to reread the list of the available vectorization styles ( found in etc/VectOptions.conf )

bool ControlCentre::sceneHasXsheet ( Scene scene)
slot

Does a scene have an xsheet?

Parameters
sceneExisting scene in the database
QVector<QObject *> ControlCentre::scenes ( Job job)
slot

Retrieve a list of all scenes in a given job.

Parameters
jobExisting job in the database
int ControlCentre::sceneSize ( Scene scene)
slot

get the size of a scene in Mbytes

Parameters
sceneExisting scene in the database
bool ControlCentre::unVectorizeElement ( Environment env,
VectorData renderData,
const String &  procOptions,
const String &  suffix 
)
slot

Send a scene/element/drawing to the unVectorize queue If no element is specified, all elements of the given scene will be sent. If no drawing is specified, all drawings of the given element will be sent. See VectorData for details.

Parameters
envExisting Environment within the database
renderDataObject containing all paramaters for the unvectorize
commandline options ( -antialialsing low | medium-low | medium | high -resolution scan | int int -bgcolor 1.0 1.0 1.0
suffix( TGA, PNG, etc...)
QVector<QObject *> ControlCentre::users ( )
slot

Retrieve a list of all users.

StringList ControlCentre::vectorizationStyles ( )
slot

Retrieve a list of the available vectorization styles ( found in etc/VectOptions.conf )

bool ControlCentre::vectorizeElement ( Environment env,
VectorData renderData,
const String &  vectorizeStyle 
)
slot

Send a scene/element/drawing to the vectorize queue If no element is specified, all elements of the given scene will be sent. If no drawing is specified, all drawings of the given element will be sent. See VectorData for details.

Parameters
envExisting Environment within the database
renderDataObject containing all paramaters for the vectorize
vectorizeStylename of the vectorization style
bool ControlCentre::verifyEnvironment ( Environment env)
slot

verify if an environment exists in the database

Parameters
envenvironment data
bool ControlCentre::verifyJob ( Job job)
slot

Verify if a job exists in the database.

Parameters
jobjob data
bool ControlCentre::verifyUser ( User user)
slot

Verify if a user exists in the database.

Parameters
userExisting user in the database
QVector<QObject *> ControlCentre::versions ( Scene scene)
slot

Retrieve all versions of a scene.

Parameters
sceneExisting Scene within the database

Member Data Documentation

WHO_AppInfo* ControlCentre::_appInfo
private
String ControlCentre::_dateStr
private
TUDbSelect* ControlCentre::_dbSelector
private
String ControlCentre::_machineStr
private
DBS_Mediator* ControlCentre::_mediator
private
StringList ControlCentre::_messagesForConsole
private
String ControlCentre::_stateStr
private
String ControlCentre::_timeStr
private
String ControlCentre::_userStr
private
DBS_VectOptionList* ControlCentre::_vectOptions
private

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