Workspace 6.21.5
Public Member Functions | List of all members
Texture2dItemType Class Reference

A 2d texture item type in the scene interaction tree.

#include <Rendering/SceneInteraction/ItemTypes/texture2ditemtype.h>

Inheritance diagram for Texture2dItemType:
[legend]

Public Member Functions

DataExecution::OperationaddToScene (DataExecution::Workspace &root, const QString &sceneIdPath) const override
 
unsigned int getFlags () const override
 
QString getIcon () const override
 
QString getMenuPath () const override
 
QString getName () const override
 
QString getOperationKey () const override
 
unsigned int getOutputType () const override
 
QString getSceneItemOutputName () const override
 
DataExecution::OperationpromptAndAddToScene (DataExecution::Workspace &root, const QString &sceneIdPath) const override
 
- Public Member Functions inherited from SceneItemType
virtual ~SceneItemType ()=default
 
virtual DataExecution::OperationaddSingleItemToScene (DataExecution::Workspace &root, const QString &sceneIdPath) const
 
virtual DataExecution::OperationaddToScene (DataExecution::Workspace &root, const QString &sceneIdPath) const =0
 
virtual bool allowMultipleConnection (QString inputName) const
 
virtual SceneInteractionWidgetItemcreateSceneInteractionWidgetItem (QTreeWidgetItem *parent, const QStringList &text, DataExecution::Operation &op) const
 
virtual SceneInteractionWidgetItemList createSceneInteractionWidgetItems (QTreeWidgetItem *parent, const QStringList &text, DataExecution::Operation &op) const
 
virtual unsigned int getFlags () const
 
virtual QString getIcon () const =0
 
virtual DataExecution::InputgetInput (DataExecution::Operation &primaryOperation, const QString &inputName) const
 
virtual QStringList getInputNameForType (unsigned int category) const
 
virtual QString getMenuPath () const
 
virtual QString getName () const =0
 
virtual QString getOperationKey () const =0
 
virtual unsigned int getOutputType () const
 
virtual QString getSceneItemOutputName () const =0
 
virtual QString getTooltipForWrongPositionInTree (const SceneInteractionWidgetItem *currentlySelectedItem) const
 
virtual bool isValidUnderTreeItem (const SceneInteractionWidgetItem *currentlySelectedItem) const
 
virtual void labelChanged (DataExecution::Workspace &root, const QString &sceneIdPath) const
 
virtual DataExecution::OperationpromptAndAddToScene (DataExecution::Workspace &root, const QString &sceneIdPath) const
 
virtual void removeFromScene (DataExecution::Workspace &root, const QString &sceneIdPath) const
 
virtual void sceneItemTypeAdded (const SceneItemType &typeJustAddedToWorkflow, DataExecution::Operation *primaryOperationJustAdded, DataExecution::Workspace &rootWorkspace, const QString &parentIdPath) const
 
virtual void sceneItemTypeRemoved (const SceneItemType &typeJustRemovedFromWorkflow, const SceneInteractionWidgetItem &treeItemRemoved, DataExecution::Operation *primaryOperationJustAdded, DataExecution::Workspace &rootWorkspace, const QString &parentIdPath) const
 Corresponding remove method.
 

Additional Inherited Members

- Public Types inherited from SceneItemType
enum  Category {
  AllCategories , Scene , SceneItem , MeshData ,
  Shader , Glypher , Texture , Overlay ,
  LastCategory = 999
}
 
enum  Flags { UserCanAdd = (1 << 0) , UserCanRemove = (1 << 1) , UserCanFocus = (1 << 2) }
 
using SceneInteractionWidgetItemList = QVector< SceneInteractionWidgetItem * >
 
- Static Public Member Functions inherited from SceneItemTypeSingleton< Texture2dItemType >
static const Texture2dItemTypegetInstance ()
 
- Static Public Member Functions inherited from SceneItemType
static void repositionOperation (DataExecution::Operation &op, DataExecution::Operation &anchor, QUndoStack &undoStack)
 ‍**
 
template<typename T >
static void setOperationInput (DataExecution::Operation &op, const QString &name, const T &value)
 
- Protected Member Functions inherited from SceneItemType
 SceneItemType ()=default
 
DataExecution::OperationaddExternalWorkspace (DataExecution::Workspace &rootWorkspace, const QString &workspaceUrl, const QString &opOutputStr, const QString &destOpIdPath) const
 
