This is a combobox with a method to populate it with names of services providing one of a set of specified interfaces.
More...
#include <fw/ServiceSelectorBox.h>
This is a combobox with a method to populate it with names of services providing one of a set of specified interfaces.
Frequently call updateServices() to keep the list of available services valid.
◆ ServiceSelectorBox()
◆ setInterface()
void setInterface |
( |
const std::string & |
interface | ) |
|
|
inline |
Set an interface to find services for.
◆ setInterfaces()
void setInterfaces |
( |
const std::vector< std::string > & |
interfaces | ) |
|
|
inline |
Set multiple interfaces to find (union of) services for.
◆ preferInitially()
void preferInitially |
( |
const std::string & |
service | ) |
|
|
inline |
Set a specific service to select automatically when it is discovered for the first time.
◆ updateServices()
Query available services for the selected interface and update the combobox.
If the previously selected service is still available, it remains selected.
This should be called in the Qt thread (so it does not need locking against signal/slot selected()).
◆ getSelectedService()
std::string getSelectedService |
( |
| ) |
|
Get the name of the selected service.
Not protected against updateServices(). If this is to be called in a different thread, the caller must handle locking.
◆ selected [1/2]
void selected |
( |
std::string |
service | ) |
|
|
signal |
◆ selected [2/2]
void selected |
( |
int |
index | ) |
|
|
inlineprotectedslot |
◆ mInterfaces
std::vector<std::string> mInterfaces |
|
protected |
◆ mServices
std::vector<std::string> mServices |
|
protected |
◆ mPreferedService
std::string mPreferedService |
|
protected |
The documentation for this class was generated from the following file: