added all empty container views

This commit is contained in:
Luis Ángel San Martín
2014-11-22 14:03:15 +01:00
parent d128b4e851
commit f0d69cb032
25 changed files with 584 additions and 484 deletions

View File

@ -1,37 +1,14 @@
#include "empty_label_widget.h"
EmptyLabelWidget::EmptyLabelWidget(QWidget *parent) :
QWidget(parent)
EmptyContainerInfo(parent)
{
#ifdef Q_OS_MAC
backgroundColor = "#FFFFFF";
#else
backgroundColor = "#2A2A2A";
#endif
setUpDefaultLayout(true);
QVBoxLayout * layout = new QVBoxLayout;
iconLabel = new QLabel();
iconLabel->setPixmap(QPixmap(":/images/empty_label.png"));
iconLabel->setAlignment(Qt::AlignCenter);
//titleLabel->setText(tr("This label doesn't contain comics yet") + QString("<p style='color:rgb(150,150,150);font-size:14px;font-weight:normal;'>%1</p>").arg(tr("Drag and drop folders and comics here")));
titleLabel = new QLabel(("This label doesn't contain comics yet"));
titleLabel->setAlignment(Qt::AlignCenter);
#ifdef Q_OS_MAC
titleLabel->setStyleSheet("QLabel {color:#888888; font-size:24px;font-family:Arial;font-weight:bold;}");
#else
titleLabel->setStyleSheet("QLabel {color:#CCCCCC; font-size:24px;font-family:Arial;font-weight:bold;}");
#endif
layout->addSpacing(100);
layout->addWidget(iconLabel);
layout->addSpacing(30);
layout->addWidget(titleLabel);
layout->addStretch();
setLayout(layout);
titleLabel->setText(tr("This label doesn't contain comics yet"));
}
void EmptyLabelWidget::setColor(YACReader::LabelColors color)
@ -42,9 +19,3 @@ void EmptyLabelWidget::setColor(YACReader::LabelColors color)
YACReader::colorize(img,destColor);
iconLabel->setPixmap(QPixmap::fromImage(img));
}
void EmptyLabelWidget::paintEvent(QPaintEvent * event)
{
QPainter painter (this);
painter.fillRect(0,0,width(),height(),QColor(backgroundColor));
}