9 #include "plotsconfig.h"
11 #include "refcountobject.h"
12 #include "refcountptr.h"
74 inline unsigned type()
const {
return _type; }
78 inline QString
name()
const {
return _name; }
86 inline QString
fullName()
const {
return _fullName; }
99 inline unsigned timeColumn()
const {
return _timeColumn; }
115 inline double timeBase()
const {
return _timeBase; }
180 unsigned _timeColumn;
183 QMutex *_curvesMutex;
184 QVector<PlotInstance *> _curves;
187 #endif // PLOTSOURCE_H_
No source: invalid.
Definition: plotsource.h:44
bool lengthenName()
Lengthen the short name() to attempt to disambiguate.
QString fullName() const
Access the full source name.
Definition: plotsource.h:86
Loaded from a file.
Definition: plotsource.h:46
unsigned type() const
Identify the source type.
Definition: plotsource.h:74
void setName(QString name)
Set the short name.
Definition: plotsource.h:82
void addCurve(PlotInstance *curve)
Add a curve to this source.
double timeBase() const
Returns the time base for the source.
Definition: plotsource.h:115
~PlotSource()
Simple destructor.
User type values should start here.
Definition: plotsource.h:54
void deriveName()
Set the name() based on the current fullName().
A generated expression with no other source.
Definition: plotsource.h:49
void removeCurve(const PlotInstance *curve)
Remove a curve to this source.
void setTimeScale(double scale)
Returns the time scaling applied to curves using this source.
Definition: plotsource.h:111
void setFullName(QString name)
Set the full source name (e.g., file name).
Definition: plotsource.h:93
A real time plot over a serial, TCP or UDP connection.
Definition: plotsource.h:51
unsigned curveCount() const
Returns the number of curves associated with the source.
Holds data for a single curve.
Definition: plotinstance.h:43
PlotSource(int sourceType, const QString &fullName, unsigned curveCount=0)
Create a PlotSource of the given type and full name.
A base class for adding reference counting to a class.
Definition: refcountobject.h:30
unsigned timeColumn() const
Returns the index of the curve used to generate timestamps for all other columns. ...
Definition: plotsource.h:99
double firstTime() const
Request the first time value from the time column.
QString name() const
Access the short name.
Definition: plotsource.h:78
void setTimeBase(double time)
Sets the time base for the source.
Definition: plotsource.h:118
Provides details about a source from which PlotInstance objects have been generated.
Definition: plotsource.h:28
double timeScale() const
Returns the time scaling applied to curves using this source.
Definition: plotsource.h:107
void setTimeColumn(unsigned index)
Set the 1-based time column index or zero for none.
Definition: plotsource.h:103
PlotInstance * timeColumnCurve() const
Returns the time column curve (if any).
Type
Defines where the plot was loaded from.
Definition: plotsource.h:41
PlotInstance * curve(unsigned index) const
Request a curve at the given index.
plotutil::RefCountPtr< PlotSource > Ptr
Reference counted pointer reference.
Definition: plotsource.h:36