roviz  0.7
Code Documentation of roviz
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
AbstractProject Class Referenceabstract
Inheritance diagram for AbstractProject:
Inheritance graph
Collaboration diagram for AbstractProject:
Collaboration graph

Signals

void stateChange ()
 
void internDomChanged ()
 
void externDomChange ()
 

Public Member Functions

virtual bool save ()=0
 Save the project in a xml structure. More...
 
virtual bool autosave ()=0
 Save the project in a xml structure. More...
 
virtual bool autosaveExists ()=0
 Check autosave project xml exists. More...
 
virtual void cleanAutosave ()=0
 Remove the autosave project xml structure. More...
 
virtual QString autosaveInfo ()=0
 Information about the autosave project xml structure. More...
 
virtual void reset ()=0
 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.
 
virtual QString connectionString ()=0
 The connection string defines the link to the project xml source (e.g file, sql). More...
 
virtual QDomDocument domDocument () const =0
 
virtual QDomDocument autosaveDomDocument () const =0
 
virtual bool setDomDocument (const QDomDocument &domDocument)=0
 Set and validate the project domDocument xml structure. More...
 
virtual void setLoaded (bool isLoaded)
 Set the project loaded property. This indicates, that the project is currently loaded by the related workspace or not. More...
 
bool isLoaded () const
 
bool validateProjectDomDocument (const QDomDocument &domDocument)
 This function validates a project domDocument xml structure. A validation error can be printed by lastError. More...
 
bool isValid () const
 
SettingsScopesettingsScope () const
 Returns a pointer to the settings scope associated with the project. More...
 
const QString & name () const
 
void setName (const QString &name)
 Set the project name. More...
 
QString version () const
 
int minorProjectVersion () const
 
int majorProjectVersion () const
 
QString description () const
 
void setDescription (const QString &description)
 Set the project description. More...
 
bool isDirty () const
 
void setDirty (bool isDirty)
 The isDirty flag represent the project save state. More...
 
bool isFastLoad () const
 
void setFastLoad (bool isFastLoad)
 Set the project fastload property. The project can directly loaded by open the related workspace. More...
 
QString lastError () const
 
bool isExternChanged () const
 

Static Public Member Functions

static QDomDocument projectDomDocumentTemplate (const QString &name, const QString &version, const QString &description="")
 The project is defined by a xml structure. This structure is represented by a domDocument. The static projectDomDocumentTemplate function creats a clean project domDocument. More...
 
static bool compareDomDocumentMD5 (const QDomDocument &dom1, const QDomDocument &dom2)
 Compare two domdocuments with each other via md5 hash bytearray. More...
 

Protected Member Functions

 AbstractProject (SettingsScope *parentSettingsScope)
 Abstract project constructor. More...
 
bool init ()
 Initialize the project properties (e.g. settings scope) and connect them. More...
 
void setValid (bool isValid)
 Set the project valid. This property decides if a project is loadable or not. More...
 
void setLastError (const QString &lastError)
 Set an error message to the project. More...
 
void setVersion (const QString &version)
 Set the project version. If the version is not compatible with the application, the project will be invalid. More...
 
void setExternChanged (bool isExternChanged)
 Set project changed by extern (e.g. project file was changed outside Traviz). More...
 

Constructor & Destructor Documentation

◆ AbstractProject()

AbstractProject::AbstractProject ( SettingsScope parentSettingsScope)
protected

Abstract project constructor.

Parameters
relatedWorkspaceThe related workspace.

Member Function Documentation

◆ autosave()

virtual bool AbstractProject::autosave ( )
pure virtual

Save the project in a xml structure.

Returns
Returns true if the save procedure was successful, otherwise returns false.
See also
save
autosaveExists
cleanAutosave
autosaveInfo

Implemented in FileProject.

◆ autosaveDomDocument()

