The Workspace class represents a workspace with all its data (library, projects, settings, ...)
More...
#include <workspace.h>
Inherits QObject.
The Workspace class represents a workspace with all its data (library, projects, settings, ...)
To access the settings of the workspace, use the method getSettings().
◆ Workspace() [1/3]
◆ Workspace() [2/3]
◆ Workspace() [3/3]
Constructor to open an existing workspace.
- Parameters
-
wsPath | The filepath to the workspace directory |
- Exceptions
-
Exception | If the workspace could not be opened, this constructor throws an exception. |
◆ ~Workspace()
◆ getPath()
Get the filepath to the workspace directory.
◆ getProjectsPath()
const FilePath& getProjectsPath |
( |
| ) |
const |
|
inline |
Get the filepath to the "projects" directory in the workspace.
◆ getMetadataPath()
const FilePath& getMetadataPath |
( |
| ) |
const |
|
inline |
Get the filepath to the version directory (v#) in the workspace.
◆ getLibrariesPath()
const FilePath& getLibrariesPath |
( |
| ) |
const |
|
inline |
Get the filepath to the "v#/libraries" directory in the workspace.
◆ getLocalLibrariesPath()
FilePath getLocalLibrariesPath |
( |
| ) |
const |
|
inline |
Get the filepath to the "v#/libraries/local" directory.
◆ getRemoteLibrariesPath()
FilePath getRemoteLibrariesPath |
( |
| ) |
const |
|
inline |
Get the filepath to the "v#/libraries/remote" directory.
◆ getProjectTreeModel()
◆ getRecentProjectsModel()
◆ getFavoriteProjectsModel()
◆ getSettings()
Get the workspace settings.
◆ getLibraryDb()
Get the workspace library database.
◆ setLastRecentlyUsedProject()
void setLastRecentlyUsedProject |
( |
const FilePath & |
filepath | ) |
|
|
noexcept |
setLastRecentlyUsedProject
- Parameters
-
◆ isFavoriteProject()
bool isFavoriteProject |
( |
const FilePath & |
filepath | ) |
const |
|
noexcept |
Check whether a project is in the favorite project list or not.
- Parameters
-
filepath | The filepath to a *.lpp project file |
- Returns
- True if the specified project is in the favorites list, false otherwise
◆ addFavoriteProject()
void addFavoriteProject |
( |
const FilePath & |
filepath | ) |
|
|
noexcept |
Add a project to the favorite projects list.
- Parameters
-
filepath | The filepath to a *.lpp project file |
◆ removeFavoriteProject()
void removeFavoriteProject |
( |
const FilePath & |
filepath | ) |
|
|
noexcept |
Remove a project from the favorite projects list.
- Parameters
-
filepath | The filepath to a *.lpp project file |
◆ operator=()
◆ isValidWorkspacePath()
bool isValidWorkspacePath |
( |
const FilePath & |
path | ) |
|
|
staticnoexcept |
Check whether a filepath points to a valid workspace directory or not.
- Parameters
-
path | A path to a directory |
- Returns
- True if the path is a valid workspace directory, false otherwise
◆ getFileFormatVersionsOfWorkspace()
getFileFormatVersionsOfWorkspace
- Parameters
-
- Returns
◆ getHighestFileFormatVersionOfWorkspace()
tl::optional< Version > getHighestFileFormatVersionOfWorkspace |
( |
const FilePath & |
path | ) |
|
|
staticnoexcept |
getHighestFileFormatVersionOfWorkspace
- Parameters
-
- Returns
◆ createNewWorkspace()
void createNewWorkspace |
( |
const FilePath & |
path | ) |
|
|
static |
Create a new workspace.
- Parameters
-
path | A path to a directory where to create the new workspace |
- Exceptions
-
◆ getMostRecentlyUsedWorkspacePath()
FilePath getMostRecentlyUsedWorkspacePath |
( |
| ) |
|
|
staticnoexcept |
Get the most recently used workspace path.
- Returns
- The filepath to the last recently used workspace (may be invalid)
◆ setMostRecentlyUsedWorkspacePath()
void setMostRecentlyUsedWorkspacePath |
( |
const FilePath & |
path | ) |
|
|
staticnoexcept |
Set the most recently used workspace path.
- Parameters
-
path | The filepath to the workspace directory |
◆ FILE_FORMAT_VERSION()
static Version FILE_FORMAT_VERSION |
( |
| ) |
|
|
inlinestaticnoexcept |
Current workspace file format version (constant)
- Warning
- Don't change this value unless you know exactly what you're doing!
- Returns
- File format version
◆ mPath
a FilePath object which represents the workspace directory
◆ mProjectsPath
◆ mMetadataPath
the subdirectory of the current file format version
◆ mLibrariesPath
the directory "v#/libraries"
◆ mLock
◆ mWorkspaceSettings
◆ mLibraryDb
◆ mProjectTreeModel
a tree model for the whole projects directory
◆ mRecentProjectsModel
a list model of all recent projects
◆ mFavoriteProjectsModel
a list model of all favorite projects
The documentation for this class was generated from the following files: