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

Public Member Functions

 FileProject (SettingsScope *parentSettingsScope, const QString &filePath, const QDomDocument &domDocument)
 
bool autosaveExists () override
 Check autosave project xml exists. More...
 
void cleanAutosave () override
 Remove the autosave project xml structure. More...
 
QString autosaveInfo () override
 Information about the autosave project xml structure. More...
 
bool save () override
 Save the project in a xml structure. More...
 
bool autosave () override
 Save the project in a xml structure. More...
 
void reset () override
 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.
 
QString connectionString () override
 The connection string defines the link to the project xml source (e.g file, sql). More...
 
void setLoaded (bool isLoaded) override
 Set the project loaded property. This indicates, that the project is currently loaded by the related workspace or not. More...
 
QDomDocument autosaveDomDocument () const override
 
bool setAutosaveDomDocument (const QDomDocument &domDocument)
 
QDomDocument domDocument () const override
 
bool setDomDocument (const QDomDocument &domDocument) override
 Set and validate the project domDocument xml structure. More...
 
void setFilePath (const QString &filePath)
 
QString filePath () const
 
QString fileName () const
 
QString path () const
 
QString relativFilePath () const
 
void setRelativFilePath (const QString &relativFilePath)
 
- Public Member Functions inherited from AbstractProject
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
 

Additional Inherited Members

- Signals inherited from AbstractProject
void stateChange ()
 
void internDomChanged ()
 
void externDomChange ()
 
- Static Public Member Functions inherited from AbstractProject
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 inherited from AbstractProject
 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...
 

Member Function Documentation

◆ autosave()

bool FileProject::autosave ( )
overridevirtual

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

Implements AbstractProject.

Here is the call graph for this function:

◆ autosaveDomDocument()

QDomDocument FileProject::autosaveDomDocument ( ) const
overridevirtual
Returns
Returns the domDocument xml structure from the autosave process.
See also
domDocument
setDomDocument

Implements AbstractProject.

◆ autosaveExists()

bool FileProject::autosaveExists ( )
overridevirtual

Check autosave project xml exists.

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

Implements AbstractProject.

Here is the call graph for this function:

◆ autosaveInfo()

QString FileProject::autosaveInfo ( )
overridevirtual

Information about the autosave project xml structure.

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

Implements AbstractProject.

Here is the call graph for this function:

◆ cleanAutosave()

void FileProject::cleanAutosave ( )
overridevirtual

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

Implements AbstractProject.

Here is the call graph for this function:

◆ connectionString()

QString FileProject::connectionString ( )
overridevirtual

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

Returns
Returns the connection string.

Implements AbstractProject.

◆ domDocument()

QDomDocument FileProject::domDocument ( ) const
overridevirtual
Returns
Returns the domDocument xml structure from the project.
See also
setDomDocument

Implements AbstractProject.

◆ save()

bool FileProject::save ( )
overridevirtual

Save the project in a xml structure.

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

Implements AbstractProject.

Here is the call graph for this function:

◆ setDomDocument()

bool FileProject::setDomDocument ( const QDomDocument &  domDocument)
overridevirtual

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

Implements AbstractProject.

◆ setLoaded()

void FileProject::setLoaded ( bool  isLoaded)
overridevirtual

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 from AbstractProject.

Here is the call graph for this function:

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