svgui
1.9
|
NoteLayer.cpp
Go to the documentation of this file.
302 SVCERR << "NoteLayer::getDisplayExtents: min = " << min << ", max = " << max << " (m_scaleMinimum = " << m_scaleMinimum << ", m_scaleMaximum = " << m_scaleMaximum << ")" << endl;
404 SVCERR << "NoteLayer::setVerticalZoomStep: " << step << ": " << newmin << " -> " << newmax << " (range " << newdist << ")" << endl;
629 SVCERR << "NoteLayer[" << this << "]::getScaleExtents: min = " << min << ", max = " << max << ", log = " << log << endl;
637 SVCERR << "NoteLayer[" << this << "]::getScaleExtents: min = " << min << ", max = " << max << ", log = " << log << endl;
664 SVCERR << "NoteLayer[" << this << "]::getYForValue(" << val << "): min = " << min << ", max = " << max << ", log = " << logarithmic << endl;
1220 tr("The items you are pasting came from a layer with different source material from this one. Do you want to re-align them in time, to match the source material for this layer?"),
QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override
Definition: NoteLayer.cpp:482
virtual bool snapToFeatureFrame(LayerGeometryProvider *, sv_frame_t &, int &resolution, SnapType, int) const
Adjust the given frame to snap to the nearest feature, if possible.
Definition: Layer.h:226
void moveSelection(Selection s, sv_frame_t newStartFrame) override
Definition: NoteLayer.cpp:1120
Definition: NoteLayer.h:96
int getCurrentVerticalZoomStep() const override
Get the current vertical zoom step.
Definition: NoteLayer.cpp:341
void setProperty(const PropertyName &, int value) override
Definition: NoteLayer.cpp:189
void editDrag(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:1010
void setFrameDuration(sv_frame_t frame)
Definition: ItemEditDialog.cpp:267
virtual QColor getForeground() const =0
void drawStart(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:873
int getVerticalScaleWidth(LayerGeometryProvider *v, bool, QPainter &) const override
Definition: NoteLayer.cpp:816
PropertyList getProperties() const override
Definition: SingleColourLayer.cpp:60
virtual bool shouldIlluminateLocalFeatures(const Layer *, QPoint &) const =0
Definition: SingleColourLayer.h:24
static int scalePixelSize(int pixels)
Take a "design pixel" size and scale it for the actual display.
Definition: ViewManager.cpp:857
float convertValueToEventValue(double value) const
Definition: NoteLayer.cpp:249
void modelReplaced()
static QString abbreviate(QString text, int maxLength, Policy policy=ElideEnd, bool fuzzy=true, QString ellipsis="")
Abbreviate the given text to the given maximum length (including ellipsis), using the given abbreviat...
Definition: TextAbbrev.cpp:79
Definition: ItemEditDialog.h:34
PropertyType getPropertyType(const PropertyName &) const override
Definition: NoteLayer.cpp:119
bool isLayerScrollable(const LayerGeometryProvider *v) const override
This should return true if the layer can safely be scrolled automatically by a given view (simply cop...
Definition: NoteLayer.cpp:215
void addCommand(Command *command)
Add a command to the command history.
Definition: CommandHistory.cpp:135
double getValueForY(LayerGeometryProvider *v, int y) const override
Definition: NoteLayer.cpp:682
void paintVertical(LayerGeometryProvider *v, const VerticalScaleLayer *layer, QPainter &paint, int x0, double minlog, double maxlog)
Definition: LogNumericalScale.cpp:40
int getCompletion(LayerGeometryProvider *) const override
Return the proportion of background work complete in drawing this view, as a percentage – in most ca...
Definition: NoteLayer.cpp:69
void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:932
virtual sv_frame_t getFrameForX(int x) const =0
Return the closest frame to the given pixel x-coordinate.
Definition: Layer.h:198
Definition: PianoScale.h:25
int getWidth(LayerGeometryProvider *v, QPainter &paint)
Definition: LinearNumericalScale.cpp:27
bool getValueExtents(double &min, double &max, bool &log, QString &unit) const override
Return the minimum and maximum values for the y axis of the model in this layer, as well as whether t...
Definition: NoteLayer.cpp:261
Definition: ItemEditDialog.h:28
virtual QColor getBaseQColor() const
Definition: SingleColourLayer.cpp:241
void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const override
Definition: SingleColourLayer.cpp:274
int getVerticalZoomSteps(int &defaultStep) const override
Get the number of vertical zoom steps available for this layer.
Definition: NoteLayer.cpp:333
int getWidth(LayerGeometryProvider *v, QPainter &paint)
Definition: LogNumericalScale.cpp:28
void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:959
void modelChanged(ModelId)
Interface for classes that provide geometry information (such as size, start frame, and a large number of other properties) about the disposition of a layer.
Definition: LayerGeometryProvider.h:45
void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override
Paint the given rectangle of this layer onto the given view using the given painter, superimposing it on top of any existing material in that view.
Definition: NoteLayer.cpp:707
Definition: NoteLayer.h:99
bool setDisplayExtents(double min, double max) override
Set the displayed minimum and maximum values for the y axis to the given range, if supported...
Definition: NoteLayer.cpp:309
int getColourIndex(QString name) const
Return the index of the colour with the given name, if found in the database.
Definition: ColourDatabase.cpp:67
void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const
Definition: NoteLayer.cpp:612
virtual sv_frame_t alignFromReference(LayerGeometryProvider *v, sv_frame_t frame) const
Definition: Layer.cpp:198
void addNoteOn(sv_frame_t frame, int pitch, int velocity)
Add a note-on.
Definition: NoteLayer.cpp:1286
QString getPropertyGroupName(const PropertyName &) const override
Definition: SingleColourLayer.cpp:82
QString getPropertyValueLabel(const PropertyName &, int value) const override
Definition: NoteLayer.cpp:173
Definition: NoteLayer.h:97
void layerParametersChanged()
Definition: ItemEditDialog.h:37
bool clipboardHasDifferentAlignment(LayerGeometryProvider *v, const Clipboard &clip) const
Definition: Layer.cpp:209
void paintPianoVertical(LayerGeometryProvider *v, QPainter &paint, QRect rect, double minf, double maxf)
Definition: PianoScale.cpp:31
int getPropertyRangeAndValue(const PropertyName &, int *min, int *max, int *deflt) const override
Definition: SingleColourLayer.cpp:88
int getPropertyRangeAndValue(const PropertyName &, int *min, int *max, int *deflt) const override
Definition: NoteLayer.cpp:142
void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:899
virtual sv_frame_t alignToReference(LayerGeometryProvider *v, sv_frame_t frame) const
Definition: Layer.cpp:187
void paintVertical(LayerGeometryProvider *v, const VerticalScaleLayer *layer, QPainter &paint, int x0, double minf, double maxf)
Definition: LinearNumericalScale.cpp:39
void setProperties(const QXmlAttributes &attributes) override
Set the particular properties of a layer (those specific to the subclass) from a set of XML attribute...
Definition: NoteLayer.cpp:1347
bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, bool interactive) override
Paste from the given clipboard onto the layer at the given frame offset.
Definition: NoteLayer.cpp:1206
virtual int getPaintHeight() const
Definition: LayerGeometryProvider.h:188
bool valueExtentsMatchMine(LayerGeometryProvider *v) const
Definition: Layer.cpp:628
Definition: ItemEditDialog.h:36
PropertyType getPropertyType(const PropertyName &) const override
Definition: SingleColourLayer.cpp:75
bool getPointToDrag(LayerGeometryProvider *v, int x, int y, Event &) const
Definition: NoteLayer.cpp:458
void editEnd(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:1043
Definition: ItemEditDialog.h:35
Event eventWithValue(const Event &e, double value) const
Definition: NoteLayer.cpp:228
void setVerticalZoomStep(int) override
!! lots of duplication with TimeValueLayer
Definition: NoteLayer.cpp:361
void setProperties(const QXmlAttributes &attributes) override
Set the particular properties of a layer (those specific to the subclass) from a set of XML attribute...
Definition: SingleColourLayer.cpp:294
void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override
Definition: NoteLayer.cpp:1192
bool editOpen(LayerGeometryProvider *v, QMouseEvent *) override
Open an editor on the item under the mouse (e.g.
Definition: NoteLayer.cpp:1072
RangeMapper * getNewVerticalZoomRangeMapper() const override
Create and return a range mapper for vertical zoom step values.
Definition: NoteLayer.cpp:411
Definition: Layer.h:196
void editStart(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:986
bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, int &resolution, SnapType snap, int ycoord) const override
Adjust the given frame to snap to the nearest feature, if possible.
Definition: NoteLayer.cpp:573
EventVector getLocalPoints(LayerGeometryProvider *v, int) const
Definition: NoteLayer.cpp:434
Definition: LinearNumericalScale.h:25
QString getPropertyValueLabel(const PropertyName &, int value) const override
Definition: SingleColourLayer.cpp:113
QString getPropertyLabel(const PropertyName &) const override
Definition: NoteLayer.cpp:111
bool getDisplayExtents(double &min, double &max) const override
Return the minimum and maximum values within the visible area for the y axis of this layer...
Definition: NoteLayer.cpp:281
Definition: PaintAssistant.h:43
void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:943
QString getPropertyGroupName(const PropertyName &) const override
Definition: NoteLayer.cpp:127
static void drawVisibleText(const LayerGeometryProvider *, QPainter &p, int x, int y, QString text, TextStyle style)
Definition: PaintAssistant.cpp:199
double convertValueFromEventValue(float eventValue) const
Definition: NoteLayer.cpp:234
int getYForValue(LayerGeometryProvider *v, double value) const override
VerticalScaleLayer methods.
Definition: NoteLayer.cpp:655
virtual bool getVisibleExtentsForUnit(QString unit, double &min, double &max, bool &log) const =0
Return the visible vertical extents for the given unit, if any.
Definition: ItemEditDialog.h:38
void resizeSelection(Selection s, Selection newSize) override
Definition: NoteLayer.cpp:1142
void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const override
Definition: NoteLayer.cpp:834
void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override
Definition: NoteLayer.cpp:964
void setProperty(const PropertyName &, int value) override
Definition: SingleColourLayer.cpp:132
virtual int getXForFrame(sv_frame_t frame) const =0
Return the pixel x-coordinate corresponding to a given sample frame (which may be negative)...
sv_frame_t getFrameDuration() const
Definition: ItemEditDialog.cpp:280
QString getPropertyLabel(const PropertyName &) const override
Definition: SingleColourLayer.cpp:68
void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const override
Definition: NoteLayer.cpp:1336
virtual View * getView()=0
Definition: LogNumericalScale.h:25
int getDefaultColourHint(bool dark, bool &impose) override
Definition: NoteLayer.cpp:1328
Generated by 1.8.11