本文整理汇总了C++中QSimCommand::menuItems方法的典型用法代码示例。如果您正苦于以下问题:C++ QSimCommand::menuItems方法的具体用法?C++ QSimCommand::menuItems怎么用?C++ QSimCommand::menuItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSimCommand
的用法示例。
在下文中一共展示了QSimCommand::menuItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: listViewPreferred
bool SimApp::listViewPreferred(const QSimCommand& cmd)
{
if (!cmd.softKeysPreferred())
return true;
// reserve one key for back button
if ((QSoftMenuBar::keys().count() - 1) >= cmd.menuItems().count())
return false;
else
return true;
}
示例2: cmdMenu
void SimApp::cmdMenu(const QSimCommand &cmd)
{
if (!simToolkitAvailable) {
// First time that we have seen the toolkit menu, so this
// SIM obviously has a SIM toolkit application on it.
simToolkitAvailable = true;
mainMenuTitle = cmd.title();
updateValueSpace();
}
// Create QSimIconReader if the menu contains them.
QList<QSimMenuItem> items = cmd.menuItems();
QList<QSimMenuItem>::ConstIterator it;
bool needIcon = false;
for (it = items.begin(); it != items.end(); ++it) {
if ( (int)(*it).iconId() ) {
needIcon = true;
if ( !iconReader )
createIconReader();
else
break;
}
}
// Create the menu widgetry.
SimMenu *menu;
if ( needIcon )
menu = new SimMenu(cmd, iconReader, stack);
else
menu = new SimMenu(cmd, stack);
// main menu send QSimEnvelope,sub menu sends QSimTerminalResponse
if (cmd.type() == QSimCommand::SetupMenu) {
connect(menu, SIGNAL(sendEnvelope(QSimEnvelope)),
this, SLOT(sendEnvelope(QSimEnvelope)) );
} else {
connect(menu, SIGNAL(sendResponse(QSimTerminalResponse)),
this, SLOT(sendResponse(QSimTerminalResponse)) );
}
setView(menu);
}
示例3: softKeysMenu
void SimApp::softKeysMenu(const QSimCommand& cmd)
{
// Request icons from the SIM if the menu contains them.
QList<QSimMenuItem> items = cmd.menuItems();
QList<QSimMenuItem>::ConstIterator it;
for (it = items.begin(); it != items.end(); ++it) {
int iconId = (int)((*it).iconId());
if ( iconId > 0 )
createIconReader();
}
// Create the menu widgetry.
SoftKeysMenu *menu = new SoftKeysMenu(cmd, iconReader, stack);
// main menu send QSimEnvelope,sub menu sends QSimTerminalResponse
if (cmd.type() == QSimCommand::SetupMenu) {
connect(menu, SIGNAL(sendEnvelope(QSimEnvelope)),
this, SLOT(sendEnvelope(QSimEnvelope)) );
} else {
connect(menu, SIGNAL(sendResponse(QSimTerminalResponse)),
this, SLOT(sendResponse(QSimTerminalResponse)) );
}
setView(menu);
}