本文整理汇总了C++中sim::PropertyHubPtr::stringMapValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyHubPtr::stringMapValue方法的具体用法?C++ PropertyHubPtr::stringMapValue怎么用?C++ PropertyHubPtr::stringMapValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sim::PropertyHubPtr
的用法示例。
在下文中一共展示了PropertyHubPtr::stringMapValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: it
ActionConfig::ActionConfig(QWidget *parent, SIM::PropertyHubPtr data, ActionPlugin *plugin)
: QWidget(parent)
, m_menu(NULL)
, m_data(data)
, m_plugin(plugin)
{
setupUi(this);
setButtonsPict(this);
connect(btnHelp, SIGNAL(clicked()), this, SLOT(help()));
int row = 0;
addRow(lstEvent, row, Icon("SIM"), i18n("Contact online"), CONTACT_ONLINE, data->value("OnLine").toString() );
row++;
addRow(lstEvent, row, Icon("SIM"), i18n("Status changed"), CONTACT_STATUS, data->value("Status").toString() );
CommandDef *cmd;
CorePlugin *core = GET_CorePlugin();
CommandsMapIterator it(core->messageTypes);
while ((cmd = ++it) != NULL){
MessageDef *def = (MessageDef*)(cmd->param);
if ((def == NULL) || (cmd->icon.isEmpty()) ||
(def->flags & (MESSAGE_HIDDEN | MESSAGE_SENDONLY | MESSAGE_CHILD)))
continue;
if ((def->singular == NULL) || (def->plural == NULL) ||
(*def->singular == 0) || (*def->plural == 0))
continue;
QString type = i18n(def->singular, def->plural, 1);
int pos = type.indexOf("1 ");
if (pos == 0){
type = type.mid(2);
}else if (pos > 0){
type = type.left(pos);
}
type = type.left(1).toUpper() + type.mid(1);
row++;
addRow(lstEvent, row, Icon(cmd->icon), type, cmd->id, data->stringMapValue("Message", cmd->id));
}
EventTmplHelpList e;
e.process();
LineEditDelegate *dg = new LineEditDelegate(1, lstEvent);
dg->setHelpList(e.helpList());
lstEvent->setItemDelegate(dg);
lstEvent->resizeColumnToContents(0);
lstEvent->sortByColumn(0, Qt::AscendingOrder);
for (QObject *p = parent; p != NULL; p = p->parent()){
QTabWidget *tab = qobject_cast<QTabWidget*>(p);
if (!tab)
continue;
m_menu = new MenuConfig(tab, data);
tab->addTab(m_menu, i18n("Menu"));
tab->adjustSize();
break;
}
}