76 std::map<QString, InteractiveClipperPtr>::iterator iter =
mClippers.begin();
79 QDomElement clipperNode = clippersNode.addElement(
"clipper");
80 clipperNode.setAttribute(
"name", iter->first);
81 iter->second->addXml(clipperNode);
89 QDomElement clippersNode = base.
parseElement(
"clippers");
90 QDomNode clipperNode = clippersNode.firstChild();
91 while (!clipperNode.isNull())
93 if (clipperNode.toElement().tagName() !=
"clipper")
95 clipperNode = clipperNode.nextSibling();
98 QString clipperName = clipperNode.toElement().attribute(
"name");
100 clipper->parseXml(clipperNode);
102 clipperNode = clipperNode.nextSibling();
109 if(!clippers.isEmpty())
124 foreach(QString name, initialList)
128 PLANE_TYPE plane = string2enum<PLANE_TYPE> (name);
129 interactiveClipper->setSlicePlane(plane);
130 this->
add(name, interactiveClipper);
138 QStringList clipperNames = planeAdapter->getValueRange();
144 if(this->
exists(clipperName))
149 this->
add(clipperName, clipper);
158 if(!this->
exists(clipperName))
165 CX_LOG_WARNING() <<
"Cannot add clipper: " << clipperName <<
" already exists";
170 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.