MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / encodeTable

Method encodeTable

Gui/KnobGuiTable.cpp:288–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286} // KnobGuiTable::createWidget
287
288std::string
289KnobGuiTablePrivate::encodeTable(const KnobTablePtr& knob) const
290{
291 std::stringstream ss;
292
293 for (Variables::const_iterator it = items.begin(); it != items.end(); ++it) {
294 // In order to use XML tags, the text inside the tags has to be escaped.
295 for (std::size_t c = 0; c < it->items.size(); ++c) {
296 std::string label = knob->getColumnLabel(c);
297 ss << "<" << label << ">";
298 ss << Project::escapeXML( it->items[c]->text().toStdString() );
299 ss << "</" << label << ">";
300 }
301 }
302
303 return ss.str();
304}
305
306void
307KnobGuiTablePrivate::createItem(const KnobTablePtr& knob,

Callers 5

onAddButtonClickedMethod · 0.80
onEditButtonClickedMethod · 0.80
onRemoveButtonClickedMethod · 0.80
onItemDoubleClickedMethod · 0.80
onItemDataChangedMethod · 0.80

Calls 4

toStdStringMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected