32 : IUAVGadgetConfiguration(classId, parent)
36 qRegisterMetaType<IPConnectionConfiguration::Protocol>();
58 settings->beginGroup(QLatin1String(
"IPConnection"));
59 settings->beginWriteArray(
"Hosts");
61 for (
int i = 0;
i < m_hosts.count();
i++) {
62 settings->setArrayIndex(
i);
63 settings->setValue(
"hostname", m_hosts.at(
i).hostname);
64 settings->setValue(
"port", m_hosts.at(
i).port);
65 settings->setValue(
"protocol", m_hosts.at(
i).protocol);
76 settings->beginGroup(QLatin1String(
"IPConnection"));
77 int elements = qMax<int>(settings->beginReadArray(
"Hosts"), 1);
78 for (
int i = 0;
i < elements;
i++) {
79 settings->setArrayIndex(
i);
81 host.
hostname = settings->value(
"hostname",
"localhost").toString();
82 host.
port = settings->value(
"port", 9000).toInt();
void setHosts(QVector< Host > &hosts)
virtual ~IPConnectionConfiguration()
static ICore * instance()
IPConnectionConfiguration(QString classId, QSettings *qSettings=nullptr, QObject *parent=nullptr)
IUAVGadgetConfiguration * clone()
virtual QSettings * settings(QSettings::Scope scope=QSettings::UserScope) const =0
Returns the application's main settings object.