Skip to content
Snippets Groups Projects
Commit 7d8e7d25 authored by Josh Siegle's avatar Josh Siegle
Browse files

Add parameter saving to RecordControlEditor

parent d10e0cd2
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ RecordControlEditor::RecordControlEditor(GenericProcessor* parentNode, bool useD
RecordControlEditor::~RecordControlEditor()
{
//deleteAllChildren();
}
void RecordControlEditor::comboBoxChanged(ComboBox* comboBox)
......@@ -96,4 +96,32 @@ void RecordControlEditor::updateSettings()
availableChans->addItem(channelName,i+1);
}
}
void RecordControlEditor::saveEditorParameters(XmlElement* xml)
{
XmlElement* info = xml->createNewChildElement("PARAMETERS");
info->setAttribute("Type", "RecordControlEditor");
info->setAttribute("Channel",availableChans->getSelectedId());
info->setAttribute("FileSaveOption",newFileToggleButton->getToggleState());
}
void RecordControlEditor::loadEditorParameters(XmlElement* xml)
{
forEachXmlChildElement(*xml, xmlNode)
{
if (xmlNode->hasTagName("PARAMETERS"))
{
newFileToggleButton->setToggleState(xmlNode->getBoolAttribute("FileSaveOption"), true);
availableChans->setSelectedId(xmlNode->getIntAttribute("Channel"));
}
}
}
\ No newline at end of file
......@@ -44,6 +44,8 @@ public:
void comboBoxChanged(ComboBox* comboBox);
void updateSettings();
void buttonEvent(Button* button);
void loadEditorParameters(XmlElement*);
void saveEditorParameters(XmlElement*);
private:
ScopedPointer<ComboBox> availableChans;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment