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

@ -5,76 +5,74 @@
#include <QHBoxLayout>
#include <QPushButton>
NoLibrariesWidget::NoLibrariesWidget(QWidget *parent) :
QWidget(parent)
NoLibrariesWidget::NoLibrariesWidget(QWidget *parent)
: QWidget(parent)
{
setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QPalette p(palette());
p.setColor(QPalette::Background, QColor(250,250,250));
setAutoFillBackground(true);
setPalette(p);
QPalette p(palette());
p.setColor(QPalette::Background, QColor(250, 250, 250));
setAutoFillBackground(true);
setPalette(p);
QPixmap icon(":/images/noLibrariesIcon.png");
QLabel * iconLabel = new QLabel();
iconLabel->setPixmap(icon);
QPixmap icon(":/images/noLibrariesIcon.png");
QLabel *iconLabel = new QLabel();
iconLabel->setPixmap(icon);
QPixmap line(":/images/noLibrariesLine.png");
QLabel * lineLabel = new QLabel();
lineLabel->setPixmap(line);
QPixmap line(":/images/noLibrariesLine.png");
QLabel *lineLabel = new QLabel();
lineLabel->setPixmap(line);
QLabel * text = new QLabel("<font color=\"#495252\">"+tr("You don't have any libraries yet")+"</font>");
text->setStyleSheet("QLabel {font-size:25px;font-weight:bold;}");
QLabel * textDescription = new QLabel("<font color=\"#565959\">"+tr("<p>You can create a library in any folder, YACReaderLibrary will import all comics and folders from this folder. If you have created any library in the past you can open them.</p><p>Don't forget that you can use YACReader as a stand alone application for reading the comics on your computer.</p>")+"</font>");
textDescription->setWordWrap(true);
textDescription->setMaximumWidth(330);
QLabel *text = new QLabel("<font color=\"#495252\">" + tr("You don't have any libraries yet") + "</font>");
text->setStyleSheet("QLabel {font-size:25px;font-weight:bold;}");
QLabel *textDescription = new QLabel("<font color=\"#565959\">" + tr("<p>You can create a library in any folder, YACReaderLibrary will import all comics and folders from this folder. If you have created any library in the past you can open them.</p><p>Don't forget that you can use YACReader as a stand alone application for reading the comics on your computer.</p>") + "</font>");
textDescription->setWordWrap(true);
textDescription->setMaximumWidth(330);
QPushButton * createButton = new QPushButton(tr("create your first library"));
createButton->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
QPushButton * addButton = new QPushButton(tr("add an existing one"));
addButton->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
QPushButton *createButton = new QPushButton(tr("create your first library"));
createButton->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
QPushButton *addButton = new QPushButton(tr("add an existing one"));
addButton->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
QVBoxLayout * layout = new QVBoxLayout(this);
QHBoxLayout * buttonLayout = new QHBoxLayout();
QHBoxLayout * topLayout = new QHBoxLayout();
QVBoxLayout * textLayout = new QVBoxLayout();
QVBoxLayout *layout = new QVBoxLayout(this);
QHBoxLayout *buttonLayout = new QHBoxLayout();
QHBoxLayout *topLayout = new QHBoxLayout();
QVBoxLayout *textLayout = new QVBoxLayout();
QWidget * topWidget = new QWidget();
topWidget->setFixedWidth(650);
textLayout->addStretch();
textLayout->addWidget(text);
textLayout->addSpacing(12);
textLayout->addWidget(textDescription);
textLayout->addStretch();
QWidget *topWidget = new QWidget();
topWidget->setFixedWidth(650);
textLayout->addStretch();
textLayout->addWidget(text);
textLayout->addSpacing(12);
textLayout->addWidget(textDescription);
textLayout->addStretch();
topLayout->addStretch();
topLayout->addWidget(iconLabel,0,Qt::AlignVCenter);
topLayout->addSpacing(30);
topLayout->addLayout(textLayout,1);
topLayout->addStretch();
topLayout->setMargin(0);
topLayout->addStretch();
topLayout->addWidget(iconLabel, 0, Qt::AlignVCenter);
topLayout->addSpacing(30);
topLayout->addLayout(textLayout, 1);
topLayout->addStretch();
topLayout->setMargin(0);
topWidget->setLayout(topLayout);
topWidget->setLayout(topLayout);
layout->setAlignment(Qt::AlignHCenter);
layout->setAlignment(Qt::AlignHCenter);
buttonLayout->addSpacing(125);
buttonLayout->addWidget(createButton);
layout->addSpacing(25);
buttonLayout->addWidget(addButton);
buttonLayout->addSpacing(125);
buttonLayout->addSpacing(125);
buttonLayout->addWidget(createButton);
layout->addSpacing(25);
buttonLayout->addWidget(addButton);
buttonLayout->addSpacing(125);
layout->addStretch();
layout->addWidget(topWidget);
layout->addSpacing(20);
layout->addWidget(lineLabel,0,Qt::AlignHCenter);
layout->addSpacing(10);
layout->addLayout(buttonLayout,0);
layout->addSpacing(150);
layout->addStretch();
layout->addStretch();
layout->addWidget(topWidget);
layout->addSpacing(20);
layout->addWidget(lineLabel, 0, Qt::AlignHCenter);
layout->addSpacing(10);
layout->addLayout(buttonLayout, 0);
layout->addSpacing(150);
layout->addStretch();
connect(createButton,SIGNAL(clicked()),this,SIGNAL(createNewLibrary()));
connect(addButton,SIGNAL(clicked()),this,SIGNAL(addExistingLibrary()));
connect(createButton, SIGNAL(clicked()), this, SIGNAL(createNewLibrary()));
connect(addButton, SIGNAL(clicked()), this, SIGNAL(addExistingLibrary()));
}