| 395 | } |
| 396 | |
| 397 | void MainApplication::showSplashScreen() |
| 398 | { |
| 399 | Settings settings; |
| 400 | int versionDB = settings.value("VersionDB", "1").toInt(); |
| 401 | if ((versionDB != Database::version()) && QFile::exists(settings.fileName())) |
| 402 | showSplashScreen_ = true; |
| 403 | |
| 404 | if (showSplashScreen_) { |
| 405 | splashScreen_ = new SplashScreen(QPixmap(":/images/images/splashScreen.png")); |
| 406 | splashScreen_->show(); |
| 407 | processEvents(); |
| 408 | if ((versionDB != Database::version()) && QFile::exists(settings.fileName())) { |
| 409 | splashScreen_->showMessage(QString("Converting database to version %1...").arg(Database::version()), |
| 410 | Qt::AlignRight | Qt::AlignTop, Qt::darkGray); |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | void MainApplication::closeSplashScreen() |
| 416 | { |