ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
ProjectManager Class Referencefinal

#include <ProjectManager.h>

Inheritance diagram for ProjectManager:
hdps::AbstractProjectManager hdps::AbstractManager hdps::util::Serializable

Public Member Functions

 ProjectManager (QObject *parent=nullptr)
 
void initialize () override
 
void reset () override
 
void newProject (const QString &workspaceFilePath="") override
 
void newProject (const Qt::AlignmentFlag &alignment, bool logging=false) override
 
void newBlankProject () override
 
void openProject (QString filePath="", bool importDataOnly=false, bool loadWorkspace=true) override
 
void importProject (QString filePath="") override
 
void saveProject (QString filePath="", const QString &password="") override
 
void saveProjectAs () override
 
void publishProject (QString filePath="") override
 
bool hasProject () const override
 
const hdps::ProjectgetCurrentProject () const override
 
hdps::ProjectgetCurrentProject () override
 
QString extractProjectFileFromHdpsFile (const QString &hdpsFilePath, QTemporaryDir &temporaryDir) override
 
QImage getPreviewImage (const QString &projectFilePath, const QSize &targetSize=QSize(500, 500)) const override
 
void fromVariantMap (const QVariantMap &variantMap) override
 
QVariantMap toVariantMap () const override
 
QMenu & getNewProjectMenu () override
 
QMenu & getImportDataMenu () override
 
hdps::gui::TriggerActiongetNewBlankProjectAction () override
 
hdps::gui::TriggerActiongetNewProjectFromWorkspaceAction () override
 
hdps::gui::TriggerActiongetOpenProjectAction () override
 
hdps::gui::TriggerActiongetImportProjectAction () override
 
hdps::gui::TriggerActiongetSaveProjectAction () override
 
hdps::gui::TriggerActiongetSaveProjectAsAction () override
 
hdps::gui::TriggerActiongetEditProjectSettingsAction () override
 
hdps::gui::RecentFilesActiongetRecentProjectsAction () override
 
hdps::gui::TriggerActiongetPublishAction () override
 
hdps::gui::TriggerActiongetPluginManagerAction () override
 
hdps::gui::ToggleActiongetShowStartPageAction () override
 
- Public Member Functions inherited from hdps::AbstractProjectManager
 AbstractProjectManager (QObject *parent=nullptr)
 
virtual State getState () const final
 
virtual void setState (const State &state) final
 
virtual bool isOpeningProject () const final
 
virtual bool isImportingProject () const final
 
virtual bool isSavingProject () const final
 
virtual bool isPublishingProject () const final
 
- Public Member Functions inherited from hdps::AbstractManager
 AbstractManager (QObject *parent=nullptr, const QString &name="")
 
virtual void beginReset () final
 
virtual void endReset () final
 
virtual void beginInitialization () final
 
virtual void endInitialization () final
 
virtual bool isInitialized () const final
 
virtual QIcon getIcon () const
 
gui::LockingActiongetLockingAction ()
 
virtual bool mayLock () const
 
virtual bool mayUnlock () const
 
- Public Member Functions inherited from hdps::util::Serializable
 Serializable (const QString &serializationName="")
 
virtual QString getId () const final
 
virtual void setId (const QString &id) final
 
virtual QString getSerializationName () const final
 
virtual void setSerializationName (const QString &serializationName) final
 
virtual void fromParentVariantMap (const QVariantMap &parentVariantMap)
 
virtual void insertIntoVariantMap (QVariantMap &variantMap) const final
 
virtual void fromJsonDocument (const QJsonDocument &jsonDocument) final
 
virtual QJsonDocument toJsonDocument () const final
 
virtual void fromJsonFile (const QString &filePath="") final
 
virtual void toJsonFile (const QString &filePath="") final
 
virtual void makeUnique () final
 

Additional Inherited Members

- Public Types inherited from hdps::AbstractProjectManager
enum class  State {
  Idle , OpeningProject , ImportingProject , SavingProject ,
  PublishingProject
}
 
- Public Types inherited from hdps::util::Serializable
enum class  State { Idle , Reading , Writing }
 
- Signals inherited from hdps::AbstractProjectManager
void projectAboutToBeCreated ()
 
void projectCreated (const hdps::Project &project)
 
