本文整理汇总了C++中UserWnd::getLongName方法的典型用法代码示例。如果您正苦于以下问题:C++ UserWnd::getLongName方法的具体用法?C++ UserWnd::getLongName怎么用?C++ UserWnd::getLongName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserWnd
的用法示例。
在下文中一共展示了UserWnd::getLongName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: contactSelected
void Container::contactSelected(int)
{
UserWnd *userWnd = m_tabBar ? m_tabBar->currentWnd() : 0;
if (userWnd == NULL)
return;
m_wnds->raiseWidget(userWnd);
userWnd->setFocus();
m_bar->setParam((void*)userWnd->id());
Command cmd;
cmd->id = CmdContainerContact;
cmd->text_wrk = userWnd->getName();
cmd->icon = userWnd->getIcon();
cmd->param = (void*)(userWnd->id());
cmd->popup_id = MenuContainerContact;
cmd->flags = BTN_PICT;
EventCommandChange e(cmd);
e.setNoProcess();
m_bar->processEvent(&e);
setMessageType(userWnd->type());
setIcon(Pict(cmd->icon));
setCaption(userWnd->getLongName());
m_bar->checkState();
m_status->message(userWnd->status());
if (isActiveWindow())
userWnd->markAsRead();
if (CorePlugin::m_plugin->getShowAvatarInContainer()) {
Client *client = NULL;
unsigned j=0;
QImage img;
while (j < getContacts()->nClients()){
client = getContacts()->getClient(j++);
img = client->userPicture(userWnd->id());
if (!img.isNull())
break;
}
if (!img.isNull()) {
m_avatar_label.setPixmap(img);
if (!m_avatar_label.isVisible())
m_avatar_window.show();
} else {
m_avatar_label.clear();
m_avatar_window.hide();
}
} else {
m_avatar_label.clear();
m_avatar_window.hide();
}
}
示例2: contactChanged
void Container::contactChanged(Contact *contact)
{
UserWnd *userWnd = NULL;
if (m_tabBar){
userWnd = m_tabBar->currentWnd();
}else if (!m_childs.empty()){
userWnd = m_childs.front();
}
if (userWnd && contact && (contact->id() == userWnd->id())){
Command cmd;
cmd->id = CmdContainerContact;
cmd->text_wrk = userWnd->getName();
cmd->icon = userWnd->getIcon();
cmd->param = (void*)(contact->id());
cmd->popup_id = MenuContainerContact;
cmd->flags = BTN_PICT;
EventCommandChange e(cmd);
m_bar->processEvent(&e);
e.setNoProcess();
setIcon(Pict(cmd->icon));
setCaption(userWnd->getLongName());
}
}