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

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

#include <Workspace/Presentation/workspaceinputreorderdialog.h>

Inheritance diagram for WorkspaceInputReorderDialog:
[legend]

Public Member Functions

 WorkspaceInputReorderDialog (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 ,
  SourceOperation
}
 
enum  Data {
  SourceRole = Qt::UserRole + 1 , DependencySourceListRole , OperationInputRole , ExternalInputGlobalNameRole ,
  ExternalInputPreferredWidgetRole , ExternalInputDescriptionRole , DataDestinationListRole , DependencyDestinationListRole ,
  GlobalNameListRole , DescriptionListRole , NameListRole , PreferredWidgetListRole ,
  ColorRole , IconPathRole , DisplayWidgetRole , LabelRole ,
  UuidRole , DataNameRole , PositionRole
}
 
- Protected Types inherited from PortReorderDialog
typedef QList< DataState * > DataStateList
 

Protected Slots

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

Protected Member Functions

bool addRow (QTreeWidget &tree, DataExecution::InputScalar &input)
 
void loadInputs ()
 
void restoreExternalProperties (QTreeWidgetItem *item, DataExecution::IOBase *ioBase)
 
void restoreOperationProperties (QTreeWidgetItem *item, DataExecution::WorkspaceInput *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::WorkspaceInput *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.

SourceOperation 

The external operation connected to this input (if there is one)

◆ Data

enum Data
protected
Enumerator
SourceRole 

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

DependencySourceListRole 

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

OperationInputRole 

InputScalar The data input of the WorkspaceInput operation The updateable.

ExternalInputGlobalNameRole 

QString Global name of the Workspace input The updateable.

ExternalInputPreferredWidgetRole 

QString Preferred widget of the Workspace input.

ExternalInputDescriptionRole 

QString Description of the Workspace input.

DataDestinationListRole 

QVariantList List of inputs belonging to operations that are connected to a WorkspaceInput operation data output as destinations.

DependencyDestinationListRole 

QVariantList List of inputs belonging to operations that are connected to a WorkspaceInput operation dependency output as destinations.

GlobalNameListRole 

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

DescriptionListRole 

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

NameListRole 

QStringList List of names used by the WorkspaceInput operation inputs and outputs.

PreferredWidgetListRole 

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

ColorRole 

QString Color used by the WorkspaceInput operation.

IconPathRole 

QString Icon path used by the WorkspaceInput operation.

DisplayWidgetRole 

QWidget The widget used to display the data value.

LabelRole 

QString WorkspaceInput label.

UuidRole 

QUuid WorkspaceInput Uuid.

DataNameRole 

QString WorkspaceInput data name.

PositionRole 

QPointF WorkspaceInput position on the canvas.

Constructor & Destructor Documentation

◆ WorkspaceInputReorderDialog()

WorkspaceInputReorderDialog ( DataExecution::Workspace workspace,
QWidget *  parent = nullptr 
)

Member Function Documentation

◆ addRow()

bool addRow ( QTreeWidget &  tree,
DataExecution::InputScalar input 
)
protected

Adds a top-level item representing the given input

◆ loadInputs()

void loadInputs ( )
protected

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

◆ okButtonClicked

void okButtonClicked ( )
overrideprotectedslot

◆ reorderInputs

void reorderInputs ( )
protectedslot

Removes all the WorkspaceInput 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 WorkspaceInput that are shown on the exterior of the nested workflow from the data stored in the tree item **

◆ restoreOperationProperties()

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

Restores the properties of the WorkspaceInput 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 WorkspaceInput that are shown on the exterior of the nested workflow inside as data stored in the tree item **

◆ storeOperationProperties()

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

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