void projectDestroyed (const QString &projectId)
 
void projectAboutToBeOpened (const hdps::Project &project)
 
void projectOpened (const hdps::Project &project)
 
void projectAboutToBeImported (const QString &filePath)
 
void projectImported (const QString &filePath)
 
void projectAboutToBeSaved (const hdps::Project &project)
 
void projectSaved (const hdps::Project &project)
 
void projectAboutToBePublished (const hdps::Project &project)
 
void projectPublished (const hdps::Project &project)
 
void projectAboutToBeDestroyed (const hdps::Project &project)
 
void stateChanged (const State &state)
 
- Signals inherited from hdps::AbstractManager
void managerAboutToBeInitialized ()
 
void managerInitialized ()
 
void managerAboutToBeReset ()
 
void managerReset ()
 
- Static Public Member Functions inherited from hdps::util::Serializable
static QString createId ()
 
- Static Protected Member Functions inherited from hdps::util::Serializable
static void fromVariantMap (Serializable *serializable, const QVariantMap &variantMap)
 
static void fromVariantMap (Serializable &serializable, const QVariantMap &variantMap, const QString &key)
 
static QVariantMap toVariantMap (const Serializable *serializable)
 
static void insertIntoVariantMap (const Serializable &serializable, QVariantMap &variantMap, const QString &key)
 
static void insertIntoVariantMap (const Serializable &serializable, QVariantMap &variantMap)
 

Detailed Description

Project class

Class for managing the creation/loading/saving of projects and contains a single project instance.

Author
Thomas Kroes

Constructor & Destructor Documentation

◆ ProjectManager()

ProjectManager::ProjectManager ( QObject *  parent = nullptr)

Creates a new project manager from with parent object

Parameters
parentPointer to parent object

Member Function Documentation

◆ extractProjectFileFromHdpsFile()

QString ProjectManager::extractProjectFileFromHdpsFile ( const QString &  hdpsFilePath,
QTemporaryDir &  temporaryDir 
)
overridevirtual

Extract the project JSON file (project.json) from a compressed HDPS file (*.hdps)

Parameters
hdpsFilePathFile path of the compressed HDPS file (*.hdps)
temporaryDirTemporary directory to store the project.json file
Returns
File path of the extracted project.json file, empty string if extraction failed

Implements hdps::AbstractProjectManager.

◆ fromVariantMap()

void ProjectManager::fromVariantMap ( const QVariantMap &  variantMap)
overridevirtual

Load widget action from variant

Parameters
Variantrepresentation of the widget action

Reimplemented from hdps::util::Serializable.

◆ getCurrentProject() [1/2]

const hdps::Project * ProjectManager::getCurrentProject ( ) const
overridevirtual

Get current project

Returns
Pointer to current project (nullptr if no project is loaded)

Implements hdps::AbstractProjectManager.

◆ getCurrentProject() [2/2]

hdps::Project * ProjectManager::getCurrentProject ( )
overridevirtual

Get current project

Returns
Pointer to current project (nullptr if no project is loaded)

Implements hdps::AbstractProjectManager.

◆ getEditProjectSettingsAction()

hdps::gui::TriggerAction & ProjectManager::getEditProjectSettingsAction ( )
inlineoverridevirtual

◆ getImportDataMenu()

QMenu & ProjectManager::getImportDataMenu ( )
overridevirtual

Get import data menu

Returns
Pointer to import data menu

Implements hdps::AbstractProjectManager.

◆ getImportProjectAction()

hdps::gui::TriggerAction & ProjectManager::getImportProjectAction ( )
inlineoverridevirtual

◆ getNewBlankProjectAction()

hdps::gui::TriggerAction & ProjectManager::getNewBlankProjectAction ( )
inlineoverridevirtual

◆ getNewProjectFromWorkspaceAction()

hdps::gui::TriggerAction & ProjectManager::getNewProjectFromWorkspaceAction ( )
inlineoverridevirtual

◆ getNewProjectMenu()

QMenu & ProjectManager::getNewProjectMenu ( )
overridevirtual

Get new project menu

Returns
Pointer to new project menu

Implements hdps::AbstractProjectManager.

◆ getOpenProjectAction()

hdps::gui::TriggerAction & ProjectManager::getOpenProjectAction ( )
inlineoverridevirtual

◆ getPluginManagerAction()

hdps::gui::TriggerAction & ProjectManager::getPluginManagerAction ( )
inlineoverridevirtual

◆ getPreviewImage()

QImage ProjectManager::getPreviewImage ( const QString &  projectFilePath,
const QSize &  targetSize = QSize(500, 500) 
) const
overridevirtual

Get preview image of the project

Parameters
projectFilePathPath of the project file
Returns
Preview image

Implements hdps::AbstractProjectManager.

◆ getPublishAction()

hdps::gui::TriggerAction & ProjectManager::getPublishAction ( )
inlineoverridevirtual

◆ getRecentProjectsAction()

hdps::gui::RecentFilesAction & ProjectManager::getRecentProjectsAction ( )
inlineoverridevirtual

◆ getSaveProjectAction()

hdps::gui::TriggerAction & ProjectManager::getSaveProjectAction ( )
inlineoverridevirtual

◆ getSaveProjectAsAction()

hdps::gui::TriggerAction & ProjectManager::getSaveProjectAsAction ( )
inlineoverridevirtual

◆ getShowStartPageAction()

hdps::gui::ToggleAction & ProjectManager::getShowStartPageAction ( )
inlineoverridevirtual

◆ hasProject()

bool ProjectManager::hasProject ( ) const
overridevirtual

Get whether a project exists

Returns
Boolean determining whether a project exists

Implements hdps::AbstractProjectManager.

◆ importProject()

void ProjectManager::importProject ( QString  filePath = "")
overridevirtual

Import project from filePath (only import the data)

Parameters
filePathFile path of the project (choose file path when empty)

Implements hdps::AbstractProjectManager.

◆ initialize()

void ProjectManager::initialize ( )
overridevirtual

Perform manager startup initialization

Reimplemented from hdps::AbstractManager.

◆ newBlankProject()

void ProjectManager::newBlankProject ( )
overridevirtual

Creates a new blank project (without any view plugins or data)

Implements hdps::AbstractProjectManager.

◆ newProject() [1/2]

void ProjectManager::newProject ( const QString &  workspaceFilePath = "")
overridevirtual

Creates a new project, possibly also loading a workspace located at workspaceFilePath

Parameters
workspaceFilePathFile path of the workspace to load (will not attempt to load workspace if empty)

Implements hdps::AbstractProjectManager.

◆ newProject() [2/2]

void ProjectManager::newProject ( const Qt::AlignmentFlag &  alignment,
bool  logging = false 
)
overridevirtual

Creates a new project with default system view plugins (either on the left or right, other alignments are ignored)

Parameters
alignmentAlignment of the default plugins
loggingWhether to add a logging view at the bottom

Implements hdps::AbstractProjectManager.

◆ openProject()

void ProjectManager::openProject ( QString  filePath = "",
bool  importDataOnly = false,
bool  loadWorkspace = true 
)
overridevirtual

Open project from filePath

Parameters
filePathFile path of the project (choose file path when empty)
importDataOnlyWhether to only import the data from the project
loadWorkspaceWhether to load the workspace which is accompanied with the project

Implements hdps::AbstractProjectManager.

◆ publishProject()

void ProjectManager::publishProject ( QString  filePath = "")
overridevirtual

Publish project to filePath

Parameters
filePathFile path of the published project

Implements hdps::AbstractProjectManager.

◆ reset()

void ProjectManager::reset ( )
overridevirtual

Resets the contents of the project manager

Implements hdps::AbstractManager.

◆ saveProject()

void ProjectManager::saveProject ( QString  filePath = "",
const QString &  password = "" 
)
overridevirtual

Save a project to filePath

Parameters
filePathFile path of the project (choose file path when empty)
passwordEncryption password

Implements hdps::AbstractProjectManager.

◆ saveProjectAs()

void ProjectManager::saveProjectAs ( )
overridevirtual

Save project to different file (user is prompted to choose the file location)

Implements hdps::AbstractProjectManager.

◆ toVariantMap()

QVariantMap ProjectManager::toVariantMap ( ) const
overridevirtual

Save widget action to variant

Returns
Variant representation of the widget action

Reimplemented from hdps::util::Serializable.


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