1 #ifndef FILE_WORKSPACE_H 2 #define FILE_WORKSPACE_H 4 #include <QFileSystemWatcher> 6 #include "abstract_workspace.h" 11 Q_PROPERTY(QString filePath READ filePath WRITE setFilePath USER
true)
16 static QSharedPointer<FileWorkspace> createFileWorkspaceFromFile(
const QString& filePath);
18 bool compare(
const QSharedPointer<AbstractWorkspace>& otherWorkspace)
const Q_DECL_OVERRIDE;
21 bool save() Q_DECL_OVERRIDE;
22 bool test() Q_DECL_OVERRIDE;
23 void init() Q_DECL_OVERRIDE;
24 void update() Q_DECL_OVERRIDE;
27 void setFilePath(
const QString& filePath);
28 void setFileEditMode(
bool editMode);
29 QString filePath()
const;
31 QString fileName()
const;
35 void updateProjects();
36 bool validateFileProperties();
37 bool _fileInfoChanged =
false;
38 bool _internalSave =
false;
39 bool _editMode =
false;
41 QFileSystemWatcher _fileSystemWatcher;
44 void onWorkspaceFileChanged();
46 #endif // FILE_WORKSPACE_H bool deleteProject(const QSharedPointer< AbstractProject > &project) Q_DECL_OVERRIDE
Delete a project and remove it from workspace.
Definition: file_workspace.cpp:309
Definition: file_workspace.h:8
QSharedPointer< AbstractProject > project(QString connectionString) const
Definition: abstract_workspace.cpp:165
bool test() Q_DECL_OVERRIDE
Workspace test procedure. The Test-Procedure is defined by the specific workspace class...
Definition: file_workspace.cpp:180
bool isOpen() const
Definition: abstract_workspace.cpp:130
bool compare(const QSharedPointer< AbstractWorkspace > &otherWorkspace) const Q_DECL_OVERRIDE
Compare a other Workspace source with this Workspace source (not the Object adress).
Definition: file_workspace.cpp:288
bool deleteWorkspace(bool deleteProjects=false) Q_DECL_OVERRIDE
Delete workspace. The function deletes this workspace and all included projects, if the deleteProject...
Definition: file_workspace.cpp:322
void update() Q_DECL_OVERRIDE
Update the workspace after property changes.
Definition: file_workspace.cpp:150
void setOpen(bool isOpen) Q_DECL_OVERRIDE
Set the workspace open (in use) state.
Definition: file_workspace.cpp:276
void init() Q_DECL_OVERRIDE
Initialize the Workspace and set isValid flag. This function must be called, otherwise the workspace ...
Definition: file_workspace.cpp:46
Definition: abstract_workspace.h:23
bool save() Q_DECL_OVERRIDE
Save workspace with all settings.
Definition: file_workspace.cpp:190