|
ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
|
#include <DataHierarchyItem.h>
Public Types | |
| enum class | TaskStatus { Undefined = -1 , Idle , Running , Finished , Aborted } |
Public Types inherited from hdps::gui::WidgetAction | |
| enum class | Scope { Private , Public } |
| enum class | HighlightOption { None , Moderate , Strong } |
| enum class | ConfigurationFlag { VisibleInMenu = 0x00001 , InternalUseOnly = 0x00002 , NoLabelInGroup = 0x00004 , ForceCollapsedInGroup = 0x00008 , ForceExpandedInGroup = 0x00010 , User = 0x00100 , Default = 0 } |
| enum | ConnectionContextFlag { Api = 0x00008 , Gui = 0x00010 , ApiAndGui = Api | Gui } |
| ** Describes the connection context options */ More... | |
| enum class | ConnectionPermissionFlag { None = 0x00000 , PublishViaApi = 0x00001 , PublishViaGui = 0x00002 , PublishViaApiAndGui = PublishViaApi | PublishViaGui , ConnectViaApi = 0x00008 , ConnectViaGui = 0x00010 , ConnectViaApiAndGui = ConnectViaApi | ConnectViaGui , DisconnectViaApi = 0x00040 , DisconnectViaGui = 0x00080 , DisconnectViaApiAndGui = DisconnectViaApi | DisconnectViaGui , ForceNone = 0x00100 , All = PublishViaApiAndGui | ConnectViaApiAndGui | DisconnectViaApiAndGui , Default = All } |
Public Types inherited from hdps::util::Serializable | |
| enum class | State { Idle , Reading , Writing } |
Signals | |
| void | taskDescriptionChanged (const QString &taskDescription) |
| void | taskProgressChanged (const float &taskProgress) |
| void | selectionChanged (const bool &selected) |
| void | actionAdded (hdps::gui::WidgetAction &widgetAction) |
| void | iconChanged () |
| void | datasetNameChanged (const QString &datasetName) |
| void | lockedChanged (bool locked) |
| void | visibilityChanged (bool visibility) |
| void | expandedChanged (bool expanded) |
| void | loading () |
| void | loaded () |
| void | saving () |
| void | saved () |
Signals inherited from hdps::gui::WidgetAction | |
| void | idChanged (const QString &id) |
| void | sortIndexChanged (std::int32_t sortIndex) |
| void | stretchChanged (std::int32_t stretch) |
| void | forceHiddenChanged (bool forceHidden) |
| void | forceDisabledChanged (bool forceDisabled) |
| void | highlightingChanged (const HighlightOption &highlightOption) |
| void | isPublishedChanged (const bool &isPublished) |
| void | isConnectedChanged (const bool &isConnected) |
| void | actionConnected (WidgetAction *action) |
| void | actionDisconnected (WidgetAction *action) |
| void | connectionPermissionsChanged (std::int32_t connectionPermissions) |
| void | configurationFlagToggled (const ConfigurationFlag &configurationFlag, bool set) |
| void | configurationChanged (std::int32_t configuration) |
| void | scopeChanged (const Scope &scope) |
| void | textChanged (const QString &text) |
| void | locationChanged (const QString &location) |
Public Member Functions | |
| DataHierarchyItem (QObject *parent, Dataset< DatasetImpl > dataset, Dataset< DatasetImpl > parentDataset, const bool &visible=true, const bool &selected=false) | |
| ~DataHierarchyItem ()=default | |
| DataHierarchyItem & | getParent () const |
| bool | hasParent () const |
| DataHierarchyItems | getChildren (const bool &recursive=false) const |
| std::uint32_t | getNumberOfChildren () const |
| bool | hasChildren () const |
| void | setVisible (bool visible) |
| bool | isSelected () const |
| void | setSelected (const bool &selected) |
| void | select () |
| void | deselect () |
| void | addChild (DataHierarchyItem &child) |
| Dataset< DatasetImpl > | getDataset () |
| template<typename DatasetType > | |
| Dataset< DatasetType > | getDataset () const |
| Dataset< DatasetImpl > & | getDatasetReference () |
| template<typename DatasetType > | |
| Dataset< DatasetType > & | getDatasetReference () const |
| DataType | getDataType () const |
| void | addAction (hdps::gui::WidgetAction &widgetAction) |
| hdps::gui::WidgetActions | getActions () const |
| QMenu * | getContextMenu (QWidget *parent=nullptr) override |
| void | populateContextMenu (QMenu *contextMenu) |
| bool | getLocked () const |
| void | setLocked (const bool &locked) |
| bool | isExpanded () const |
| void | setExpanded (bool expanded) |
| QString | getTaskName () const |
| void | setTaskName (const QString &taskName) |
| TaskStatus | getTaskStatus () const |
| QString | getTaskDescription () const |
| void | setTaskDescription (const QString &taskDescription) |
| float | getTaskProgress () const |
| void | setTaskProgress (float taskProgress) |
| void | setNumberOfSubTasks (float numberOfSubTasks) |
| void | setSubTaskFinished (float subTaskIndex) |
| bool | isIdle () const |
| bool | isRunning () const |
| bool | isFinished () const |
| bool | isAborted () const |
| void | setTaskIdle () |
| void | setTaskRunning () |
| void | setTaskFinished () |
| void | setTaskAborted () |
| QIcon | getIcon () const |
| void | setIcon (const QIcon &icon) |
| void | fromVariantMap (const QVariantMap &variantMap) override |
| QVariantMap | toVariantMap () const override |
Public Member Functions inherited from hdps::gui::WidgetAction | |
| WidgetAction (QObject *parent, const QString &title) | |
| ~WidgetAction () | |
| virtual WidgetAction * | getParentAction () const final |
| virtual WidgetActions | getParentActions () const final |
| virtual WidgetActions | getChildren () const final |
| virtual bool | isRoot () const final |
| virtual bool | isLeaf () const final |
| virtual QWidget * | createWidget (QWidget *parent) override final |
| virtual QWidget * | createCollapsedWidget (QWidget *parent) const final |
| virtual QWidget * | createLabelWidget (QWidget *parent, const std::int32_t &widgetFlags=0x00001) const final |
| QWidget * | createWidget (QWidget *parent, const std::int32_t &widgetFlags) |
| virtual std::int32_t | getSortIndex () const final |
| virtual void | setSortIndex (const std::int32_t &sortIndex) final |
| virtual std::int32_t | getStretch () const final |
| virtual void | setStretch (const std::int32_t &stretch) final |
| virtual bool | getForceHidden () const final |
| virtual void | setForceHidden (bool forceHidden) final |
| virtual bool | isVisible () const final |
| virtual bool | getForceDisabled () const final |
| virtual void | setForceDisabled (bool forceDisabled) final |
| virtual bool | isEnabled () const final |
| void | setText (const QString &text) |
| virtual QString | getLocation () const |
| virtual std::int32_t | getDefaultWidgetFlags () const final |
| virtual void | setDefaultWidgetFlags (const std::int32_t &widgetFlags) final |
| virtual void | setDefaultWidgetFlag (const std::int32_t &widgetFlags, bool unset=false) final |
| virtual HighlightOption | getHighlighting () const final |
| virtual bool | isHighlighted () const final |
| virtual void | setHighlighting (const HighlightOption &highlighting) final |
| virtual void | setHighlighted (bool highlighted) final |
| virtual void | highlight () final |
| virtual void | unHighlight () final |
| virtual Scope | getScope () const final |
| virtual bool | isPrivate () const final |
| virtual bool | isPublic () const final |
| virtual bool | isPublished () const final |
| virtual bool | isConnected () const final |
| virtual bool | mayConnectToPublicAction (const WidgetAction *publicAction) const final |
| virtual bool | publish (const QString &name="", bool allowDuplicateName=false) final |
| virtual WidgetAction * | getPublicAction () final |
| virtual WidgetAction * | getPublicCopy () const final |
| virtual const WidgetActions | getConnectedActions () const final |
| virtual WidgetActions & | getConnectedActions () final |
| virtual bool | mayPublish (ConnectionContextFlag connectionContextFlags) const final |
| virtual bool | mayConnect (ConnectionContextFlag connectionContextFlags) const final |
| virtual bool | mayDisconnect (ConnectionContextFlag connectionContextFlags) const final |
| virtual std::int32_t | getConnectionPermissions () const final |
| virtual bool | isConnectionPermissionFlagSet (ConnectionPermissionFlag connectionPermissionsFlag) final |
| virtual void | setConnectionPermissionsFlag (ConnectionPermissionFlag connectionPermissionsFlag, bool unset=false, bool recursive=false) final |
| virtual void | setConnectionPermissions (std::int32_t connectionPermissions, bool recursive=false) final |
| virtual void | setConnectionPermissionsToNone (bool recursive=false) final |
| virtual void | setConnectionPermissionsToForceNone (bool recursive=false) final |
| virtual void | setConnectionPermissionsToAll (bool recursive=false) final |
| virtual void | cacheConnectionPermissions (bool recursive=false) final |
| virtual void | restoreConnectionPermissions (bool recursive=false) final |
| virtual void | startDrag () final |
| virtual bool | isResettable () const final |
| virtual void | reset () final |
| virtual void | setSettingsPrefix (const QString &settingsPrefix, const bool &load=true) final |
| virtual void | setSettingsPrefix (plugin::Plugin *plugin, const QString &settingsPrefix, const bool &load=true) final |
| virtual QString | getSettingsPrefix () const |
| virtual void | loadFromSettings () final |
| virtual void | saveToSettings () final |
| virtual QVector< WidgetAction * > | findChildren (const QString &searchString, bool recursive=true) const final |
| virtual QSize | getPopupSizeHint () const final |
| virtual void | setPopupSizeHint (const QSize &popupSizeHint) final |
| virtual std::int32_t | getConfiguration () const final |
| virtual bool | isConfigurationFlagSet (ConfigurationFlag configurationFlag) const final |
| virtual void | setConfigurationFlag (ConfigurationFlag configurationFlag, bool unset=false, bool recursive=false) final |
| virtual void | setConfiguration (std::int32_t configuration, bool recursive=false) final |
| virtual QString | getTypeString (bool humanFriendly=false) const final |
| void | fromVariantMap (const QVariantMap &variantMap) override |
| QVariantMap | toVariantMap () const override |
| virtual void | cacheState (const QString &name="cache") final |
| virtual void | restoreState (const QString &name="cache", bool remove=true) final |
| virtual void | setStudioMode (bool studioMode, bool recursive=true) final |
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 |
Static Public Member Functions | |
| static void | getParents (DataHierarchyItem &dataHierarchyItem, DataHierarchyItems &parents) |
Static Public Member Functions inherited from hdps::util::Serializable | |
| static QString | createId () |
Protected Member Functions | |
| void | setParent (DataHierarchyItem &parent) |
Protected Member Functions inherited from hdps::gui::WidgetAction | |
| virtual void | makePublic (bool recursive=true) final |
| virtual void | connectToPublicAction (WidgetAction *publicAction, bool recursive) |
| virtual void | connectToPublicActionByName (const QString &publicActionName) final |
| virtual void | disconnectFromPublicAction (bool recursive) |
| virtual QWidget * | getWidget (QWidget *parent, const std::int32_t &widgetFlags) |
Protected Attributes | |
| Dataset< DatasetImpl > | _dataset |
| DataHierarchyItem * | _parent |
| DataHierarchyItems | _children |
| bool | _selected |
| bool | _expanded |
| QString | _taskDescription |
| float | _taskProgress |
| QBitArray | _subTasks |
| QString | _taskName |
| TaskStatus | _taskStatus |
| QTimer | _taskDescriptionTimer |
| QTimer | _taskProgressTimer |
| QIcon | _icon |
| hdps::gui::WidgetActions | _actions |
Static Protected Attributes | |
| static constexpr std::uint32_t | TASK_UPDATE_TIMER_INTERVAL = 100 |
| static constexpr std::uint32_t | MESSAGE_DISAPPEAR_INTERVAL = 1500 |
Friends | |
| class | DataHierarchyManager |
| class | DataManager |
Additional Inherited Members | |
Static Public Attributes inherited from hdps::gui::WidgetAction | |
| static QMap< Scope, QString > | scopeNames |
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) |
Data hierarchy item class
Represents a dataset as an item in a dataset hierarchy
|
strong |
| hdps::DataHierarchyItem::DataHierarchyItem | ( | QObject * | parent, |
| Dataset< DatasetImpl > | dataset, | ||
| Dataset< DatasetImpl > | parentDataset, | ||
| const bool & | visible = true, |
||
| const bool & | selected = false |
||
| ) |
Constructor
| parent | Pointer to parent object |
| dataset | Smart pointer to dataset |
| parentDataset | Smart pointer to parent dataset (if any) |
| visible | Whether the dataset is visible |
| selected | Whether the dataset is selected |
|
default |
Destructor
|
signal |
Signals that a widget action was added
| widgetAction | Widget action that was added |
| void hdps::DataHierarchyItem::addAction | ( | hdps::gui::WidgetAction & | widgetAction | ) |
Add action
| void hdps::DataHierarchyItem::addChild | ( | DataHierarchyItem & | child | ) |
Add a child
| child | Reference to child data hierarchy item |
|
signal |
Signals that the dataset name changed
| datasetName | New name of the dataset |
| void hdps::DataHierarchyItem::deselect | ( | ) |
De-selects the hierarchy item
|
signal |
Signals that the expansion status changed
| expanded | Whether the item is expanded or not |
|
overridevirtual |
Load widget action from variant
| Variant | representation of the widget action |
Reimplemented from hdps::util::Serializable.
| WidgetActions hdps::DataHierarchyItem::getActions | ( | ) | const |
Returns list of shared action widgets
| DataHierarchyItems hdps::DataHierarchyItem::getChildren | ( | const bool & | recursive = false | ) | const |
Gets the names of the children name
| recursive | Recursive |
|
overridevirtual |
Get the context menu
| parent | Parent widget |
Reimplemented from hdps::gui::WidgetAction.
| Dataset< DatasetImpl > hdps::DataHierarchyItem::getDataset | ( | ) |
Get the dataset
|
inline |
Get the dataset
| Dataset< hdps::DatasetImpl > & hdps::DataHierarchyItem::getDatasetReference | ( | ) |
Get reference to dataset smart pointer
|
inline |
Get reference to dataset smart pointer of a specific type
| DataType hdps::DataHierarchyItem::getDataType | ( | ) | const |
Get the dataset type
| QIcon hdps::DataHierarchyItem::getIcon | ( | ) | const |
Get icon
| bool hdps::DataHierarchyItem::getLocked | ( | ) | const |
Get locked status
| std::uint32_t hdps::DataHierarchyItem::getNumberOfChildren | ( | ) | const |
Gets the number of children
| DataHierarchyItem & hdps::DataHierarchyItem::getParent | ( | ) | const |
Get reference to parent hierarchy item
|
static |
Walks up the hierarchy of the data hierarchy item and returns all parents
| dataHierarchyItem | Item to fetch the parents for |
| parents | Item parents |
| QString hdps::DataHierarchyItem::getTaskDescription | ( | ) | const |
Gets the task description
| QString hdps::DataHierarchyItem::getTaskName | ( | ) | const |
Get task name
| float hdps::DataHierarchyItem::getTaskProgress | ( | ) | const |
Gets the task progress [0, 1]
| hdps::DataHierarchyItem::TaskStatus hdps::DataHierarchyItem::getTaskStatus | ( | ) | const |
Get task status
| bool hdps::DataHierarchyItem::hasChildren | ( | ) | const |
Establishes whether the item has any children
| bool hdps::DataHierarchyItem::hasParent | ( | ) | const |
Returns whether the data hierarchy item has a parent
|
signal |
Signals that the set icon has changed
| bool hdps::DataHierarchyItem::isAborted | ( | ) | const |
| bool hdps::DataHierarchyItem::isExpanded | ( | ) | const |
Get expanded status
| bool hdps::DataHierarchyItem::isFinished | ( | ) | const |
| bool hdps::DataHierarchyItem::isIdle | ( | ) | const |
Convenience functions for status checking
| bool hdps::DataHierarchyItem::isRunning | ( | ) | const |
| bool hdps::DataHierarchyItem::isSelected | ( | ) | const |
Gets whether the hierarchy item is selected
|
signal |
Signals that the data hierarchy item has been loaded
|
signal |
Signals that the data hierarchy item is being loaded
|
signal |
Signals that the locked status changed
| locked | Locked |
| void hdps::DataHierarchyItem::populateContextMenu | ( | QMenu * | contextMenu | ) |
Populates existing menu with actions menus
| contextMenu | Context menu to populate |
|
signal |
Signals that the data hierarchy item has been saved
|
signal |
Signals that the data hierarchy item is being saved
| void hdps::DataHierarchyItem::select | ( | ) |
Selects the hierarchy item
|
signal |
Signals that the item got selected
| selected | Whether the item is selected |
| void hdps::DataHierarchyItem::setExpanded | ( | bool | expanded | ) |
Set expanded status
| expanded | Whether the dataset is expanded |
| void hdps::DataHierarchyItem::setIcon | ( | const QIcon & | icon | ) |
Set icon
| icon | Icon |
| void hdps::DataHierarchyItem::setLocked | ( | const bool & | locked | ) |
Set locked status
| locked | Whether the dataset is locked |
| void hdps::DataHierarchyItem::setNumberOfSubTasks | ( | float | numberOfSubTasks | ) |
Set the number of sub tasks
| numberOfSubTasks | Number of sub tasks |
|
protected |
Set reference to parent hierarchy item
| void hdps::DataHierarchyItem::setSelected | ( | const bool & | selected | ) |
Sets the item selection status
| selected | Whether the hierarchy item is selected |
| void hdps::DataHierarchyItem::setSubTaskFinished | ( | float | subTaskIndex | ) |
Flag sub task as finished
| subTaskIndex | Index of the sub task |
| void hdps::DataHierarchyItem::setTaskAborted | ( | ) |
| void hdps::DataHierarchyItem::setTaskDescription | ( | const QString & | taskDescription | ) |
Sets the task description
| taskDescription | Task description [0, 1] |
| void hdps::DataHierarchyItem::setTaskFinished | ( | ) |
| void hdps::DataHierarchyItem::setTaskIdle | ( | ) |
Set task status
| void hdps::DataHierarchyItem::setTaskName | ( | const QString & | taskName | ) |
Set task name
| taskName | Name of the task |
| void hdps::DataHierarchyItem::setTaskProgress | ( | float | taskProgress | ) |
Sets the task progress
| taskProgress | Task progress |
| void hdps::DataHierarchyItem::setTaskRunning | ( | ) |
| void hdps::DataHierarchyItem::setVisible | ( | bool | visible | ) |
Set visibility
| visible | Whether the data hierarchy item is visible or not |
|
signal |
Signals that the task description changed
| taskDescription | Task description |
|
signal |
Signals that the task progress changed
| taskProgress | Task progress |
|
overridevirtual |
Save widget action to variant
Reimplemented from hdps::util::Serializable.
|
signal |
Signals that the visibility status changed
| visibility | Visibility |
|
friend |
Widget actions
|
friend |
|
protected |
Icon
|
protected |
Pointer to parent data hierarchy item
|
protected |
|
protected |
Whether the hierarchy item is selected
|
protected |
Task progress timer which prevents excessive GUI updates
|
protected |
Smart pointer to dataset
|
protected |
Pointers to child items (if any)
|
protected |
Task progress
|
protected |
Whether the item is expanded or not (when it has children)
|
protected |
Status of the current task
|
protected |
Sub-tasks bit array
|
protected |
Task description
|
protected |
Task description timer which prevents excessive successive GUI updates
|
protected |
Name of the current task
|
staticconstexprprotected |
Single shot message disappear timer interval
|
staticconstexprprotected |
Single shot task update timer interval