virtual QDomDocument AbstractProject::autosaveDomDocument ( ) const
pure virtual
Returns
Returns the domDocument xml structure from the autosave process.
See also
domDocument
setDomDocument

Implemented in FileProject.

◆ autosaveExists()

virtual bool AbstractProject::autosaveExists ( )
pure virtual

Check autosave project xml exists.

Returns
Returns true if the autosave xml exists, otherwise returns false.
See also
save
autosave
cleanAutosave
autosaveInfo

Implemented in FileProject.

◆ autosaveInfo()

virtual QString AbstractProject::autosaveInfo ( )
pure virtual

Information about the autosave project xml structure.

Returns
Returns a QString with the autosave information.
See also
save
autosave
autosaveExists
cleanAutosave

Implemented in FileProject.

◆ cleanAutosave()

virtual void AbstractProject::cleanAutosave ( )
pure virtual

Remove the autosave project xml structure.

Returns
Returns true if the project xml structure was successfully removed, otherwise returns false.
See also
save
autosave
autosaveExists
autosaveInfo

Implemented in FileProject.

◆ compareDomDocumentMD5()

bool AbstractProject::compareDomDocumentMD5 ( const QDomDocument &  dom1,
const QDomDocument &  dom2 
)
static

Compare two domdocuments with each other via md5 hash bytearray.

Parameters
dom1The first domDocument.
dom2The second domDocument.
Returns
Returns true if the domDocuments are equil, otherwise returns false.

◆ connectionString()

QString AbstractProject::connectionString ( )
pure virtual

The connection string defines the link to the project xml source (e.g file, sql).

Returns
Returns the connection string.

Implemented in FileProject.

◆ description()

QString AbstractProject::description ( ) const
Returns
Returns the description from the project.
See also
setDescription
Here is the caller graph for this function:

◆ domDocument()

virtual QDomDocument AbstractProject::domDocument ( ) const
pure virtual
Returns
Returns the domDocument xml structure from the project.
See also
setDomDocument

Implemented in FileProject.

Here is the caller graph for this function:

◆ init()

bool AbstractProject::init ( )
protected

Initialize the project properties (e.g. settings scope) and connect them.

Returns
Returns true if the init procedure was successful, otherwise returns false.
Here is the call graph for this function:

◆ isDirty()

bool AbstractProject::isDirty ( ) const
Returns
Returns true if the project is not in a persistant state (saved), otherwise returns false.
See also
setDirty
Here is the caller graph for this function:

◆ isExternChanged()

bool AbstractProject::isExternChanged ( ) const
Returns
Returns true if the project was changed by extern, otherwise returns false.
Here is the caller graph for this function:

◆ isFastLoad()

bool AbstractProject::isFastLoad ( ) const
Returns
Returns true if the project should be directly load, otherwise returns false.
See also
setFastLoad
Here is the caller graph for this function:

◆ isLoaded()

bool AbstractProject::isLoaded ( ) const
Returns
Returns true if the project is loaded in the related workspace, otherwise returns false.
See also
setLoaded
Here is the caller graph for this function:

◆ isValid()

bool AbstractProject::isValid ( ) const
Returns
Returns true if the project is valid, otherwise returns false.
See also
setValid
validateProjectDomDocument
Here is the caller graph for this function:

◆ lastError()

QString AbstractProject::lastError ( ) const
Returns
The last error, which is occured in the project.
Here is the caller graph for this function:

◆ majorProjectVersion()

int AbstractProject::majorProjectVersion ( ) const
Returns
Returns the major project version.
See also
version
minorProjectVersion

◆ minorProjectVersion()

int AbstractProject::minorProjectVersion ( ) const
Returns
Returns the minor project version.
See also
version
majorProjectVersion

◆ name()

const QString & AbstractProject::name ( ) const
Returns
Returns the name from the project.
See also
setName
Here is the caller graph for this function:

◆ projectDomDocumentTemplate()

