1id: qtgui_const_sink_x
2label: QT GUI Constellation Sink
3flags: [ python ]
4
5parameters:
6-   id: type
7    label: Type
8    dtype: enum
9    default: complex
10    options: [complex, msg_complex]
11    option_labels: [Complex, Complex Message]
12    option_attributes:
13        fcn: [const_sink_c, const_sink_c]
14        t: [complex, message]
15    hide: part
16-   id: name
17    label: Name
18    dtype: string
19    default: '""'
20    hide: ${ ('none' if len(name) > 0 else 'part') }
21-   id: size
22    label: Number of Points
23    dtype: int
24    default: '1024'
25    hide: ${ ('all' if type.startswith('msg')  else 'none') }
26-   id: grid
27    label: Grid
28    dtype: enum
29    default: 'False'
30    options: ['True', 'False']
31    option_labels: ['Yes', 'No']
32    hide: part
33-   id: autoscale
34    label: Autoscale
35    dtype: enum
36    default: 'False'
37    options: ['True', 'False']
38    option_labels: ['Yes', 'No']
39-   id: ymin
40    label: Y min
41    dtype: real
42    default: '-2'
43    hide: part
44-   id: ymax
45    label: Y max
46    dtype: real
47    default: '2'
48    hide: part
49-   id: xmin
50    label: X min
51    dtype: real
52    default: '-2'
53    hide: part
54-   id: xmax
55    label: X max
56    dtype: real
57    default: '2'
58    hide: part
59-   id: nconnections
60    label: Number of Inputs
61    dtype: int
62    default: '1'
63    hide: ${ ('all' if type.startswith('msg') else 'part') }
64-   id: update_time
65    label: Update Period
66    dtype: real
67    default: '0.10'
68    hide: part
69-   id: gui_hint
70    label: GUI Hint
71    dtype: gui_hint
72    hide: part
73-   id: tr_mode
74    label: Trigger Mode
75    category: Trigger
76    dtype: enum
77    default: qtgui.TRIG_MODE_FREE
78    options: [qtgui.TRIG_MODE_FREE, qtgui.TRIG_MODE_AUTO, qtgui.TRIG_MODE_NORM, qtgui.TRIG_MODE_TAG]
79    option_labels: [Free, Auto, Normal, Tag]
80    hide: part
81-   id: tr_slope
82    label: Trigger Slope
83    category: Trigger
84    dtype: enum
85    default: qtgui.TRIG_MODE_POS
86    options: [qtgui.TRIG_SLOPE_POS, qtgui.TRIG_SLOPE_NEG]
87    option_labels: [Positive, Negative]
88    hide: part
89-   id: tr_level
90    label: Trigger Level
91    category: Trigger
92    dtype: float
93    default: '0.0'
94    hide: part
95-   id: tr_chan
96    label: Trigger Channel
97    category: Trigger
98    dtype: int
99    default: '0'
100    hide: part
101-   id: tr_tag
102    label: Trigger Tag Key
103    category: Trigger
104    dtype: string
105    default: '""'
106    hide: part
107-   id: legend
108    label: Legend
109    category: Config
110    dtype: enum
111    default: 'True'
112    options: ['True', 'False']
113    option_labels: ['Yes', 'No']
114    hide: part
115-   id: axislabels
116    label: Axis Labels
117    category: Config
118    dtype: enum
119    default: 'True'
120    options: ['True', 'False']
121    option_labels: ['Yes', 'No']
122    hide: part
123-   id: label1
124    label: Line 1 Label
125    category: Config
126    dtype: string
127    hide: ${ ('part' if int(nconnections) >= 1 else 'all') }
128-   id: width1
129    label: Line 1 Width
130    category: Config
131    dtype: int
132    default: '1'
133    hide: ${ ('part' if int(nconnections) >= 1 else 'all') }
134-   id: color1
135    label: Line 1 Color
136    category: Config
137    dtype: enum
138    options: ['"blue"', '"red"', '"green"', '"black"', '"cyan"', '"magenta"', '"yellow"',
139        '"dark red"', '"dark green"', '"Dark Blue"']
140    option_labels: [Blue, Red, Green, Black, Cyan, Magenta, Yellow, Dark Red, Dark
141            Green, Dark Blue]
142    hide: ${ ('part' if int(nconnections) >= 1 else 'all') }
143-   id: style1
144    label: Line 1 Style
145    category: Config
146    dtype: enum
147    options: ['0', '1', '2', '3', '4', '5']
148    option_labels: [None, Solid, Dash, Dots, Dash-Dot, Dash-Dot-Dot]
149    hide: ${ ('part' if int(nconnections) >= 1 else 'all') }
150-   id: marker1
151    label: Line 1 Marker
152    category: Config
153    dtype: enum
154    options: ['0', '1', '2', '3', '4', '6', '7', '8', '9', '-1']
155    option_labels: [Circle, Rectangle, Diamond, Triangle, Down Triangle, Left Triangle,
156        Right Triangle, Cross, X-Cross, None]
157    hide: ${ ('part' if int(nconnections) >= 1 else 'all') }
158-   id: alpha1
159    label: Line 1 Alpha
160    category: Config
161    dtype: float
162    default: '1.0'
163    hide: ${ ('part' if int(nconnections) >= 1 else 'all') }
164-   id: label2
165    label: Line 2 Label
166    base_key: label1
167    hide: ${ ('part' if int(nconnections) >= 2 else 'all') }
168-   id: width2
169    label: Line 2 Width
170    base_key: width1
171    hide: ${ ('part' if int(nconnections) >= 2 else 'all') }
172-   id: color2
173    label: Line 2 Color
174    base_key: color1
175    default: '"red"'
176    hide: ${ ('part' if int(nconnections) >= 2 else 'all') }
177-   id: style2
178    label: Line 2 Style
179    base_key: style1
180    hide: ${ ('part' if int(nconnections) >= 2 else 'all') }
181-   id: marker2
182    label: Line 2 Marker
183    base_key: marker1
184    hide: ${ ('part' if int(nconnections) >= 2 else 'all') }
185-   id: alpha2
186    label: Line 2 Alpha
187    base_key: alpha1
188    hide: ${ ('part' if int(nconnections) >= 2 else 'all') }
189-   id: label3
190    label: Line 3 Label
191    base_key: label1
192    hide: ${ ('part' if int(nconnections) >= 3 else 'all') }
193-   id: width3
194    label: Line 3 Width
195    base_key: width1
196    hide: ${ ('part' if int(nconnections) >= 3 else 'all') }
197-   id: color3
198    label: Line 3 Color
199    base_key: color1
200    default: '"red"'
201    hide: ${ ('part' if int(nconnections) >= 3 else 'all') }
202-   id: style3
203    label: Line 3 Style
204    base_key: style1
205    hide: ${ ('part' if int(nconnections) >= 3 else 'all') }
206-   id: marker3
207    label: Line 3 Marker
208    base_key: marker1
209    hide: ${ ('part' if int(nconnections) >= 3 else 'all') }
210-   id: alpha3
211    label: Line 3 Alpha
212    base_key: alpha1
213    hide: ${ ('part' if int(nconnections) >= 3 else 'all') }
214-   id: label4
215    label: Line 4 Label
216    base_key: label1
217    hide: ${ ('part' if int(nconnections) >= 4 else 'all') }
218-   id: width4
219    label: Line 4 Width
220    base_key: width1
221    hide: ${ ('part' if int(nconnections) >= 4 else 'all') }
222-   id: color4
223    label: Line 4 Color
224    base_key: color1
225    default: '"red"'
226    hide: ${ ('part' if int(nconnections) >= 4 else 'all') }
227-   id: style4
228    label: Line 4 Style
229    base_key: style1
230    hide: ${ ('part' if int(nconnections) >= 4 else 'all') }
231-   id: marker4
232    label: Line 4 Marker
233    base_key: marker1
234    hide: ${ ('part' if int(nconnections) >= 4 else 'all') }
235-   id: alpha4
236    label: Line 4 Alpha
237    base_key: alpha1
238    hide: ${ ('part' if int(nconnections) >= 4 else 'all') }
239-   id: label5
240    label: Line 5 Label
241    base_key: label1
242    hide: ${ ('part' if int(nconnections) >= 5 else 'all') }
243-   id: width5
244    label: Line 5 Width
245    base_key: width1
246    hide: ${ ('part' if int(nconnections) >= 5 else 'all') }
247-   id: color5
248    label: Line 5 Color
249    base_key: color1
250    default: '"red"'
251    hide: ${ ('part' if int(nconnections) >= 5 else 'all') }
252-   id: style5
253    label: Line 5 Style
254    base_key: style1
255    hide: ${ ('part' if int(nconnections) >= 5 else 'all') }
256-   id: marker5
257    label: Line 5 Marker
258    base_key: marker1
259    hide: ${ ('part' if int(nconnections) >= 5 else 'all') }
260-   id: alpha5
261    label: Line 5 Alpha
262    base_key: alpha1
263    hide: ${ ('part' if int(nconnections) >= 5 else 'all') }
264-   id: label6
265    label: Line 6 Label
266    base_key: label1
267    hide: ${ ('part' if int(nconnections) >= 6 else 'all') }
268-   id: width6
269    label: Line 6 Width
270    base_key: width1
271    hide: ${ ('part' if int(nconnections) >= 6 else 'all') }
272-   id: color6
273    label: Line 6 Color
274    base_key: color1
275    default: '"red"'
276    hide: ${ ('part' if int(nconnections) >= 6 else 'all') }
277-   id: style6
278    label: Line 6 Style
279    base_key: style1
280    hide: ${ ('part' if int(nconnections) >= 6 else 'all') }
281-   id: marker6
282    label: Line 6 Marker
283    base_key: marker1
284    hide: ${ ('part' if int(nconnections) >= 6 else 'all') }
285-   id: alpha6
286    label: Line 6 Alpha
287    base_key: alpha1
288    hide: ${ ('part' if int(nconnections) >= 6 else 'all') }
289-   id: label7
290    label: Line 7 Label
291    base_key: label1
292    hide: ${ ('part' if int(nconnections) >= 7 else 'all') }
293-   id: width7
294    label: Line 7 Width
295    base_key: width1
296    hide: ${ ('part' if int(nconnections) >= 7 else 'all') }
297-   id: color7
298    label: Line 7 Color
299    base_key: color1
300    default: '"red"'
301    hide: ${ ('part' if int(nconnections) >= 7 else 'all') }
302-   id: style7
303    label: Line 7 Style
304    base_key: style1
305    hide: ${ ('part' if int(nconnections) >= 7 else 'all') }
306-   id: marker7
307    label: Line 7 Marker
308    base_key: marker1
309    hide: ${ ('part' if int(nconnections) >= 7 else 'all') }
310-   id: alpha7
311    label: Line 7 Alpha
312    base_key: alpha1
313    hide: ${ ('part' if int(nconnections) >= 7 else 'all') }
314-   id: label8
315    label: Line 8 Label
316    base_key: label1
317    hide: ${ ('part' if int(nconnections) >= 8 else 'all') }
318-   id: width8
319    label: Line 8 Width
320    base_key: width1
321    hide: ${ ('part' if int(nconnections) >= 8 else 'all') }
322-   id: color8
323    label: Line 8 Color
324    base_key: color1
325    default: '"red"'
326    hide: ${ ('part' if int(nconnections) >= 8 else 'all') }
327-   id: style8
328    label: Line 8 Style
329    base_key: style1
330    hide: ${ ('part' if int(nconnections) >= 8 else 'all') }
331-   id: marker8
332    label: Line 8 Marker
333    base_key: marker1
334    hide: ${ ('part' if int(nconnections) >= 8 else 'all') }
335-   id: alpha8
336    label: Line 8 Alpha
337    base_key: alpha1
338    hide: ${ ('part' if int(nconnections) >= 8 else 'all') }
339-   id: label9
340    label: Line 9 Label
341    base_key: label1
342    hide: ${ ('part' if int(nconnections) >= 9 else 'all') }
343-   id: width9
344    label: Line 9 Width
345    base_key: width1
346    hide: ${ ('part' if int(nconnections) >= 9 else 'all') }
347-   id: color9
348    label: Line 9 Color
349    base_key: color1
350    default: '"red"'
351    hide: ${ ('part' if int(nconnections) >= 9 else 'all') }
352-   id: style9
353    label: Line 9 Style
354    base_key: style1
355    hide: ${ ('part' if int(nconnections) >= 9 else 'all') }
356-   id: marker9
357    label: Line 9 Marker
358    base_key: marker1
359    hide: ${ ('part' if int(nconnections) >= 9 else 'all') }
360-   id: alpha9
361    label: Line 9 Alpha
362    base_key: alpha1
363    hide: ${ ('part' if int(nconnections) >= 9 else 'all') }
364-   id: label10
365    label: Line 10 Label
366    base_key: label1
367    hide: ${ ('part' if int(nconnections) >= 10 else 'all') }
368-   id: width10
369    label: Line 10 Width
370    base_key: width1
371    hide: ${ ('part' if int(nconnections) >= 10 else 'all') }
372-   id: color10
373    label: Line 10 Color
374    base_key: color1
375    default: '"red"'
376    hide: ${ ('part' if int(nconnections) >= 10 else 'all') }
377-   id: style10
378    label: Line 10 Style
379    base_key: style1
380    hide: ${ ('part' if int(nconnections) >= 10 else 'all') }
381-   id: marker10
382    label: Line 10 Marker
383    base_key: marker1
384    hide: ${ ('part' if int(nconnections) >= 10 else 'all') }
385-   id: alpha10
386    label: Line 10 Alpha
387    base_key: alpha1
388    hide: ${ ('part' if int(nconnections) >= 10 else 'all') }
389
390inputs:
391-   domain: stream
392    dtype: ${ type.t }
393    multiplicity: ${ (0 if type.startswith('msg') else nconnections) }
394    optional: ${ (True if type.startswith('msg') else False) }
395
396templates:
397    imports: |-
398        from PyQt5 import Qt
399        from gnuradio import qtgui
400        import sip
401    callbacks:
402    - set_update_time(${update_time})
403    - self.${id}.set_trigger_mode(${tr_mode}, ${tr_slope}, ${tr_level}, ${tr_chan},
404        ${tr_tag})
405    make: |-
406        <%
407            win = 'self._%s_win'%id
408        %>\
409        qtgui.${type.fcn}(
410            ${size}, #size
411            ${name}, #name
412            ${0 if type.startswith('msg') else nconnections} #number of inputs
413        )
414        self.${id}.set_update_time(${update_time})
415        self.${id}.set_y_axis(${ymin}, ${ymax})
416        self.${id}.set_x_axis(${xmin}, ${xmax})
417        self.${id}.set_trigger_mode(${tr_mode}, ${tr_slope}, ${tr_level}, ${tr_chan}, ${tr_tag})
418        self.${id}.enable_autoscale(${autoscale})
419        self.${id}.enable_grid(${grid})
420        self.${id}.enable_axis_labels(${axislabels})
421
422        % if legend == "False":
423        self.${id}.disable_legend()
424        % endif
425
426        labels = [${label1}, ${label2}, ${label3}, ${label4}, ${label5},
427            ${label6}, ${label7}, ${label8}, ${label9}, ${label10}]
428        widths = [${width1}, ${width2}, ${width3}, ${width4}, ${width5},
429            ${width6}, ${width7}, ${width8}, ${width9}, ${width10}]
430        colors = [${color1}, ${color2}, ${color3}, ${color4}, ${color5},
431            ${color6}, ${color7}, ${color8}, ${color9}, ${color10}]
432        styles = [${style1}, ${style2}, ${style3}, ${style4}, ${style5},
433            ${style6}, ${style7}, ${style8}, ${style9}, ${style10}]
434        markers = [${marker1}, ${marker2}, ${marker3}, ${marker4}, ${marker5},
435            ${marker6}, ${marker7}, ${marker8}, ${marker9}, ${marker10}]
436        alphas = [${alpha1}, ${alpha2}, ${alpha3}, ${alpha4}, ${alpha5},
437            ${alpha6}, ${alpha7}, ${alpha8}, ${alpha9}, ${alpha10}]
438
439        for i in range(${1 if type.startswith('msg') else nconnections}):
440            if len(labels[i]) == 0:
441                self.${id}.set_line_label(i, "Data {0}".format(i))
442            else:
443                self.${id}.set_line_label(i, labels[i])
444            self.${id}.set_line_width(i, widths[i])
445            self.${id}.set_line_color(i, colors[i])
446            self.${id}.set_line_style(i, styles[i])
447            self.${id}.set_line_marker(i, markers[i])
448            self.${id}.set_line_alpha(i, alphas[i])
449
450        self._${id}_win = sip.wrapinstance(self.${id}.pyqwidget(), Qt.QWidget)
451        ${gui_hint() % win}
452
453documentation: |-
454    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.
455
456file_format: 1
457