Format code using clang-format

This commit is contained in:
Luis Ángel San Martín
2019-05-30 19:46:37 +02:00
parent e0eb94e3ae
commit e3ec56aa43
356 changed files with 19824 additions and 21874 deletions

View File

@ -8,62 +8,63 @@
#include "goto_flow_toolbar.h"
#include "configuration.h"
GoToFlowWidget::GoToFlowWidget(QWidget * parent)
:QWidget(parent)
GoToFlowWidget::GoToFlowWidget(QWidget *parent)
: QWidget(parent)
{
mainLayout = new QVBoxLayout;
mainLayout->setMargin(0);
mainLayout->setSpacing(0);
mainLayout = new QVBoxLayout;
mainLayout->setMargin(0);
mainLayout->setSpacing(0);
toolBar = new GoToFlowToolBar(this);
toolBar = new GoToFlowToolBar(this);
setLayout(mainLayout);
setLayout(mainLayout);
//toolBar->installEventFilter(this);
//toolBar->installEventFilter(this);
}
GoToFlowWidget::~GoToFlowWidget() {
delete toolBar;
delete mainLayout;
GoToFlowWidget::~GoToFlowWidget()
{
delete toolBar;
delete mainLayout;
}
void GoToFlowWidget::setPageNumber(int page)
{
toolBar->setPage(page);
toolBar->setPage(page);
}
void GoToFlowWidget::keyPressEvent(QKeyEvent* event)
void GoToFlowWidget::keyPressEvent(QKeyEvent *event)
{
switch (event->key())
{
case Qt::Key_Return: case Qt::Key_Enter:
toolBar->goTo();
toolBar->centerSlide();
break;
case Qt::Key_Space:
toolBar->centerSlide();
break;
case Qt::Key_S:
QCoreApplication::sendEvent(this->parent(),event);
break;
}
switch (event->key()) {
case Qt::Key_Return:
case Qt::Key_Enter:
toolBar->goTo();
toolBar->centerSlide();
break;
case Qt::Key_Space:
toolBar->centerSlide();
break;
case Qt::Key_S:
QCoreApplication::sendEvent(this->parent(), event);
break;
}
event->accept();
event->accept();
}
void GoToFlowWidget::updateConfig(QSettings * settings)
void GoToFlowWidget::updateConfig(QSettings *settings)
{
Q_UNUSED(settings)
Q_UNUSED(settings)
toolBar->updateOptions();
}
void GoToFlowWidget::updateSize()
{
// called by parent in resizeEvent
// no need to update width when QuickNaviMode disabled
// height is set in updateConfig
if (Configuration::getConfiguration().getQuickNaviMode() && parentWidget() != nullptr)
resize(parentWidget()->width(),height());
// called by parent in resizeEvent
// no need to update width when QuickNaviMode disabled
// height is set in updateConfig
if (Configuration::getConfiguration().getQuickNaviMode() && parentWidget() != nullptr)
resize(parentWidget()->width(), height());
}
/*bool GoToFlowWidget::eventFilter(QObject * target, QEvent * event)