本文整理汇总了C++中SplashScreen::setFont方法的典型用法代码示例。如果您正苦于以下问题:C++ SplashScreen::setFont方法的具体用法?C++ SplashScreen::setFont怎么用?C++ SplashScreen::setFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SplashScreen
的用法示例。
在下文中一共展示了SplashScreen::setFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}