31 std::vector<TreeNodePtr> retval;
32 std::vector<TreeNodePtr> all = this->
repo()->getNodes();
33 for (
unsigned i=0; i<all.size(); ++i)
36 if (p && (p->getUid() == this->
getUid()))
37 retval.push_back(all[i]);
63 std::vector<TreeNodePtr> retval;
64 std::vector<TreeNodePtr> all = this->
repo()->getNodes();
65 for (
unsigned i=0; i<all.size(); ++i)
68 if (vp && (vp->getUid() == this->
getUid()))
69 retval.push_back(all[i]);
79 while (parent && !parent->isVisibleNode())
81 parent = parent->getParent();
89 bool isKnown = this->
repo()->getAllNodeTypes().contains(this->
getType());
90 bool isVisible = this->
repo()->getVisibleNodeTypes().contains(this->
getType());
94 return !isKnown || isVisible;
99 return this->
repo()->getServices();
114 QPixmap org = input.pixmap(input.actualSize(QSize(1000,1000)));
115 QImage image(org.size(), QImage::Format_RGBA8888);
116 QPainter painter(&image);
117 painter.fillRect(image.rect(), color);
118 painter.drawPixmap(0,0,org);
119 return QIcon(QPixmap::fromImage(image));
boost::shared_ptr< class TreeRepository > TreeRepositoryPtr
boost::shared_ptr< TreeNode > TreeNodePtr
virtual QString getUid() const =0
VisServicesPtr getServices() const
boost::shared_ptr< class VisServices > VisServicesPtr
virtual bool isVisibleNode() const
TreeNodeImpl(TreeRepositoryWeakPtr repo)
boost::weak_ptr< class TreeRepository > TreeRepositoryWeakPtr
virtual QString getType() const =0
virtual std::vector< TreeNodePtr > getVisibleChildren() const
TreeRepositoryWeakPtr mRepository
QIcon addBackgroundColorToIcon(QIcon input, QColor color) const
virtual TreeNodePtr getVisibleParent() const
virtual TreeNodePtr getParent() const =0
virtual std::vector< TreeNodePtr > getChildren() const
Namespace for all CustusX production code.