Workspace 6.21.5
Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
WorkflowDifferencesWidget Class Reference

Display workflow differences as held in an ObjectArray.

#include <Tools/Widgets/workflowdifferenceswidget.h>

Inherits QWidget.

Public Types

enum  Columns {
  Number = 0 , WorkflowIcon , Difference , Item ,
  ValueInA , ValueInB , Uuid , SortValue ,
  SortValueWorkspace , ColumnCount
}
 
enum  DataRoles {
  OldBackgroundColor = Qt::UserRole + 1 , OperationGuid , ParentOperationGuid , SiblingOperationGuid ,
  ArrayIndex , OperationIndex , OperationType , NumberText ,
  Category , InternalWorkspaceOp , Id , Present ,
  SameValue , Label , DestinationId , PairedConnection ,
  OutputName , InputName , InputIndex , DestinationLabel ,
  StringHighlights
}
 

Public Slots

void clearContents ()
 
void onFindDone (int)
 
void onFindRequested (QRegExp)
 
void onHideConnectionArrayIndexChangesToggled (bool hideConnectionArrayIndexChanges)
 
void onHideOperationMovesToggled (bool hideOperationMoves)
 
void onHideWorkspaceInputsAndOutputsToggled (bool hideWorkspaceIO)
 
void onItemSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected) const
 
void onSelectionChanged (const QModelIndex &index, bool selected, bool notifyDiffWidgets=true) const
 
void onShowGuidsToggled (bool)
 
void setMaxFormatterInputLength (int length)
 This is set by the user through the SettingsStackDialog.
 
void setShowKey (bool val)
 
void setSortValueFieldWidth (int fieldWidth)
 This is set by the user through the SettingsStackDialog. It has a minimum value that is determined by the application and enforced through a limitiation on the input widget.
 
void setUseWorkflowIcons (bool val)
 
void setWriteNotPresentAsString (bool val)
 
void showContextMenu (const QPoint &point)
 

Signals

void annotationSuppressionChanged (ComparisonRole desc, QStringList connectionIds, bool suppress)
 
void childItemSelected (const ChildItemSelectionData &data, bool selected, bool notifyDiffWidgets=true, bool notifyTabWidgets=true) const
 
void connectionSelected (const ConnectionData &data, bool selected, bool notifyDiffWidgets, bool notifyTabWidgets=true) const
 
void displaySelected (const DisplayData &data, bool selected, bool notifyDiffWidgets, bool notifyTabWidgets=true) const
 
void itemSelected (const QUuid &opId, bool selected, bool notifyDiffWidgets, bool notifyTabWidgets=true) const
 
void requestWidgetRefresh ()
 
void updateWorkflow (Tools::ComparisonRole desc, Tools::MergeCategory category, const QUuid &guid, int itemId, Tools::MergeAction action)
 
void widgetUpdated ()
 
void workspaceAnchorSelected (const ConnectionAnchorData &data, bool selected, bool notifyDiffWidgets, bool notifyTabWidgets=true) const
 
void workspaceNoteSelected (const NoteData &data, bool selected, bool notifyDiffWidgets, bool notifyTabWidgets=true) const
 
void workspaceSelected (const WorkspaceData &data, bool selected, bool notifyDiffWidgets, bool notifyTabWidgets=true) const
 

Public Member Functions

 WorkflowDifferencesWidget (QWidget *parent=nullptr)
 
 ~WorkflowDifferencesWidget () override
 
void addToAttributeIgnoreList (const QString &attribute)
 
void clear ()
 Clears both contents and context.
 
void clearIgnoreLists ()
 
void enableWorkflowUpdates (bool value)
 
void findItems (const QRegExp &searchTerm)
 
bool itemMatchesData (const QTreeWidgetItem &item, const ConnectionAnchorData &data)
 
bool itemMatchesData (const QTreeWidgetItem &item, const ConnectionData &data)
 
bool itemMatchesData (const QTreeWidgetItem &item, const DataExecution::Operation &op)
 
bool itemMatchesData (const QTreeWidgetItem &item, const DisplayData &data)
 
bool itemMatchesData (const QTreeWidgetItem &item, const NoteData &data)
 
bool itemMatchesData (const QTreeWidgetItem &item, const QUuid &data)
 
bool itemMatchesData (const QTreeWidgetItem &item, const WorkspaceData &data)
 
void setContextMaps (const QMap< QString, QPair< QString, QString > > &labels, const QMap< QString, QString > &paths)
 
void setFileColours (const QColor &colourA, const QColor &colourB, const QColor &colourNotPresent)
 Sets the colours that will be displayed for FileA and FileB in the UI (as well as a colour for missing elements).
 
