Turn NotebookTab into a BaseWidget

This commit is contained in:
Rasmus Karlsson 2017-08-13 16:10:53 +02:00
parent eb3645a723
commit f4df262179
2 changed files with 4 additions and 6 deletions

View file

@ -9,8 +9,7 @@ namespace chatterino {
namespace widgets { namespace widgets {
NotebookTab::NotebookTab(Notebook *_notebook) NotebookTab::NotebookTab(Notebook *_notebook)
: QWidget(_notebook) : BaseWidget(_notebook)
, colorScheme(_notebook->colorScheme)
, positionChangedAnimation(this, "pos") , positionChangedAnimation(this, "pos")
, notebook(_notebook) , notebook(_notebook)
{ {

View file

@ -1,7 +1,8 @@
#pragma once #pragma once
#include "widgets/basewidget.hpp"
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QWidget>
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
#include <boost/signals2/connection.hpp> #include <boost/signals2/connection.hpp>
@ -15,7 +16,7 @@ namespace widgets {
class Notebook; class Notebook;
class NotebookPage; class NotebookPage;
class NotebookTab : public QWidget class NotebookTab : public BaseWidget
{ {
Q_OBJECT Q_OBJECT
@ -25,8 +26,6 @@ public:
explicit NotebookTab(Notebook *_notebook); explicit NotebookTab(Notebook *_notebook);
~NotebookTab(); ~NotebookTab();
ColorScheme &colorScheme;
void calcSize(); void calcSize();
NotebookPage *page; NotebookPage *page;