本文整理汇总了C++中QSimCommand::highPriority方法的典型用法代码示例。如果您正苦于以下问题:C++ QSimCommand::highPriority方法的具体用法?C++ QSimCommand::highPriority怎么用?C++ QSimCommand::highPriority使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSimCommand
的用法示例。
在下文中一共展示了QSimCommand::highPriority方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cmdDisplayText
void SimApp::cmdDisplayText(const QSimCommand &cmd)
{
#ifndef QTOPIA_TEST
// DisplayText with low priority came while screen is busy
if ( !this->isVisible()
&& !(HomeScreenControl::instance()->homeScreen()->windowState() & Qt::WindowActive)
&& !cmd.highPriority() ) {
QSimTerminalResponse resp;
resp.setCommand(cmd);
resp.setCause(QSimTerminalResponse::ScreenIsBusy);
resp.setResult(QSimTerminalResponse::MEUnableToProcess);
sendResponse( resp );
return;
}
#endif
if ( cmd.iconId() > 0 )
createIconReader();
hasSustainedDisplayText = cmd.immediateResponse();
if (view && qobject_cast<SimText*>(view)) {
SimText *text = (SimText *)view;
if (cmd.highPriority() || !text->hasHighPriority()) {
if (cmd.iconId())
text->setCommand(cmd, iconReader);
else
text->setCommand(cmd);
stack->setCurrentWidget(text);
} else {
// send screen busy response
QSimTerminalResponse resp;
resp.setCommand(cmd);
resp.setCause(QSimTerminalResponse::ScreenIsBusy);
resp.setResult(QSimTerminalResponse::MEUnableToProcess);
sendResponse( resp );
}
} else {
SimText *text = new SimText(cmd, iconReader, stack);
connect(text, SIGNAL(sendResponse(QSimTerminalResponse)),
this, SLOT(sendResponse(QSimTerminalResponse)) );
connect(text, SIGNAL(hideApp()), this, SLOT(hideApp()));
setView(text);
}
}