16 #ifndef _TIME_VALUE_LAYER_H_ 17 #define _TIME_VALUE_LAYER_H_ 23 #include "data/model/SparseTimeValueModel.h" 73 virtual void copy(
View *v, Selection s, Clipboard &to);
74 virtual bool paste(
View *v,
const Clipboard &from,
int frameOffset,
78 void setModel(SparseTimeValueModel *model);
86 int *min,
int *max,
int *deflt)
const;
89 virtual void setProperty(
const PropertyName &,
int value);
134 bool &logarithmic, QString &unit)
const;
144 virtual void toXml(QTextStream &stream, QString indent =
"",
145 QString extraAttributes =
"")
const;
185 void finish(SparseTimeValueModel::EditCommand *command) {
186 Command *c = command->finish();
void setModel(SparseTimeValueModel *model)
virtual void copy(View *v, Selection s, Clipboard &to)
virtual QString getPropertyValueLabel(const PropertyName &, int value) const
virtual void setProperty(const PropertyName &, int value)
virtual ColourSignificance getLayerColourSignificance() const
Implements Layer::getLayerColourSignificance()
virtual bool isLayerScrollable(const View *v) const
This should return true if the layer can safely be scrolled automatically by a given view (simply cop...
SparseTimeValueModel * m_model
void setProperties(const QXmlAttributes &attributes)
Set the particular properties of a layer (those specific to the subclass) from a set of XML attribute...
void getScaleExtents(View *, float &min, float &max, bool &log) const
virtual int getYForValue(View *, float value) const
VerticalScaleLayer and ColourScaleLayer methods.
int getFillColourMap() const
virtual bool getValueExtents(float &min, float &max, bool &logarithmic, QString &unit) const
Return the minimum and maximum values for the y axis of the model in this layer, as well as whether t...
virtual void drawDrag(View *v, QMouseEvent *)
void setPlotStyle(PlotStyle style)
virtual const Model * getModel() const
virtual QString getScaleUnits() const
virtual void eraseStart(View *v, QMouseEvent *)
virtual RangeMapper * getNewVerticalZoomRangeMapper() const
Create and return a range mapper for vertical zoom step values.
void addCommand(Command *command)
Add a command to the command history.
virtual float getValueForY(View *, int y) const
virtual int getPropertyRangeAndValue(const PropertyName &, int *min, int *max, int *deflt) const
virtual bool snapToFeatureFrame(View *v, int &frame, int &resolution, SnapType snap) const
Adjust the given frame to snap to the nearest feature, if possible.
virtual void deleteSelection(Selection s)
virtual QString getPropertyLabel(const PropertyName &) const
SparseTimeValueModel::Point m_editingPoint
VerticalScale m_verticalScale
virtual void setVerticalZoomStep(int)
Set the vertical zoom step.
virtual int getVerticalScaleWidth(View *v, bool, QPainter &) const
VerticalScale getVerticalScale() const
virtual QColor getColourForValue(View *v, float value) const
bool getShowDerivative() const
virtual QString getPropertyIconName(const PropertyName &) const
virtual void editDrag(View *v, QMouseEvent *)
virtual bool paste(View *v, const Clipboard &from, int frameOffset, bool interactive)
Paste from the given clipboard onto the layer at the given frame offset.
virtual PropertyType getPropertyType(const PropertyName &) const
virtual void paint(View *v, QPainter &paint, QRect rect) const
Paint the given rectangle of this layer onto the given view using the given painter,...
virtual void eraseEnd(View *v, QMouseEvent *)
virtual bool isLayerEditable() const
This should return true if the layer can be edited by the user.
virtual int getCurrentVerticalZoomStep() const
Get the current vertical zoom step.
static CommandHistory * getInstance()
virtual void resizeSelection(Selection s, Selection newSize)
virtual bool setDisplayExtents(float min, float max)
Set the displayed minimum and maximum values for the y axis to the given range, if supported.
virtual void eraseDrag(View *v, QMouseEvent *)
void setVerticalScale(VerticalScale scale)
SparseTimeValueModel::PointList getLocalPoints(View *v, int) const
virtual void drawStart(View *v, QMouseEvent *)
View is the base class of widgets that display one or more overlaid views of data against a horizonta...
virtual void moveSelection(Selection s, int newStartFrame)
virtual void drawEnd(View *v, QMouseEvent *)
virtual int getVerticalZoomSteps(int &defaultStep) const
Get the number of vertical zoom steps available for this layer.
virtual PropertyList getProperties() const
virtual void paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const
void setDrawSegmentDivisions(bool)
bool m_drawSegmentDivisions
void setShowDerivative(bool)
virtual QString getLabelPreceding(int) const
virtual bool snapToSimilarFeature(View *v, int &frame, int &resolution, SnapType snap) const
Adjust the given frame to snap to the next feature that has "effectively" the same value as the featu...
virtual QString getFeatureDescription(View *v, QPoint &) const
virtual void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const
Convert the layer's data (though not those of the model it refers to) into XML for file output.
void finish(SparseTimeValueModel::EditCommand *command)
virtual bool editOpen(View *v, QMouseEvent *)
Open an editor on the item under the mouse (e.g.
void setFillColourMap(int)
bool getDrawSegmentDivisions() const
virtual QString getPropertyGroupName(const PropertyName &) const
virtual int getDefaultColourHint(bool dark, bool &impose)
PlotStyle getPlotStyle() const
virtual void editEnd(View *v, QMouseEvent *)
virtual bool getDisplayExtents(float &min, float &max) const
Return the minimum and maximum values within the displayed range for the y axis, if only a subset of ...
SparseTimeValueModel::Point m_originalPoint
SparseTimeValueModel::EditCommand * m_editingCommand
bool shouldAutoAlign() const
virtual int getCompletion(View *) const
Return the proportion of background work complete in drawing this view, as a percentage – in most cas...
virtual void editStart(View *v, QMouseEvent *)
virtual bool needsTextLabelHeight() const