QPixmap splashPix
(":/Images/splash_new.png");
splash->setPixmap(splashPix);
splash->showFullScreen();
splash->raise();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash
->showMessage
(QObject::tr("Checking connectivity"),
Qt::AlignJustify, Qt::white);
Utils::sleep(1);
splash
->showMessage
(QObject::tr("Checking connectivity."),
Qt::AlignJustify, Qt::white);
Utils::sleep(1);
splash
->showMessage
(QObject::tr("Checking connectivity.."),
Qt::AlignJustify, Qt::white);
Utils::sleep(1);
splash
->showMessage
(QObject::tr("Checking connectivity..."),
Qt::AlignJustify, Qt::white);
splash->clearMessage();
net = isConnectedToNetwork(); // connection status call
if(net)
{
//Found an interface. Show status & proceed normally.
splash
->showMessage
(QObject::tr("Connection Found !!"),
Qt::AlignJustify, Qt::green);
qWarning("Connection found....");
Utils::sleep(2);
splash
->showMessage
(QObject::tr("Launching application"),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
splash
->showMessage
(QObject::tr("Launching application."),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
splash
->showMessage
(QObject::tr("Launching application.."),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
splash
->showMessage
(QObject::tr("Launching application..."),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
}
else
{
qWarning("Comes here");
splash
->showMessage
(QObject::tr("No Internet Connection !!\nPlease check the network settings.\nTrackIt will now exit..."),
Qt::AlignJustify, Qt::red);
Utils::sleep(5);
return -1;
}
Utils::sleep(5);
splash->clearMessage();
splash->finish(w);
w->showFullScreen();
delete splash;
splash = NULL;
QPixmap splashPix(":/Images/splash_new.png");
QSplashScreen *splash = new QSplashScreen;
splash->setPixmap(splashPix);
splash->showFullScreen();
splash->raise();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash->showMessage(QObject::tr("Checking connectivity"),
Qt::AlignJustify, Qt::white);
Utils::sleep(1);
splash->showMessage(QObject::tr("Checking connectivity."),
Qt::AlignJustify, Qt::white);
Utils::sleep(1);
splash->showMessage(QObject::tr("Checking connectivity.."),
Qt::AlignJustify, Qt::white);
Utils::sleep(1);
splash->showMessage(QObject::tr("Checking connectivity..."),
Qt::AlignJustify, Qt::white);
splash->clearMessage();
net = isConnectedToNetwork(); // connection status call
if(net)
{
//Found an interface. Show status & proceed normally.
splash->showMessage(QObject::tr("Connection Found !!"),
Qt::AlignJustify, Qt::green);
qWarning("Connection found....");
Utils::sleep(2);
splash->showMessage(QObject::tr("Launching application"),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
splash->showMessage(QObject::tr("Launching application."),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
splash->showMessage(QObject::tr("Launching application.."),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
splash->showMessage(QObject::tr("Launching application..."),
Qt::AlignJustify, Qt::green);
Utils::sleep(1);
}
else
{
qWarning("Comes here");
splash->showMessage(QObject::tr("No Internet Connection !!\nPlease check the network settings.\nTrackIt will now exit..."),
Qt::AlignJustify, Qt::red);
Utils::sleep(5);
return -1;
}
Utils::sleep(5);
splash->clearMessage();
splash->finish(w);
w->showFullScreen();
delete splash;
splash = NULL;
To copy to clipboard, switch view to plain text mode
Bookmarks