Added logo to settings. Small bugfixes.

This commit is contained in:
2017-05-30 09:12:40 +02:00
parent c3598673c6
commit 37b2dd7246
5 changed files with 53 additions and 5 deletions
+16
View File
@@ -2,6 +2,7 @@
#include "ui_globalsettingsform.h"
#include <QMessageBox>
#include <QFileDialog>
#include "seasonnamedialog.h"
#include "globalsettings.h"
@@ -107,6 +108,11 @@ void GlobalSettingsForm::loadEntity()
setEntity(settings);
ui->grpVat->setEnabled(settings->vatPayer());
if (!settings->logoPath().isEmpty())
{
ui->lblLogo->setPixmap(QPixmap(settings->logoPath()));
}
loadSeasons();
loadNumSeries();
}
@@ -155,3 +161,13 @@ void GlobalSettingsForm::on_btnNew_clicked()
});
}
}
void GlobalSettingsForm::on_pushButton_clicked()
{
QString logoPath = QFileDialog::getOpenFileName(this, tr("Select logo"), "", tr("Images (*.png *.xpm *.jpg)"));
if (!logoPath.isEmpty())
{
entity()->setLogoPath(logoPath);
ui->lblLogo->setPixmap(QPixmap(logoPath));
}
}