diff options
-rw-r--r-- | muse2/muse/app.cpp | 13 | ||||
-rw-r--r-- | muse2/muse/app.h | 11 | ||||
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 24 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 8 | ||||
-rw-r--r-- | muse2/muse/widgets/canvas.cpp | 2 |
5 files changed, 30 insertions, 28 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 9bbe8736..80a7b7ef 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -999,9 +999,13 @@ MusE::MusE(int argc, char** argv) : QMainWindow() scoreAllInOneSubsubmenu = new QMenu(tr("all parts in one staff"), this); scoreOneStaffPerTrackSubsubmenu = new QMenu(tr("one staff per part"), this); + + scoreSubmenu->addMenu(scoreAllInOneSubsubmenu); + scoreSubmenu->addMenu(scoreOneStaffPerTrackSubsubmenu); updateScoreMenus(); + startScoreEditAction = new QAction(*scoreIconSet, tr("New score window"), this); startPianoEditAction = new QAction(*pianoIconSet, tr("Pianoroll"), this); startDrumEditAction = new QAction(QIcon(*edit_drummsIcon), tr("Drums"), this); startListEditAction = new QAction(QIcon(*edit_listIcon), tr("List"), this); @@ -1151,6 +1155,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() connect(editSignalMapper, SIGNAL(mapped(int)), this, SLOT(cmd(int))); connect(startPianoEditAction, SIGNAL(activated()), SLOT(startPianoroll())); + connect(startScoreEditAction, SIGNAL(activated()), SLOT(startScoreQuickly())); connect(startDrumEditAction, SIGNAL(activated()), SLOT(startDrumEditor())); connect(startListEditAction, SIGNAL(activated()), SLOT(startListEditor())); connect(startWaveEditAction, SIGNAL(activated()), SLOT(startWaveEditor())); @@ -1373,8 +1378,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() menuEdit->addAction(startPianoEditAction); menuEdit->addMenu(scoreSubmenu); - scoreSubmenu->addMenu(scoreAllInOneSubsubmenu); - scoreSubmenu->addMenu(scoreOneStaffPerTrackSubsubmenu); + menuEdit->addAction(startScoreEditAction); menuEdit->addAction(startDrumEditAction); menuEdit->addAction(startListEditAction); menuEdit->addAction(startWaveEditAction); @@ -3536,6 +3540,11 @@ void MusE::openInScoreEdit(ScoreEdit* destination, PartList* pl, bool allInOne) destination->add_parts(pl, allInOne); } +void MusE::startScoreQuickly() +{ + openInScoreEdit_oneStaffPerTrack(NULL); +} + //--------------------------------------------------------- // startPianoroll //--------------------------------------------------------- diff --git a/muse2/muse/app.h b/muse2/muse/app.h index 8a9fdac0..2fd83854 100644 --- a/muse2/muse/app.h +++ b/muse2/muse/app.h @@ -69,6 +69,8 @@ class ScoreEdit; #define MENU_ADD_SYNTH_ID_BASE 0x1000 + + //--------------------------------------------------------- // MusE //--------------------------------------------------------- @@ -110,12 +112,14 @@ class MusE : public QMainWindow QAction *editInvertSelectionAction, *editInsideLoopAction, *editOutsideLoopAction, *editAllPartsAction; QAction *trackMidiAction, *trackDrumAction, *trackWaveAction, *trackAOutputAction, *trackAGroupAction; QAction *trackAInputAction, *trackAAuxAction; - QAction *startPianoEditAction, *startDrumEditAction, *startListEditAction, *startWaveEditAction; QAction *masterGraphicAction, *masterListAction; QAction *midiTransposeAction; QAction *midiTransformerAction; QAction *editSongInfoAction; - + public: + QAction *startScoreEditAction, *startPianoEditAction, *startDrumEditAction, *startListEditAction, *startWaveEditAction; + QMenu *scoreSubmenu, *scoreOneStaffPerTrackSubsubmenu, *scoreAllInOneSubsubmenu; + private: // View Menu actions QAction *viewTransportAction, *viewBigtimeAction, *viewMixerAAction, *viewMixerBAction, *viewCliplistAction, *viewMarkerAction; @@ -159,7 +163,6 @@ class MusE : public QMainWindow QMenu* menu_audio, *menuAutomation; QMenu* menu_functions, *menuScriptPlugins; QMenu* select, *master, *midiEdit, *addTrack; - QMenu *scoreSubmenu, *scoreOneStaffPerTrackSubsubmenu, *scoreAllInOneSubsubmenu; // Special 'stay-open' menu for routes. PopupMenu* routingPopupMenu; @@ -273,7 +276,7 @@ class MusE : public QMainWindow void clearScoreMenuMappers(); void updateScoreMenus(); void scoreNamingChanged(); - + void startScoreQuickly(); void startPianoroll(); void startPianoroll(PartList* /*pl*/, bool /*showDefaultCtrls*/ = false); void startWaveEditor(); diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 6068c743..c76e4421 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -783,19 +783,17 @@ QMenu* PartCanvas::genItemPopup(CItem* item) partPopup->addSeparator(); switch(trackType) { case Track::MIDI: { - QAction *act_pianoroll = partPopup->addAction(QIcon(*pianoIconSet), tr("pianoroll")); - act_pianoroll->setData(10); - QAction *act_mlist = partPopup->addAction(QIcon(*edit_listIcon), tr("list")); - act_mlist->setData(12); + partPopup->addAction(muse->startPianoEditAction); + partPopup->addMenu(muse->scoreSubmenu); + partPopup->addAction(muse->startScoreEditAction); + partPopup->addAction(muse->startListEditAction); QAction *act_mexport = partPopup->addAction(tr("save part to disk")); act_mexport->setData(16); } break; case Track::DRUM: { - QAction *act_dlist = partPopup->addAction(QIcon(*edit_listIcon), tr("list")); - act_dlist->setData(12); - QAction *act_drums = partPopup->addAction(QIcon(*edit_drummsIcon), tr("drums")); - act_drums->setData(13); + partPopup->addAction(muse->startDrumEditAction); + partPopup->addAction(muse->startListEditAction); QAction *act_dexport = partPopup->addAction(tr("save part to disk")); act_dexport->setData(16); } @@ -866,15 +864,7 @@ void PartCanvas::itemPopup(CItem* item, int n, const QPoint& pt) case 5: copy(pl); break; - case 10: // pianoroll edit - emit startEditor(pl, 0); - return; - case 12: // list edit - emit startEditor(pl, 1); - return; - case 13: // drum edit - emit startEditor(pl, 3); - return; + case 14: // wave edit { // Changed to allow multiple selected parts to be shown. By T356 diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index 98568325..de397c30 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -3469,10 +3469,6 @@ set<Part*> staff_t::parts_at_tick(unsigned tick) * x nothing atm * * less important stuff - * o use the proper quantisation functions instead of - * flo_quantize() and flo_quantize_floor() - * o let the user set up SPLIT_NOTE - * o let the user decide about the initial clef (search for FINDME_INITCLEF) * o deal with expanding parts or clip (expanding is better) * o offer functions like in the pianoroll: quantize etc. * o support selections @@ -3488,6 +3484,10 @@ set<Part*> staff_t::parts_at_tick(unsigned tick) * keeping its own pos_add variable (which is only an optimisation) * o draw a margin around notes which are in a bright color * o refuse to resize so that width gets smaller or equal than x_left + * o use the proper quantisation functions instead of + * flo_quantize() and flo_quantize_floor() + * o let the user set up SPLIT_NOTE + * o let the user decide about the initial clef (search for FINDME_INITCLEF) * * stuff for the other muse developers * o process accurate timesignatures from muse's list (has to be implemented first in muse) diff --git a/muse2/muse/widgets/canvas.cpp b/muse2/muse/widgets/canvas.cpp index 596e4067..14f414b7 100644 --- a/muse2/muse/widgets/canvas.cpp +++ b/muse2/muse/widgets/canvas.cpp @@ -557,7 +557,7 @@ void Canvas::viewMousePressEvent(QMouseEvent* event) itemPopupMenu = genItemPopup(curItem); if (itemPopupMenu) { QAction *act = itemPopupMenu->exec(QCursor::pos()); - if (act) + if (act && act->data().isValid()) itemPopup(curItem, act->data().toInt(), start); delete itemPopupMenu; } |