1
0
Fork 0

allow RLP communications protocols to be enabled/disabled

This commit is contained in:
Kevin Matz 2022-11-26 12:41:46 -05:00
parent 617b082f96
commit 11d202d51a
3 changed files with 13 additions and 13 deletions

View File

@ -21,6 +21,8 @@ MultiverseView::MultiverseView(QWidget *parent, QSacnNode *node)
ui->actionTerminate->setEnabled(false);
ui->actionUnsubscribe->setEnabled(false);
ui->actionInspect->setEnabled(false);
ui->actionIPv4->setChecked(node->isEnabledIPv4());
ui->actionIPv6->setChecked(node->isEnabledIPv6());
ui->actionDiscovery->setChecked(node->discoveryEnabled());
ui->menubar->setNativeMenuBar(false);
@ -48,6 +50,12 @@ MultiverseView::MultiverseView(QWidget *parent, QSacnNode *node)
connect(ui->actionUACN, &QAction::triggered,
this, &MultiverseView::showUacnEditor);
connect(ui->actionIPv4, &QAction::toggled,
node, &QSacnNode::setIPv4);
connect(ui->actionIPv6, &QAction::toggled,
node, &QSacnNode::setIPv6);
connect(ui->actionInspect, &QAction::triggered,
this, [this]() {
auto selected = ui->multiverseView->currentIndex();

View File

@ -216,12 +216,6 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>IPv4</string>
</property>
@ -236,12 +230,6 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>IPv6</string>
</property>

View File

@ -15,6 +15,8 @@ SacnExplorer::SacnExplorer(int argc, char *argv[])
settings_->beginGroup("ACN");
auto cid = settings_->value("CID", QUuid::createUuid()).toUuid();
auto uacn = settings_->value("UACN", "").toString();
auto ipv4 = settings_->value("IPv4", true).toBool();
auto ipv6 = settings_->value("IPv6", true).toBool();
settings_->endGroup();
settings_->beginGroup("sACN");
settings_->beginGroup("receiver");
@ -23,7 +25,7 @@ SacnExplorer::SacnExplorer(int argc, char *argv[])
settings_->endGroup();
// sACN Node
node_ = new QSacnNode(this, cid, applicationName());
node_ = new QSacnNode(this, cid, applicationName(), ipv4, ipv6);
node_->assignUserName(uacn.toStdString());
qDebug() << "sACN node" << QString(node_->name().c_str()) << "started with CID" << cid.toString();
if (discovery)
@ -54,6 +56,8 @@ void SacnExplorer::saveSettings()
settings_->beginGroup("ACN");
settings_->setValue("CID", node_->cid().string().c_str());
settings_->setValue("UACN", node_->userName().c_str());
settings_->setValue("IPv4", node_->isEnabledIPv4());
settings_->setValue("IPv6", node_->isEnabledIPv6());
settings_->endGroup();
settings_->beginGroup("sACN");
settings_->beginGroup("receiver");