Moved status message in splash screen to the bottom

This commit is contained in:
0xFEEDC0DE64
2017-12-31 15:49:04 +01:00
parent adc51eb39e
commit 65e26d71b6

View File

@@ -57,7 +57,7 @@ bool loadAndInstallTranslator(QTranslator &translator, const QString &filename)
bool loadTranslations(QSplashScreen &splashScreen, ZeiterfassungSettings &settings) bool loadTranslations(QSplashScreen &splashScreen, ZeiterfassungSettings &settings)
{ {
splashScreen.showMessage(QCoreApplication::translate("main", "Loading translations...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading translations..."), Qt::AlignHCenter | Qt::AlignBottom);
if(settings.language() == QLocale::AnyLanguage) if(settings.language() == QLocale::AnyLanguage)
{ {
@@ -89,7 +89,7 @@ bool loadTranslations(QSplashScreen &splashScreen, ZeiterfassungSettings &settin
bool loadTheme(QSplashScreen &splashScreen, ZeiterfassungSettings &settings) bool loadTheme(QSplashScreen &splashScreen, ZeiterfassungSettings &settings)
{ {
splashScreen.showMessage(QCoreApplication::translate("main", "Loading theme...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading theme..."), Qt::AlignHCenter | Qt::AlignBottom);
if(settings.theme().isEmpty()) if(settings.theme().isEmpty())
return true; return true;
@@ -122,7 +122,7 @@ bool loadTheme(QSplashScreen &splashScreen, ZeiterfassungSettings &settings)
bool loadStripLayouts(QSplashScreen &splashScreen, StripFactory &stripFactory) bool loadStripLayouts(QSplashScreen &splashScreen, StripFactory &stripFactory)
{ {
splashScreen.showMessage(QCoreApplication::translate("main", "Loading strip layouts...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading strip layouts..."), Qt::AlignHCenter | Qt::AlignBottom);
if(!stripFactory.load(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("strips")))) if(!stripFactory.load(QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("strips"))))
{ {
@@ -166,7 +166,7 @@ bool loadStripLayouts(QSplashScreen &splashScreen, StripFactory &stripFactory)
bool loadLoginPage(QSplashScreen &splashScreen, ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung) bool loadLoginPage(QSplashScreen &splashScreen, ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung)
{ {
splashScreen.showMessage(QCoreApplication::translate("main", "Loading login page...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading login page..."), Qt::AlignHCenter | Qt::AlignBottom);
again: again:
auto reply = erfassung.doLoginPage(); auto reply = erfassung.doLoginPage();
@@ -197,7 +197,7 @@ bool loadLoginPage(QSplashScreen &splashScreen, ZeiterfassungSettings &settings,
bool doAuthentication(QSplashScreen &splashScreen, ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung) bool doAuthentication(QSplashScreen &splashScreen, ZeiterfassungSettings &settings, ZeiterfassungApi &erfassung)
{ {
splashScreen.showMessage(QCoreApplication::translate("main", "Authenticating...")); splashScreen.showMessage(QCoreApplication::translate("main", "Authenticating..."), Qt::AlignHCenter | Qt::AlignBottom);
if(settings.username().isNull() || settings.password().isNull()) if(settings.username().isNull() || settings.password().isNull())
{ {
@@ -240,7 +240,7 @@ bool doAuthentication(QSplashScreen &splashScreen, ZeiterfassungSettings &settin
bool loadUserInfo(QSplashScreen &splashScreen, ZeiterfassungApi &erfassung, GetUserInfoReply::UserInfo &userInfo) bool loadUserInfo(QSplashScreen &splashScreen, ZeiterfassungApi &erfassung, GetUserInfoReply::UserInfo &userInfo)
{ {
splashScreen.showMessage(QCoreApplication::translate("main", "Getting user information...")); splashScreen.showMessage(QCoreApplication::translate("main", "Getting user information..."), Qt::AlignHCenter | Qt::AlignBottom);
{ {
auto reply = erfassung.doUserInfo(); auto reply = erfassung.doUserInfo();
@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
QCoreApplication::setApplicationVersion(QStringLiteral("1.5")); QCoreApplication::setApplicationVersion(QStringLiteral("1.5"));
QSplashScreen splashScreen(QPixmap(QStringLiteral(":/zeiterfassung/images/splash.png"))); QSplashScreen splashScreen(QPixmap(QStringLiteral(":/zeiterfassung/images/splash.png")));
splashScreen.showMessage(QCoreApplication::translate("main", "Loading settings...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading settings..."), Qt::AlignHCenter | Qt::AlignBottom);
splashScreen.show(); splashScreen.show();
ZeiterfassungSettings settings(&app); ZeiterfassungSettings settings(&app);