32 #ifndef CXTREEREPOSITORY_H 33 #define CXTREEREPOSITORY_H 36 #include <boost/weak_ptr.hpp> 37 #include <boost/shared_ptr.hpp> 65 template<
class WIDGET>
66 boost::shared_ptr<WIDGET>
find()
68 for (
unsigned i=0; i<mWidgets.size(); ++i)
70 boost::shared_ptr<WIDGET> w = boost::dynamic_pointer_cast<WIDGET>(mWidgets[i]);
74 return boost::shared_ptr<WIDGET>();
79 void add(boost::shared_ptr<QWidget> widget);
82 typedef QPointer<QWidget> QWidgetPtr;
83 std::vector<boost::shared_ptr<QWidget> > mWidgets;
93 std::vector<TreeNodePtr> getNodes();
94 TreeNodePtr getNode(QString uid);
97 TreeNodePtr getTopNode();
98 TreeNodePtr getNodeForGroup(QString groupname);
101 WidgetTypeRepositoryPtr getWidgetTypeRepository();
103 QString getMode()
const;
105 QStringList getVisibleNodeTypes()
const;
107 QStringList getAllNodeTypes()
const;
119 void createVisibilityProperty();
120 void createModeProperty();
123 std::vector<TreeNodePtr> mNodes;
124 TreeRepositoryWeakPtr mSelf;
129 StringListPropertyPtr mVisibilityProperty;
132 WidgetTypeRepositoryPtr mWidgetTypeRepository;
136 void insertTopNode();
137 void insertDataNode(
DataPtr data);
139 void insertToolNode(
ToolPtr tool);
140 void insertGroupNode(QString groupname);
148 #endif // CXTREEREPOSITORY_H boost::shared_ptr< class TreeRepository > TreeRepositoryPtr
boost::shared_ptr< TreeNode > TreeNodePtr
boost::shared_ptr< class VisServices > VisServicesPtr
boost::weak_ptr< class TreeRepository > TreeRepositoryWeakPtr
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class StringProperty > StringPropertyPtr
StringListPropertyPtr getVisibilityProperty()
boost::shared_ptr< class WidgetTypeRepository > WidgetTypeRepositoryPtr
Identification of a Coordinate system.
StringPropertyPtr getModeProperty()
boost::shared_ptr< class StringListProperty > StringListPropertyPtr
Helper class for xml files used to store ssc/cx data.
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr