DbScript
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

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

Verify if a job exists in the database

QVector< QObject * > jobs (Environment *env)
 Retrieve a list of all jobs in a given environment. More...
 
bool addJob (Job *job)
 Add a job to an environment. More...
 
bool deleteJob (Job *job)
 delete a job More...
 
bool modifyJob (Job *job)
 Modify a job to an environment Current supported modifications are changes to the priority, approval policy and stage. More...
 
bool verifyJob (Job *job)
 Verify if a job exists in the database. More...
 
Scenes
QVector< QObject * > scenes (Job *job)
 Retrieve a list of all scenes in a given job. More...
 
QVector< QObject * > lockedScenes (Job *job)
 Retrieve a list of all locked scenes in a given job. More...
 
QVector< QObject * > lockedSceneVersions (Scene *scene)
 Retrieve a list of all locked scene versions in a given scene. More...
 
bool addScene (Scene *scene, int addPos)
 Add a new scene to an existing job. More...
 
bool deleteScene (Scene *scene)
 Delete an existing scene. More...
 
bool forceUnlockScene (Scene *scene, const String &username)
 Force unlock a scene. More...
 
bool forceUnlockSceneVersion (SceneVersion *scene, const String &username)
 Force unlock a scene version. More...
 
bool renameScene (Scene *scene, const String &newName)
 rename a scene More...
 
bool copyScene (Scene *fromScene, Scene *toScene, bool allData)
 copy a scene More...
 
bool moveScene (Scene *scene, const String &fileSystem, bool override)
 move a scene More...
 
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 More...
 
bool clearScene (Scene *scene)
 clear a scene More...
 
bool sceneHasXsheet (Scene *scene)
 Does a scene have an xsheet? More...
 
bool changeSceneStage (Scene *scene, const String &stage)
 Change the stage of a scene. More...
 
bool changeScenePriority (Scene *scene, int priority)
 Change the priority of a scene. More...
 
Import /Export
bool importScene (ImportData *import)
 Import a scene into the database. More...
 
StringList availableFileSystems ()
 Get list of filesystems exposed to the database. More...
 
bool exportScene (ExportData *exportData)
 Export a scene from the database. More...
 
QObject calculateSizeOfExport (ExportData *exportData)
 Calculate size of export package - Calculates all fields of the ExportSize based on job and sceneNames of exportData. More...
 

Public Member Functions

 ControlCentre (QObject *, TUDbSelect *dbSelector, DBS_Mediator *mediator, WHO_AppInfo *_appInfo)
 
 ~ControlCentre ()
 
StringList messagesForConsole ()
 
Elements, Drawings and Versions
QVector< QObject * > elements (Scene *scene)
 Retrieve all elements within a scene. More...
 
QVector< QObject * > versions (Scene *scene)
 Retrieve all versions of a scene. More...
 
QVector< QObject * > drawings (Element *element)
 Retrieve all drawings within a element within a scene. More...
 
Locked Drawings and Palettes
StringList lockedAssets (Scene *scene)
 Retrieve a list of all locked drawings and palettes within the scene. More...
 
bool forceUnlockAsset (const String &asset)
 Force unlock a given drawing or palette ( as found in the call to lockedAssets ) More...
 

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
 

Render and Vectorize Queues

StringList pixmapFormatList ()
 Retrieve the list of supported pixmap formats ( for unvectorize ) More...
 
QVector< QObject * > getRenderJobs (Environment *env)
 Retrieve a list of all render jobs within a given environment. More...
 
QVector< QObject * > getVectorJobs (Environment *env)
 Retrieve a list of all vectorize jobs within a given environment. More...
 
bool renderScene (Environment *env, RenderData *renderData)
 Send a scene to the render queue. More...
 
StringList namedResolutions ()
 Returns list of defined resolutions. More...
 
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. More...
 
StringList vectorizationStyles ()
 Retrieve a list of the available vectorization styles ( found in etc/VectOptions.conf ) More...
 
void reReadVectFile ()
 Force Control Centre to reread the list of the available vectorization styles ( found in etc/VectOptions.conf ) More...
 
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. More...
 

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)

Retrieve all drawings within a element within a scene.

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

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)

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)

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 ( )
inline
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 ( )

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)

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: