Top class for Waterfall Plots ,.
More...
#include <waterfallplot.h>
|
| WaterfallPlot (QWidget *parent=0) |
| constructor
|
|
| ~WaterfallPlot () |
| destructor
|
|
void | init (int spectrogram_data_width, int spectrogram_data_depth, double max_frequency, double data_min, double data_max, int zoom_init, double span_init, double center_frequency_init) |
| initializing function, creates data structures for spectrogram and its display important: the user needs to make sure, that the values specified here fit to the data, which is passed in set_next_data_line that means: zoom level and its corresponding span needs to fit the fft data passed to this class! if this is not ensured, the displayed waterfall has nothing to do with the frequency scale displayed More...
|
|
void | set_max_zoom (int max_zoom) |
| sets the maximum possible zoom level
|
|
void | set_min_zoom (int min_zoom) |
| sets the minimum possible zoom level
|
|
void | set_color_map (QwtLinearColorMap color_map) |
| changes the color map of the waterfall plot (a default is assinged in the constructor)
|
|
void | set_next_data_line (double *array) |
| sets one line in the 2 dim data array for spectrogram More...
|
|
void | correct_size () |
| corrects the size of the plot area, so that the data width always matches the display width in pixels
|
|
void | set_center_frequency (double center_frequency) |
| sets center frequency in kHz (in this case the waterfall display is emptied completely)
|
|
void | set_wheel_action (int wheel_action) |
| sets, what happens if the user turn the mouse wheel in the plot area More...
|
|
bool | receiver_update_required () |
|
void | reset_receiver_update () |
| confirms, that a receiver update has been recognized and resets the internal memeber, which signals "update required"
|
|
int | get_zoom_level () |
|
double | get_center_frequency () |
|
double | get_start_frequency () |
|
double | get_stop_frequency () |
|
double | get_frequency_span () |
|
double | get_max_frequency () |
|
double | get_data_min () |
|
double | get_data_max () |
|
|
void | wheelEvent (QWheelEvent *event) |
| handels wheel events (for zoom) and decides if zoom in or out or nothing (max or min zoom exeeded) is done and calls method zoom_update_axis
|
|
void | zoom_update_axis (int x, bool zoom_in) |
| calls zoom functions of waterfalldata, calculates new frequencies (start/stop/span etc.) and sets new plot scales More...
|
|
void | shift_frequency (double frequency_shift) |
| shifts the waterfall ny the specified shift
|
|
void | mouseMoveEvent (QMouseEvent *event) |
| event handler for mouse moves for shift functionality
|
|
void | mousePressEvent (QMouseEvent *event) |
| event handler for mouse clicks for shift functionality and audio tuning
|
|
|
QwtPlotSpectrogram * | spectrogram_plot_ |
|
RasterData * | raster_data_ |
|
WaterfallData * | waterfall_data_ |
|
int | zoom_level_ |
|
int | max_zoom_ |
|
int | min_zoom_ |
|
double | data_min_ |
|
double | data_max_ |
|
double | max_frequency_ |
|
double | start_frequency_ |
|
double | stop_frequency_ |
|
double | center_frequency_ |
|
double | frequency_span_ |
|
int | spectrogram_data_width_ |
|
int | spectrogram_data_depth_ |
|
double | scroll_start_frequency_ |
|
int | left_border_ |
|
int | right_border_ |
|
bool | receiver_update_required_ |
|
int | wheel_action_ |
|
Top class for Waterfall Plots ,.
- handles a complete waterfall display (Generic Widget on GUI is promoted to this class)
- includes data structres (RasterData & 2d array in WaterfallData) and plots (QwtPlot and QwtSpectrogram)
void WaterfallPlot::audio_frequency_clicked |
( |
double |
frequency | ) |
|
|
signal |
sends the frequency for tuning the audio receiver (when right clicking in the waterfall)
- Parameters
-
frequency | frequency in kHz |
void WaterfallPlot::init |
( |
int |
spectrogram_data_width, |
|
|
int |
spectrogram_data_depth, |
|
|
double |
max_frequency, |
|
|
double |
data_min, |
|
|
double |
data_max, |
|
|
int |
zoom_init, |
|
|
double |
span_init, |
|
|
double |
center_frequency_init |
|
) |
| |
initializing function, creates data structures for spectrogram and its display important: the user needs to make sure, that the values specified here fit to the data, which is passed in set_next_data_line that means: zoom level and its corresponding span needs to fit the fft data passed to this class! if this is not ensured, the displayed waterfall has nothing to do with the frequency scale displayed
- Parameters
-
spectrogram_data_width | width of 2 dimensional data array (and display area in px) |
spectrogram_data_depth | depth/height of 2 dimensional data array (and display area in px) |
max_frequency | maximum frequency for display scale in kHz |
data_min | expected minimum data value required by rasterdata.h |
data_max | expected maximum data value required by rasterdata.h |
zoom_init | inital zoom level |
span_init | inital span in KHz |
center_frequency_init | inital center frequency in kHz |
bool WaterfallPlot::receiver_update_required |
( |
| ) |
|
|
inline |
@ brief returns if a receiver update is required (happens if a change in the waterfall has been made, e.g. zoom or shift)
void WaterfallPlot::set_next_data_line |
( |
double * |
array | ) |
|
sets one line in the 2 dim data array for spectrogram
- Parameters
-
array | double array for one line |
void WaterfallPlot::set_wheel_action |
( |
int |
wheel_action | ) |
|
|
inline |
sets, what happens if the user turn the mouse wheel in the plot area
- Parameters
-
wheel_action | 0=zoom with wheel (default), 1=shift frequency by a small frequency (e.g. 20 Hz for audio waterfall) |
void WaterfallPlot::zoom_update_axis |
( |
int |
x, |
|
|
bool |
zoom_in |
|
) |
| |
|
private |
calls zoom functions of waterfalldata, calculates new frequencies (start/stop/span etc.) and sets new plot scales
- Parameters
-
x | zoom position (position of mouse pointer relative to left border of plot) |
zoom_in | true: zoom in, false: zoom out |
The documentation for this class was generated from the following files:
- radio_control/waterfall/waterfallplot.h
- radio_control/waterfall/waterfallplot.cpp