本文整理汇总了C++中SplashScreen类的典型用法代码示例。如果您正苦于以下问题:C++ SplashScreen类的具体用法?C++ SplashScreen怎么用?C++ SplashScreen使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SplashScreen类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupResources
bool Project_Gravity::setup(void)
{
std::cout<<"setup"<<std::endl;
// Setup resources
mRoot = new Ogre::Root(mPluginsCfg);
setupResources();
// Configure the settings
bool carryOn = configure();
if (!carryOn) return false;
// Initialize ogre elements
chooseSceneManager();
createCamera();
createViewports();
initCEGUI();
SplashScreen *splashScreen = new SplashScreen(mWindow);
splashScreen->show();
// Set default mipmap level (NB some APIs ignore this)
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
return true;
}
示例2: SplashScreen
void CryptobullionApplication::createSplashScreen(bool isaTestNet)
{
SplashScreen *splash = new SplashScreen(QPixmap(), isaTestNet);
splash->setAttribute(Qt::WA_DeleteOnClose);
splash->show();
connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*)));
}
示例3: SplashScreen
SplashScreen* SplashScreen::create()
{
SplashScreen* screen = new SplashScreen();
screen->autorelease();
return screen;
}
示例4: ShowSplashScreen
void Game::ShowSplashScreen()
{
SplashScreen splashScreen;
splashScreen.Show(_mainWindow);
_gameState = Game::ShowingMenu;
}
示例5: GameLoop
void Game::GameLoop() {
sf::Event event;
Screen screen;
SplashScreen splashScreen;
while (renderWindow.pollEvent(event)) {
switch (gameState) {
case Game::ScreenMenu: {
renderWindow.clear(sf::Color::Blue);
renderWindow.display();
break;
}
case Game::ScreenSplash: {
splashScreen.showScreen(renderWindow);
gameState = splashScreen.processChoice();
break;
}
case Game::ScreenGame: {
break;
}
case Game::ScreenScore: {
break;
}
}
if (event.type == sf::Event::Closed) {
gameState = Exiting;
}
}
}
示例6: InitCommonControls
BOOL InformApp::InitInstance()
{
InitCommonControls();
CWinApp::InitInstance();
theOS.Init();
theOS.BufferedPaintInit();
if (!AfxOleInit())
return FALSE;
if (!Scintilla_RegisterClasses(AfxGetInstanceHandle()))
return FALSE;
if (GetIEVersion() < 5.0)
{
CString msg;
msg.Format("Internet Explorer version 5 or higher must be installed.");
AfxMessageBox(msg,MB_ICONSTOP|MB_OK);
exit(0);
}
CheckMSXML();
SetRegistryKey("David Kinder");
SetFonts();
ReportHtml::SetIEPreferences(REGISTRY_PATH_BROWSER);
// Set the HOME environment variable to the My Documents folder,
// used by the Natural Inform compiler, and make sure directories
// under My Documents exist.
SetMyDocuments();
// Discard any log file from a previous run
/*::DeleteFile(m_home+LOG_FILE);*/
// Install the protocol for inform: URLs
m_protocol.Install(L"inform");
CString dir = GetAppDir();
m_protocol.AddDirectory(dir+"\\Documentation");
m_protocol.AddDirectory(dir+"\\Documentation\\doc_images");
m_protocol.AddDirectory(dir+"\\Documentation\\sections");
m_protocol.AddDirectory(L"//Extensions",m_home+"\\Inform\\Documentation");
m_protocol.AddDirectory(L"//Extensions",dir+"\\Documentation");
// Find and create documentation for extensions
FindExtensions();
RunCensus(false);
// Show the splash screen
SplashScreen splash;
splash.ShowSplash();
// Only continue if a project has been opened
if (AfxGetMainWnd() == NULL)
return FALSE;
return TRUE;
}
示例7: main
int main()
{
SetupCallbacks();
scePowerSetClockFrequency(333, 333, 166);
//initialize render manager
RenderManager::InstancePtr()->Init();
RenderManager::InstancePtr()->CollectPerformance(true);
RenderManager::InstancePtr()->InitDebugFont();
//set perspectives
RenderManager::InstancePtr()->SetOrtho(0,0,0,0,0,0);
//init and load sounds
SoundManager::Instance()->Init();
srand(time(NULL));
//new state manager
StateManager stateManager;
stateManager.Init();
RenderManager::InstancePtr()->SetClearColour(0xFF000000);
//splash screens
SplashScreen *screen = new SplashScreen(TextureHelper::Instance()->GetTexture(TextureHelper::Genesis),0,0,480,272,3);
screen->ShowSplash();
delete screen;
SplashScreen *screen2 = new SplashScreen(TextureHelper::Instance()->GetTexture(TextureHelper::PspTeam),0,0,424,72,3);
screen2->ShowSplash();
delete screen2;
RenderManager::InstancePtr()->SetClearColour(0xFFF5B783);
//new active state
StateMenu *statePlay = new StateMenu();
statePlay->Init();
stateManager.ChangeState(statePlay);
//trun
while ( stateManager.Running() )
{
stateManager.HandleEvents();
stateManager.Update();
stateManager.Draw();
}
sceGuTerm(); // Terminating the Graphics System
sceKernelExitGame(); // Quits Application
return 0;
}
示例8: main
int main(int argc, char *argv[])
{
SplashScreen *ss;
QApplication a(argc, argv);
QString routeFile;
QCoreApplication::setOrganizationName("IvimeyCom");
QCoreApplication::setOrganizationDomain("ivimey.com");
QCoreApplication::setApplicationName(PROGRAM_NAME);
setupLogEngine();
for(int i = 1; i < argc; i++)
{
if (argv[i][0] == '-')
{
if (strcmp(argv[i], "--help") == 0)
{
printf(PROGRAM_NAME " (c) 2013-2014 IvimeyCom, by Ruth Ivimey-Cook\n"
"\nUsage: RWMapMaker [--help] [path..to..RouteProperties.xml]\n");
exit(0);
}
}
else
{
routeFile = argv[i];
break;
}
}
ss = new SplashScreen();
ss->show();
try
{
RWMapMaker *w = new RWMapMaker(routeFile);
w->show();
return a.exec();
}
catch(std::exception ex)
{
printf(PROGRAM_NAME " Exception caught:\n%s", ex.what());
exit(1);
}
catch(...)
{
printf(PROGRAM_NAME " Exception caught:\n");
exit(2);
}
}
示例9: main
int main(int argc, char *argv[]) {
std::cout << "Itchy++" << std::flush;
QApplication a(argc, argv);
SplashScreen *splash = new SplashScreen(true, QPixmap(":/logos/res/splash.png"));
splash->show();
itchy w;
w.show();
splash->hide();
return a.exec();
}
示例10: initialise
//==============================================================================
void initialise (const String& /*commandLine*/)
{
#if JUCE_DEBUG && DROWAUDIO_UNIT_TESTS
UnitTestRunner testRunner;
testRunner.runAllTests();
#endif
SplashScreen* splash = new SplashScreen();
splash->show ("dRowAudio Demo",
ImageCache::getFromMemory (BinaryData::splash_screen_png, BinaryData::splash_screen_pngSize),
0, true);
// Do your application's initialisation code here..
mainWindow = new MainAppWindow();
}
示例11: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Configuration::getInstance()->mainWindow = new Output();
Output *w = static_cast<Output*>(Configuration::getInstance()->mainWindow);
// w.show();
SplashScreen *splash = new SplashScreen(4000);
splash->show();
qDebug()<<w;
Q_ASSERT(SIEmethods::mW);
splash->connect(splash,SIGNAL(startApp()),w,SLOT(start()));
return a.exec();
}
示例12: main
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(kactus);
QApplication a(argc, argv);
// Set the palette to use nice pastel colors.
QPalette palette = a.palette();
palette.setColor(QPalette::Active, QPalette::Highlight, QColor(33, 135, 237));
palette.setColor(QPalette::Disabled, QPalette::Highlight, QColor(166, 200, 234));
palette.setColor(QPalette::Inactive, QPalette::Highlight, QColor(166, 200, 234));
a.setPalette(palette);
// Create the main window and close the splash after 1.5 seconds.
MainWindow w;
// the release mode
#ifdef NDEBUG
// Show the splash screen.
SplashScreen splash;
splash.show();
splash.showMessage("");
a.processEvents();
QTimer::singleShot(1500, &splash, SLOT(close()));
QTimer::singleShot(1500, &w, SLOT(show()));
QTimer::singleShot(1700, &w, SLOT(onLibrarySearch()));
// the debug mode
#else
QTimer::singleShot(200, &w, SLOT(onLibrarySearch()));
w.show();
#endif
return a.exec();
}
示例13: main
//.........这里部分代码省略.........
{
MainWindow::Module serverModule;
modules.at(0).toInt(&isNumber);
//check if the argument starts with server id
if(isNumber)
{
serverModule.serverID = modules.at(0);
serverModule.modules = modules.at(1).split(",");
remoteModules.push_back(serverModule);
}
}
command = argv[i+1];
}
}
}
}
//initialises message handeler
if(!debug)
{
qInstallMsgHandler(customMessageHandler);
}
//current Aquila verions
QString version = "Aquila 2.0";
//localhost name
QString hostName = QHostInfo::localHostName();
//minimum version of YARP required for full support
QString yarpVersion = "2.3.20";
//add active developers to the list
QStringList developers;
developers<<" Martin Peniak"<<" & Anthony Morse";
//initialise YARP
yarp::os::Network yarp;
//initialises Aquila and loads its icon
QApplication *a = new QApplication(argc, argv);
a->setWindowIcon(QPixmap(":/images/icon.png"));
a->setAttribute(Qt::AA_X11InitThreads);
//initialise splash screen
QPixmap pixmap(":/images/splash.png");
SplashScreen *splash = new SplashScreen(pixmap, 4);
splash->setFont(QFont("Ariel", 8, QFont::Bold));
splash->show();
//initialise GUI, probe yarpservers, its modules and add local modules to GUI
MainWindow *w = new MainWindow(0, version, hostName, yarpVersion);
splash->showMessage(QString("Initialising ")+version,Qt::AlignLeft | Qt::AlignBottom,Qt::white);
QObject::connect(a, SIGNAL(aboutToQuit()), w, SLOT(aboutToQuit()));
a->processEvents();
splash->showMessage(QObject::tr("Detecting available modules on the local network"),Qt::AlignLeft | Qt::AlignBottom,Qt::white);
w->probeServers(remoteServers);
a->processEvents();
//start local modules
if(!localModules.isEmpty())
{
splash->showMessage(QObject::tr("Starting local modules"),Qt::AlignLeft | Qt::AlignBottom,Qt::white);
w->addLocalModules(localModules);
a->processEvents();
}
//start remote modules
if(!remoteModules.isEmpty())
{
if(remoteServers)
{
splash->showMessage(QObject::tr("Starting remote modules"),Qt::AlignLeft | Qt::AlignBottom,Qt::white);
w->addRemoteModules(remoteModules);
a->processEvents();
}
else
{
qWarning(" - main_gui: '--localMode' argument prevented remote modules from loading during startup");
}
}
//load graphial user interface, show credits and close the splash
splash->showMessage(QObject::tr("Loading graphical user interface"),Qt::AlignLeft | Qt::AlignBottom,Qt::white);
a->processEvents();
QString credits("Developed by");
for(int i=0; i<developers.size(); i++)
{
credits.append(developers.at(i));
}
splash->showMessage(credits,Qt::AlignLeft | Qt::AlignBottom,Qt::white);
a->processEvents();
splash->finish(w);
//show graphial user interface
w->show();
return a->exec();
}
示例14: QApplication
/*!
* \brief OMEditApplication::OMEditApplication
* \param argc
* \param argv
* \param threadData
*/
OMEditApplication::OMEditApplication(int &argc, char **argv, threadData_t* threadData)
: QApplication(argc, argv)
{
// set the stylesheet
setStyleSheet("file:///:/Resources/css/stylesheet.qss");
#if !(QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
QTextCodec::setCodecForTr(QTextCodec::codecForName(Helper::utf8.toLatin1().data()));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName(Helper::utf8.toLatin1().data()));
#endif
#ifndef WIN32
QTextCodec::setCodecForLocale(QTextCodec::codecForName(Helper::utf8.toLatin1().data()));
#endif
setAttribute(Qt::AA_DontShowIconsInMenus, false);
// Localization
//*a.severin/ add localization
const char *omhome = getenv("OPENMODELICAHOME");
#ifdef WIN32
if (!omhome) {
QMessageBox::critical(0, QString(Helper::applicationName).append(" - ").append(Helper::error),
GUIMessages::getMessage(GUIMessages::OPENMODELICAHOME_NOT_FOUND), Helper::ok);
quit();
exit(1);
}
#else /* unix */
omhome = omhome ? omhome : CONFIG_DEFAULT_OPENMODELICAHOME;
#endif
QSettings *pSettings = Utilities::getApplicationSettings();
QLocale settingsLocale = QLocale(pSettings->value("language").toString());
settingsLocale = settingsLocale.name() == "C" ? pSettings->value("language").toLocale() : settingsLocale;
QString locale = settingsLocale.name().isEmpty() ? QLocale::system().name() : settingsLocale.name();
/* Set the default locale of the application so that QSpinBox etc show values according to the locale.
* Set OMEdit locale to C so that we get dot as decimal separator instead of comma.
*/
QLocale::setDefault(QLocale::c());
QString translationDirectory = omhome + QString("/share/omedit/nls");
// install Qt's default translations
QTranslator *pQtTranslator = new QTranslator(this);
#ifdef Q_OS_WIN
pQtTranslator->load("qt_" + locale, translationDirectory);
#else
pQtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
#endif
installTranslator(pQtTranslator);
// install application translations
QTranslator *pTranslator = new QTranslator(this);
pTranslator->load("OMEdit_" + locale, translationDirectory);
installTranslator(pTranslator);
// Splash Screen
QPixmap pixmap(":/Resources/icons/omedit_splashscreen.png");
SplashScreen *pSplashScreen = SplashScreen::instance();
pSplashScreen->setPixmap(pixmap);
pSplashScreen->show();
Helper::initHelperVariables();
/* Force C-style doubles */
setlocale(LC_NUMERIC, "C");
// if user has requested to open the file by passing it in argument then,
bool debug = false;
QString fileName = "";
QStringList fileNames;
if (arguments().size() > 1) {
for (int i = 1; i < arguments().size(); i++) {
if (strncmp(arguments().at(i).toStdString().c_str(), "--Debug=",8) == 0) {
QString debugArg = arguments().at(i);
debugArg.remove("--Debug=");
if (0 == strcmp("true", debugArg.toStdString().c_str())) {
debug = true;
} else {
debug = false;
}
} else {
fileName = arguments().at(i);
if (!fileName.isEmpty()) {
// if path is relative make it absolute
QFileInfo file (fileName);
QString absoluteFileName = fileName;
if (file.isRelative()) {
absoluteFileName = QString("%1/%2").arg(QDir::currentPath()).arg(fileName);
}
absoluteFileName = absoluteFileName.replace("\\", "/");
if (QFile::exists(absoluteFileName)) {
fileNames << absoluteFileName;
} else {
printf("Invalid command line argument: %s %s\n", fileName.toStdString().c_str(), absoluteFileName.toStdString().c_str());
}
}
}
}
}
// MainWindow Initialization
MainWindow *pMainwindow = MainWindow::instance(debug);
pMainwindow->setUpMainWindow(threadData);
if (pMainwindow->getExitApplicationStatus()) { // if there is some issue in running the application.
quit();
//.........这里部分代码省略.........
示例15: reportError
int InteractiveApplication::run(int argc, char** argv)
{
// Generate the XML files
if (generateXml() == false)
{
return -1;
}
// Set the application to run in interactive mode
ApplicationServicesImp* pApp = ApplicationServicesImp::instance();
if (pApp != NULL)
{
pApp->setInteractive();
}
// Initialize the Qt application
QApplication& qApplication = dynamic_cast<QApplication&>(getQApp());
#if !defined(LINUX)
qApplication.setFont(QFont("Tahoma", 8));
#endif
bool configSettingsValid = false;
string configSettingsErrorMsg = "";
ConfigurationSettingsImp* pConfigSettings = ConfigurationSettingsImp::instance();
if (pConfigSettings != NULL)
{
configSettingsValid = pConfigSettings->isInitialized();
if (pConfigSettings->getInitializationErrorMsg() != NULL)
{
configSettingsErrorMsg = pConfigSettings->getInitializationErrorMsg();
}
if (configSettingsValid)
{
pConfigSettings->validateInitialization();
configSettingsValid = pConfigSettings->isInitialized();
if (pConfigSettings->getInitializationErrorMsg() != NULL)
{
configSettingsErrorMsg = pConfigSettings->getInitializationErrorMsg();
}
}
}
if (!configSettingsValid)
{
if (configSettingsErrorMsg.empty())
{
configSettingsErrorMsg = "Unable to locate configuration settings";
}
reportError(configSettingsErrorMsg);
return -1;
}
else
{
if (!configSettingsErrorMsg.empty())
{
reportWarning(configSettingsErrorMsg);
}
}
{ // scope the lifetime of the lock
SessionSaveLock lock;
// Create a progress object
mpProgress = new ProgressAdapter();
// Splash screen
Q_INIT_RESOURCE(Application);
SplashScreen* pSplash = new SplashScreen(mpProgress);
vector<string> splashPaths = Service<InstallerServices>()->getSplashScreenPaths();
pSplash->setSplashImages(list<string>(splashPaths.begin(), splashPaths.end()));
pSplash->show();
qApplication.processEvents();
// process pending extension uninstalls
InstallerServicesImp::instance()->processPending(mpProgress);
string errMsg;
if(!ConfigurationSettingsImp::instance()->loadSettings(errMsg))
{
if (QMessageBox::warning(pSplash, "Error loading configuration settings",
QString("Warning: unable to reload application settings.\n%1\nContinue loading Opticks?").arg(QString::fromStdString(errMsg)),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::No)
{
pSplash->close();
delete pSplash;
return -1;
}
}
// Initialization
int iReturn = Application::run(argc, argv);
if (iReturn == -1)
{
pSplash->close();
delete pSplash;
return -1;
}
//.........这里部分代码省略.........