Workspace 6.21.5
Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | List of all members
WorkspaceOutputReorderDialog Class Reference

Class implementing a dialog box for reordering a Nested Workspace's outputs. More...

#include <Workspace/Presentation/workspaceoutputreorderdialog.h>

Inheritance diagram for WorkspaceOutputReorderDialog:
[legend]

Public Member Functions

 WorkspaceOutputReorderDialog (DataExecution::Workspace &workspace, QWidget *parent=nullptr)
 
- Public Member Functions inherited from PortReorderDialog
 PortReorderDialog (int displayWidgetCol, int selectWidgetCol, DataExecution::Workspace &workspace, bool readOnly=false, QWidget *parent=nullptr)
 Creates a dialog box with DisplayWidgets for the values of supplied Updatables.
 
bool isModified ()
 
- Public Member Functions inherited from BasicTextLogger
 BasicTextLogger ()
 
virtual ~BasicTextLogger ()
 
void logLine (const Application::LogManager::MessageCategory &category, const QString &msg) const
 
void logLine (const QString &msg) const
 
void logText (const Application::LogManager::MessageCategory &category, const QString &msg) const
 
void logText (const QString &msg) const
 

Protected Types

enum  Column { Name = 0 , DataType , DisplayWidget , DisplaySelectionWidget }
 
enum  Data {
  SourceRole = Qt::UserRole + 1 , DependencySourceListRole , OperationInputRole , OperationOutputRole ,
  InternalDestinationListRole , ExternalOutputGlobalNameRole , ExternalOutputPreferredWidgetRole , ExternalOutputDescriptionRole ,
  ExternalDestinationListRole , GlobalNameListRole , DescriptionListRole , NameListRole ,
  PreferredWidgetListRole , ColorRole , IconPathRole , LabelRole ,
  UuidRole , DataNameRole , OutputNameRole , PositionRole
}
 
- Protected Types inherited from PortReorderDialog
typedef QList< DataState * > DataStateList
 

Protected Slots

void okButtonClicked () override
 
void reorderOutputs ()
 
- Protected Slots inherited from PortReorderDialog
virtual void okButtonClicked ()=0
 

Protected Member Functions

bool addRow (QTreeWidget &treeWidget, DataExecution::Output &output)
 
void loadOutputs ()
 
void restoreExternalProperties (QTreeWidgetItem *item, DataExecution::IOBase *ioBase)
 
void restoreOperationProperties (QTreeWidgetItem *item, DataExecution::WorkspaceOutput *op, DataExecution::DataObject *data)
 
void setColumnHints ()
 
void setItemHints (QTreeWidgetItem *item)
 
QSize sizeHint () const override
 
void storeExternalProperties (QTreeWidgetItem *item, DataExecution::IOBase *ioBase)
 
void storeOperationProperties (QTreeWidgetItem *item, DataExecution::PolymorphicDataOperation *op)
 
- Protected Member Functions inherited from PortReorderDialog
bool findConnectedDestinations (DataExecution::Output *output, QVariantList &destInputList)
 
void findDObjects (DataExecution::Operation &op, DataStateList &inputDataObjects, DataStateList &outputDataObjects)
 
void findIoBaseProperties (DataExecution::IOBase *ioBase, QStringList &globalNames, QStringList &descriptions, QStringList &names, QStringList &preferredWidgets, QVariantList &dependencySources)
 
void findScalarProperties (DataExecution::IOBase *ioBase, QString &globalName, QString &description, QString &preferredWidget)
 
void findScalarProperties (DataExecution::IOBase *ioBase, QStringList &globalNames, QStringList &descriptions, QStringList &preferredWidgets)
 
void keyPressEvent (QKeyEvent *evt) override
 Stops the dialog box from closing when Enter is pressed **.
 
bool registerItem (QTreeWidgetItem *item, DataExecution::IOBase *ioBase, DisplayWidgetTree::PortType portType, bool readOnly=false)
 
bool removeConnectedDestinations (DataExecution::Output *output)
 
bool removeConnectedSources (DataExecution::InputArray *inputArray)
 
bool restoreConnectedDestinations (DataExecution::Output *output, const QVariantList &destInputList)
 
bool restoreConnectedSources (DataExecution::InputArray *inputArray, const QVariantList &srcOutputList)
 
void restoreDObjects (DataExecution::Operation &op, DataStateList &inputDataObjects, DataStateList &outputDataObjects)
 
void restoreIoBaseProperties (DataExecution::IOBase *ioBase, QStringList &globalNames, QStringList &descriptions, QStringList &names, QStringList &preferredWidgets, const QVariantList &dependencySources)
 
void restoreScalarProperties (DataExecution::IOBase *ioBase, const QString &globalName, const QString &description, const QString &preferredWidget)
 
