2 #include <Device/Protocol/ProtocolSettingsWidget.hpp>
4 #include <Protocols/NetworkWidgets/TCPWidget.hpp>
6 #include <ossia/network/sockets/configuration.hpp>
20 auto layout =
new QFormLayout{
this};
21 layout->setContentsMargins(0, 0, 0, 0);
23 m_remotePort =
new QSpinBox(
this);
24 m_remotePort->setRange(0, 65535);
25 m_remotePort->setValue(9996);
26 proto.checkForChanges(m_remotePort);
28 m_framing =
new QComboBox{
this};
29 m_framing->addItems({
"Size prefixing",
"SLIP"});
30 m_framing->setCurrentIndex(1);
32 layout->addRow(tr(
"Port"), m_remotePort);
33 layout->addRow(tr(
"Framing"), m_framing);
36 framing_type framing()
const noexcept
38 return (framing_type)m_framing->currentIndex();
41 ossia::net::tcp_server_configuration settings()
const noexcept
43 ossia::net::tcp_server_configuration conf;
44 conf.port = m_remotePort->value();
49 const ossia::net::osc_protocol_configuration& c,
50 const ossia::net::tcp_server_configuration& conf)
52 m_remotePort->setValue(conf.port);
53 m_framing->setCurrentIndex(c.framing);
57 QSpinBox* m_remotePort{};
58 QComboBox* m_framing{};