// in main.cpp
CSplashScreen splash;
if(1 == cmdArgs)
{
splash.show();
}
qApp->processEvents();
f.setPixelSize(12);
qApp->setFont(f);
CMainWindow w;
qApp->processEvents();
w.setWindowFlags(Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
w.setWindowTitle("SecPod Saner");
w.setFixedSize(800, 500);
if(1 == cmdArgs)
{
w.connect(&w, SIGNAL(showNwError_Splash(bool)), &splash, SLOT(serverConnectError_Msg(bool)));
w.connect(&w, SIGNAL(showConfError_Splash()), &splash, SLOT(confError_Msg()));
w.connect(&w, SIGNAL(sig_DontStartUI()), &splash, SLOT(onKillSplashScreen()));
w.connect(&w, SIGNAL(sig_DontStartUI()), &w, SLOT(onQuit()));
w.connect(&w, SIGNAL(sig_killSplashScreen()), &w, SLOT(show()));
w.connect(&w, SIGNAL(sig_killSplashScreen()), &splash, SLOT(onKillSplashScreen()));
}
// in main.cpp
CSplashScreen splash;
int cmdArgs = QCoreApplication::arguments().size();
if(1 == cmdArgs)
{
splash.show();
}
qApp->processEvents();
QFont f = qApp->font();
f.setPixelSize(12);
qApp->setFont(f);
CMainWindow w;
qApp->processEvents();
w.setWindowFlags(Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);
w.setWindowTitle("SecPod Saner");
w.setFixedSize(800, 500);
QObject::connect(&app, SIGNAL(messageAvailable(QString)), &w, SLOT(receiveMessage(QString)));
if(1 == cmdArgs)
{
w.connect(&w, SIGNAL(showNwError_Splash(bool)), &splash, SLOT(serverConnectError_Msg(bool)));
w.connect(&w, SIGNAL(showConfError_Splash()), &splash, SLOT(confError_Msg()));
w.connect(&w, SIGNAL(sig_DontStartUI()), &splash, SLOT(onKillSplashScreen()));
w.connect(&w, SIGNAL(sig_DontStartUI()), &w, SLOT(onQuit()));
w.connect(&w, SIGNAL(sig_killSplashScreen()), &w, SLOT(show()));
w.connect(&w, SIGNAL(sig_killSplashScreen()), &splash, SLOT(onKillSplashScreen()));
}
To copy to clipboard, switch view to plain text mode
// in mainwindow.cpp
{
connect(worker, SIGNAL(sig_AppActivated()), this, SIGNAL(sig_killSplashScreen()));
}
// in mainwindow.cpp
if(1 == QCoreApplication::arguments().size())
{
connect(worker, SIGNAL(sig_AppActivated()), this, SIGNAL(sig_killSplashScreen()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks