turning a lot of includes into forward declares

This commit is contained in:
fourtf
2018-08-11 22:23:06 +02:00
parent 63eaf3b94c
commit 44f5a15da3
117 changed files with 591 additions and 536 deletions
+10 -10
View File
@@ -2,6 +2,7 @@
#include "Application.hpp"
#include "debug/Log.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Theme.hpp"
#include "singletons/WindowManager.hpp"
#include "util/InitUpdateButton.hpp"
@@ -27,11 +28,11 @@ namespace chatterino {
Notebook::Notebook(QWidget *parent)
: BaseWidget(parent)
, addButton_(this)
, addButton_(new NotebookButton(this))
{
this->addButton_.setIcon(NotebookButton::Icon::Plus);
this->addButton_->setIcon(NotebookButton::Icon::Plus);
this->addButton_.setHidden(true);
this->addButton_->setHidden(true);
auto *shortcut_next = new QShortcut(QKeySequence("Ctrl+Tab"), this);
QObject::connect(shortcut_next, &QShortcut::activated,
@@ -290,14 +291,14 @@ void Notebook::setShowAddButton(bool value)
{
this->showAddButton_ = value;
this->addButton_.setHidden(!value);
this->addButton_->setHidden(!value);
}
void Notebook::scaleChangedEvent(float scale)
{
float h = NOTEBOOK_TAB_HEIGHT * this->getScale();
this->addButton_.setFixedSize(h, h);
this->addButton_->setFixedSize(h, h);
for (auto &i : this->items_) {
i.tab->updateSize();
@@ -353,7 +354,7 @@ void Notebook::performLayout(bool animated)
}
if (this->showAddButton_) {
this->addButton_.move(x, y);
this->addButton_->move(x, y);
}
if (this->lineY_ != y + tabHeight) {
@@ -368,7 +369,7 @@ void Notebook::performLayout(bool animated)
}
if (this->showAddButton_) {
this->addButton_.raise();
this->addButton_->raise();
}
if (this->selectedPage_ != nullptr) {
@@ -389,7 +390,7 @@ void Notebook::paintEvent(QPaintEvent *event)
NotebookButton *Notebook::getAddButton()
{
return &this->addButton_;
return this->addButton_;
}
NotebookButton *Notebook::addCustomButton()
@@ -460,8 +461,7 @@ void SplitNotebook::addCustomButtons()
// updates
auto updateBtn = this->addCustomButton();
initUpdateButton(*updateBtn, this->updateDialogHandle_,
this->signalHolder_);
initUpdateButton(*updateBtn, this->signalHolder_);
}
SplitContainer *SplitNotebook::addPage(bool select)