void setFileLabels (const QString &fileALabel, const QString &fileBLabel)
 
void setGroupByWorkspace (bool value)
 
void setItemSelected (const ChildItemSelectionData &data, bool selected)
 
template<typename T >
void setItemSelected (const T &elementData, bool selected)
 
void updateAnnotationSuppression (ComparisonRole desc, QStringList connectionIds, bool suppress)
 
bool updateData (CSIRO::DataExecution::ObjectArray &data)
 
bool updateWidget (const CSIRO::DataExecution::ObjectArray &data)
 

Public Attributes

WorkflowUpdateRequester workflowUpdateRequester_
 

Protected Member Functions

void enforceSingleRowSelection (bool selected)
 
QTreeWidget & getTreeWidget ()
 
void selectAndScrollToItem (QTreeWidgetItem &item, bool selected)
 

Properties

bool collapseInIOTree
 

Member Enumeration Documentation

◆ Columns

enum Columns
Enumerator
Number 

Operation difference index.

WorkflowIcon 

Icon indicating workflow(s) to which the item belongs.

Difference 

The type of difference.

Item 

Text to allow the item to identified.

ValueInA 

Value of the item in workflowA if it is there.

ValueInB 

Value of the item in workflowB if it is there.

Uuid 

Uuid of an operation (operation differences only)

SortValue 

Sorts strictly according to the item number (2 < 10)

SortValueWorkspace 

When grouped into Workspaces: sorts putting differences to the parent workspace itself top children in the child list.

ColumnCount 

◆ DataRoles

enum DataRoles
Enumerator
OldBackgroundColor 
OperationGuid 

for an operation difference

ParentOperationGuid 

for an auxiliary difference that can only be displayed by expanding its operation (e.g. a note)

SiblingOperationGuid 

for an auxiliary difference that is displayed in the same tab as its operation

ArrayIndex 

index into a difference array

OperationIndex 

index into the operation difference array

OperationType 

operation factory type

NumberText 

the index as shown in the Number col (if shown numerically)

Category 

the type of difference as a string

InternalWorkspaceOp 

true if this is one of a pair of markers for a NestedWorkspace, and it holds any Note or Anchor children

Id 

this element's guid, if it has one

Present 

if this is true, the element is present (may not be defined)

SameValue 

if this is true, the element is present in both workflows and has the same value in each

Label 

operation label

DestinationId 

connection destination

PairedConnection 

true if there is another connection between the same IO (to a different array input elt)

OutputName 

connection output name

InputName 

connection input name

InputIndex 

connection input index, if an input array

DestinationLabel 
StringHighlights 

Constructor & Destructor Documentation

◆ WorkflowDifferencesWidget()

WorkflowDifferencesWidget ( QWidget *  parent = nullptr)

◆ ~WorkflowDifferencesWidget()

~WorkflowDifferencesWidget ( )
overridedefault

Member Function Documentation

◆ addToAttributeIgnoreList()

void addToAttributeIgnoreList ( const QString &  attribute)

◆ annotationSuppressionChanged

void annotationSuppressionChanged ( ComparisonRole  desc,
QStringList  connectionIds,
bool  suppress 
)
signal

◆ childItemSelected

void childItemSelected ( const ChildItemSelectionData data,
bool  selected,
bool  notifyDiffWidgets = true,
bool  notifyTabWidgets = true 
) const
signal

◆ clear()

void clear ( )
See also
clearContents()
clearContext()

◆ clearContents

void clearContents ( )
slot

◆ clearIgnoreLists()

void clearIgnoreLists ( )

◆ connectionSelected

void connectionSelected ( const ConnectionData data,
bool  selected,
bool  notifyDiffWidgets,
bool  notifyTabWidgets = true 
) const
signal

◆ displaySelected

void displaySelected ( const DisplayData data,
bool  selected,
bool  notifyDiffWidgets,
bool  notifyTabWidgets = true 
) const
signal

◆ enableWorkflowUpdates()

void enableWorkflowUpdates ( bool  value)
inline

◆ enforceSingleRowSelection()

void enforceSingleRowSelection ( bool  selected)
protected

◆ findItems()

void findItems ( const QRegExp &  searchTerm)

◆ getTreeWidget()

QTreeWidget & getTreeWidget ( )
protected

◆ itemMatchesData() [1/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const ConnectionAnchorData data 
)

◆ itemMatchesData() [2/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const ConnectionData data 
)

◆ itemMatchesData() [3/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const DataExecution::Operation op 
)

◆ itemMatchesData() [4/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const DisplayData data 
)

