43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
#include "mainwindow.h"
|
|
#include "splashscreen.h"
|
|
|
|
#include <QApplication>
|
|
#include <QThread>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
QCoreApplication::setOrganizationDomain("redline.llc");
|
|
QCoreApplication::setOrganizationName("RedLine Solutions, LLC.");
|
|
QCoreApplication::setApplicationName("GWF PowerUp Injector");
|
|
QCoreApplication::setApplicationVersion("v1.1.0");
|
|
|
|
// Show splash screen
|
|
SplashScreen splash;
|
|
splash.show();
|
|
splash.startAnimation();
|
|
a.processEvents();
|
|
|
|
// Create main window (doesn't load maps yet)
|
|
MainWindow w;
|
|
|
|
// Connect progress signals to splash screen
|
|
QObject::connect(&w, &MainWindow::loadingProgress,
|
|
[&splash](int percent, const QString &status) {
|
|
splash.setProgress(percent);
|
|
splash.setStatus(status);
|
|
});
|
|
|
|
QObject::connect(&w, &MainWindow::loadingComplete, [&]() {
|
|
// Small delay to show 100% progress
|
|
QThread::msleep(300);
|
|
splash.finish(&w);
|
|
});
|
|
|
|
// Start async initialization (loads maps with progress reporting)
|
|
w.initializeAsync();
|
|
|
|
return a.exec();
|
|
}
|