roviz  0.7
Code Documentation of roviz
Public Member Functions | Static Public Member Functions | Properties | List of all members
FileWorkspace Class Reference
Inheritance diagram for FileWorkspace:
Inheritance graph
Collaboration diagram for FileWorkspace:
Collaboration graph

Public Member Functions

bool compare (const QSharedPointer< AbstractWorkspace > &otherWorkspace) const Q_DECL_OVERRIDE
 Compare a other Workspace source with this Workspace source (not the Object adress). More...
 
bool deleteWorkspace (bool deleteProjects=false) Q_DECL_OVERRIDE
 Delete workspace. The function deletes this workspace and all included projects, if the deleteProjects flag is set true. More...
 
bool deleteProject (const QSharedPointer< AbstractProject > &project) Q_DECL_OVERRIDE
 Delete a project and remove it from workspace. More...
 
bool save () Q_DECL_OVERRIDE
 Save workspace with all settings. More...
 
bool test () Q_DECL_OVERRIDE
 Workspace test procedure. The Test-Procedure is defined by the specific workspace class, which inherits from AbstractWorkspace class. More...
 
void init () Q_DECL_OVERRIDE
 Initialize the Workspace and set isValid flag. This function must be called, otherwise the workspace can't be valid. More...
 
void update () Q_DECL_OVERRIDE
 Update the workspace after property changes. More...
 
void setOpen (bool isOpen) Q_DECL_OVERRIDE
 Set the workspace open (in use) state. More...
 
void setFilePath (const QString &filePath)
 
void setFileEditMode (bool editMode)
 
QString filePath () const
 
QString path () const
 
QString fileName () const
 
- Public Member Functions inherited from AbstractWorkspace
bool removeProject (const QSharedPointer< AbstractProject > &project)
 Remove a project from workspace. The project will not be deleted. More...
 
bool removeProjects ()
 Remove all projects from workspace. The projects will not be deleted. More...
 
bool saveProjects () const
 Save all projects in workspace. More...
 
bool saveExternChangedProjects () const
 Save all projects in workspace which are changed by extern. More...
 
void resetProjects () const
 Reset all projects in workspace. Reload the complete project structure from xml. All settings, which are not saved will be discarded and the project isDirty flag will be set to false.
 
void resetExternChangedProjects () const
 Reset all projects in workspace which are changed by extern. More...
 
QStringList projectNames () const
 
bool validateWorkspaceDomDocument (const QDomDocument &domDocument)
 Validate a workspace DomDocument. More...
 
QDomDocument workspaceDomDocument () const
 
QString name () const
 
void setName (const QString &name)
 Set the workspace name. More...
 
bool isDefault () const
 
void setDefault (bool isDefault)
 Set workspace as default workspace. On Traviz start this workspace will be loaded directly. No workspace manager will be shown. More...
 
QString version () const
 
void setVersion (const QString &version)
 Set the workspace version. If the version is not compatible with the application condition the workspace could not be loaded. More...
 
int majorWorkspaceVersion () const
 
void setMajorWorkspaceVersion (int majorWorkspaceVersion)
 Set the workspace major version. If the version is not compatible with the application condition the workspace could not be loaded. More...
 
int minorWorkspaceVersion () const
 
void setMinorWorkspaceVersion (int minorWorkspaceVersion)
 Set the workspace minor version. If the version is not compatible with the application condition the workspace could not be loaded. More...
 
QVector< QSharedPointer< AbstractProject > > projects () const
 
QSharedPointer< AbstractProjectproject (QString connectionString) const
 
bool addProject (const QSharedPointer< AbstractProject > &project)
 Add a project into workspace. More...
 
void setProjects (const QVector< QSharedPointer< AbstractProject >> &projects)
 Set the vector of projects for a workspace. More...
 
int projectCount () const
 
void setConnectionString (const QString &connectionString)
 Set the Workspace connection string. The connectionString is unique source identifier inside a running Traviz application. More...
 
QString connectionString () const
 The Workspace connection string holds the source connection information (e.g File-Workspace -> filename, Sql-Workspace -> Server and user information). The connectionString is unique inside a running Traviz application and can be used to identifier a workspace. More...
 
QString description () const
 
void setDescription (const QString &description)
 Set the workspace description. More...
 
bool isOpen () const
 
QString className () const
 
SettingsScopesettingsScope ()
 
QString typeString () const
 
bool isValid () const
 
