55 std::map<QString, InteractiveClipperPtr>::iterator iter =
mClippers.begin();
58 QDomElement clipperNode = clippersNode.addElement(
"clipper");
59 clipperNode.setAttribute(
"name", iter->first);
60 iter->second->addXml(clipperNode);
68 QDomElement clippersNode = base.
parseElement(
"clippers");
69 QDomNode clipperNode = clippersNode.firstChild();
70 while (!clipperNode.isNull())
72 if (clipperNode.toElement().tagName() !=
"clipper")
74 clipperNode = clipperNode.nextSibling();
77 QString clipperName = clipperNode.toElement().attribute(
"name");
79 clipper->parseXml(clipperNode);
81 clipperNode = clipperNode.nextSibling();
88 if(!clippers.isEmpty())
103 foreach(QString name, initialList)
107 PLANE_TYPE plane = string2enum<PLANE_TYPE> (name);
108 interactiveClipper->setSlicePlane(plane);
109 this->
add(name, interactiveClipper);
117 QStringList clipperNames = planeAdapter->getValueRange();
123 if(this->
exists(clipperName))
128 this->
add(clipperName, clipper);
137 if(!this->
exists(clipperName))
144 CX_LOG_WARNING() <<
"Cannot add clipper: " << clipperName <<
" already exists";
149 if(this->
exists(clipperName))
void remove(QString clipperName)
InteractiveClipperPtr getClipper(QString clipperName)
void createDefaultClippers()
void parseXml(QDomNode parentNode)
void addXml(QDomNode &parentNode)
boost::shared_ptr< class VisServices > VisServicesPtr
void importList(QString clippers)
QDomElement addElement(QString name)
std::map< QString, InteractiveClipperPtr > mClippers
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
void add(QString clipperName, InteractiveClipperPtr clipper)
QStringList getClipperNames()
QStringList getInitialClipperNames()
Clippers(VisServicesPtr services)
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
bool exists(QString clipperName)
static StringPropertyClipPlanePtr New(InteractiveClipperPtr clipper)
QDomElement parseElement(QString name)
Namespace for all CustusX production code.