◆ itemMatchesData() [5/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const NoteData data 
)

◆ itemMatchesData() [6/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const QUuid &  data 
)

◆ itemMatchesData() [7/7]

bool itemMatchesData ( const QTreeWidgetItem &  item,
const WorkspaceData data 
)

◆ itemSelected

void itemSelected ( const QUuid &  opId,
bool  selected,
bool  notifyDiffWidgets,
bool  notifyTabWidgets = true 
) const
signal

◆ onFindDone

void onFindDone ( int  )
slot

◆ onFindRequested

void onFindRequested ( QRegExp  regexp)
slot

◆ onHideConnectionArrayIndexChangesToggled

void onHideConnectionArrayIndexChangesToggled ( bool  hideConnectionArrayIndexChanges)
slot

◆ onHideOperationMovesToggled

void onHideOperationMovesToggled ( bool  hideOperationMoves)
slot

◆ onHideWorkspaceInputsAndOutputsToggled

void onHideWorkspaceInputsAndOutputsToggled ( bool  hideWorkspaceIO)
slot

◆ onItemSelectionChanged

void onItemSelectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
) const
slot

◆ onSelectionChanged

void onSelectionChanged ( const QModelIndex &  index,
bool  selected,
bool  notifyDiffWidgets = true 
) const
slot

◆ onShowGuidsToggled

void onShowGuidsToggled ( bool  b)
slot

◆ requestWidgetRefresh

void requestWidgetRefresh ( )
signal

◆ selectAndScrollToItem()

void selectAndScrollToItem ( QTreeWidgetItem &  item,
bool  selected 
)
protected

◆ setContextMaps()

void setContextMaps ( const QMap< QString, QPair< QString, QString > > &  labels,
const QMap< QString, QString > &  paths 
)

◆ setFileColours()

void setFileColours ( const QColor &  colourA,
const QColor &  colourB,
const QColor &  colourNotPresent 
)
Parameters
colourAColour to use for items present in A but not B
colourBColour to use for items present in B but not A
colourNotPresentColour to use in the difference list for items missing in a workflow

◆ setFileLabels()

void setFileLabels ( const QString &  fileALabel,
const QString &  fileBLabel 
)
Parameters
fileALabelLabel to display for File A
fileBLabelLabel to display for File B

Sets the labels that will be displayed for FileA and FileB in the UI.

◆ setGroupByWorkspace()

void setGroupByWorkspace ( bool  value)

◆ setItemSelected() [1/2]

void setItemSelected ( const ChildItemSelectionData data,
bool  selected 
)

◆ setItemSelected() [2/2]

void setItemSelected ( const T &  elementData,
bool  selected 
)

◆ setMaxFormatterInputLength

void setMaxFormatterInputLength ( int  length)
slot

◆ setShowKey

void setShowKey ( bool  val)
slot

◆ setSortValueFieldWidth

void setSortValueFieldWidth ( int  fieldWidth)
slot

◆ setUseWorkflowIcons

void setUseWorkflowIcons ( bool  val)
slot

◆ setWriteNotPresentAsString

void setWriteNotPresentAsString ( bool  val)
slot

◆ showContextMenu

void showContextMenu ( const QPoint &  point)
slot

◆ updateAnnotationSuppression()

void updateAnnotationSuppression ( ComparisonRole  desc,
QStringList  connectionIds,
bool  suppress 
)

◆ updateData()

bool updateData ( CSIRO::DataExecution::ObjectArray data)

◆ updateWidget()

bool updateWidget ( const CSIRO::DataExecution::ObjectArray data)

◆ updateWorkflow

void updateWorkflow ( Tools::ComparisonRole  desc,
Tools::MergeCategory  category,
const QUuid &  guid,
int  itemId,
Tools::MergeAction  action 
)
signal

◆ widgetUpdated

void widgetUpdated ( )
signal

◆ workspaceAnchorSelected

void workspaceAnchorSelected ( const ConnectionAnchorData data,
bool  selected,
bool  notifyDiffWidgets,
bool  notifyTabWidgets = true 
) const
signal

◆ workspaceNoteSelected

void workspaceNoteSelected ( const NoteData data,
bool  selected,
bool  notifyDiffWidgets,
bool  notifyTabWidgets = true 
) const
signal

◆ workspaceSelected

void workspaceSelected ( const WorkspaceData data,
bool  selected,
bool  notifyDiffWidgets,
bool  notifyTabWidgets = true 
) const
signal

Member Data Documentation

◆ workflowUpdateRequester_

WorkflowUpdateRequester workflowUpdateRequester_

Property Documentation

◆ collapseInIOTree

bool collapseInIOTree
read