本文整理汇总了C++中QSplashScreen::font方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplashScreen::font方法的具体用法?C++ QSplashScreen::font怎么用?C++ QSplashScreen::font使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSplashScreen
的用法示例。
在下文中一共展示了QSplashScreen::font方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: time
void *TUIMod::Task( void * )
{
vector<string> list;
bool first_ent = true;
QImage ico_t;
time_t st_time = time(NULL);
vector<TMess::SRec> recs;
//> Init locale setLocale
QLocale::setDefault(QLocale(Mess->lang().c_str()));
//> Qt application object init
QApplication *QtApp = new QApplication(mod->qtArgC, (char**)&mod->qtArgV);
QtApp->setApplicationName(PACKAGE_STRING);
QtApp->setQuitOnLastWindowClosed(false);
mod->run_st = true;
//> Create I18N translator
I18NTranslator translator;
QtApp->installTranslator(&translator);
//> Start splash create
if(!ico_t.load(TUIS::icoGet(SYS->id()+"_splash",NULL,true).c_str())) ico_t.load(":/images/splash.png");
QSplashScreen *splash = new QSplashScreen(QPixmap::fromImage(ico_t));
splash->show();
QFont wFnt = splash->font();
wFnt.setPixelSize(10);
splash->setFont(wFnt);
while(!mod->startCom() && !mod->endRun())
{
SYS->archive().at().messGet(st_time, time(NULL), recs, "", TMess::Debug, BUF_ARCH_NM);
QString mess;
for(int i_m = recs.size()-1; i_m >= 0 && i_m > ((int)recs.size()-10); i_m--)
mess += QString("\n%1: %2").arg(recs[i_m].categ.c_str()).arg(recs[i_m].mess.c_str());
recs.clear();
splash->showMessage(mess,Qt::AlignBottom|Qt::AlignLeft);
QtApp->processEvents();
TSYS::sysSleep(0.5);
}
//> Start external modules
WinControl *winCntr = new WinControl( );
int op_wnd = 0;
mod->owner().modList(list);
for(unsigned i_l = 0; i_l < list.size(); i_l++)
if(mod->owner().modAt(list[i_l]).at().modInfo("SubType") == "QT" &&
mod->owner().modAt(list[i_l]).at().modFuncPresent("QMainWindow *openWindow();"))
{
//>> Search module into start list
int i_off = 0;
string s_el;
while((s_el=TSYS::strSepParse(mod->start_mod,0,';',&i_off)).size())
if(s_el == list[i_l]) break;
if(!s_el.empty() || !i_off)
if(winCntr->callQTModule(list[i_l])) op_wnd++;
}
delete splash;
//> Start call dialog
if(QApplication::topLevelWidgets().isEmpty()) winCntr->startDialog( );
QObject::connect(QtApp, SIGNAL(lastWindowClosed()), winCntr, SLOT(lastWinClose()));
QtApp->exec();
delete winCntr;
//> Stop splash create
if(!ico_t.load(TUIS::icoGet(SYS->id()+"_splash_exit",NULL,true).c_str())) ico_t.load(":/images/splash.png");
splash = new QSplashScreen(QPixmap::fromImage(ico_t));
splash->show();
splash->setFont(wFnt);
st_time = time(NULL);
while(!mod->endRun())
{
SYS->archive().at().messGet( st_time, time(NULL), recs, "", TMess::Debug, BUF_ARCH_NM );
QString mess;
for(int i_m = recs.size()-1; i_m >= 0 && i_m > ((int)recs.size()-10); i_m--)
mess += QString("\n%1: %2").arg(recs[i_m].categ.c_str()).arg(recs[i_m].mess.c_str());
recs.clear();
splash->showMessage(mess,Qt::AlignBottom|Qt::AlignLeft);
QtApp->processEvents();
TSYS::sysSleep(0.5);
}
delete splash;
//> Qt application object free
delete QtApp;
first_ent = false;
mod->run_st = false;
return NULL;
}