SwitchSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings) : ComboBoxSetting(this), m_node(node), m_settings(settings) { setLabel(node.GetDescription()); setHelpText(DeviceTree::tr("Choose a port to use for this switch.")); uint num_children = node.GetChildCount(); for (uint ch = 0; ch < num_children; ch++) { QString val = QString("%1").arg(ch); QString descr = DeviceTree::tr("Port %1").arg(ch+1); DiSEqCDevDevice *child = node.GetChild(ch); if (child) descr += QString(" (%2)").arg(child->GetDescription()); addSelection(descr, val); } }
RotorSetting(DiSEqCDevDevice &node, DiSEqCDevSettings &settings) : ComboBoxSetting(this), m_node(node), m_settings(settings) { setLabel(node.GetDescription()); setHelpText(DeviceTree::tr("Choose a satellite position.")); DiSEqCDevRotor *rotor = dynamic_cast<DiSEqCDevRotor*>(&m_node); if (rotor) m_posmap = rotor->GetPosMap(); }