Added logo to settings. Small bugfixes.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ private slots:
|
||||
void on_season_currentIndexChanged(int index);
|
||||
void on_btnEditName_clicked();
|
||||
void on_btnNew_clicked();
|
||||
void on_pushButton_clicked();
|
||||
};
|
||||
|
||||
#endif // GLOBALSETTINGSFORM_H
|
||||
|
||||
@@ -99,9 +99,24 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="lblLogo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Logo</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user