diff options
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/muse/midiedit/dcanvas.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/midiedit/dcanvas.h | 2 | ||||
-rw-r--r-- | muse2/muse/midiedit/ecanvas.h | 2 | ||||
-rw-r--r-- | muse2/muse/midiedit/prcanvas.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/midiedit/prcanvas.h | 4 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.h | 12 |
7 files changed, 15 insertions, 15 deletions
diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp index e1f77bef..e3dac210 100644 --- a/muse2/muse/midiedit/dcanvas.cpp +++ b/muse2/muse/midiedit/dcanvas.cpp @@ -80,7 +80,7 @@ DEvent::DEvent(MusECore::Event e, MusECore::Part* p, int instr) // addItem //--------------------------------------------------------- -CItem* DrumCanvas::addItem(MusECore::Part* part, MusECore::Event& event) +CItem* DrumCanvas::addItem(MusECore::Part* part, const MusECore::Event& event) { if (signed(event.tick())<0) { printf("ERROR: trying to add event before current part!\n"); diff --git a/muse2/muse/midiedit/dcanvas.h b/muse2/muse/midiedit/dcanvas.h index 75c9fca3..300f2291 100644 --- a/muse2/muse/midiedit/dcanvas.h +++ b/muse2/muse/midiedit/dcanvas.h @@ -130,7 +130,7 @@ class DrumCanvas : public EventCanvas { void dragEnterEvent(QDragEnterEvent* event); void dragMoveEvent(QDragMoveEvent*); void dragLeaveEvent(QDragLeaveEvent*); - virtual CItem* addItem(MusECore::Part*, MusECore::Event&); + virtual CItem* addItem(MusECore::Part*, const MusECore::Event&); virtual void resizeEvent(QResizeEvent*); virtual void curPartChanged(); int getNextStep(unsigned int pos, int basicStep, int stepSize=1); diff --git a/muse2/muse/midiedit/ecanvas.h b/muse2/muse/midiedit/ecanvas.h index 95e856c8..e7d7ad6e 100644 --- a/muse2/muse/midiedit/ecanvas.h +++ b/muse2/muse/midiedit/ecanvas.h @@ -80,7 +80,7 @@ class EventCanvas : public Canvas { bool _setCurPartIfOnlyOneEventIsSelected; void updateSelection(); - virtual CItem* addItem(MusECore::Part*, MusECore::Event&) = 0; + virtual CItem* addItem(MusECore::Part*, const MusECore::Event&) = 0; virtual QPoint raster(const QPoint&) const; virtual MusECore::Undo moveCanvasItems(CItemList&, int, int, DragType, bool rasterize = true) = 0; virtual bool moveItem(MusECore::Undo&, CItem*, const QPoint&, DragType, bool rasterize = true) = 0; diff --git a/muse2/muse/midiedit/prcanvas.cpp b/muse2/muse/midiedit/prcanvas.cpp index 1d8039bb..a46b5a5c 100644 --- a/muse2/muse/midiedit/prcanvas.cpp +++ b/muse2/muse/midiedit/prcanvas.cpp @@ -59,7 +59,7 @@ namespace MusEGui { // NEvent //--------------------------------------------------------- -NEvent::NEvent(MusECore::Event& e, MusECore::Part* p, int y) : MusEGui::CItem(e, p) +NEvent::NEvent(const MusECore::Event& e, MusECore::Part* p, int y) : MusEGui::CItem(e, p) { y = y - KH/4; unsigned tick = e.tick() + p->tick(); @@ -72,7 +72,7 @@ NEvent::NEvent(MusECore::Event& e, MusECore::Part* p, int y) : MusEGui::CItem(e, // addItem //--------------------------------------------------------- -CItem* PianoCanvas::addItem(MusECore::Part* part, MusECore::Event& event) +CItem* PianoCanvas::addItem(MusECore::Part* part, const MusECore::Event& event) { if (signed(event.tick())<0) { printf("ERROR: trying to add event before current part!\n"); diff --git a/muse2/muse/midiedit/prcanvas.h b/muse2/muse/midiedit/prcanvas.h index 888427ea..4748093b 100644 --- a/muse2/muse/midiedit/prcanvas.h +++ b/muse2/muse/midiedit/prcanvas.h @@ -46,7 +46,7 @@ namespace MusEGui { class NEvent : public CItem { public: - NEvent(MusECore::Event& e, MusECore::Part* p, int y); + NEvent(const MusECore::Event& e, MusECore::Part* p, int y); }; class ScrollScale; @@ -80,7 +80,7 @@ class PianoCanvas : public EventCanvas { virtual void dragEnterEvent(QDragEnterEvent* event); virtual void dragMoveEvent(QDragMoveEvent*); virtual void dragLeaveEvent(QDragLeaveEvent*); - virtual CItem* addItem(MusECore::Part*, MusECore::Event&); + virtual CItem* addItem(MusECore::Part*, const MusECore::Event&); int y2pitch(int) const; int pitch2y(int) const; diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index c1666a78..54ff0c2f 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -3970,7 +3970,7 @@ void ScoreCanvas::mouseReleaseEvent (QMouseEvent* event) if (!ctrl) deselect_all(); - set<MusECore::Event*> already_processed; + set<const MusECore::Event*> already_processed; for (list<staff_t>::iterator it=staves.begin(); it!=staves.end(); it++) it->apply_lasso(lasso.translated(x_pos-x_left, y_pos - it->y_draw), already_processed); @@ -4559,7 +4559,7 @@ set<MusECore::Part*> staff_t::parts_at_tick(unsigned tick) return result; } -void staff_t::apply_lasso(QRect rect, set<MusECore::Event*>& already_processed) +void staff_t::apply_lasso(QRect rect, set<const MusECore::Event*>& already_processed) { for (ScoreItemList::iterator it=itemlist.begin(); it!=itemlist.end(); it++) for (set<FloItem>::iterator it2=it->second.begin(); it2!=it->second.end(); it2++) diff --git a/muse2/muse/midiedit/scoreedit.h b/muse2/muse/midiedit/scoreedit.h index 3b413660..cc7acbd5 100644 --- a/muse2/muse/midiedit/scoreedit.h +++ b/muse2/muse/midiedit/scoreedit.h @@ -258,7 +258,7 @@ class FloEvent typeEnum type; unsigned tick; MusECore::Part* source_part; - MusECore::Event* source_event; + const MusECore::Event* source_event; int pitch; mutable int vel; @@ -270,7 +270,7 @@ class FloEvent MusECore::key_enum key; - FloEvent(unsigned ti, int p,int v,int l,typeEnum t, MusECore::Part* part=NULL, MusECore::Event* event=NULL) + FloEvent(unsigned ti, int p,int v,int l,typeEnum t, MusECore::Part* part=NULL, const MusECore::Event* event=NULL) { pitch=p; vel=v; @@ -312,7 +312,7 @@ class FloItem enum typeEnum { NOTE=21, REST=22, NOTE_END=01, REST_END=02, BAR =10, KEY_CHANGE=13, TIME_SIG=16}; //the order matters! typeEnum type; unsigned begin_tick; - MusECore::Event* source_event; + const MusECore::Event* source_event; MusECore::Part* source_part; note_pos_t pos; @@ -343,7 +343,7 @@ class FloItem - FloItem(typeEnum t, note_pos_t p, int l=0,int d=0, bool ti=false, unsigned beg=0, MusECore::Part* part=NULL, MusECore::Event* event=NULL) + FloItem(typeEnum t, note_pos_t p, int l=0,int d=0, bool ti=false, unsigned beg=0, MusECore::Part* part=NULL, const MusECore::Event* event=NULL) { pos=p; dots=d; @@ -568,7 +568,7 @@ struct staff_t void process_itemlist(); void calc_item_pos(); - void apply_lasso(QRect rect, set<MusECore::Event*>& already_processed); + void apply_lasso(QRect rect, set<const MusECore::Event*>& already_processed); void recalculate() { @@ -746,7 +746,7 @@ class ScoreCanvas : public MusEGui::View int dragged_event_part_index; MusECore::Event dragged_event; MusECore::Event original_dragged_event; - MusECore::Event* clicked_event_ptr; + const MusECore::Event* clicked_event_ptr; int old_pitch; unsigned old_dest_tick; |