mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #303 Simulator table view
* Simulator component * Name / variant pair object / view / model
This commit is contained in:
@@ -24,6 +24,29 @@ namespace BlackMisc
|
||||
CSequence<CNameVariantPair>(other)
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Name contained?
|
||||
*/
|
||||
bool CNameVariantPairList::containsName(const QString &name)
|
||||
{
|
||||
return this->contains(&CNameVariantPair::getName, name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Name index
|
||||
*/
|
||||
int CNameVariantPairList::getNameRowIndex(const QString &name)
|
||||
{
|
||||
for (int i = 0; i < this->size(); i++)
|
||||
{
|
||||
if ((*this)[i].getName() == name)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user