NorMIT-nav  22.09
An IGT application
cxToolTreeNode.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 CXTOOLTREENODE_H
12 #define CXTOOLTREENODE_H
13 
14 #include "cxTreeNodeImpl.h"
15 
16 namespace cx
17 {
18 
19 class TreeNode;
20 typedef boost::weak_ptr<TreeNode> TreeNodeWeakPtr;
21 typedef boost::shared_ptr<TreeNode> TreeNodePtr;
22 
23 
24 class ToolTreeNode : public TreeNodeImpl
25 {
26  Q_OBJECT
27 public:
29  virtual ~ToolTreeNode();
30  virtual QString getUid() const;
31  virtual QString getName() const;
32  virtual QString getType() const;
33  virtual TreeNodePtr getParent() const;
34  virtual void activate();
35  virtual QIcon getIcon() const;
36  virtual boost::shared_ptr<QWidget> createPropertiesWidget() const;
37  virtual QVariant getColor() const;
38  virtual bool useColoredName() const { return true; }
39  virtual QVariant getFont() const;
40 
41 private:
42  ToolPtr mTool;
43 };
44 
45 } // namespace cx
46 
47 #endif // CXTOOLTREENODE_H
cx::ToolTreeNode::getType
virtual QString getType() const
Definition: cxToolTreeNode.cpp:70
cx::ToolTreeNode::getColor
virtual QVariant getColor() const
Definition: cxToolTreeNode.cpp:88
cx::TreeNodeImpl
Definition: cxTreeNodeImpl.h:26
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxTreeNodeImpl.h
cx::ToolTreeNode
Definition: cxToolTreeNode.h:24
cx::ToolTreeNode::getName
virtual QString getName() const
Definition: cxToolTreeNode.cpp:42
cx::ToolTreeNode::getIcon
virtual QIcon getIcon() const
Definition: cxToolTreeNode.cpp:75
cx::ToolTreeNode::useColoredName
virtual bool useColoredName() const
Definition: cxToolTreeNode.h:38
cx::ToolTreeNode::~ToolTreeNode
virtual ~ToolTreeNode()
Definition: cxToolTreeNode.cpp:33
cx::ToolTreeNode::activate
virtual void activate()
Definition: cxToolTreeNode.cpp:65
cx::TreeNodeWeakPtr
boost::weak_ptr< TreeNode > TreeNodeWeakPtr
Definition: cxDataTreeNode.h:20
cx::TreeNodePtr
boost::shared_ptr< TreeNode > TreeNodePtr
Definition: cxDataTreeNode.h:22
cx::ToolTreeNode::ToolTreeNode
ToolTreeNode(TreeRepositoryWeakPtr repo, ToolPtr tool)
Definition: cxToolTreeNode.cpp:26
cx::TreeNodeImpl::repo
TreeRepositoryPtr repo()
Definition: cxTreeNodeImpl.cpp:102
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cx::ToolTreeNode::getFont
virtual QVariant getFont() const
Definition: cxToolTreeNode.cpp:98
cx::ToolTreeNode::createPropertiesWidget
virtual boost::shared_ptr< QWidget > createPropertiesWidget() const
Definition: cxToolTreeNode.cpp:109
cx::ToolTreeNode::getUid
virtual QString getUid() const
Definition: cxToolTreeNode.cpp:37
cx::TreeRepositoryWeakPtr
boost::weak_ptr< class TreeRepository > TreeRepositoryWeakPtr
Definition: cxTreeNode.h:30
cx::ToolTreeNode::getParent
virtual TreeNodePtr getParent() const
Definition: cxToolTreeNode.cpp:47