6 #ifndef SPLITPLOTVIEW_H_
7 #define SPLITPLOTVIEW_H_
9 #include "ocurvesconfig.h"
89 void collate(QVector<PlotView *> &views);
95 void collateActive(QStringList &sourceNames, QStringList &curveNames,
const PlotView *exclude =
nullptr);
170 void viewFocusGained();
181 void viewSyncChanged(
bool sync);
187 void viewToolModeChanged(
int mode);
191 void viewZoomModeChanged(
int mode);
205 static PlotView *findFirstView(QWidget *widget);
216 static QWidget *relevantChild(
const QSplitter *split,
int index);
220 static inline QWidget *left(
const QSplitter *split) {
return relevantChild(split, 0); }
224 static inline QWidget *right(
const QSplitter *split) {
return relevantChild(split, 1); }
231 void initialiseView(
PlotView *view,
const PlotView *referenceView =
nullptr);
238 void initialiseSplit(QSplitter *split);
247 void initialiseSplit(QSplitter *split,
PlotView *view);
253 void saveBranch(QSettings &settings, QWidget *branch);
277 QList<PlotView *> _synchedViews;
278 bool _suppressEvents;
281 #endif // SPLITPLOTVIEW_H_
void setMultiTool()
Set the current tool to PlotView::MultiTool. Affects all child views.
void setZoomX()
Set the current zoom mode to PlotZoomer::ZoomX. Affects all child views.
void zoomToolModeSet()
Raised when the PlotView::ToolMode is changed to PlotView::ZoomTool.
bool hasSplits() const
Does the view have any splits?
void splitRemoveAll()
Remove all splits, keeping only the current plot view.
void loadSettings(QSettings &settings)
Load settings for the split view, as saved by saveSettings().
void saveSettings(QSettings &settings)
Saves settings for the split view supporting restoring to the same state.
void zoomYSet()
Raised when the PlotZoomer::ZoomMode is changed to PlotZoomer::ZoomY.
void zoomXSet()
Raised when the PlotZoomer::ZoomMode is changed to PlotZoomer::ZoomX.
void syncPan(int x, int y)
Signals panning from a child PlotView where PlotView::synchronised() is set.
void splitVertical()
Split the active plot view vertically.
void replot()
Re-plot all views within the splitter tree.
void splitRemove()
Remove the current split.
void collate(QVector< PlotView * > &views)
Collate all contained views.
An plot view viewing a Curves model.
Definition: plotview.h:36
void setZoomY()
Set the current zoom mode to PlotZoomer::ZoomY. Affects all child views.
void multiToolModeSet()
Raised when the PlotView::ToolMode is changed to PlotView::MultiTool.
The data model for loaded plots and curves.
Definition: curves.h:36
void activeViewChanged(PlotView *newView, PlotView *oldView)
Raised when the activeView() changes.
void panToolModeSet()
Raised when the PlotView::ToolMode is changed to PlotView::PanTool.
void collateActive(QStringList &sourceNames, QStringList &curveNames, const PlotView *exclude=nullptr)
Collates the list of source and curve names being viewed by any active view.
SplitPlotView(Curves *curves, QWidget *parent=nullptr)
Create a split view containing exactly one PlotView.
PlotView * activeView() const
Access the active view.
Definition: splitplotview.h:78
void setZoomTool()
Set the current tool to PlotView::ZoomTool. Affects all child views.
A special plotting view which can contain multiple splits, each with its own PlotView.
Definition: splitplotview.h:33
void zoomXYSet()
Raised when the PlotZoomer::ZoomMode is changed to PlotZoomer::ZoomBoth.
void setPanTool()
Set the current tool to PlotView::PanTool. Affects all child views.
void setZoomXY()
Set the current zoom mode to PlotZoomer::ZoomBoth. Affects all child views.
void splitHorizontal()
Split the active plot view horizontally.
void viewAdded(PlotView *view)
Raised when a new view is created due to a new split.