QDomDocument AbstractProject::projectDomDocumentTemplate ( const QString &  name,
const QString &  version,
const QString &  description = "" 
)
static

The project is defined by a xml structure. This structure is represented by a domDocument. The static projectDomDocumentTemplate function creats a clean project domDocument.

Parameters
nameThe name for the project.
versionThe version for the project. The version has to be compatible with the current application, otherwise the project is invalid.
descriptionThe description for the project. The description is empty by default.
Returns
Returns a clean project dom document.

◆ save()

virtual bool AbstractProject::save ( )
pure virtual

Save the project in a xml structure.

Returns
Returns true if the save procedure was successful, otherwise returns false.
See also
autosave

Implemented in FileProject.

◆ setDescription()

void AbstractProject::setDescription ( const QString &  description)

Set the project description.

Parameters
descriptionThe description for the project.
See also
description
Here is the call graph for this function:

◆ setDirty()

void AbstractProject::setDirty ( bool  isDirty)

The isDirty flag represent the project save state.

Parameters
isDirtySet the dirty state flag.
See also
isDirty
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDomDocument()

virtual bool AbstractProject::setDomDocument ( const QDomDocument &  domDocument)
pure virtual

Set and validate the project domDocument xml structure.

Parameters
domDocumentThe domDocument for the project.
Returns
Returns true if the domDocument is valid and set, otherwise returns false.
See also
domDocument
validateProjectDomDocument

Implemented in FileProject.

◆ setExternChanged()

void AbstractProject::setExternChanged ( bool  isExternChanged)
protected

Set project changed by extern (e.g. project file was changed outside Traviz).

Parameters
isExternChangedThe project extern changed state.
See also
isExternChanged
Here is the call graph for this function:

◆ setFastLoad()

void AbstractProject::setFastLoad ( bool  isFastLoad)

Set the project fastload property. The project can directly loaded by open the related workspace.

Parameters
isFastLoadSet the fastload state flag.
See also
isFastLoad
Here is the call graph for this function:

◆ setLastError()

void AbstractProject::setLastError ( const QString &  lastError)
protected

Set an error message to the project.

Parameters
lastErrorThe error message.
See also
lastError
Here is the call graph for this function:

◆ setLoaded()

void AbstractProject::setLoaded ( bool  isLoaded)
virtual

Set the project loaded property. This indicates, that the project is currently loaded by the related workspace or not.

Parameters
isLoadedSet the loaded state flag.
See also
isLoaded

Reimplemented in FileProject.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setName()

void AbstractProject::setName ( const QString &  name)

Set the project name.

Parameters
nameThe name for the project.
See also
name
Here is the call graph for this function:

◆ settingsScope()

SettingsScope * AbstractProject::settingsScope ( ) const

Returns a pointer to the settings scope associated with the project.

Returns
A pointer to the settings scope associated with the project.

◆ setValid()

void AbstractProject::setValid ( bool  isValid)
protected

Set the project valid. This property decides if a project is loadable or not.

Parameters
isValidThe valid flag.
See also
isValid
validateProjectDomDocument
Here is the call graph for this function:

◆ setVersion()

void AbstractProject::setVersion ( const QString &  version)
protected

Set the project version. If the version is not compatible with the application, the project will be invalid.

Parameters
versionThe project version.
See also
version
majorProjectVersion
minorProjectVersion
Here is the call graph for this function:

◆ validateProjectDomDocument()

bool AbstractProject::validateProjectDomDocument ( const QDomDocument &  domDocument)

This function validates a project domDocument xml structure. A validation error can be printed by lastError.

Parameters
domDocumentThe domDocument, which has to be validated.
Returns
Returns true if the project domDocument validation was successful, otherwise returns false.
See also
isValid
setValid
lastError
Here is the call graph for this function:

◆ version()

QString AbstractProject::version ( ) const
Returns
Returns the project version.
See also
majorProjectVersion
minorProjectVersion
Here is the caller graph for this function:

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