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

#include <AbstractActionsModel.h>

Inheritance diagram for hdps::AbstractActionsModel:
hdps::ActionsHierarchyModel hdps::ActionsListModel hdps::PublicActionsModel

Classes

struct  ColumHeaderInfo
 
class  ConnectionPermissionItem
 
class  ForceDisabledItem
 
class  ForceHiddenItem
 
class  HeaderItem
 
class  IdItem
 
class  InternalUseOnlyItem
 
class  IsConnectedItem
 
class  IsLeafItem
 
class  IsRootItem
 
class  Item
 
class  LocationItem
 
class  NameItem
 
class  NumberOfConnectedActionsItem
 
class  ParentActionIdItem
 
class  PublicActionIdItem
 
class  Row
 
class  ScopeItem
 
class  SortIndexItem
 
class  StretchItem
 
class  TypeItem
 

Public Types

enum class  Column {
  Name , Location , ID , Type ,
  Scope , ForceDisabled , ForceHidden , MayPublish ,
  MayConnect , MayDisconnect , SortIndex , Stretch ,
  ParentActionId , IsConnected , NumberOfConnectedActions , PublicActionID ,
  IsRoot , IsLeaf , InternalUseOnly , Count
}
 

Public Member Functions

 AbstractActionsModel (QObject *parent=nullptr)
 
virtual void initialize ()=0
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
gui::WidgetActiongetAction (const QModelIndex &index)
 
gui::WidgetActiongetAction (std::int32_t rowIndex)
 
gui::WidgetActiongetAction (const QString &name)
 
virtual QModelIndex getActionIndex (const gui::WidgetAction *action, const Column &column=Column::Name) const final
 
virtual QStandardItem * getActionItem (const gui::WidgetAction *action) const final
 

Static Public Attributes

static QMap< Column, ColumHeaderInfocolumnInfo
 

Protected Member Functions

Qt::DropActions supportedDropActions () const override
 
Qt::DropActions supportedDragActions () const override
 
QStringList mimeTypes () const override
 
QMimeData * mimeData (const QModelIndexList &indexes) const override
 
bool canDropMimeData (const QMimeData *mimeData, Qt::DropAction dropAction, int row, int column, const QModelIndex &parent) const override
 
bool dropMimeData (const QMimeData *mimeData, Qt::DropAction dropAction, int row, int column, const QModelIndex &parent) override
 
virtual void actionAddedToManager (gui::WidgetAction *action)
 
virtual void actionAboutToBeRemovedFromManager (gui::WidgetAction *action)
 
virtual void publicActionAddedToManager (gui::WidgetAction *publicAction)
 
virtual void publicActionAboutToBeRemovedFromManager (gui::WidgetAction *publicAction)
 

Friends

class ActionsFilterModel
 
class Item
 

Detailed Description

Abstract actions model class

Abstract standard item model class for actions

Author
Thomas Kroes

Member Enumeration Documentation

◆ Column

Action columns

Enumerator
Name 
Location 

Name of the action

ID 

Where the action is located in the user interface

Type 

Globally unique identifier of the action

Scope 

Action type string

ForceDisabled 

Scope of the action (whether the action is public or private)

ForceHidden 

Whether the action is force disabled or not

MayPublish 

Whether the action is force hidden or not

MayConnect 

Whether the action may be published

MayDisconnect 

Whether the action may connect to a public action

SortIndex 

Whether the action may disconnect from a public action

Stretch 

The sorting index of the action (its relative position in action groups)

ParentActionId 

The stretch in action groups

IsConnected 

The identifier of the parent action (if not a top-level action)

NumberOfConnectedActions 

Whether the action is connected or not

PublicActionID 

Number of connected actions (in case the action is public)

IsRoot 

The identifier of the public action with which the action is connected

IsLeaf 

If the action is at the root or not

InternalUseOnly 

If the action is a leaf or not

Count 

If the action is for internal use only

Constructor & Destructor Documentation

◆ AbstractActionsModel()

hdps::AbstractActionsModel::AbstractActionsModel ( QObject *  parent = nullptr)

Construct with parent object

Parameters
parentPointer to parent object

Member Function Documentation

◆ actionAboutToBeRemovedFromManager()

virtual void hdps::AbstractActionsModel::actionAboutToBeRemovedFromManager ( gui::WidgetAction action)
inlineprotectedvirtual

Helper method which is invoked when action is about to be removed from the actions manager

Parameters
actionPointer to action that was removed

Reimplemented in hdps::ActionsHierarchyModel, hdps::ActionsListModel, and hdps::PublicActionsModel.

◆ actionAddedToManager()

virtual void hdps::AbstractActionsModel::actionAddedToManager ( gui::WidgetAction action)
inlineprotectedvirtual

Helper method which is invoked when action is added to the actions manager

Parameters
actionPointer to action that was added

Reimplemented in hdps::ActionsHierarchyModel, hdps::ActionsListModel, and hdps::PublicActionsModel.

◆ canDropMimeData()

bool hdps::AbstractActionsModel::canDropMimeData ( const QMimeData *  mimeData,
Qt::DropAction  dropAction,
int  row,
int  column,
const QModelIndex &  parent 
) const
overrideprotected

Determines whether mimeData with action can be dropped on row and column with parent model index

Parameters
mimeDataPointer to dropped mime data
dropActionDrop action
rowDrop row
columnDrop column
parentDrop parent index
Returns
Boolean whether the drop is permitted

◆ dropMimeData()

bool hdps::AbstractActionsModel::dropMimeData ( const QMimeData *  mimeData,
Qt::DropAction  dropAction,
int  row,
int  column,
const QModelIndex &  parent 
)
overrideprotected

Invoked when mimeData is dropped

Parameters
mimeDataPointer to dropped mime data
dropActionDrop action
rowDrop row
columnDrop column
parentDrop parent index
Returns
Boolean determining whether the drop is performed

◆ flags()

Qt::ItemFlags hdps::AbstractActionsModel::flags ( const QModelIndex &  index) const
override

Get flags for item with index

Returns
Item flags

◆ getAction() [1/3]

WidgetAction * hdps::AbstractActionsModel::getAction ( const QModelIndex &  index)

Get action for model index

Parameters
indexModel index to retrieve the action for
Returns
Pointer to action (nullptr if not found)

◆ getAction() [2/3]

WidgetAction * hdps::AbstractActionsModel::getAction ( const QString &  name)

Get action by name

Parameters
nameName of the action
Returns
Pointer to action (nullptr if not found)

◆ getAction() [3/3]

WidgetAction * hdps::AbstractActionsModel::getAction ( std::int32_t  rowIndex)

Get action for model rowIndex

Parameters
rowIndexRow index to retrieve the action for
Returns
Pointer to action (nullptr if not found)

◆ getActionIndex()

QModelIndex hdps::AbstractActionsModel::getActionIndex ( const gui::WidgetAction action,
const Column column = Column::Name 
) const
finalvirtual

Get model index for action and column

Parameters
actionPointer to action to retrieve the model index for
columnColumn to retrieve the action index for
Returns
Found model index
Parameters
column= Column::Name

◆ getActionItem()

QStandardItem * hdps::AbstractActionsModel::getActionItem ( const gui::WidgetAction action) const
finalvirtual

Get action item for action

Parameters
actionPointer to action to retrieve the model item for
Returns
Pointer to standard item (nullptr if not found)

◆ initialize()

virtual void hdps::AbstractActionsModel::initialize ( )
pure virtual

Initializes the model from the current state of the actions manager

Implemented in hdps::ActionsHierarchyModel, hdps::ActionsListModel, and hdps::PublicActionsModel.

◆ mimeData()

QMimeData * hdps::AbstractActionsModel::mimeData ( const QModelIndexList &  indexes) const
overrideprotected

Get mime data for model indexes

Returns
Pointer to mime data for indexes

◆ mimeTypes()

QStringList hdps::AbstractActionsModel::mimeTypes ( ) const
overrideprotected

Get mime types

Returns
Supported mime types

◆ publicActionAboutToBeRemovedFromManager()

virtual void hdps::AbstractActionsModel::publicActionAboutToBeRemovedFromManager ( gui::WidgetAction publicAction)
inlineprotectedvirtual

Helper method which is invoked when publicAction is about to be removed from the actions manager

Parameters
publicActionPointer to public action to remove

Reimplemented in hdps::ActionsHierarchyModel, and hdps::PublicActionsModel.

◆ publicActionAddedToManager()

virtual void hdps::AbstractActionsModel::publicActionAddedToManager ( gui::WidgetAction publicAction)
inlineprotectedvirtual

Helper method which is invoked when publicAction is added to the actions manager

Parameters
publicActionPointer to public action that was added

Reimplemented in hdps::ActionsHierarchyModel, and hdps::PublicActionsModel.

◆ supportedDragActions()

Qt::DropActions hdps::AbstractActionsModel::supportedDragActions ( ) const
overrideprotected

Get the supported drag actions

◆ supportedDropActions()

Qt::DropActions hdps::AbstractActionsModel::supportedDropActions ( ) const
overrideprotected

Get the supported drop actions

Friends And Related Symbol Documentation

◆ ActionsFilterModel

friend class ActionsFilterModel
friend

◆ Item

friend class Item
friend

Member Data Documentation

◆ columnInfo

QMap< AbstractActionsModel::Column, AbstractActionsModel::ColumHeaderInfo > hdps::AbstractActionsModel::columnInfo
static
Initial value:
= QMap<AbstractActionsModel::Column, AbstractActionsModel::ColumHeaderInfo>({
{ AbstractActionsModel::Column::ForceDisabled, { "" , "Enabled", "Whether the parameter is enabled or not" } },
{ AbstractActionsModel::Column::Name, { "Name" , "Name", "Name of the parameter" } },
{ AbstractActionsModel::Column::Location, { "Location" , "Location", "Where the parameter is located in the user interface" } },
{ AbstractActionsModel::Column::ID, { "ID", "ID", "Globally unique identifier of the parameter" } },
{ AbstractActionsModel::Column::Type, { "Type", "Type", "Type of parameter" } },
{ AbstractActionsModel::Column::Scope, { "Scope", "Scope", "Scope of the parameter (whether the parameter is public or private)" } },
{ AbstractActionsModel::Column::ForceDisabled, { "", "Force Disabled", "Whether the parameter is forcibly disabled (regardless of its programmatic enabled setting)" } },
{ AbstractActionsModel::Column::ForceHidden, { "", "Force Hidden", "Whether the parameter is forcibly hidden (regardless of its programmatic visibility setting)" } },
{ AbstractActionsModel::Column::MayPublish, { "", "May Publish", "Whether the parameter may be published" } },
{ AbstractActionsModel::Column::MayConnect, { "", "May Connect", "Whether the parameter may connect to a public parameter" } },
{ AbstractActionsModel::Column::MayDisconnect, { "", "May Disconnect", "Whether the parameter may disconnect from a public parameter" } },
{ AbstractActionsModel::Column::SortIndex, { "Sort Index", "Sort Index", "The sorting index of the parameter (its relative position in parameter groups)" } },
{ AbstractActionsModel::Column::Stretch, { "Stretch", "Stretch", "The parameter stretch in parameter groups" } },
{ AbstractActionsModel::Column::ParentActionId, { "Parent ID", "Parent ID", "The identifier of the parent parameter (if not a top-level parameter)" } },
{ AbstractActionsModel::Column::IsConnected, { "Connected", "Connected", "Whether the parameter is connected or not" } },
{ AbstractActionsModel::Column::NumberOfConnectedActions, { "No. Connected Parameters", "No. Connected Parameters", "The number of connected parameters (in case the parameter is public)" } },
{ AbstractActionsModel::Column::PublicActionID, { "Public Parameter ID", "Public Parameter ID", "The identifier of the public parameter with which the parameter is connected" } },
{ AbstractActionsModel::Column::IsRoot, { "Root", "Root", "Whether the parameter is located at the root of the hierarchy" } },
{ AbstractActionsModel::Column::IsLeaf, { "Leaf", "Leaf", "Whether the parameter is a leaf or not" } },
{ AbstractActionsModel::Column::InternalUseOnly, { "Internal use only", "Internal use only", "Whether the parameter is for internal use only" } }
})

Column name and tooltip


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