|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Group manager for synchronizing multiple QwtPlotSeriesDataPicker instances across plot widgets 更多...
#include <qwt_plot_series_data_picker_group.h>
类 | |
| class | PrivateData |
Public 槽 | |
| void | onPickerMove (const QPoint &pos) |
| void | onPickerActivated (bool on) |
| void | onPickerDestroy (QObject *obj) |
| void | onPickerClicked (QwtPlotSeriesDataPicker *picker, const QPoint &pos) |
| Handles click signal from a picker, syncs other pickers, then emits group's clicked signal | |
| void | onPickerDoubleClicked (QwtPlotSeriesDataPicker *picker, const QPoint &pos) |
| Handles double-click signal from a picker, syncs other pickers, then emits group's doubleClicked signal | |
信号 | |
| void | clicked (QwtPlotSeriesDataPicker *picker, const QPoint &pos) |
| Emitted when a picker in the group is clicked | |
| void | doubleClicked (QwtPlotSeriesDataPicker *picker, const QPoint &pos) |
| Emitted when a picker in the group is double-clicked | |
Public 成员函数 | |
| QwtPlotSeriesDataPickerGroup (QObject *par=nullptr) | |
| Constructor | |
| ~QwtPlotSeriesDataPickerGroup () override | |
| Destructor | |
| void | addPicker (QwtPlotSeriesDataPicker *pick) |
| Add a picker to the group | |
| void | removePicker (QwtPlotSeriesDataPicker *pick) |
| Remove a picker from the group | |
| QList< QwtPlotSeriesDataPicker * > | pickers () const |
| Get all pickers in the group | |
| void | setEnabled (bool on) |
| Set enabled state | |
| bool | isEnabled () const |
| Check if enabled | |
Group manager for synchronizing multiple QwtPlotSeriesDataPicker instances across plot widgets
This class enables coordinated interaction among multiple plot pickers, currently implementing synchronized X-axis proportional positioning. When a user moves the mouse over one plot within a subplot arrangement, the active picker displays its Y-value while all other pickers in the same group automatically position themselves at equivalent X-axis proportional locations on their respective plots, creating a unified cross-plot data inspection experience.
Key features:
| QwtPlotSeriesDataPickerGroup::QwtPlotSeriesDataPickerGroup | ( | QObject * | par = nullptr | ) |
Constructor
| [in] | par | Parent object |
Destructor
| void QwtPlotSeriesDataPickerGroup::addPicker | ( | QwtPlotSeriesDataPicker * | pick | ) |
Add a picker to the group
Adds a picker to the synchronization group
| pick | Pointer to QwtPlotSeriesDataPicker instance to be added to the group |
|
signal |
Emitted when a picker in the group is clicked
| picker | The picker that was clicked |
| pos | The click position in picker's canvas coordinates |
|
signal |
Emitted when a picker in the group is double-clicked
| picker | The picker that was double-clicked |
| pos | The double-click position in picker's canvas coordinates |
| bool QwtPlotSeriesDataPickerGroup::isEnabled | ( | ) | const |
|
slot |
Handles click signal from a picker, syncs other pickers, then emits group's clicked signal
| picker | The picker that emitted the click signal |
| pos | The click position |
|
slot |
Handles double-click signal from a picker, syncs other pickers, then emits group's doubleClicked signal
| picker | The picker that emitted the double-click signal |
| pos | The double-click position |
| QList< QwtPlotSeriesDataPicker * > QwtPlotSeriesDataPickerGroup::pickers | ( | ) | const |
Get all pickers in the group
Returns the list of all pickers currently in the group
| void QwtPlotSeriesDataPickerGroup::removePicker | ( | QwtPlotSeriesDataPicker * | pick | ) |
Remove a picker from the group
| [in] | pick | Pointer to QwtPlotSeriesDataPicker instance to be removed from the group |
| void QwtPlotSeriesDataPickerGroup::setEnabled | ( | bool | on | ) |
Set enabled state
When disabled, picker synchronization will not occur.
| [in] | on | Enable/disable synchronization |