Tabs are now loaded and saved (no chats yet)

This commit is contained in:
Rasmus Karlsson
2017-01-28 22:35:23 +01:00
parent 6fb4305162
commit 1c076b803e
11 changed files with 236 additions and 18 deletions
+21
View File
@@ -203,5 +203,26 @@ NotebookTab::mouseMoveEvent(QMouseEvent *event)
}
}
}
void
NotebookTab::load(const boost::property_tree::ptree &tree)
{
// Load tab text
try {
this->setText(QString::fromStdString(tree.get<std::string>("text")));
} catch (boost::property_tree::ptree_error) {
}
}
boost::property_tree::ptree
NotebookTab::save()
{
boost::property_tree::ptree tree;
tree.put("text", this->getText().toStdString());
return tree;
}
} // namespace widgets
} // namespace chatterino