const QString lastError () const
 
void clearLastError ()
 
bool contains (const QSharedPointer< AbstractProject > &project) const
 
QString lastUsedDateTime () const
 
void setLastUsedDateTime (const QString &lastUsedDateTime)
 Set the workspace last used date value ("MM/dd/yyyy hh:mm:ss") More...
 

Static Public Member Functions

static QSharedPointer< FileWorkspacecreateFileWorkspaceFromFile (const QString &filePath)
 
- Static Public Member Functions inherited from AbstractWorkspace
static QDomDocument workspaceDomDocumentTemplate (const QString &name, const QString &version, const QString &description)
 This static function creates a clean workspace DomDocument. More...
 

Properties

QString filePath
 
- Properties inherited from AbstractWorkspace
bool isDefault
 

Additional Inherited Members

- Signals inherited from AbstractWorkspace
void workspaceUpdated ()
 
void isValidChanged (bool isValid)
 
void workspaceNameChanged (const QString &workspaceName)
 
void workspaceConnectionChanged (const QString &workspaceConnection)
 
void workspaceDescriptionChanged (const QString &workspaceDescription)
 
void projectDomDocumentChanged (const QSharedPointer< AbstractProject > &project)
 
- Protected Member Functions inherited from AbstractWorkspace
 AbstractWorkspace (const QString &typeString)
 AbstractWorkspace constructor with typeString definition (e,g. File, Sql). More...
 
void setValid (bool isValid)
 Set the workspace valid. This property decides if a workspace is loadable or not. More...
 
void setLastError (const QString &lastError)
 Set the last occured workspace error string. More...
 
bool setWorkspaceProperties (const QDomDocument &domDocument)
 Set the workspace properties. The properties will be read from domDocument. More...
 
void setWorkspaceDomDocument (const QDomDocument &workspaceDomDocument)
 Set the workspace dom document. The domdocument hold all information about the workspace (e.g version, name, last used date, projects). More...
 

Member Function Documentation

◆ compare()

bool FileWorkspace::compare ( const QSharedPointer< AbstractWorkspace > &  otherWorkspace) const
virtual

Compare a other Workspace source with this Workspace source (not the Object adress).

Parameters
otherWorkspaceThe Workspace to compare with.
Returns
Returns true if the other Workspace is equil (e.g. File-Workspace: same file), otherwise returns false.

Implements AbstractWorkspace.

◆ deleteProject()

bool FileWorkspace::deleteProject ( const QSharedPointer< AbstractProject > &  project)
virtual

Delete a project and remove it from workspace.

Parameters
projectThe project which should be deleted.
Returns
Returns true if the process was successfull, otherwise returns false.
See also
removeProject
removeProjects
saveProjects

Implements AbstractWorkspace.

Here is the call graph for this function:

◆ deleteWorkspace()

bool FileWorkspace::deleteWorkspace ( bool  deleteProjects = false)
virtual

Delete workspace. The function deletes this workspace and all included projects, if the deleteProjects flag is set true.

Parameters
deleteProjectsThe delete all projects flag (default = false).
Returns
Returns true if the process was successfull, otherwise returns false.
See also
deleteProject

Implements AbstractWorkspace.

Here is the call graph for this function:

◆ init()

void FileWorkspace::init ( )
virtual

Initialize the Workspace and set isValid flag. This function must be called, otherwise the workspace can't be valid.

See also
update

Implements AbstractWorkspace.

Here is the call graph for this function:

◆ save()

bool FileWorkspace::save ( )
virtual

Save workspace with all settings.

Returns
Returns true if the Workspace was successfully saved, otherwise returns false.

Implements AbstractWorkspace.

Here is the call graph for this function:

◆ setOpen()

void FileWorkspace::setOpen ( bool  isOpen)
virtual

Set the workspace open (in use) state.

Parameters
isOpenThe open flag.
See also
isOpen

Reimplemented from AbstractWorkspace.

Here is the call graph for this function:

◆ test()

bool FileWorkspace::test ( )
virtual

Workspace test procedure. The Test-Procedure is defined by the specific workspace class, which inherits from AbstractWorkspace class.

Returns
Returns true if the process was successfull, otherwise returns false.

Implements AbstractWorkspace.

◆ update()

void FileWorkspace::update ( )
virtual

Update the workspace after property changes.

See also
init

Implements AbstractWorkspace.

Here is the call graph for this function:

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