NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxDataTreeNode.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXDATATREENODE_H
12 #define CXDATATREENODE_H
13 
14 #include "cxTreeNodeImpl.h"
15 
16 namespace cx
17 {
18 
19 
20 class TreeNode;
21 typedef boost::weak_ptr<TreeNode> TreeNodeWeakPtr;
22 typedef boost::shared_ptr<TreeNode> TreeNodePtr;
23 
24 
25 class DataTreeNode : public TreeNodeImpl
26 {
27  Q_OBJECT
28 public:
30  virtual ~DataTreeNode();
31  virtual QString getUid() const;
32  virtual QString getName() const;
33  virtual QString getType() const;
34  virtual TreeNodePtr getParent() const;
35  virtual bool isVisibleNode() const;
36  virtual void activate();
37  virtual QIcon getIcon() const;
38  virtual QVariant getViewGroupVisibility(int index) const;
39  virtual void setViewGroupVisibility(int index, bool value);
40  virtual boost::shared_ptr<QWidget> createPropertiesWidget() const;
41  virtual QVariant getColor() const;
42  virtual QVariant getFont() const;
43  virtual bool isDefaultExpanded() const;
44 
45  virtual bool isRemovable() const { return true; }
46  virtual void remove();
47 
48 private:
49  DataPtr mData;
50 };
51 
52 } // namespace cx
53 
54 #endif // CXDATATREENODE_H
cx::TreeNodeImpl
Definition: cxTreeNodeImpl.h:26
cx::DataTreeNode::getType
virtual QString getType() const
Definition: cxDataTreeNode.cpp:60
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::DataTreeNode::getIcon
virtual QIcon getIcon() const
Definition: cxDataTreeNode.cpp:101
cx::DataTreeNode::getName
virtual QString getName() const
Definition: cxDataTreeNode.cpp:55
cxTreeNodeImpl.h
cx::DataTreeNode::isDefaultExpanded
virtual bool isDefaultExpanded() const
Definition: cxDataTreeNode.cpp:132
cx::DataTreeNode::getUid
virtual QString getUid() const
Definition: cxDataTreeNode.cpp:50
cx::DataTreeNode::getColor
virtual QVariant getColor() const
Definition: cxDataTreeNode.cpp:109
cx::DataTreeNode::DataTreeNode
DataTreeNode(TreeRepositoryWeakPtr repo, DataPtr data)
Definition: cxDataTreeNode.cpp:37
cx::DataTreeNode
Definition: cxDataTreeNode.h:25
cx::DataTreeNode::createPropertiesWidget
virtual boost::shared_ptr< QWidget > createPropertiesWidget() const
Definition: cxDataTreeNode.cpp:161
cx::DataTreeNode::getViewGroupVisibility
virtual QVariant getViewGroupVisibility(int index) const
Definition: cxDataTreeNode.cpp:142
cx::DataTreeNode::isVisibleNode
virtual bool isVisibleNode() const
Definition: cxDataTreeNode.cpp:65
cx::DataTreeNode::isRemovable
virtual bool isRemovable() const
Definition: cxDataTreeNode.h:45
cx::TreeNode
Definition: cxTreeNode.h:34
cx::DataTreeNode::setViewGroupVisibility
virtual void setViewGroupVisibility(int index, bool value)
Definition: cxDataTreeNode.cpp:153
cx::DataTreeNode::~DataTreeNode
virtual ~DataTreeNode()
Definition: cxDataTreeNode.cpp:45
cx::DataTreeNode::getParent
virtual TreeNodePtr getParent() const
Definition: cxDataTreeNode.cpp:83
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::TreeNodeWeakPtr
boost::weak_ptr< TreeNode > TreeNodeWeakPtr
Definition: cxDataTreeNode.h:20
cx::TreeNodePtr
boost::shared_ptr< TreeNode > TreeNodePtr
Definition: cxDataTreeNode.h:22
cx::TreeNodeImpl::repo
TreeRepositoryPtr repo()
Definition: cxTreeNodeImpl.cpp:102
cx::DataTreeNode::remove
virtual void remove()
Definition: cxDataTreeNode.cpp:137
cx::DataTreeNode::activate
virtual void activate()
Definition: cxDataTreeNode.cpp:96
cx::TreeRepositoryWeakPtr
boost::weak_ptr< class TreeRepository > TreeRepositoryWeakPtr
Definition: cxTreeNode.h:30
cx::DataTreeNode::getFont
virtual QVariant getFont() const
Definition: cxDataTreeNode.cpp:121