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
+31
View File
@@ -3,7 +3,9 @@
#include "widgets/chatwidget.h"
#include "widgets/notebook.h"
#include <QDebug>
#include <QPalette>
#include <boost/foreach.hpp>
namespace chatterino {
namespace widgets {
@@ -68,5 +70,34 @@ MainWindow::repaintVisibleChatWidgets(Channel *channel)
}
}
}
void
MainWindow::load(const boost::property_tree::ptree &tree)
{
this->notebook.load(tree);
this->loaded = true;
}
boost::property_tree::ptree
MainWindow::save()
{
boost::property_tree::ptree child;
child.put("type", "main");
this->notebook.save(child);
return child;
}
void
MainWindow::loadDefaults()
{
this->notebook.loadDefaults();
this->loaded = true;
}
} // namespace widgets
} // namespace chatterino