OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
VersionGraphItem.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
12
13namespace ot {
14
15 class GraphicsTextItem;
16 class GraphicsInvisibleItem;
17 class GraphicsConnectionItem;
18
22 public:
23 VersionGraphItem(const VersionGraphVersionCfg& _config, int _row, const std::string& _activeVersion, GraphicsScene* _scene);
24 virtual ~VersionGraphItem();
25
26 const VersionGraphVersionCfg& getVersionConfig(void) const { return m_config; };
27
28 void setParentVersionItem(VersionGraphItem* _item) { m_parentVersion = _item; };
29 VersionGraphItem* getParentVersionItem(void) const { return m_parentVersion; };
30
31 void setRowIndex(int _row) { m_row = _row; };
32 int getRowIndex(void) const { return m_row; };
34 int getMaxRowIndex(void) const;
35
37 void addChildVersion(VersionGraphItem* _version);
38
40 void forgetChildVersion(VersionGraphItem* _version);
41 const std::list<VersionGraphItem*>& getChildVersions(void) const { return m_childVersions; };
42 void clearChildVersions(void) { m_childVersions.clear(); };
43
44 void connectToParent(void);
45 void disconnectFromParent(void);
46
47 void updateVersionPositionAndSize(void);
48
49 void setIsInActiveBranch(void);
50
51 const QSizeF& getCurrentSize(void) const { return m_currentSize; };
52
53 private:
55
56 VersionGraphItem* m_parentVersion;
57 GraphicsConnectionItem* m_parentConnection;
58
59 GraphicsTextItem* m_nameItem;
60 GraphicsTextItem* m_labelItem;
61 GraphicsInvisibleItem* m_inConnector;
62 GraphicsInvisibleItem* m_outConnector;
63
64 std::list<VersionGraphItem*> m_childVersions;
65 int m_row;
66 QSizeF m_currentSize;
67 };
68
69}
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NODEFAULT(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:22
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
Definition GraphicsConnectionItem.h:25
Definition GraphicsInvisibleItem.h:16
Graphics Scene for ot::GraphicsItem Adding QGraphicsItems to the scene that do not inherit ot::Graphi...
Definition GraphicsScene.h:31
The GraphicsStackItem is used adjust the size of child items marked as slave occording to the naster ...
Definition GraphicsStackItem.h:17
Definition GraphicsTextItem.h:17
Definition VersionGraphItem.h:19
void setRowIndex(int _row)
Definition VersionGraphItem.h:31
void setParentVersionItem(VersionGraphItem *_item)
Definition VersionGraphItem.h:28
int getRowIndex(void) const
Definition VersionGraphItem.h:32
void clearChildVersions(void)
Definition VersionGraphItem.h:42
const std::list< VersionGraphItem * > & getChildVersions(void) const
Definition VersionGraphItem.h:41
const VersionGraphVersionCfg & getVersionConfig(void) const
Definition VersionGraphItem.h:26
VersionGraphItem * getParentVersionItem(void) const
Definition VersionGraphItem.h:29
const QSizeF & getCurrentSize(void) const
Definition VersionGraphItem.h:51
Definition VersionGraphVersionCfg.h:24
Definition Connector.h:8