ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
hdps::AbstractProjectManager Class Referenceabstract

#include <AbstractProjectManager.h>

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

Classes

class  ScopedState
 

Public Types

enum class  State {
  Idle , OpeningProject , ImportingProject , SavingProject ,
  PublishingProject
}
 
- Public Types inherited from hdps::util::Serializable
enum class  State { Idle , Reading , Writing }
 

Signals

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 ()
 

Public Member Functions

 AbstractProjectManager (QObject *parent=nullptr)
 
virtual void newProject (const QString &workspaceFilePath="")=0
 
virtual void newProject (const Qt::AlignmentFlag &defaultPluginsAlignment, bool logging=false)=0
 
virtual void newBlankProject ()=0
 
virtual void openProject (QString filePath="", bool importDataOnly=true, bool loadWorkspace=true)=0
 
virtual void importProject (QString filePath="")=0
 
virtual void saveProject (QString filePath="", const QString &password="")=0
 
virtual void saveProjectAs ()=0
 
virtual void publishProject (QString filePath="")=0
 
virtual bool hasProject () const =0
 
virtual const ProjectgetCurrentProject () const =0
 
virtual ProjectgetCurrentProject ()=0
 
virtual QString extractProjectFileFromHdpsFile (const QString &hdpsFilePath, QTemporaryDir &temporaryDir)=0
 
virtual QImage getPreviewImage (const QString &projectFilePath, const QSize &targetSize=QSize(500, 500)) const =0
 
virtual QMenu & getNewProjectMenu ()=0
 
virtual QMenu & getImportDataMenu ()=0
 
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
 
virtual hdps::gui::TriggerActiongetNewBlankProjectAction ()=0
 
virtual hdps::gui::TriggerActiongetNewProjectFromWorkspaceAction ()=0
 
virtual hdps::gui::TriggerActiongetOpenProjectAction ()=0
 
virtual hdps::gui::TriggerActiongetImportProjectAction ()=0
 
virtual hdps::gui::TriggerActiongetSaveProjectAction ()=0
 
virtual hdps::gui::TriggerActiongetSaveProjectAsAction ()=0
 
virtual hdps::gui::TriggerActiongetEditProjectSettingsAction ()=0
 
virtual hdps::gui::RecentFilesActiongetRecentProjectsAction ()=0
 
virtual hdps::gui::TriggerActiongetPublishAction ()=0
 
virtual hdps::gui::TriggerActiongetPluginManagerAction ()=0
 
virtual hdps::gui::ToggleActiongetShowStartPageAction ()=0
 
- Public Member Functions inherited from hdps::AbstractManager
 AbstractManager (QObject *parent=nullptr, const QString &name="")
 
virtual void initialize ()
 
virtual void beginReset () final
 
virtual void reset ()=0
 
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 fromVariantMap (const QVariantMap &variantMap)
 
virtual void fromParentVariantMap (const QVariantMap &parentVariantMap)
 
virtual QVariantMap toVariantMap () const
 
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

- 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

Abstract project manager class

Base abstract plugin manager class for managing projects.

Author
Thomas Kroes

Member Enumeration Documentation

◆ State

The project manager is currently

Enumerator
Idle 
OpeningProject 

Not doing anything

ImportingProject 

Opening a project

SavingProject 

Importing a project

PublishingProject 

Saving a project Publishing a project

Constructor & Destructor Documentation

◆ AbstractProjectManager()

hdps::AbstractProjectManager::AbstractProjectManager ( QObject *  parent = nullptr)
inline

Construct project manager with parent object

Parameters
parentPointer to parent object

Member Function Documentation

◆ extractProjectFileFromHdpsFile()

virtual QString hdps::AbstractProjectManager::extractProjectFileFromHdpsFile ( const QString &  hdpsFilePath,
QTemporaryDir &  temporaryDir 
)
pure virtual

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

Implemented in ProjectManager.

◆ getCurrentProject() [1/2]

virtual const Project * hdps::AbstractProjectManager::getCurrentProject ( ) const
pure virtual

Get current project

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

Implemented in ProjectManager.

