All splash imgage display dialogs now use common code.

The splash image library displayed all images in 128x64 mono format.
Changed this to display either in 128x64 mono or 212x64 gray scale depending on profile information.
This commit is contained in:
Kjell Kernen
2014-02-23 22:24:43 +01:00
parent 08812f2546
commit c289689105
10 changed files with 201 additions and 262 deletions
+1 -7
View File
@@ -3,7 +3,6 @@
#include "appdata.h"
#include <QtGui>
#include "helpers.h"
//#include "splashlabel.h"
#include "flashinterface.h"
#include "helpers.h"
@@ -23,7 +22,6 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(pare
foreach(splashLabel *sl, findChildren<splashLabel *>()) {
connect(sl, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
}
resize(0, 0);
}
splashLibrary::~splashLibrary() {
@@ -40,7 +38,7 @@ void splashLibrary::setupPage(int page) {
if ((i + 20 * page) < imageList.size()) {
QImage image(imageList.at(i + 20 * page));
if (!image.isNull()) {
sl[i]->setPixmap(QPixmap::fromImage(image.scaled(SPLASH_WIDTH, SPLASH_HEIGHT).convertToFormat(QImage::Format_Mono)));
sl[i]->setPixmap(makePixMap(image, g.profile[g.id()].fwType()));
sl[i]->setEnabled(true);
sl[i]->setId((i + 20 * page));
sl[i]->setStyleSheet("border:1px solid; border-color:#999999;");
@@ -104,10 +102,6 @@ void splashLibrary::getFileList() {
}
}
void splashLibrary::shrink() {
resize(0, 0);
}
void splashLibrary::dclose() {
close();
}