Esempio n. 1
0
const SContact *CContactModel::getContact(quint32 id) const
{
    int index = indexOfContact(id);
    if (index < 0) {
        return nullptr;
    }

    return contactAt(index);
}
Esempio n. 2
0
ContactSet BuddiesListView::selectedContacts() const
{
	ContactSet result;

	QModelIndexList selectionList = selectedIndexes();
	foreach (const QModelIndex &selection, selectionList)
	{
		Contact contact = contactAt(selection);
		if (contact)
			result.insert(contact);
	}
Esempio n. 3
0
Contact BuddiesListView::currentContact() const
{
	return contactAt(currentIndex());
}