Draft implementation of Snapshots, with saving and UI

This commit is contained in:
brunoherbelin
2021-04-17 10:28:12 +02:00
parent 2d4a6d1fe6
commit ebb5fd16bb
13 changed files with 116 additions and 34 deletions

View File

@@ -100,6 +100,10 @@ void SessionCreator::load(const std::string& filename)
for (auto group_it = groups.begin(); group_it != groups.end(); group_it++)
session_->link( *group_it );
// load snapshots
loadSnapshots( xmlDoc_.FirstChildElement("Snapshots") );
// load notes
loadNotes( xmlDoc_.FirstChildElement("Notes") );
// all good
@@ -119,6 +123,15 @@ void SessionCreator::loadConfig(XMLElement *viewsNode)
}
}
void SessionCreator::loadSnapshots(XMLElement *snapshotsNode)
{
if (snapshotsNode != nullptr && session_ != nullptr) {
std::string text = std::string ( snapshotsNode->GetText() );
session_->setSnapshots( text );
}
}
void SessionCreator::loadNotes(XMLElement *notesNode)
{
if (notesNode != nullptr && session_ != nullptr) {