52 std::vector<TreeNodePtr> retval;
53 std::vector<TreeNodePtr> all = this->
repo()->getNodes();
54 for (
unsigned i=0; i<all.size(); ++i)
57 if (p && (p->getUid() == this->
getUid()))
58 retval.push_back(all[i]);
84 std::vector<TreeNodePtr> retval;
85 std::vector<TreeNodePtr> all = this->
repo()->getNodes();
86 for (
unsigned i=0; i<all.size(); ++i)
89 if (vp && (vp->getUid() == this->
getUid()))
90 retval.push_back(all[i]);
100 while (parent && !parent->isVisibleNode())
102 parent = parent->getParent();
110 bool isKnown = this->
repo()->getAllNodeTypes().contains(this->
getType());
111 bool isVisible = this->
repo()->getVisibleNodeTypes().contains(this->
getType());
115 return !isKnown || isVisible;
120 return this->
repo()->getServices();
135 QPixmap org = input.pixmap(input.actualSize(QSize(1000,1000)));
136 QImage image(org.size(), QImage::Format_RGBA8888);
137 QPainter painter(&image);
138 painter.fillRect(image.rect(), color);
139 painter.drawPixmap(0,0,org);
140 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