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
+14 -4
View File
@@ -3,11 +3,13 @@
#include "widgets/chatwidget.h"
#include "widgets/notebooktab.h"
#include <QDebug>
#include <QHBoxLayout>
#include <QMimeData>
#include <QPainter>
#include <QVBoxLayout>
#include <QWidget>
#include <boost/foreach.hpp>
namespace chatterino {
namespace widgets {
@@ -73,9 +75,8 @@ NotebookPage::removeFromLayout(ChatWidget *widget)
}
void
NotebookPage::addToLayout(
ChatWidget *widget,
std::pair<int, int> position = std::pair<int, int>(-1, -1))
NotebookPage::addToLayout(ChatWidget *widget, std::pair<int, int> position =
std::pair<int, int>(-1, -1))
{
this->chatWidgets.push_back(widget);
@@ -239,5 +240,14 @@ NotebookPage::paintEvent(QPaintEvent *)
ColorScheme::getInstance().TabSelectedBackground);
}
}
void
NotebookPage::load(const boost::property_tree::ptree &v)
{
const std::string &tabName = v.get<std::string>("name", "UNNAMED");
qDebug() << "tab name :" << tabName.c_str();
}
}
} // namespace widgets
} // namespace chatterino