void restoreScalarProperties (DataExecution::IOBase *ioBase, QStringList &globalNames, QStringList &descriptions, QStringList &preferredWidgets)
 
DataExecution::WorkspacerootWorkspace ()
 

Additional Inherited Members

- Protected Attributes inherited from PortReorderDialog
DisplayWidgetTree treeWidget_
 
DataExecution::Workspaceworkspace_
 

Detailed Description

Member Enumeration Documentation

◆ Column

enum Column
protected
Enumerator
Name 

Name of the Workspace input.

DataType 

data type of the Workspace input

DisplayWidget 

Selected Widget for displaying the data.

DisplaySelectionWidget 

ComboBox that lets you choose a display widget from those that match the data type.

◆ Data

enum Data
protected
Enumerator
SourceRole 

Output An output belonging to an operation connected as a source to the WorkspaceOutput operation.

DependencySourceListRole 

QVariantList List List of sources connected to the dependency input array of the WorkspaceOutput operation (may have nullptr members for those unconnected)

OperationInputRole 

InputScalar The data input of the WorkspaceOutput operation.

OperationOutputRole 

Output The data output of the WorkspaceOutput operation The updateable.

InternalDestinationListRole 

QVariantList List of inputs belonging to operations that are connected internally to the WorkspaceOutput dependency output.

ExternalOutputGlobalNameRole 

QString Global name of the Workspace output.

ExternalOutputPreferredWidgetRole 

QString Preferred widget of the Workspace output.

ExternalOutputDescriptionRole 

QString Description of the Workspace output.

ExternalDestinationListRole 

QVariantList List of inputs belonging to operations that are connected externally to a WorkspaceOutput operation.

GlobalNameListRole 

QStringList List of global names used by the WorkspaceOutput operation and its inputs and outputs.

DescriptionListRole 

QStringList List of descriptions used by the WorkspaceOutput operation and its inputs and outputs.

NameListRole 

QStringList List of names used by the WorkspaceOutput inputs and outputs.

PreferredWidgetListRole 

QStringList List of preferred widgets used by the WorkspaceInput inputs and outputs.

ColorRole 

QString Color used by the WorkspaceOutput operation.

IconPathRole 

QString Icon path used by the WorkspaceOutput operation.

LabelRole 

QString WorkspaceOutput label.

UuidRole 

QUuid WorkspaceOutput Uuid.

DataNameRole 

QString WorkspaceOutput data name.

OutputNameRole 

QString WorkspaceOutput data output name.

PositionRole 

QPointF WorkspaceOutput position on the canvas.

Constructor & Destructor Documentation

◆ WorkspaceOutputReorderDialog()

WorkspaceOutputReorderDialog ( DataExecution::Workspace workspace,
QWidget *  parent = nullptr 
)
Parameters
workspaceNested workflow whose outputs are to be reordered
parentParent Widget

Member Function Documentation

◆ addRow()

bool addRow ( QTreeWidget &  treeWidget,
DataExecution::Output output 
)
protected

Adds a top-level item representing the given output

◆ loadOutputs()

void loadOutputs ( )
protected

Adds all the outputs to the treewidget as top-level items

◆ okButtonClicked

void okButtonClicked ( )
overrideprotectedslot

◆ reorderOutputs

void reorderOutputs ( )
protectedslot

Removes all the WorkspaceOutput operations from the Workspace and restores them in the new order **

◆ restoreExternalProperties()

void restoreExternalProperties ( QTreeWidgetItem *  item,
DataExecution::IOBase ioBase 
)
protected

Restores the properties of the WorkspaceOutput that are shown on the exterior of the nested workflow from the data stored in the tree item **

◆ restoreOperationProperties()

void restoreOperationProperties ( QTreeWidgetItem *  item,
DataExecution::WorkspaceOutput op,
DataExecution::DataObject data 
)
protected

Restores the properties of the WorkspaceOutput and its inputs/outputs from data stored in the tree item **

◆ setColumnHints()

void setColumnHints ( )
protected

Sets some tool-tips in the tree header **

◆ setItemHints()

void setItemHints ( QTreeWidgetItem *  item)
protected

Sets some tool-tips and whatsthis comments on per-item basis **

◆ sizeHint()

QSize sizeHint ( ) const
overrideprotected

◆ storeExternalProperties()

void storeExternalProperties ( QTreeWidgetItem *  item,
DataExecution::IOBase ioBase 
)
protected

Stores the properties of the WorkspaceOutput that are shown on the exterior of the nested workflow in data stored in the tree item **

◆ storeOperationProperties()

void storeOperationProperties ( QTreeWidgetItem *  item,
DataExecution::PolymorphicDataOperation op 
)
protected

Stores those properties of the WorkspaceOutput and its inputs/outputs inside as data stored in the tree item **