本文整理汇总了C++中UserInfo::getPhoneInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ UserInfo::getPhoneInfo方法的具体用法?C++ UserInfo::getPhoneInfo怎么用?C++ UserInfo::getPhoneInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserInfo
的用法示例。
在下文中一共展示了UserInfo::getPhoneInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: contextMenuEvent
/*! \brief display the context Menu
*/
void ExtendedTableWidget::contextMenuEvent(QContextMenuEvent * event)
{
qDebug() << Q_FUNC_INFO << event;
qDebug() << " " << event->pos();
QTableWidgetItem *item = itemAt(event->pos());
QAction *action;
if (item) {
event->accept();
QMenu contextMenu( this );
if (m_editable) {
action = contextMenu.addAction(tr("&Remove"), this, SLOT(remove()));
action->setProperty("row", row(item));
}
if (m_re_number.exactMatch(item->text())) {
action = contextMenu.addAction(tr("&Dial"), this, SLOT(dialNumber()));
action->setProperty("number", item->text());
QMenu *transferMenu = new QMenu(tr("Direct &Transfer"), &contextMenu);
QMenu *indirectTransferMenu = new QMenu(tr("&Indirect Transfer"), &contextMenu);
UserInfo *ui = b_engine->getXivoClientUser();
if (ui) {
foreach (const QString phone, ui->phonelist()) {
const PhoneInfo * pi = ui->getPhoneInfo( phone );
if (pi) {
QMapIterator<QString, QVariant> it( pi->comms() );
while(it.hasNext()) {
it.next();
QMap<QString, QVariant> call = it.value().toMap();
// Add the transfer entry with the callerid name and num
QString text;
if (call.contains("calleridname")) {
text.append( call["calleridname"].toString() );
text.append(" : ");
}
text.append(call["calleridnum"].toString() );
action = transferMenu->addAction(text, this, SLOT(dtransfer()));
action->setProperty("chan", call["peerchannel"]);
action->setProperty("number", item->text());
action = indirectTransferMenu->addAction(text, this, SLOT(itransfer()));
action->setProperty("chan", call["thischannel"]);
action->setProperty("number", item->text());
}
}
}
}
if (!transferMenu->isEmpty()) {
contextMenu.addMenu(transferMenu);
}
if (!indirectTransferMenu->isEmpty()) {
contextMenu.addMenu(indirectTransferMenu);
}
} else if(item->text().contains("@")) { // this is an email address