summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/number_sink_impl.cc
Commit message (Collapse)AuthorAgeFilesLines
* qtgui: Replace pyqwidget() with qwidget()David Winter2021-09-031-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, two versions of the `qtwidget` functions existed, `qwidget()` and `pyqwidget()`, with the only difference being that `qwidget()` returned a pointer to the `QWidget` object managed by the corresponding block, while `pyqwidget()` returned that same pointer, but as an integer (Or `PyLong` in this case). While `qwidget()` is used by C++ code accessing the widgets, `pyqwidget()` is only used for the python interface. This makes these two methods redundant, thus this commit entirely removes `pyqwidget()`, and modifies the `qwidget()` python wrapper to behave like `pyqwidget()`. Note that we can be fairly confident that this change will not effect potential users of `qwidget()`, because any invocation on the objects previously returned by `qwidget()` would cause a segmentation fault. This commit also fixes a memory leak: Internally, the `pyqwidget()` functions were returning a PyLong `PyObject *`, which was then upwrapped in a pybind trampoline without decrementing the reference count of that python object. Signed-off-by: David Winter <david.winter@analog.com>
* gr-qtgui: fix invalid pointerVolker Schroer2021-06-011-7/+1
| | | | Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* qtgui: Remove manual memory managementThomas Habets2021-02-261-10/+0
| | | | Signed-off-by: Thomas Habets <thomas@habets.se>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | run /usr/share/clang/run-clang-tidy.py -checks=file '-header-filter=.*' -fix .. from build directory. Then, clang-format -i $(git diff --name-only origin/master) to clang-format changed files. Then, refresh all header hashes in pybind bindings (*/python/bindings/*.cc) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* gr-qtgui number sink: Honor block setting of 'avg' in GUIJeff Long2021-01-041-0/+2
| | | | | | | | | | | | | | | GUI was overriding block parameter (setting to 0) at init. - Use block parameter for 'avg' - Add callback for 'avg' to yml It is still possible to set the avg from the GUI middle click. The menu value is not updated when avg is set from a block parameter (there is no slot in the widget to do this). If the user creates a GRC file with a widget (e.g., entry) to set avg, and also sets it via the menu, the values shown will not match. However, the value can be successfully set either way. Signed-off-by: Jeff Long <willcode4@gmail.com>
* Replace all calls to `get_initial_sptr` with `make_block_sptr`Thomas Habets2020-07-301-2/+2
| | | | | | | | | | | | | | First batch of changes: ``` find […] -print0 | xargs -0 sed -i -r '/get_initial_sptr/{:nxt N;/;/!b nxt;s/get_initial_sptr\(\s*new ([^(]+)(.*)\)\)/make_block_sptr<\1>\2)/}' ``` Then: * Back out `sptr_magic.h` edits * Change some `friend` clauses * clang-format the whole thing * Update checksums in the pybind11 bindings files
* Update license header to SPDX formatdevnulling2020-01-271-13/+1
|
* clang-format: Ordering all the includesMarcus Müller2019-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format: ordering includes in gnuradio-runtime clang-format: ordering includes in gr-filter clang-format: ordering includes in gr-fft clang-format: ordering includes in gr-audio clang-format: ordering includes in gr-analog clang-format: ordering includes in gr-fec clang-format: ordering includes in gr-wavelet clang-format: ordering includes in gr-zeromq clang-format: ordering includes in gr-vocoder clang-format: ordering includes in gr-video-sdl clang-format: ordering includes in gr-trellis clang-format: ordering includes in gr-blocks clang-format: ordering includes in gr-digital clang-format: ordering includes in gr-uhd clang-format: ordering includes in gr-dtv clang-format: ordering includes in gr-channels clang-format: ordering includes in gr-qtgui clang_format.py: re-enable include reordering
* Tree: clang-format without the include sortingMarcus Müller2019-08-091-282/+216
|
* Use unsigned integers where dealing with indicesMarcus Müller2018-08-281-14/+14
| | | | | This is to improve quality of warnings when trying to pass negative indices.
* cleanup: add missing includes + reorder qtgui includes correctlyAndrej Rode2018-03-041-2/+5
|
* qtgui: fixed an issue with the number sink mistreating non-float inputs.Tom Rondeau2014-10-161-4/+30
| | | | Dealing with ints will require an api change.
* Merge branch 'maint'Johnathan Corgan2014-08-261-0/+9
|\
| * qtgui: accounted for MSVC having _finite() instead of std::isfinite()Nicholas Corgan2014-08-071-0/+9
| |
* | Merge branch 'maint'Tom Rondeau2014-07-281-2/+2
|\|
| * qtgui: replaced use of local mutex with d_setlock from gr::block.Tom Rondeau2014-07-281-2/+2
| | | | | | | | Partial response to issue #706.
* | Merge branch 'maint'Tom Rondeau2014-07-261-9/+27
|\|
| * qtgui: fixes a problem with the number sink when fed NaN or +/-inf.Tom Rondeau2014-07-261-3/+7
| | | | | | | | Addresses issue #704.
| * qtgui: fixes a bug in the number sink to respect the update time.Tom Rondeau2014-07-261-6/+20
| | | | | | | | Addresses issue #703.
* | qtgui: updates number sink behavor.Tom Rondeau2014-07-121-1/+37
|/ | | | | | Adds ability to add a title, set the units of teh number, add and set the scaling factor. Addresses Issue #690.
* qtgui: fixes number sink to handle Python/C++ exposure (see: 6a78af5919133 ↵Tom Rondeau2014-03-171-0/+6
| | | | and d9dbb6b489deb)
* qtgui: adding a 'config' tab to qtgui sinks to set display/line config ↵Tom Rondeau2014-03-171-19/+33
| | | | options (style, width, colors, etc.)
* qtgui: Adding a Number sink with options to set autoscale, layout style, ↵Tom Rondeau2014-03-141-0/+290
colors, averaging.