16 #ifndef _TIME_INSTANT_LAYER_H_ 17 #define _TIME_INSTANT_LAYER_H_ 20 #include "data/model/SparseOneDimensionalModel.h" 63 virtual void copy(
View *v, Selection s, Clipboard &to);
64 virtual bool paste(
View *v,
const Clipboard &from,
int frameOffset,
68 void setModel(SparseOneDimensionalModel *model);
74 int *min,
int *max,
int *deflt)
const;
77 virtual void setProperty(
const PropertyName &,
int value);
99 virtual void toXml(QTextStream &stream, QString indent =
"",
100 QString extraAttributes =
"")
const;
127 void finish(SparseOneDimensionalModel::EditCommand *command) {
128 Command *c = command->finish();
virtual QString getPropertyLabel(const PropertyName &) const
virtual void eraseDrag(View *v, QMouseEvent *)
virtual void copy(View *v, Selection s, Clipboard &to)
virtual bool needsTextLabelHeight() const
virtual void resizeSelection(Selection s, Selection newSize)
virtual PropertyList getProperties() const
virtual QString getFeatureDescription(View *v, QPoint &) const
virtual const Model * getModel() const
virtual void drawStart(View *v, QMouseEvent *)
virtual void drawDrag(View *v, QMouseEvent *)
virtual void moveSelection(Selection s, int newStartFrame)
virtual ColourSignificance getLayerColourSignificance() const
Implements Layer::getLayerColourSignificance()
virtual QString getLabelPreceding(int) const
SparseOneDimensionalModel::Point m_editingPoint
void setModel(SparseOneDimensionalModel *model)
SparseOneDimensionalModel * m_model
void addCommand(Command *command)
Add a command to the command history.
virtual PropertyType getPropertyType(const PropertyName &) const
virtual void drawEnd(View *v, QMouseEvent *)
virtual bool snapToFeatureFrame(View *v, int &frame, int &resolution, SnapType snap) const
Adjust the given frame to snap to the nearest feature, if possible.
void setProperties(const QXmlAttributes &attributes)
Set the particular properties of a layer (those specific to the subclass) from a set of XML attribute...
SparseOneDimensionalModel::EditCommand * m_editingCommand
PlotStyle getPlotStyle() 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,...
void setPlotStyle(PlotStyle style)
virtual int getCompletion(View *) const
Return the proportion of background work complete in drawing this view, as a percentage – in most cas...
virtual bool isLayerEditable() const
This should return true if the layer can be edited by the user.
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 int getDefaultColourHint(bool dark, bool &impose)
bool clipboardAlignmentDiffers(View *v, const Clipboard &) const
static CommandHistory * getInstance()
virtual void eraseStart(View *v, QMouseEvent *)
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...
virtual bool editOpen(View *, QMouseEvent *)
Open an editor on the item under the mouse (e.g.
virtual int getPropertyRangeAndValue(const PropertyName &, int *min, int *max, int *deflt) const
virtual ~TimeInstantLayer()
View is the base class of widgets that display one or more overlaid views of data against a horizonta...
virtual QString getPropertyValueLabel(const PropertyName &, int value) const
virtual void editEnd(View *v, QMouseEvent *)
virtual void setProperty(const PropertyName &, int value)
virtual void deleteSelection(Selection s)
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.
virtual void editDrag(View *v, QMouseEvent *)
void finish(SparseOneDimensionalModel::EditCommand *command)
virtual void eraseEnd(View *v, QMouseEvent *)
virtual int getVerticalScaleWidth(View *, bool, QPainter &) const
virtual bool getValueExtents(float &, float &, bool &, QString &) const
Return the minimum and maximum values for the y axis of the model in this layer, as well as whether t...
virtual void editStart(View *v, QMouseEvent *)
SparseOneDimensionalModel::PointList getLocalPoints(View *v, int) const