8 using namespace swift::misc::network;
12 CEcosystemComboBox::CEcosystemComboBox(QWidget *parent) : QComboBox(parent) { this->initAllItems(); }
15 : QComboBox(parent), m_systems(systems)
22 if (this->currentIndex() < 0 || this->currentIndex() >= m_systems.
size()) {
return CEcosystem(); }
23 return m_systems[this->currentIndex()];
37 void CEcosystemComboBox::initAllItems()
40 for (
const CEcosystem &e : m_systems) { this->addItem(e.getSystemString()); }
swift::misc::network::CEcosystem getSelectedEcosystem() const
The selected ecosystem.
CEcosystemComboBox(QWidget *parent=nullptr)
Constructor.
void setCurrentEcosystem(const swift::misc::network::CEcosystem &ecosystem)
Set current system.
void setEcosystems(const swift::misc::network::CEcosystemList &systems)
Set the supported systems.
bool contains(const T &object) const
Return true if there is an element equal to given object. Uses the most efficient implementation avai...
size_type size() const
Returns number of elements in the sequence.
Ecosystem of server belonging together.
const QString & getSystemString() const
Get the system string.
Value object encapsulating a list of voice rooms.