The main Open Curves UI window.
More...
#include <ocurvesui.h>
|
void | removeCurvesWithSource (const QString &sourceName) |
| Removes all curves which have a PlotSource::name() mathcing sourceName . More...
|
|
void | updateColours (const QStringList &activeSources, const QStringList &activeCurves) |
| Recolours all visible PlotInstance objects by cycling through the colour set. More...
|
|
virtual void | timerEvent (QTimerEvent *) override |
| Periodic event used to migrate background loaded data. More...
|
|
virtual void | showEvent (QShowEvent *) override |
| Handles reveling the window by restoring stored settings.
|
|
virtual void | closeEvent (QCloseEvent *) override |
| Ensures loading is stopped and settings are saved.
|
|
The main Open Curves UI window.
The main UI holds the major UI components as well as the main data model classes. It also manages background loading and progressive plotting data sets.
The main UI consists of the following components:
The data components are:
OCurvesUI::OCurvesUI |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
void OCurvesUI::connectToRealtimeSource |
( |
| ) |
|
|
slot |
Show a dialog allowing the user to select a real time source XML file to load.
Aborts current loading.
- Todo:
- Add a reference to the real time source specifications here.
void OCurvesUI::copyActiveView |
( |
| ) |
|
|
slot |
Curves* OCurvesUI::curves |
( |
| ) |
const |
|
inline |
Access the primary Curves
data.
- Returns
- The complete
Curves
set
void OCurvesUI::load |
( |
const QString & |
plotFile, |
|
|
bool |
append = false |
|
) |
| |
|
slot |
Request loading of the given file.
May optionally append to any currently loading file list when append
is true. When false (default), any current load process is aborted.
- Parameters
-
plotFile | The file to load. |
append | True to append to the active list of files to load. |
void OCurvesUI::load |
( |
const QStringList & |
plotFiles, |
|
|
bool |
append = false , |
|
|
QVector< TimeSampling > * |
plotTiming = nullptr |
|
) |
| |
|
slot |
Request loading of the given list of files.
May optionally append to any currently loading file list when append
is true. When false (default), any current load process is aborted.
- Parameters
-
plotFiles | List of files to load. |
append | True to append to the active list of files to load. |
plotTiming | Optionally provides TimeSampling control on a per file basis. For each element in plotFiles , the corresponding plotTiming entry overrides the time column, scale base and flags. May be null, and insufficient entries are handled. Additional entries are ignored. |
void OCurvesUI::loadSettings |
( |
QSettings & |
settings, |
|
|
bool |
loadGeometry = true |
|
) |
| |
Loads saved settings saved by saveSettings()
and applies them.
Geometry settings may be excluded as they cannot be properly restored from the constructor. Use loadWindowSettings()
to do so manually.
- Parameters
-
settings | The settings object to load from. |
loadGeometry | Restore geometry settings? |
void OCurvesUI::loadWindowsSettings |
( |
QSettings & |
settings | ) |
|
Loads and restores window geometry and other settings.
This cannot be done from the constructor.
- Parameters
-
settings | The settings object to load from. |
void OCurvesUI::openDataFiles |
( |
| ) |
|
|
slot |
Show a dialog allowing the user to select data files to open.
Aborts current loading.
void OCurvesUI::plotsSelectOnly |
( |
int |
row | ) |
|
|
slot |
Select only the curve name at row
.
- Parameters
-
row | The row of the curve name to select. Range checked. |
void OCurvesUI::plotsSelectOnlyIndex |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Handler for selecting a single curve name by model index.
- Parameters
-
index | Index into the plot list view model for the source to select. |
void OCurvesUI::removeCurvesWithSource |
( |
const QString & |
sourceName | ) |
|
|
protected |
Removes all curves which have a PlotSource::name()
mathcing sourceName
.
This function does not perform UI cleanup and UI components may need to be further updated to reflect the removal of curves.
Loading will be stopped if the source is curently being loaded.
- Parameters
-
sourceName | The source name to match. |
void OCurvesUI::saveSettings |
( |
QSettings & |
settings, |
|
|
bool |
bookmarkCurrent = false |
|
) |
| |
Saves the application state and settings including both UI and data settings.
The UI state for all windows and children is saved. It serialises the current colour set and makes calls to save the state of the SplitPlotView
and Expressions
.
The current state may be optionally bookmarked as "bookmark0" which allows the user to restore the last session.
- Parameters
-
settings | The settings object to save to. |
bookmarkCurrent | True to bookmark the currently open files, selections, etc as bookmark0. |
void OCurvesUI::sourceSelectOnly |
( |
int |
row | ) |
|
|
slot |
Select only the source at row
.
- Parameters
-
row | The row of the source to select. Range checked. |
void OCurvesUI::sourceSelectOnlyIndex |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Handler for selecting a single source by model index.
- Parameters
-
index | Index into the source list view model for the source to select. |
Access the main plot view.
Supports splitting.
- Returns
- The
SplitPlotView
.
virtual void OCurvesUI::timerEvent |
( |
QTimerEvent * |
| ) |
|
|
overrideprotectedvirtual |
void OCurvesUI::updateColours |
( |
const QStringList & |
activeSources, |
|
|
const QStringList & |
activeCurves |
|
) |
| |
|
protected |
Recolours all visible PlotInstance
objects by cycling through the colour set.
This affects all visible PlotInstance
objects in all views. Colours are assigned in turn from the current colour set, cycling back to the beginning of the set if there are more curves than colours.
To be visible, a PlotInstance
must have a PlotSource::name()
which is present in the activeSources
list and its own PlotInstance::name()
must be in activeCurves
.
Curves with an explicit colour set are skipped.
- Parameters
-
activeSources | The list of sources from which to display curves. |
activeCurves | The list of curves to show. |
The documentation for this class was generated from the following file: