mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 14:15:35 +08:00
refs #273, added methods for CSimulatorInfoList
This commit is contained in:
@@ -8,8 +8,22 @@
|
|||||||
namespace BlackSim
|
namespace BlackSim
|
||||||
{
|
{
|
||||||
|
|
||||||
CSimulatorInfoList::CSimulatorInfoList()
|
CSimulatorInfoList::CSimulatorInfoList() { }
|
||||||
|
|
||||||
|
bool CSimulatorInfoList::supportsSimulator(const CSimulatorInfo &info)
|
||||||
{
|
{
|
||||||
|
return this->contains(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList CSimulatorInfoList::toStringList(bool i18n) const
|
||||||
|
{
|
||||||
|
QStringList infoList;
|
||||||
|
foreach(CSimulatorInfo info, (*this))
|
||||||
|
{
|
||||||
|
QString i = info.toQString(i18n);
|
||||||
|
infoList.append(i);
|
||||||
|
}
|
||||||
|
return infoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace BlackSim
|
} // namespace BlackSim
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "simulatorinfo.h"
|
#include "simulatorinfo.h"
|
||||||
#include "blackmisc/sequence.h"
|
#include "blackmisc/sequence.h"
|
||||||
#include "blackmisc/collection.h"
|
#include "blackmisc/collection.h"
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
namespace BlackSim
|
namespace BlackSim
|
||||||
{
|
{
|
||||||
@@ -28,6 +29,12 @@ namespace BlackSim
|
|||||||
{
|
{
|
||||||
return QVariant::fromValue(*this);
|
return QVariant::fromValue(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Is simulator supported
|
||||||
|
bool supportsSimulator(const CSimulatorInfo &info);
|
||||||
|
|
||||||
|
//! String list with meaningful representations
|
||||||
|
QStringList toStringList(bool i18n = false) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user