OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::VersionGraph Class Reference

#include "VersionGraph.h"

Inheritance diagram for ot::VersionGraph:
ot::GraphicsView ot::QWidgetInterface

Public Types

enum  VersionGraphConfig { NoConfigFlags = 0 << 0 , IgnoreActivateRequestOnReadOnly = 1 << 0 , IgnoreSelectionHandlingOnReadOnly = 1 << 1 }
 
typedef Flags< VersionGraphConfigVersionGraphConfigFlags
 
- Public Types inherited from ot::GraphicsView
enum  GraphicsViewFlag { NoViewFlags = 0x00 , ViewManagesSceneRect = 0x01 , IgnoreConnectionByUser = 0x02 }
 
enum  ViewStateFlag { DefaultState = 0 << 0 , ItemMoveInProgress = 1 << 0 , MiddleMousePressedState = 1 << 1 , ReadOnlyState = 1 << 2 }
 
typedef Flags< GraphicsViewFlagGraphicsViewFlags
 
typedef ot::Flags< ViewStateFlagViewStateFlags
 

Public Slots

void slotSelectionChanged (void)
 
void slotCenterOnActiveVersion (void)
 
void slotGraphicsItemDoubleClicked (const ot::GraphicsItem *_item)
 

Signals

void versionDeselected (void)
 
void versionSelected (const std::string &_versionName)
 
void versionActivateRequest (const std::string &_versionName)
 
- Signals inherited from ot::GraphicsView
void itemRequested (const QString &_name, const QPointF &_pos)
 Will be emitted when an item was dropped into the scene by the user.
 
void connectionRequested (const ot::UID &_fromUid, const std::string &_fromConnector, const ot::UID &_toUid, const std::string &_toConnector)
 Will be emitted when a connection was "dropped" by the user.
 
void connectionToConnectionRequested (const ot::UID &_fromItemUid, const std::string &_fromItemConnector, const ot::UID &_toConnectionUid, const ot::Point2DD &_newControlPoint)
 
void itemMoved (const ot::UID &_uid, const QPointF &_newPos)
 
void itemConfigurationChanged (const ot::GraphicsItemCfg *_newConfig)
 
void removeItemsRequested (const ot::UIDList &_items, const ot::UIDList &_connections)
 
void itemCopyRequested (const GraphicsCopyInformation *_info)
 

Public Member Functions

 VersionGraph ()
 
virtual ~VersionGraph ()
 
void setupFromConfig (const VersionGraphCfg &_config)
 
void clear (void)
 
bool isCurrentVersionEndOfBranch (void) const
 
bool isVersionEndOfBranch (const std::string &_versionName) const
 
void setVersionGraphConfig (VersionGraphConfig _config, bool _active=true)
 
void setVersionGraphConfigFlags (const VersionGraphConfigFlags &_flags)
 
const VersionGraphConfigFlagsgetVersionGraphConfigFlags (void) const
 
- Public Member Functions inherited from ot::GraphicsView
 GraphicsView (GraphicsScene *_scene=(GraphicsScene *) nullptr)
 
virtual ~GraphicsView ()
 
virtual QWidget * getQWidget (void) override
 Returns a pointer to the root widget of this object.
 
virtual const QWidget * getQWidget (void) const override
 
void resetView (void)
 
void ensureViewInBounds (void)
 
void setMouseWheelEnabled (bool _enabled)
 
bool getMouseWheelEnabled (void) const
 
void setOwner (const BasicServiceInformation &_owner)
 
const BasicServiceInformationgetOwner (void) const
 
void setGraphicsViewFlag (GraphicsViewFlag _flag, bool _active=true)
 
void setGraphicsViewFlags (const GraphicsViewFlags &_flags)
 
const GraphicsViewFlagsgetGraphicsViewFlags (void) const
 
void setGraphicsScene (GraphicsScene *_scene)
 
GraphicsScenegetGraphicsScene (void)
 
GraphicsItemgetItem (const ot::UID &_itemUid)
 
GraphicsConnectionItemgetConnection (const ot::UID &_connectionUid)
 
bool connectionAlreadyExists (const ot::GraphicsConnectionCfg &connection)
 
void setDropsEnabled (bool _enabled)
 
void setGraphicsViewName (const std::string &_name)
 
const std::string & getGraphicsViewName (void) const
 
void addItem (ot::GraphicsItem *_item)
 
void removeItem (const ot::UID &_itemUid, bool bufferConnections=false)
 
std::list< ot::UIDgetSelectedItemUIDs (void) const
 
std::list< GraphicsItem * > getSelectedGraphicsItems (void) const
 
void setSceneMargins (const QMarginsF &_margins)
 
const QMarginsF & getSceneMargins (void) const
 
bool addConnectionIfConnectedItemsExist (const GraphicsConnectionCfg &_config)
 
void removeConnection (const GraphicsConnectionCfg &_connectionInformation)
 
void removeConnection (const ot::UID &_connectionInformation)
 
ot::UIDList getSelectedConnectionUIDs (void) const
 
std::list< GraphicsConnectionItem * > getSelectedConnectionItems (void) const
 
void requestConnection (const ot::UID &_fromUid, const std::string &_fromConnector, const ot::UID &_toUid, const std::string &_toConnector)
 
void requestConnectionToConnection (const ot::UID &_fromItemUid, const std::string &_fromItemConnector, const ot::UID &_toConnectionUid, const ot::Point2DD &_newControlPoint)
 
void notifyItemMoved (const ot::GraphicsItem *_item)
 
void notifyItemConfigurationChanged (const ot::GraphicsItem *_item)
 
QRectF getVisibleSceneRect (void) const
 
void setReadOnly (bool _isReadOnly)
 
bool isReadOnly (void) const
 
- Public Member Functions inherited from ot::QWidgetInterface
 QWidgetInterface ()
 
virtual ~QWidgetInterface ()
 
void setOTWidgetFlags (const WidgetFlags &_flags)
 
const WidgetFlagsotWidgetFlags (void) const
 

Protected Member Functions

virtual void showEvent (QShowEvent *_event) override
 
virtual void paintEvent (QPaintEvent *_event) override
 
- Protected Member Functions inherited from ot::GraphicsView
virtual void wheelEvent (QWheelEvent *_event) override
 
virtual void mousePressEvent (QMouseEvent *_event) override
 
virtual void mouseReleaseEvent (QMouseEvent *_event) override
 
virtual void mouseMoveEvent (QMouseEvent *_event) override
 
virtual void keyPressEvent (QKeyEvent *_event) override
 
virtual void keyReleaseEvent (QKeyEvent *_event) override
 
virtual void resizeEvent (QResizeEvent *_event) override
 
virtual void dragEnterEvent (QDragEnterEvent *_event) override
 
virtual void dropEvent (QDropEvent *_event) override
 
virtual void dragMoveEvent (QDragMoveEvent *_event) override
 
- Protected Member Functions inherited from ot::QWidgetInterface
virtual void otWidgetFlagsChanged (const WidgetFlags &_flags)
 

Member Typedef Documentation

◆ VersionGraphConfigFlags

Member Enumeration Documentation

◆ VersionGraphConfig

Enumerator
NoConfigFlags 
IgnoreActivateRequestOnReadOnly 

No VersionGraph configuration flags.

IgnoreSelectionHandlingOnReadOnly 

Activate version requests will be suppressed if the VersionGraph is in read-only state.

Constructor & Destructor Documentation

◆ VersionGraph()

ot::VersionGraph::VersionGraph ( )

◆ ~VersionGraph()

ot::VersionGraph::~VersionGraph ( )
virtual

Member Function Documentation

◆ clear()

void ot::VersionGraph::clear ( void )

◆ getVersionGraphConfigFlags()

const VersionGraphConfigFlags & ot::VersionGraph::getVersionGraphConfigFlags ( void ) const
inline

◆ isCurrentVersionEndOfBranch()

bool ot::VersionGraph::isCurrentVersionEndOfBranch ( void ) const

◆ isVersionEndOfBranch()

bool ot::VersionGraph::isVersionEndOfBranch ( const std::string & _versionName) const

◆ paintEvent()

void ot::VersionGraph::paintEvent ( QPaintEvent * _event)
overrideprotectedvirtual

◆ setupFromConfig()

void ot::VersionGraph::setupFromConfig ( const VersionGraphCfg & _config)

◆ setVersionGraphConfig()

void ot::VersionGraph::setVersionGraphConfig ( VersionGraphConfig _config,
bool _active = true )
inline

◆ setVersionGraphConfigFlags()

void ot::VersionGraph::setVersionGraphConfigFlags ( const VersionGraphConfigFlags & _flags)
inline

◆ showEvent()

void ot::VersionGraph::showEvent ( QShowEvent * _event)
overrideprotectedvirtual

◆ slotCenterOnActiveVersion

void ot::VersionGraph::slotCenterOnActiveVersion ( void )
slot

◆ slotGraphicsItemDoubleClicked

void ot::VersionGraph::slotGraphicsItemDoubleClicked ( const ot::GraphicsItem * _item)
slot

◆ slotSelectionChanged

void ot::VersionGraph::slotSelectionChanged ( void )
slot

◆ versionActivateRequest

void ot::VersionGraph::versionActivateRequest ( const std::string & _versionName)
signal

◆ versionDeselected

void ot::VersionGraph::versionDeselected ( void )
signal

◆ versionSelected

void ot::VersionGraph::versionSelected ( const std::string & _versionName)
signal

The documentation for this class was generated from the following files: