当前位置: 首页>>代码示例>>C++>>正文


C++ QSplashScreen::showMessage方法代码示例

本文整理汇总了C++中QSplashScreen::showMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplashScreen::showMessage方法的具体用法?C++ QSplashScreen::showMessage怎么用?C++ QSplashScreen::showMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QSplashScreen的用法示例。


在下文中一共展示了QSplashScreen::showMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QSplashScreen *splash = new QSplashScreen;
    splash->setPixmap(QPixmap(":/ICO_Home.gif"));
    splash->show();
    Qt::Alignment toRight = Qt::AlignTop | Qt::AlignTop;
    splash->showMessage(QObject::tr("Seeting up the main windows ..."), toRight, Qt::black);
    MainWindow w;


    for(int i=0;i<90000;i++)
           for(int j=0;j<900;j++);
        splash->showMessage(QObject::tr("Loading modules..."), toRight, Qt::black);
        for(int i=0;i<90000;i++)
           for(int j=0;j<900;j++);
        splash->showMessage(QObject::tr("Etablishing connections..."), toRight, Qt::black);
        for(int i=0;i<90000;i++)
           for(int j=0;j<6000;j++);


    w.setWindowState(w.windowState() ^ Qt::WindowMaximized);
    w.show();

    splash->finish(&w);
        delete splash;

    return a.exec();
}
开发者ID:pech,项目名称:yags,代码行数:30,代码来源:main.cpp

示例2: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTextCodec *codec = QTextCodec::codecForName("UTF-8");
    QTextCodec::setCodecForLocale(codec);

    QSplashScreen *splash = new QSplashScreen;
    MainWindow w;

    splash->setPixmap(QPixmap(":/data/splash.jpg").scaled(640, 480));
    // splash->setPixmap(QPixmap(":/dataplash.png").scaled(400, 300, Qt::KeepAspectRatio));
    splash->show();
    w.show();
    Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
    w.move ((QApplication::desktop()->width() - w.width()) / 2, (QApplication::desktop()->height() - w.height()) / 2);
    splash->showMessage(QObject::tr("Setting up the main window..."));
    sleep(1);

    splash->showMessage(QObject::tr("Loading modules..."), topRight, Qt::black);

    splash->finish(&w);
    delete splash;

    return a.exec();
}
开发者ID:gzxultra,项目名称:EmbeddedNavigationSystem,代码行数:25,代码来源:main.cpp

示例3: main

int main(int argc, char *argv[])
{

#ifndef QT_DEBUG
    QString fileName = FilePirate::StoragePath + "captains-log.log";
    QFile *log = new QFile(fileName);
    if (log->open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
        out = new QTextStream(log);
        qInstallMsgHandler(logOutput);
    } else {
        qDebug() << "Error opening log file '" << fileName << "'. All debug output redirected to console.";
    }
#endif


    SingleApplication a(argc, argv, "9578A25E-F82A-4558-842C-1DE074F3C232");

    if (a.alreadyExists()) {
        qDebug() << "FilePirate is already running.";
        a.sendMessage("fg");
        return 0;
    }

    QPixmap pixmap(":/images/splash.png");
    QSplashScreen *splash = new QSplashScreen(pixmap);
    splash->show();
    a.processEvents();
    splash->showMessage("Loading...",Qt::AlignCenter | Qt::AlignBottom,Qt::white);
    qDebug() << "Registering URL handler...";
    QDesktopServices::setUrlHandler("pirate",&FilePirate::Application(),"handleUrl");
    a.processEvents();
    // Force the user to see the splash screen for at least some time
    QMutex dummy;
    dummy.lock();
    QWaitCondition wait;
    wait.wait(&dummy, 750);
    dummy.unlock();
    // And move on to the rest of loading
    splash->showMessage("Loading settings...",Qt::AlignCenter | Qt::AlignBottom,Qt::white);
    // load the settings here
    FilePirate::Application().settingsLoaded = FilePirate::Application().loadSettings();
    splash->showMessage("Loading local filelist...",Qt::AlignCenter | Qt::AlignBottom,Qt::white);
    FilePirate::Application().fileMon->fullRefreshFileList();

    // bring up the filelist - this is a good time to start up the settings dialog
    // if the user hasn't done so yet...
    splash->showMessage("Finishing up...",Qt::AlignCenter | Qt::AlignBottom,Qt::white);
    FilePirate::Application().moveHelpersToThreads();

    MainWindow w;
    w.show();
    splash->finish(&w);

    a.connect(&a, SIGNAL(messageAvailable(QStringList)), &w, SLOT(secondInstanceMessages(QStringList)));

    delete splash;

    return a.exec();
}
开发者ID:JonnyFunFun,项目名称:FilePirate,代码行数:59,代码来源:main.cpp

示例4: date

BibleTime::BibleTime()
        : m_WindowWasMaximizedBeforeFullScreen(false) {
    namespace DU = util::directory;

    QSplashScreen splash;
    bool showSplash = CBTConfig::get(CBTConfig::logo);
    QString splashHtml;

    if (showSplash) {
        splashHtml = "<div style='background:transparent;color:white;font-weight:bold'>%1"
                     "</div>";
        const QDate date(QDate::currentDate());
        const int day = date.day();
        const int month = date.month();
        QString splashImage(DU::getPicsDir().canonicalPath().append("/"));

        if ((month >= 12 && day >= 24) || (month <= 1 && day < 6)) {
            splashImage.append("startuplogo_christmas.png");
        } else {
            splashImage.append("startuplogo.png");
        }

        QPixmap pm;
        if (!pm.load(splashImage)) {
            qWarning("Can't load startuplogo! Check your installation.");
        }
        splash.setPixmap(pm);
        splash.show();

        splash.showMessage(splashHtml.arg(tr("Initializing the SWORD engine...")),
                           Qt::AlignCenter);
    }
    initBackends();

    if (showSplash) {
        splash.showMessage(splashHtml.arg(tr("Creating BibleTime's user interface...")),
                           Qt::AlignCenter);
    }
    initView();

    if (showSplash) {
        splash.showMessage(splashHtml.arg(tr("Initializing menu- and toolbars...")),
                           Qt::AlignCenter);
    }
    initActions();
    initConnections();
    readSettings();

    setWindowTitle("BibleTime " BT_VERSION);
    setWindowIcon(DU::getIcon(CResMgr::mainWindow::icon));
}
开发者ID:bibletime,项目名称:historic-bibletime-svn,代码行数:51,代码来源:bibletime.cpp

示例5: main

int main(int argc, char *argv[])
{


    QApplication a(argc, argv);
    Q_INIT_RESOURCE(images);

    // Show a loading screen, I am not sure this is showed even on slow computers...
    QSplashScreen *splash = new QSplashScreen;
    splash->setPixmap(QPixmap("../resources/images/splash.jpg"));
    splash->show();
    splash->showMessage(QObject::tr("ROS GUI is launching...."),Qt::AlignBottom,Qt::black);

    //Make the main window appear
    MainWindow w;
    w.show();
    w.setArguments(argc,argv);

    // The main window is fully loaded, we can now delete the splash screen
    splash->finish(&w);
    delete splash;

    a.setStyle("gtk+");
    a.exec();

    return 0;
}
开发者ID:mBusaleh,项目名称:corobot,代码行数:27,代码来源:main.cpp

示例6: WinMain

  int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) 
{
    int argc = 0;
    char **argv = 0;
#else
  int main(int argc, char *argv[]) 
{
#endif

  using namespace ReconstructMeGUI;

  QApplication app(argc, argv);

  // Splashscreen
  QPixmap splashPix(":/images/splash_screen.png");
  QSplashScreen *sc = new QSplashScreen(splashPix);
  sc->setAutoFillBackground(false);
  sc->showMessage(welcome_tag, SPLASH_MSG_ALIGNMENT);
  sc->show();

  // global style sheet
  QFile style_file(style_sheet_file_tag);
  if(style_file.open(QFile::ReadOnly)) {
    app.setStyle("plastique");
    app.setStyleSheet(style_file.readAll());
  }

  // MainWindow
  reconstructme reme;
  sc->finish(&reme);
  reme.show();

  return app.exec();
}
开发者ID:01NkT10,项目名称:reconstructme-qt,代码行数:34,代码来源:main.cpp

示例7: main

int main(int argc, char *argv[])
{
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
    QApplication a(argc, argv);
    RMMSMain w;

    QSplashScreen *splash = new QSplashScreen;
    splash->setStyleSheet("font-size: 16px");
    splash->setPixmap(QPixmap(":/splash/1.png"));//设置图片
    splash->show();//显示图片
    Qt::Alignment topRight = Qt::AlignCenter | Qt::AlignBottom;
    splash->showMessage(QObject::tr("Setting up the main window..."), topRight, Qt::white);//显示信息

    QDateTime curtime = QDateTime::currentDateTime();
    QDateTime nowtime;
    do{
        nowtime = QDateTime::currentDateTime();
    } while(curtime.secsTo(nowtime) <= 3);

    w.setWindowTitle(SystemName);
    w.show();

    splash->finish(&w);//图片一直显示到mainWin加载完成
    delete splash;

    return a.exec();
}
开发者ID:mcmdhr,项目名称:RMMS,代码行数:27,代码来源:main.cpp

示例8: main

int main(int argc, char *argv[])
{
	
	QoccApplication app( argc, argv );
	

	QSplashScreen *mySplash = new QSplashScreen;
	mySplash->setPixmap(QPixmap(QString::fromUtf8(":/images/style/FMD_SPLASH.png")).scaledToWidth(600));
	mySplash->show();
	Qt::Alignment topright = Qt::AlignRight | Qt::AlignTop;
	mySplash->showMessage(QString::fromUtf8("Loading More CowBell ..."),topright,Qt::white);

#if defined(Q_WS_WIN)
	//QtDotNetStyle* style = new QtDotNetStyle();
	//QCDEStyle* style = new QCDEStyle();
	//app.setStyle(QStyleFactory::create("motif"));
	//cleanlooks,"motif", "cde", "plastique" and "cleanlooks

#endif
	
	qGeomApp->msleep ( 100 );
	QoccMainWindow *window = new QoccMainWindow();
    window->showMaximized();
	mySplash->finish(window);
	delete mySplash;
	
	int retval = app.exec();
	return retval;
}
开发者ID:jf---,项目名称:openshapefactory,代码行数:29,代码来源:main.cpp

示例9: main

int main(int argc, char *argv[])
{
    g_app = new QApplication(argc, argv);

    // Create a splash screen.
    QSplashScreen *splash = new QSplashScreen;
    splash->setPixmap(QPixmap(":/images/splash.bmp"));
    splash->show();

    // Set message alignment for splash screen.
    Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
    // Display message while bringing up main window state.
    splash->showMessage(QObject::tr("Setting up the main window ..."),
        topRight, Qt::black);
    g_app->processEvents(); // Accept a click on the screen so that user can cancel the screen.

    // Switch from splash state to main window.
    MainWindow mainWindow;
    //SplashUtil::sleep(3); // Splash page is shown for 3 seconds.

    mainWindow.show();
    splash->finish(&mainWindow);
    delete splash;

    return g_app->exec();
}
开发者ID:WizzerWorks,项目名称:QtVpTest,代码行数:26,代码来源:main.cpp

示例10: splashScreen

void splashScreen()
{
	QSplashScreen *splash = new QSplashScreen;  
    splash->setPixmap(QPixmap("./image/splash.jpg"));  
    splash->show();
	Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;  
    splash->showMessage(QObject::tr("Setting up the Login Window..."),  
                        topRight,  
                        Qt::red);
	QTest::qSleep(3000);
	splash->showMessage(QObject::tr("Loading modules..."),  
                        topRight,  
                        Qt::blue);  
    QTest::qSleep(3000);  
	delete splash;
}
开发者ID:lzz5235,项目名称:QtProject,代码行数:16,代码来源:main.cpp

示例11: main

int main(int argc, char *argv[])
{


    Q_INIT_RESOURCE(icons); /** Initializing the icon images for the application. */

    /** Application object for creating the application */
    QApplication app(argc, argv);
    /** Providing application settings */
    app.setOrganizationName("NITK Surathkal");
    app.setApplicationName("Talk To The Hand");
    app.setApplicationVersion("Version 1.0");
    app.setWindowIcon(QIcon(":/images/logo.jpg"));

    /** Initializing splash screen for the application */
    QSplashScreen *splash = new QSplashScreen;
    QImage *splashImage = new QImage(":/images/SplashScreen.jpg");
    *splashImage = splashImage->scaledToHeight(300);
    splash->setPixmap(QPixmap::fromImage(*splashImage));
    splash->show();
    Qt::Alignment topRight = Qt::AlignLeft | Qt::AlignBottom;
    splash->showMessage(QObject::tr("Initializing..."),topRight, Qt::black);
    sleep(3);

    /** Creating mainwindow of the application and then showing it*/
    MainWindow mainWin;
    mainWin.show();
    //mainWin.showFullScreen();

    /** Remove splash screen as soon as the window loads */
    splash->finish(&mainWin);
    delete splash;

    return app.exec();
}
开发者ID:andrearenika,项目名称:TalkToTheHand,代码行数:35,代码来源:main.cpp

示例12: Splash

 explicit Splash()
     : pixmap(getPixmapFilenameRaw("splash20.png"))
     , splash(pixmap)
 {
     const auto message = QString("%1").arg(MMAPPER_VERSION, -9);
     splash.showMessage(message, Qt::AlignBottom | Qt::AlignRight, Qt::yellow);
     splash.show();
 }
开发者ID:nschimme,项目名称:MMapper,代码行数:8,代码来源:main.cpp

示例13: main

int main(int argc, char *argv[])
{

#ifdef HAS_GUI

    if (argc > 1){
    	// using terminal mode
    	if (argc < 2){
            printf("Usage: %s input _file\n", argv[0]);
    		exit(1);
    	}
    	else {
            TEMP_SCHEME* RunEngine = new TEMP_SCHEME(argc, argv);
    		RunEngine->evaluation();
    		return(0);
    	}
    }
    else {			// using GUI
    	QApplication app(argc, argv);
    	app.setOrganizationName(ORGANIZATION);
    	app.setApplicationName(NAME);
    	app.setApplicationVersion(VERSION);
/*
        QFile stylesheetfile(":/css/stylesheet.css");
        if (stylesheetfile.open(QFile::ReadOnly)){
            app.setStyleSheet(stylesheetfile.readAll());
            stylesheetfile.close();
        }
*/
    	QSplashScreen *splash = new QSplashScreen;
		splash->setPixmap(QPixmap(":/libel.png"));
		splash->show();
		splash->showMessage(app.organizationName());
		QIcon windowIcon(":/libel.png");

    	GUI gui;
    	gui.setWindowIcon(windowIcon);

        QTimer::singleShot(1000, splash, SLOT(close()));
        QTimer::singleShot(1000, &gui, SLOT(showMaximized()));

    	return app.exec();
    }
#else
    if (argc > 1){
        	// using terminal mode
        	if (argc < 2){
        		printf("Usage: %s input_file\n", argv[0]);
        		exit(1);
        	}
        	else {
                TEMP_SCHEME* RunEngine = new TEMP_SCHEME(argc, argv);
        		RunEngine->evaluation();
        		return(0);
        	}
        }
#endif
}
开发者ID:alessandronascimento,项目名称:libela,代码行数:58,代码来源:main.cpp

示例14: main

/** Application launch functionn. */
int main(int argc, char *argv[]) {
    using namespace ews::app::model;
    using namespace ews::app::widget;

#if defined(QT_DEBUG)                
    osg::setNotifyLevel(osg::INFO);
#endif                
    
    // To see Qt object dumps on macos, run with the environment variable
    // "DYLD_IMAGE_SUFFIX" set to "_debug".
    
    QApplication mainQApp(argc, argv);
    mainQApp.setQuitOnLastWindowClosed(true);
    QApplication::setOrganizationName(EWS_ORGANIZATION_NAME);
    QApplication::setOrganizationDomain(EWS_BUNDLE_ID);
    QApplication::setApplicationVersion(EWS_VERSION);
    QApplication::setApplicationName(EWS_APP_NAME);
    
    // First register the dialog error handler, then
    // get the function pointer to it by passing zero to the handler installer
    // then install our own.
    QErrorMessage::qtHandler();
    saveHandler(qInstallMsgHandler(0));
    qInstallMsgHandler(errHandler);
    
    QSplashScreen splash;
    QPixmap img(":/images/splash");
    
    if (img.isNull()) {
       qWarning() << "Couldn't load splash image";
    }
    
    splash.setPixmap(img);
    splash.showMessage(QObject::tr("Starting up...."));
    splash.show();
    
    mainQApp.connect(&mainQApp, SIGNAL(lastWindowClosed()), &mainQApp, SLOT(quit()));

    SimulationState state;
    state.setObjectName("root");
    
    EWSMainWindow w(&state);
    w.setWindowTitle(EWS_APP_NAME);
#if defined(__APPLE__)
    w.setWindowIcon(QIcon(":/images/appicon"));
#else    
    QApplication::setWindowIcon(QIcon(":/images/appicon"));    
#endif    


    w.show();
    
    splash.finish(&w);

    return mainQApp.exec();
}
开发者ID:metasim,项目名称:ews,代码行数:57,代码来源:main.cpp

示例15: main

// Start method main
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // Create splashscreen object
    QSplashScreen *splash = new QSplashScreen;
    splash->setPixmap(QPixmap(":/img/images/splash.png"));
    splash->show();

    // Create database object
    Database *db = new Database();

    Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;

    splash->showMessage(QObject::tr("Establishing connections..."),
                        topRight, Qt::white);
    // Database connection
    if(!db->createConnection())
        return 1;
    // Client connection
    Clock clock;
    clock.show();


    splash->showMessage(QObject::tr("Setting up main window..."),
                        topRight, Qt::white);
    // Create game window
    GameWindow gameWindow;

    splash->showMessage(QObject::tr("Setting up game..."),
                            topRight, Qt::white);
    // create game
    Game *game = new Game();

    gameWindow.setCentralWidget(game);
    gameWindow.show();
    splash->finish(&gameWindow);

    delete splash;

    return a.exec();
}// End method main
开发者ID:NE-,项目名称:NajeraEnrique_CIS17B_48941,代码行数:43,代码来源:main.cpp


注:本文中的QSplashScreen::showMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。