55 explicit UiFigure(matplot::figure_type* pltfigure, QWidget* parent =
nullptr);
63 matplot::figure_type*
pltfigure()
const {
return pltfigure_; }
66 QToolBar*
toolBar()
const {
return toolBar_; }
69 void setFigureSize(
int w,
int h);
72 QSize sizeHint()
const override;
75 void refreshOriginalLimits();
78 void syncToolbarState();
84 void restoreNavigationState();
87 void restoreEditModeIfNeeded();
97 void setPanMode(
bool on);
100 void setZoomInMode(
bool on);
106 void toggleLegend(
bool on);
109 void toggleGrid(
bool on);
112 void toggleColorbar(
bool on);
115 void setEditMode(
bool on);
118 void openPropertyInspector();
122 void onOverlayGeometryChanged(QWidget* w, QRectF oldNorm, QRectF newNorm);
124 void onPickActionToggled(
bool on);
128 void createActions();
131 void clearDataPickers();
132 void createDataPickers();
133 void createOverlay();
135 QIcon loadIcon(
const QString& name)
const;
136 QList<QwtPlot*> allAxes()
const;
139 double xMin = 0, xMax = 0, yMin = 0, yMax = 0;
142 QwtFigure* qwtfigure_ =
nullptr;
143 matplot::figure_type* pltfigure_ =
nullptr;
144 QToolBar* toolBar_ =
nullptr;
145 QAction* panAction_ =
nullptr;
146 QAction* zoomInAction_ =
nullptr;
147 QAction* legendAction_ =
nullptr;
148 QAction* gridAction_ =
nullptr;
149 QAction* colorbarAction_ =
nullptr;
150 QAction* pickYAction_ =
nullptr;
151 QAction* pickNearestAction_ =
nullptr;
152 QMenu* dataPickMenu_ =
nullptr;
153 QToolButton* dataPickBtn_ =
nullptr;
154 QMap<QwtPlot*, AxisLimits> originalLimits_;
155 QList<QPointer<QwtPlotPanner>> panners_;
156 QList<QPointer<QwtPlotCanvasZoomer>> zoomers_;
157 QList<QPointer<QwtPlotSeriesDataPicker>> dataPickers_;
158 QScopedPointer<QwtPlotSeriesDataPickerGroup> dataPickerGroup_;
161 QAction* editModeAction_ =
nullptr;
162 QScopedPointer<QwtFigureWidgetOverlay> overlay_;
165 QAction* propertiesAction_ =
nullptr;
166 QPointer<EditFigureDialog> propertiesDialog_;