QT GUI Range: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This block creates a variable with a slider. The ID will be the variable name, so use that ID as a parameter in another block to make it adjustable in real-time.
This block creates a variable with a choice of widgets. The variable can be given a default value and its value can be changed at runtime within a specified range.


Leave the label blank to use the variable id as the label.      
The ID will be the variable name, so that ID can be used as a parameter in another block to make it adjustable in real-time.


The default value must be between the start and the stop.
Leave the label blank to use the variable id as the label.    


See [[GUI Hint]] for how to position the GUI within a window.
This block does not support C++ output, so it cannot be used when the output language of a flowgraph in GRC is C++.


[[File:Gui-range-ex.png]]
== Parameters ==
 
; Id (''R'')
: ID of the variable
 
; Label
: The label of the variable
 
; Type
:* float
:* int
 
; Default Value (''R'')
: The default value must be between the start and stop values.
 
; Start
: The starting value of the variable
 
; Stop
: The ending value of the variable
 
; Step
: The increment in the variable's values that will be shown on the widget
 
; Widget
:* Counter + Slider
:* Counter
:* Slider
:* Knob
 
; Minimum length
:
 
; GUI hint
: See [[GUI Hint]] for how to position the GUI within a window.
 
== Example Flowgraph ==
The following flowgraph has three QT GUI Range blocks for the variables 'volume', 'tuning', and 'sq_lvl'.
 
[[File:FunCube_2_meter_NB_FM_fg.png|800px]]
 
The run-time window shows the three QT GUI Range widgets.
 
[[File:FunCube_2_meter_NB_FM_out.png|600px]]
 
== Source Files ==
; Block definition
: [https://github.com/gnuradio/gnuradio/blob/main/gr-qtgui/grc/qtgui_range.block.yml qtgui_range.block.yml]
 
[[Category:Block Docs]]

Latest revision as of 11:26, 10 February 2022

This block creates a variable with a choice of widgets. The variable can be given a default value and its value can be changed at runtime within a specified range.

The ID will be the variable name, so that ID can be used as a parameter in another block to make it adjustable in real-time.

Leave the label blank to use the variable id as the label.

This block does not support C++ output, so it cannot be used when the output language of a flowgraph in GRC is C++.

Parameters

Id (R)
ID of the variable
Label
The label of the variable
Type
  • float
  • int
Default Value (R)
The default value must be between the start and stop values.
Start
The starting value of the variable
Stop
The ending value of the variable
Step
The increment in the variable's values that will be shown on the widget
Widget
  • Counter + Slider
  • Counter
  • Slider
  • Knob
Minimum length
GUI hint
See GUI Hint for how to position the GUI within a window.

Example Flowgraph

The following flowgraph has three QT GUI Range blocks for the variables 'volume', 'tuning', and 'sq_lvl'.

FunCube 2 meter NB FM fg.png

The run-time window shows the three QT GUI Range widgets.

FunCube 2 meter NB FM out.png

Source Files

Block definition
qtgui_range.block.yml