DataExecution::OperationaddExternalWorkspace (DataExecution::Workspace &rootWorkspace, const QString &workspaceUrl, const QString &opOutputStr, DataExecution::Operation &destOp, const QString &destOpInputStr, const SceneItemType *itemType) const
 
DataExecution::OperationaddOperation (DataExecution::Workspace &rootWorkspace, const QString &pluginStr, const QString &opStr, const QString &opOutputStr, const QString &destOpIdPath) const
 
- Static Protected Member Functions inherited from SceneItemType
static bool addConnection (DataExecution::Operation &sourceOp, const QString &sourceOutputStr, DataExecution::Operation &destOp, const QString &destInputStr)
 
static bool connectMeshModelSource (DataExecution::Operation &op, const QString &opInputName, DataExecution::Operation &meshInstanceOp)
 
static DataExecution::OperationfindOperationWithGlobalName (DataExecution::Workspace &parent, const QString &globalName)
 
static QPointF getOperationPosition (DataExecution::Operation &op)
 
static DataExecution::OutputtraceBackToRealOperationOutput (DataExecution::InputScalar *input)
 

Member Function Documentation

◆ addToScene()

Operation * addToScene ( DataExecution::Workspace root,
const QString &  sceneIdPath 
) const
overridevirtual

Adds this type to an existing scene, without requiring any user input. Depending on the type of SceneItem being created, all of the necessary inputs may not have been set on the operation, so it is up to the caller to assign values to these inputs before the returned operation is used.

Parameters
rootRoot workspace of the hierarchy.
sceneIdPathWorkspace id path of the transform parent this type should be added to.
Returns
The newly added operation.

Implements SceneItemType.

◆ getFlags()

unsigned int getFlags ( ) const
overridevirtual
Returns
The flags for this item.

The base implementation returns UserCanAdd | UserCanRemove | UserCanFocus.

Reimplemented from SceneItemType.

◆ getIcon()

QString getIcon ( ) const
overridevirtual
Returns
The icon filename for this type.

Implements SceneItemType.

◆ getMenuPath()

QString getMenuPath ( ) const
overridevirtual
Returns
The menu path for this item

Reimplemented from SceneItemType.

◆ getName()

QString getName ( ) const
overridevirtual
Returns
The name for this type.

Implements SceneItemType.

◆ getOperationKey()

QString getOperationKey ( ) const
overridevirtual
Returns
If this scene item type represents a single operation then this key is the the name of the operation otherwise if this scene item type represents a complex workspace then this key will be the external URL of that workspace.

Implements SceneItemType.

◆ getOutputType()

unsigned int getOutputType ( ) const
overridevirtual
Returns
The Category type this item produces. Will be a SceneItem::Category or some user defined type > SceneItem::LastCategory

The scene interaction code uses the category returned by this function when calling getInputNameForType() to determine if some exising item accepts this item as an input.

Clients may return other types of their own as long as they don't clash with the names of the above types. If this is done it is expected that a client has also defined one or more types that return a valid input when the new type is passed to getInputNameForType().

The base implementation returns SceneItem.

See also
getInputNameForType()

Reimplemented from SceneItemType.

◆ getSceneItemOutputName()

QString getSceneItemOutputName ( ) const
overridevirtual
Returns
The name of the operation output that contains the scene item for this type.

Implements SceneItemType.

◆ promptAndAddToScene()

Operation * promptAndAddToScene ( DataExecution::Workspace root,
const QString &  sceneIdPath 
) const
overridevirtual
See also
addToScene. This method mirrors addToScene but will prompt the user for missing data (e.g. file name)
Parameters
rootRoot workspace of the hierarchy.
sceneIdPathWorkspace id path of the transform parent this type should be added to.

Adds this type to an existing scene, prompting the user for any inputs it cannot automatically determine. Operations returned by this function are guaranteed to be ready to use after the function has returned.

Most subclasses will not need to override this function - its default implementation simply invokes addToScene. Only those operations that require user input in the form of dialogs will need to override this function.

E.g. Adding a MeshModel to a scene can be done in code using the addToScene function, but adding a MeshModel to a scene via the SceneInteractionWidget requires some user input for the fileName and fileType. This can be done with dialogs created in the version of this function overridden in a subclass.

Returns
The newly added operation.

Reimplemented from SceneItemType.