예제 #1
0
PeerData *NewGroupInner::selectedUser() {
	for (ContactsData::const_iterator i = _contactsData.cbegin(), e = _contactsData.cend(); i != e; ++i) {
		if (i.value()->check) {
			return i.key();
		}
	}
	return 0;
}
예제 #2
0
QVector<MTPInputUser> NewGroupInner::selectedInputs() {
	QVector<MTPInputUser> result;
	result.reserve(_contactsData.size());
	for (ContactsData::const_iterator i = _contactsData.cbegin(), e = _contactsData.cend(); i != e; ++i) {
		if (i.value()->check) {
			result.push_back(i.key()->inputUser);
		}
	}
	return result;
}
예제 #3
0
QVector<UserData*> AddParticipantInner::selected() {
	QVector<UserData*> result;
	result.reserve(_contactsData.size());
	for (ContactsData::const_iterator i = _contactsData.cbegin(), e = _contactsData.cend(); i != e; ++i) {
		if (i.value()->check) {
			result.push_back(i.key());
		}
	}
	return result;
}