11 #ifndef CXTREEREPOSITORY_H 12 #define CXTREEREPOSITORY_H 15 #include <boost/weak_ptr.hpp> 16 #include <boost/shared_ptr.hpp> 44 template<
class WIDGET>
45 boost::shared_ptr<WIDGET>
find()
47 for (
unsigned i=0; i<mWidgets.size(); ++i)
49 boost::shared_ptr<WIDGET> w = boost::dynamic_pointer_cast<WIDGET>(mWidgets[i]);
53 return boost::shared_ptr<WIDGET>();
58 void add(boost::shared_ptr<QWidget> widget);
61 typedef QPointer<QWidget> QWidgetPtr;
62 std::vector<boost::shared_ptr<QWidget> > mWidgets;
72 std::vector<TreeNodePtr> getNodes();
73 TreeNodePtr getNode(QString uid);
76 TreeNodePtr getTopNode();
77 TreeNodePtr getNodeForGroup(QString groupname);
80 WidgetTypeRepositoryPtr getWidgetTypeRepository();
82 QString getMode()
const;
84 QStringList getVisibleNodeTypes()
const;
86 QStringList getAllNodeTypes()
const;
98 void createVisibilityProperty();
99 void createModeProperty();
102 std::vector<TreeNodePtr> mNodes;
103 TreeRepositoryWeakPtr mSelf;
108 StringListPropertyPtr mVisibilityProperty;
111 WidgetTypeRepositoryPtr mWidgetTypeRepository;
115 void insertTopNode();
116 void insertDataNode(
DataPtr data);
118 void insertToolNode(
ToolPtr tool);
119 void insertGroupNode(QString groupname);
127 #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