CustusX  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
boost::shared_ptr< TreeNode > TreeNodePtr
virtual QVariant getFont() const
virtual QVariant getColor() const
virtual QString getName() const
virtual boost::shared_ptr< QWidget > createPropertiesWidget() const
virtual QString getUid() const
virtual bool isDefaultExpanded() const
boost::weak_ptr< class TreeRepository > TreeRepositoryWeakPtr
Definition: cxTreeNode.h:30
virtual bool isRemovable() const
virtual QString getType() const
TreeRepositoryPtr repo()
boost::shared_ptr< class Data > DataPtr
DataTreeNode(TreeRepositoryWeakPtr repo, DataPtr data)
virtual void setViewGroupVisibility(int index, bool value)
boost::weak_ptr< TreeNode > TreeNodeWeakPtr
virtual ~DataTreeNode()
virtual TreeNodePtr getParent() const
virtual QVariant getViewGroupVisibility(int index) const
virtual bool isVisibleNode() const
virtual QIcon getIcon() const
virtual void activate()
Namespace for all CustusX production code.