|
roviz
0.7
Code Documentation of roviz
|
#include <abstract_workspace.h>


Signals | |
| 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) |
Public Member Functions | |
| virtual void | init ()=0 |
| Initialize the Workspace and set isValid flag. This function must be called, otherwise the workspace can't be valid. More... | |
| virtual void | update ()=0 |
| Update the workspace after property changes. More... | |
| virtual bool | compare (const QSharedPointer< AbstractWorkspace > &otherWorkspace) const =0 |
| Compare a other Workspace source with this Workspace source (not the Object adress). More... | |
| virtual bool | save ()=0 |
| Save workspace with all settings. More... | |
| virtual bool | test ()=0 |
| Workspace test procedure. The Test-Procedure is defined by the specific workspace class, which inherits from AbstractWorkspace class. More... | |
| virtual bool | deleteWorkspace (bool deleteProjects=false)=0 |
Delete workspace. The function deletes this workspace and all included projects, if the deleteProjects flag is set true. More... | |
| virtual bool | deleteProject (const QSharedPointer< AbstractProject > &project)=0 |
| Delete a project and remove it from workspace. More... | |
| 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< AbstractProject > | project (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 |
| virtual void | setOpen (bool isOpen) |
| Set the workspace open (in use) state. More... | |
| QString | className () const |
| SettingsScope * | settingsScope () |
| 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 QDomDocument | workspaceDomDocumentTemplate (const QString &name, const QString &version, const QString &description) |
| This static function creates a clean workspace DomDocument. More... | |
Protected Member Functions | |
| 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... | |
Properties | |
| bool | isDefault |
The AbstractWorkspace class defines a functional basic class for e.g. a file and sql workspace. A workspace can handle Traviz projects.
This class is part of the projectmanager feature.
|
protected |
AbstractWorkspace constructor with typeString definition (e,g. File, Sql).
| typeString | Define the type of workspace. |

| bool AbstractWorkspace::addProject | ( | const QSharedPointer< AbstractProject > & | project | ) |
Add a project into workspace.
| project | The abstract project which should be inserted. |
true if the process was successfull, otherwise returns false.
| QString AbstractWorkspace::className | ( | ) | const |
| void AbstractWorkspace::clearLastError | ( | ) |
|
pure virtual |
Compare a other Workspace source with this Workspace source (not the Object adress).
| otherWorkspace | The Workspace to compare with. |
true if the other Workspace is equil (e.g. File-Workspace: same file), otherwise returns false. Implemented in SqlWorkspace, and FileWorkspace.
| QString AbstractWorkspace::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.
the workspace connection string.
| bool AbstractWorkspace::contains | ( | const QSharedPointer< AbstractProject > & | project | ) | const |
| project | The abstract project. |
true if the workspace contains an occurrence of project;, otherwise returns false.
|
pure virtual |
Delete a project and remove it from workspace.
| project | The project which should be deleted. |
true if the process was successfull, otherwise returns false.Implemented in SqlWorkspace, and FileWorkspace.
|
pure virtual |
Delete workspace. The function deletes this workspace and all included projects, if the deleteProjects flag is set true.
| deleteProjects | The delete all projects flag (default = false). |
true if the process was successfull, otherwise returns false.Implemented in SqlWorkspace, and FileWorkspace.
| QString AbstractWorkspace::description | ( | ) | const |
the workspace description.
|
pure virtual |
Initialize the Workspace and set isValid flag. This function must be called, otherwise the workspace can't be valid.
Implemented in FileWorkspace, and SqlWorkspace.
| bool AbstractWorkspace::isDefault | ( | ) | const |
true if the workspace is set as default workspace, otherwise returns false.
| bool AbstractWorkspace::isOpen | ( | ) | const |
true if the workspace is open (in use), otherwise it returns false.
| bool AbstractWorkspace::isValid | ( | ) | const |
true if the workspace is valid, otherwise it returns false. 
| const QString AbstractWorkspace::lastError | ( | ) | const |
sa clearLastError

| QString AbstractWorkspace::lastUsedDateTime | ( | ) | const |
| int AbstractWorkspace::majorWorkspaceVersion | ( | ) | const |
the workspace major version.
| int AbstractWorkspace::minorWorkspaceVersion | ( | ) | const |
the workspace minor version.
| QString AbstractWorkspace::name | ( | ) | const |
| QSharedPointer< AbstractProject > AbstractWorkspace::project | ( | QString | connectionString | ) | const |


| int AbstractWorkspace::projectCount | ( | ) | const |
the number of projects in this workspace.| QStringList AbstractWorkspace::projectNames | ( | ) | const |
a stringlist containing all project names, which are existent in workspace. 
| QVector< QSharedPointer< AbstractProject > > AbstractWorkspace::projects | ( | ) | const |

| bool AbstractWorkspace::removeProject | ( | const QSharedPointer< AbstractProject > & | project | ) |
Remove a project from workspace. The project will not be deleted.
| project | The project which should be removed. |
true if the process was successfull, otherwise returns false.
| bool AbstractWorkspace::removeProjects | ( | ) |
Remove all projects from workspace. The projects will not be deleted.
true if the process was successfull, otherwise returns false.
| void AbstractWorkspace::resetExternChangedProjects | ( | ) | const |
Reset all projects in workspace which are changed by extern.

|
pure virtual |
Save workspace with all settings.
true if the Workspace was successfully saved, otherwise returns false. Implemented in SqlWorkspace, and FileWorkspace.

| bool AbstractWorkspace::saveExternChangedProjects | ( | ) | const |
Save all projects in workspace which are changed by extern.
true if the process was successfull, otherwise returns false.
| bool AbstractWorkspace::saveProjects | ( | ) | const |
Save all projects in workspace.
true if the process was successfull, otherwise returns false.
| void AbstractWorkspace::setConnectionString | ( | const QString & | connectionString | ) |
Set the Workspace connection string. The connectionString is unique source identifier inside a running Traviz application.
| connectionString | The connection string. |

| void AbstractWorkspace::setDefault | ( | bool | isDefault | ) |
Set workspace as default workspace. On Traviz start this workspace will be loaded directly. No workspace manager will be shown.
| isDefault | The enable bool flag. |

| void AbstractWorkspace::setDescription | ( | const QString & | description | ) |
Set the workspace description.
| description | The workspace description. |


|
protected |
Set the last occured workspace error string.
| lastError | The error string. |


| void AbstractWorkspace::setLastUsedDateTime | ( | const QString & | lastUsedDateTime | ) |
Set the workspace last used date value ("MM/dd/yyyy hh:mm:ss")
| lastUsedDateTime | The last used date time of the workspace. |
| void AbstractWorkspace::setMajorWorkspaceVersion | ( | int | majorWorkspaceVersion | ) |
Set the workspace major version. If the version is not compatible with the application condition the workspace could not be loaded.
| version | The version value string. |

| void AbstractWorkspace::setMinorWorkspaceVersion | ( | int | minorWorkspaceVersion | ) |
Set the workspace minor version. If the version is not compatible with the application condition the workspace could not be loaded.
| version | The version value string. |

| void AbstractWorkspace::setName | ( | const QString & | name | ) |
Set the workspace name.
| name | The name for the workspace. |


|
virtual |
Set the workspace open (in use) state.
| isOpen | The open flag. |
Reimplemented in FileWorkspace.


| void AbstractWorkspace::setProjects | ( | const QVector< QSharedPointer< AbstractProject >> & | projects | ) |
Set the vector of projects for a workspace.
| projects | The vector of shared pointer to projects. |

| SettingsScope * AbstractWorkspace::settingsScope | ( | ) |
|
protected |
Set the workspace valid. This property decides if a workspace is loadable or not.
| isValid | The valid flag. |

| void AbstractWorkspace::setVersion | ( | const QString & | version | ) |
Set the workspace version. If the version is not compatible with the application condition the workspace could not be loaded.
| version | The version value string. |

|
protected |
Set the workspace dom document. The domdocument hold all information about the workspace (e.g version, name, last used date, projects).
| workspaceDomDocument | The domdocument. |

|
protected |
Set the workspace properties. The properties will be read from domDocument.
| domDocument | Hold the workspace properties. |
| fallbackName | If no workspace name is set, the workspace fallback name will be used. |
true if the workspace properties are set and workspace is valid, otherwise it returns false. 
|
pure virtual |
Workspace test procedure. The Test-Procedure is defined by the specific workspace class, which inherits from AbstractWorkspace class.
true if the process was successfull, otherwise returns false. Implemented in SqlWorkspace, and FileWorkspace.
| QString AbstractWorkspace::typeString | ( | ) | const |

|
pure virtual |
Update the workspace after property changes.
Implemented in FileWorkspace, and SqlWorkspace.
| bool AbstractWorkspace::validateWorkspaceDomDocument | ( | const QDomDocument & | domDocument | ) |
Validate a workspace DomDocument.
| domDocument | The Workspace DomDocument. |
true if the DomDocument is valid, otherwise returns false. 

| QString AbstractWorkspace::version | ( | ) | const |
the workspace version.
| QDomDocument AbstractWorkspace::workspaceDomDocument | ( | ) | const |

|
static |
This static function creates a clean workspace DomDocument.
| name | The Workspace name. |
| version | The Workspace version. |
| description | The Workspace description. |

1.8.13