<?xml version="1.0"?>
<!--
###################################################
##QT GUI Edit Box that sends messages
###################################################
 -->
<block>
  <name>QT GUI Message Edit Box</name>
  <key>qtgui_edit_box_msg</key>
  <import>from PyQt4 import Qt</import>
  <import>from gnuradio import qtgui</import>
  <import>import sip</import>
  <make>#set $win = 'self._%s_win'%$id
qtgui.edit_box_msg($(type.t), $value, $label, $is_pair, $is_static, $key)
self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget)
$(gui_hint() % $win)</make>

  <param>
    <name>Type</name>
    <key>type</key>
    <value>string</value>
    <type>enum</type>
    <option>
      <name>String</name>
      <key>string</key>
      <opt>t:qtgui.STRING</opt>
    </option>
    <option>
      <name>Int</name>
      <key>int</key>
      <opt>t:qtgui.INT</opt>
    </option>
    <option>
      <name>Float</name>
      <key>float</key>
      <opt>t:qtgui.FLOAT</opt>
    </option>
    <option>
      <name>Double</name>
      <key>double</key>
      <opt>t:qtgui.DOUBLE</opt>
    </option>
    <option>
      <name>Complex</name>
      <key>complex</key>
      <opt>t:qtgui.COMPLEX</opt>
    </option>
    <option>
      <name>Int (Vec)</name>
      <key>int_vec</key>
      <opt>t:qtgui.INT_VEC</opt>
    </option>
    <option>
      <name>Float (Vec)</name>
      <key>flt_vec</key>
      <opt>t:qtgui.FLOAT_VEC</opt>
    </option>
    <option>
      <name>Double (Vec)</name>
      <key>dbl_vec</key>
      <opt>t:qtgui.DOUBLE_VEC</opt>
    </option>
    <option>
      <name>Complex (Vec)</name>
      <key>cpx_vec</key>
      <opt>t:qtgui.COMPLEX_VEC</opt>
    </option>
  </param>

  <param>
    <name>Value</name>
    <key>value</key>
    <value></value>
    <type>string</type>
  </param>

  <param>
    <name>Label</name>
    <key>label</key>
    <value></value>
    <type>string</type>
  </param>

  <param>
    <name>Pair Mode</name>
    <key>is_pair</key>
    <value>True</value>
    <type>enum</type>
    <option>
      <name>False</name>
      <key>False</key>
    </option>
    <option>
      <name>True</name>
      <key>True</key>
    </option>
  </param>

  <param>
    <name>Static Mode</name>
    <key>is_static</key>
    <value>True</value>
    <type>enum</type>
    <option>
      <name>False</name>
      <key>False</key>
    </option>
    <option>
      <name>True</name>
      <key>True</key>
    </option>
  </param>

  <param>
    <name>Key</name>
    <key>key</key>
    <value></value>
    <type>string</type>
    <hide>#if $is_pair() == 'True' then 'none' else 'all'#</hide>
  </param>

  <param>
    <name>GUI Hint</name>
    <key>gui_hint</key>
    <value></value>
    <type>gui_hint</type>
    <hide>part</hide>
  </param>

  <!-- If both is_pair and is_static are True, we require a default key.
       If either or both are false, we don't care about a default key.
  -->
  <check>($is_pair and $is_static and len($key) &gt; 0) or not ($is_pair and $is_static)</check>

  <sink>
    <name>val</name>
    <type>message</type>
    <optional>1</optional>
  </sink>

  <source>
    <name>msg</name>
    <type>message</type>
    <optional>1</optional>
  </source>

  <doc>
The GUI hint can be used to position the widget within the application. \
The hint is of the form [tab_id@tab_index]: [row, col, row_span, col_span]. \
Both the tab specification and the grid position are optional.
  </doc>
</block>