◆ getCurrentProject() [2/2]

virtual Project * hdps::AbstractProjectManager::getCurrentProject ( )
pure virtual

Get current project

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

Implemented in ProjectManager.

◆ getEditProjectSettingsAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getEditProjectSettingsAction ( )
pure virtual

Implemented in ProjectManager.

◆ getImportDataMenu()

virtual QMenu & hdps::AbstractProjectManager::getImportDataMenu ( )
pure virtual

Get import data menu

Returns
Pointer to import data menu

Implemented in ProjectManager.

◆ getImportProjectAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getImportProjectAction ( )
pure virtual

Implemented in ProjectManager.

◆ getNewBlankProjectAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getNewBlankProjectAction ( )
pure virtual

Implemented in ProjectManager.

◆ getNewProjectFromWorkspaceAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getNewProjectFromWorkspaceAction ( )
pure virtual

Implemented in ProjectManager.

◆ getNewProjectMenu()

virtual QMenu & hdps::AbstractProjectManager::getNewProjectMenu ( )
pure virtual

Get new project menu

Returns
Pointer to new project menu

Implemented in ProjectManager.

◆ getOpenProjectAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getOpenProjectAction ( )
pure virtual

Implemented in ProjectManager.

◆ getPluginManagerAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getPluginManagerAction ( )
pure virtual

Implemented in ProjectManager.

◆ getPreviewImage()

virtual QImage hdps::AbstractProjectManager::getPreviewImage ( const QString &  projectFilePath,
const QSize &  targetSize = QSize(500, 500) 
) const
pure virtual

Get preview image of the project

Parameters
projectFilePathPath of the project file
Returns
Preview image

Implemented in ProjectManager.

◆ getPublishAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getPublishAction ( )
pure virtual

Implemented in ProjectManager.

◆ getRecentProjectsAction()

virtual hdps::gui::RecentFilesAction & hdps::AbstractProjectManager::getRecentProjectsAction ( )
pure virtual

Implemented in ProjectManager.

◆ getSaveProjectAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getSaveProjectAction ( )
pure virtual

Implemented in ProjectManager.

◆ getSaveProjectAsAction()

virtual hdps::gui::TriggerAction & hdps::AbstractProjectManager::getSaveProjectAsAction ( )
pure virtual

Implemented in ProjectManager.

◆ getShowStartPageAction()

virtual hdps::gui::ToggleAction & hdps::AbstractProjectManager::getShowStartPageAction ( )
pure virtual

Implemented in ProjectManager.

◆ getState()

virtual State hdps::AbstractProjectManager::getState ( ) const
inlinefinalvirtual

Get the state of the project manager

Returns
State of the project manager

◆ hasProject()

virtual bool hdps::AbstractProjectManager::hasProject ( ) const
pure virtual

Get whether a project exists

Returns
Boolean determining whether a project exists

Implemented in ProjectManager.

◆ importProject()

virtual void hdps::AbstractProjectManager::importProject ( QString  filePath = "")
pure virtual

Import project from filePath (only import the data)

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

Implemented in ProjectManager.

◆ isImportingProject()

virtual bool hdps::AbstractProjectManager::isImportingProject ( ) const
inlinefinalvirtual

Get whether the project manager is importing a project

Returns
Boolean determining whether the project manager is importing a project

◆ isOpeningProject()

virtual bool hdps::AbstractProjectManager::isOpeningProject ( ) const
inlinefinalvirtual

Get whether the project manager is opening a project

Returns
Boolean determining whether the project manager is opening a project

◆ isPublishingProject()

virtual bool hdps::AbstractProjectManager::isPublishingProject ( ) const
inlinefinalvirtual

Get whether the project manager is publishing a project

Returns
Boolean determining whether the project manager is publishing a project

◆ isSavingProject()

virtual bool hdps::AbstractProjectManager::isSavingProject ( ) const
inlinefinalvirtual

Get whether the project manager is saving a project

Returns
Boolean determining whether the project manager is saving a project

◆ newBlankProject()

virtual void hdps::AbstractProjectManager::newBlankProject ( )
pure virtual

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

Implemented in ProjectManager.

◆ newProject() [1/2]

virtual void hdps::AbstractProjectManager::newProject ( const QString &  workspaceFilePath = "")
pure virtual

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)

Implemented in ProjectManager.

◆ newProject() [2/2]

virtual void hdps::AbstractProjectManager::newProject ( const Qt::AlignmentFlag &  defaultPluginsAlignment,
bool  logging = false 
)
pure virtual

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

Implemented in ProjectManager.

◆ openProject()

virtual void hdps::AbstractProjectManager::openProject ( QString  filePath = "",
bool  importDataOnly = true,
bool  loadWorkspace = true 
)
pure virtual

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

Implemented in ProjectManager.

◆ projectAboutToBeCreated

void hdps::AbstractProjectManager::projectAboutToBeCreated ( )
signal

Signals that a new project is about to be created

◆ projectAboutToBeDestroyed

void hdps::AbstractProjectManager::projectAboutToBeDestroyed ( const hdps::Project project)
signal

Signals that project is about to be destroyed

Parameters
projectReference to the project that is about to be destroyed

◆ projectAboutToBeImported

void hdps::AbstractProjectManager::projectAboutToBeImported ( const QString &  filePath)
signal

Signals that a project is about to be imported from filePath

Parameters
filePathPath of the project file which is about to be imported

◆ projectAboutToBeOpened

void hdps::AbstractProjectManager::projectAboutToBeOpened ( const hdps::Project project)
signal

Signals that project is about to be opened

Parameters
projectReference to the project that is about to be opened

◆ projectAboutToBePublished

void hdps::AbstractProjectManager::projectAboutToBePublished ( const hdps::Project project)
signal

Signals that project is about to be published

Parameters
projectReference to the project that is about to be published

◆ projectAboutToBeSaved

void hdps::AbstractProjectManager::projectAboutToBeSaved ( const hdps::Project project)
signal

Signals that project is about to be saved

Parameters
projectReference to the project that is about to be saved

◆ projectCreated

void hdps::AbstractProjectManager::projectCreated ( const hdps::Project project)
signal

Signals that project is created

Parameters
projectReference to the created project

◆ projectDestroyed

void hdps::AbstractProjectManager::projectDestroyed ( const QString &  projectId)
signal

Signals that project with projectId is destroyed

Parameters
projectIdGlobally unique identifier of the project that is destroyed

◆ projectImported

void hdps::AbstractProjectManager::projectImported ( const QString &  filePath)
signal

Signals that a project is imported from filePath

Parameters
filePathPath of the project file which is imported

◆ projectOpened

void hdps::AbstractProjectManager::projectOpened ( const hdps::Project project)
signal

Signals that project is opened

Parameters
projectReference to the project that is opened

◆ projectPublished

void hdps::AbstractProjectManager::projectPublished ( const hdps::Project project)
signal

Signals that project is published

Parameters
projectReference to the published project

◆ projectSaved

void hdps::AbstractProjectManager::projectSaved ( const hdps::Project project)
signal

Signals that project is saved

Parameters
projectReference to the saved project

◆ publishProject()

virtual void hdps::AbstractProjectManager::publishProject ( QString  filePath = "")
pure virtual

Publish project to filePath

Parameters
filePathFile path of the published project

Implemented in ProjectManager.

◆ saveProject()

virtual void hdps::AbstractProjectManager::saveProject ( QString  filePath = "",
const QString &  password = "" 
)
pure virtual

Save a project to filePath

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

Implemented in ProjectManager.

◆ saveProjectAs()

virtual void hdps::AbstractProjectManager::saveProjectAs ( )
pure virtual

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

Implemented in ProjectManager.

◆ setState()

virtual void hdps::AbstractProjectManager::setState ( const State state)
inlinefinalvirtual

Set the state of the serializable object to state

Parameters
stateState of the serializable object

◆ stateChanged

void hdps::AbstractProjectManager::stateChanged ( const State state)
signal

Signals that the state of the project manager changed to state

Parameters
stateState of the project manager

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