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

Creates graphics effects that differ depending on the provided difference information (for the three-way merge tool). More...

#include <Tools/WorkflowMerge/Application/mergegraphicseffectfactory.h>

Inheritance diagram for MergeGraphicsEffectFactory:
[legend]

Public Member Functions

 MergeGraphicsEffectFactory (const DataExecution::ObjectArray &differenceArray1, const DataExecution::ObjectArray &differenceArray2, const DataExecution::ObjectArray &differenceArrayFinal)
 
 MergeGraphicsEffectFactory (const DataExecution::ObjectArray &differenceArray1, const DataExecution::ObjectArray &differenceArray2, MergeRole mergeRole)
 
 MergeGraphicsEffectFactory (const MergeGraphicsEffectFactory &)=delete
 
 ~MergeGraphicsEffectFactory () override
 
Presentation::WorkspaceGraphicsEffectcreateEffect (const Presentation::ConnectionAnchor &anchor, QObject *parent=nullptr) const override
 
Presentation::WorkspaceGraphicsEffectcreateEffect (const Presentation::WorkspaceNoteItem &note, QObject *parent=nullptr) const override
 
Presentation::WorkspaceGraphicsEffectcreateEffect (const QGraphicsTextItem &label, const DataExecution::IOBase &iobase, QObject *parent=nullptr) const override
 
Presentation::WorkspaceGraphicsEffectcreateEffect (const QPainterPath &path, const DataExecution::Connection &connPort, QObject *parent=nullptr) const override
 
Presentation::WorkspaceGraphicsEffectcreateEffect (const QPainterPath &path, const DataExecution::IOBase &io, QObject *parent=nullptr) const override
 
Presentation::WorkspaceGraphicsEffectcreateEffect (const QPainterPath &path, const DataExecution::Operation &opView, QObject *parent=nullptr) const override
 
MergeGraphicsEffectFactoryoperator= (const MergeGraphicsEffectFactory)=delete
 
virtual WorkspaceGraphicsEffectcreateEffect (const ConnectionAnchor &anchor, QObject *parent=nullptr) const =0
 
virtual WorkspaceGraphicsEffectcreateEffect (const QGraphicsTextItem &label, const DataExecution::IOBase &ioBase, QObject *parent=nullptr) const =0
 
virtual WorkspaceGraphicsEffectcreateEffect (const QPainterPath &path, const DataExecution::Connection &conn, QObject *parent=nullptr) const =0
 
virtual WorkspaceGraphicsEffectcreateEffect (const QPainterPath &path, const DataExecution::IOBase &ioBase, QObject *parent=nullptr) const =0
 
virtual WorkspaceGraphicsEffectcreateEffect (const QPainterPath &path, const DataExecution::Operation &op, QObject *parent=nullptr) const =0
 
virtual WorkspaceGraphicsEffectcreateEffect (const WorkspaceNoteItem &path, QObject *parent=nullptr) const =0
 

Static Public Member Functions

static void setColours (const QColor &shared, const QColor &shadow, const QColor &query, const QColor &common, const QColor &modify, const QColor &base, const QColor &workflow1, const QColor &workflow2)
 Sets the colours to be used in annotating differences between workflows.
 

Detailed Description

Constructor & Destructor Documentation

◆ MergeGraphicsEffectFactory() [1/3]

MergeGraphicsEffectFactory ( const DataExecution::ObjectArray differenceArray1,
const DataExecution::ObjectArray differenceArray2,
MergeRole  mergeRole 
)
Parameters
differenceArray1Array of differences between the base and modified workflow 1
differenceArray2Array of differences between the base and modified workflow 2
mergeRoleWhich workflow merge role_ this effect is being applied to: 1 or 2, based or merged

◆ MergeGraphicsEffectFactory() [2/3]

MergeGraphicsEffectFactory ( const DataExecution::ObjectArray differenceArray1,
const DataExecution::ObjectArray differenceArray2,
const DataExecution::ObjectArray differenceArrayFinal 
)
Parameters
differenceArray1Array of differences between the base and modified workflow 1
differenceArray2Array of differences between the base and modified workflow 2
differenceArrayFinalArray of differences between the base and merged workflow

