55 explicit UiFigure(matplot::figure_type* pltfigure, QWidget* parent =
nullptr);
65 matplot::figure_type*
pltfigure()
const {
return pltfigure_; }
68 QToolBar*
toolBar()
const {
return toolBar_; }
71 void setFigureSize(
int w,
int h);
74 QSize sizeHint()
const override;
77 void refreshOriginalLimits();
80 void syncToolbarState();
86 void restoreNavigationState();
89 void restoreEditModeIfNeeded();
99 void setPanMode(
bool on);
102 void setZoomInMode(
bool on);
108 void toggleLegend(
bool on);
111 void toggleGrid(
bool on);
114 void toggleColorbar(
bool on);
117 void setEditMode(
bool on);
120 void openPropertyInspector();
124 void onOverlayGeometryChanged(QWidget* w, QRectF oldNorm, QRectF newNorm);
126 void onPickActionToggled(
bool on);
130 void createActions();
133 void clearDataPickers();
134 void createDataPickers();
135 void createOverlay();
137 QIcon loadIcon(
const QString& name)
const;
138 QList<QwtPlot*> allAxes()
const;
141 double xMin = 0, xMax = 0, yMin = 0, yMax = 0;
144 QwtFigure* qwtfigure_ =
nullptr;
145 matplot::figure_type* pltfigure_ =
nullptr;
146 QToolBar* toolBar_ =
nullptr;
147 QAction* panAction_ =
nullptr;
148 QAction* zoomInAction_ =
nullptr;
149 QAction* legendAction_ =
nullptr;
150 QAction* gridAction_ =
nullptr;
151 QAction* colorbarAction_ =
nullptr;
152 QAction* pickYAction_ =
nullptr;
153 QAction* pickNearestAction_ =
nullptr;
154 QMenu* dataPickMenu_ =
nullptr;
155 QToolButton* dataPickBtn_ =
nullptr;
156 QMap<QwtPlot*, AxisLimits> originalLimits_{};
157 QList<QPointer<QwtPlotPanner>> panners_{};
158 QList<QPointer<QwtPlotCanvasZoomer>> zoomers_{};
159 QList<QPointer<QwtPlotSeriesDataPicker>> dataPickers_{};
160 QScopedPointer<QwtPlotSeriesDataPickerGroup> dataPickerGroup_{};
163 QAction* editModeAction_ =
nullptr;
164 QScopedPointer<QwtFigureWidgetOverlay> overlay_{};
167 QAction* propertiesAction_ =
nullptr;
168 QPointer<EditFigureDialog> propertiesDialog_{};