◆ MergeGraphicsEffectFactory() [3/3]

◆ ~MergeGraphicsEffectFactory()

~MergeGraphicsEffectFactory ( )
overridedefault

Member Function Documentation

◆ createEffect() [1/6]

WorkspaceGraphicsEffect * createEffect ( const Presentation::ConnectionAnchor anchor,
QObject *  parent = nullptr 
) const
overridevirtual
Parameters
anchorThe anchor from which the painterpath of the effect will be obtained
parentThe (optional) parent of this effect which will take ownership of it.
Returns
A new WorkspaceGraphicsEffect object with the specified path and parent.

Implements WorkspaceGraphicsEffectFactory.

◆ createEffect() [2/6]

WorkspaceGraphicsEffect * createEffect ( const Presentation::WorkspaceNoteItem note,
QObject *  parent = nullptr 
) const
overridevirtual
Parameters
noteThe note from which the painterpath of the effect will be obtained
parentThe (optional) parent of this effect which will take ownership of it.
Returns
A new WorkspaceGraphicsEffect object with the specified path and parent.

Implements WorkspaceGraphicsEffectFactory.

◆ createEffect() [3/6]

WorkspaceGraphicsEffect * createEffect ( const QGraphicsTextItem &  label,
const DataExecution::IOBase iobase,
QObject *  parent = nullptr 
) const
overridevirtual
Parameters
labelThe label from which the painterpath of the effect will be obtained
iobaseThe iobase we are creating the effect for.
parentThe (optional) parent of this effect which will take ownership of it.
Returns
A new WorkspaceGraphicsEffect object with the specified path and parent.

Implements WorkspaceGraphicsEffectFactory.

◆ createEffect() [4/6]

WorkspaceGraphicsEffect * createEffect ( const QPainterPath &  path,
const DataExecution::Connection conn,
QObject *  parent = nullptr 
) const
overridevirtual
Parameters
pathThe painterpath of the effect.
connThe connection we are creating the effect for.
parentThe (optional) parent of this effect which will take ownership of it.
Returns
A new WorkspaceGraphicsEffect object with the specified path and parent.

Implements WorkspaceGraphicsEffectFactory.

◆ createEffect() [5/6]

WorkspaceGraphicsEffect * createEffect ( const QPainterPath &  path,
const DataExecution::IOBase io,
QObject *  parent = nullptr 
) const
overridevirtual
Parameters
pathThe painterpath of the effect.
ioThe iobase we are creating the effect for.
parentThe (optional) parent of this effect which will take ownership of it.
Returns
A new WorkspaceGraphicsEffect object with the specified path and parent.

Implements WorkspaceGraphicsEffectFactory.

◆ createEffect() [6/6]

WorkspaceGraphicsEffect * createEffect ( const QPainterPath &  path,
const DataExecution::Operation op,
QObject *  parent = nullptr 
) const
overridevirtual
Parameters
pathThe painterpath of the effect.
opThe operation we are creating the effect for.
parentThe (optional) parent of this effect which will take ownership of it.
Returns
A new WorkspaceGraphicsEffect object with the specified path and parent.

Implements WorkspaceGraphicsEffectFactory.

◆ operator=()

MergeGraphicsEffectFactory & operator= ( const  MergeGraphicsEffectFactory)
delete

◆ setColours()

void setColours ( const QColor &  shared,
const QColor &  shadow,
const QColor &  query,
const QColor &  common,
const QColor &  modify,
const QColor &  base,
const QColor &  workflow1,
const QColor &  workflow2 
)
static
Parameters
sharedItem present identically in workflows 1 and 2, but not the base
shadowGhost element
queryItem in unknown state
commonItem common to all 3 input workflows
modifyItem present in 1 or more input workflows, but changed in some way
baseItem present in the base workflow, possibly identically in Workflow 1 or 2 (but not both)
workflow1Item only present in Workflow1
workflow2Item only present in Workflow2