Skip to content

Commit

Permalink
resolved merge conflict after moving muse3 to src
Browse files Browse the repository at this point in the history
  • Loading branch information
spamatica committed Feb 15, 2021
2 parents d9d1bf1 + f85c17e commit 833cbf1
Show file tree
Hide file tree
Showing 17 changed files with 104 additions and 76 deletions.
4 changes: 4 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
15.02.2021
*** MusE 4.0pre3 ***
- Fix: Consistent sorting and terminology of all Functions menus. (kybos)
- Fix: Dummy icon to work around Qt>5.12 menu styling bugs. (kybos)
- Fix: Script popup couldn't be cancelled. (kybos)
- Add: New vector icons for Quantize/Set range to selection. (kybos)
14.02.2021
- muse3 folder renamed to src for futureproofing (rj)
- Rework: Removed LastEditedEvent from configuration and added it (rj)
Expand Down
23 changes: 14 additions & 9 deletions src/muse/arranger/arrangerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ ArrangerView::ArrangerView(QWidget* parent)
editInvertSelectionAction = new QAction(QIcon(*select_invert_selectionIcon), tr("Invert &Selection"), this);
editInsideLoopAction = new QAction(QIcon(*select_inside_loopIcon), tr("&Inside Loop"), this);
editOutsideLoopAction = new QAction(QIcon(*select_outside_loopIcon), tr("&Outside Loop"), this);
editAllPartsAction = new QAction( QIcon(*select_all_parts_on_trackIcon), tr("All &Parts on Track"), this);
editRangeToSelection = new QAction(tr("Set &Range to Selection"), this);
editAllPartsAction = new QAction(QIcon(*select_all_parts_on_trackIcon), tr("All &Parts on Track"), this);
editRangeToSelection = new QAction(*rangeToSelectionSVGIcon, tr("Set &Range to Selection"), this);

select->addAction(editSelectAllAction);
select->addAction(editDeselectAllAction);
Expand Down Expand Up @@ -278,16 +278,20 @@ ArrangerView::ArrangerView(QWidget* parent)
functions_menu->addAction(midiTransformerAction);
functions_menu->addSeparator();

QAction* func_quantize_action = functions_menu->addAction(tr("&Quantize Notes"));
QAction* func_notelen_action = functions_menu->addAction(tr("Change Note &Length"));
QAction* func_velocity_action = functions_menu->addAction(tr("Change Note &Velocity"));
QAction* func_quantize_action = functions_menu->addAction(*quantizeSVGIcon, tr("&Quantize Events"));
QAction* func_velocity_action = functions_menu->addAction(tr("Change Event &Velocity"));
QAction* func_cresc_action = functions_menu->addAction(tr("Crescendo/Decrescendo"));
QAction* func_move_action = functions_menu->addAction(tr("Move Events in Parts"));
QAction* func_del_overlaps_action = functions_menu->addAction(tr("Delete Overlapping Events"));
QAction* func_erase_action = functions_menu->addAction(tr("Erase Events From Parts"));

functions_menu->addSeparator();

QAction* func_notelen_action = functions_menu->addAction(tr("Change Event &Length"));
QAction* func_fixed_len_action = functions_menu->addAction(tr("Set Fixed Event Length"));
QAction* func_transpose_action = functions_menu->addAction(tr("Transpose"));
QAction* func_erase_action = functions_menu->addAction(tr("Erase Events (Not Parts)"));
QAction* func_move_action = functions_menu->addAction(tr("Move Events (Not Parts)"));
QAction* func_fixed_len_action = functions_menu->addAction(tr("Set Fixed Note Length"));
QAction* func_del_overlaps_action = functions_menu->addAction(tr("Delete Overlapping Notes"));
QAction* func_legato_action = functions_menu->addAction(tr("Legato"));

connect(func_quantize_action, &QAction::triggered, [this]() { cmd(CMD_QUANTIZE); } );
connect(func_notelen_action, &QAction::triggered, [this]() { cmd(CMD_NOTELEN); } );
connect(func_velocity_action, &QAction::triggered, [this]() { cmd(CMD_VELOCITY); } );
Expand All @@ -298,6 +302,7 @@ ArrangerView::ArrangerView(QWidget* parent)
connect(func_fixed_len_action, &QAction::triggered, [this]() { cmd(CMD_FIXED_LEN); } );
connect(func_del_overlaps_action, &QAction::triggered, [this]() { cmd(CMD_DELETE_OVERLAPS); } );
connect(func_legato_action, &QAction::triggered, [this]() { cmd(CMD_LEGATO); } );

functions_menu->addSeparator();
functions_menu->addAction(editShrinkPartsAction);
functions_menu->addAction(editExpandPartsAction);
Expand Down
2 changes: 1 addition & 1 deletion src/muse/function_dialogs/gatetimebase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>MusE: Modify Note Length</string>
<string>MusE: Modify Event Length</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
Expand Down
2 changes: 1 addition & 1 deletion src/muse/function_dialogs/movebase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>MusE: Move Notes</string>
<string>MusE: Move Events</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
Expand Down
2 changes: 1 addition & 1 deletion src/muse/function_dialogs/removebase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>MusE: Erase Notes</string>
<string>MusE: Erase Events</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
Expand Down
2 changes: 1 addition & 1 deletion src/muse/function_dialogs/setlenbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>MusE: Set Note Length</string>
<string>MusE: Set Event Length</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
Expand Down
18 changes: 14 additions & 4 deletions src/muse/icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
#include "xpm/velo_per_note.xpm"

#include "xpm/midi_transform.xpm"
#include "xpm/select.xpm"
#include "xpm/select_all.xpm"
#include "xpm/select_all_parts_on_track.xpm"
#include "xpm/select_deselect_all.xpm"
Expand Down Expand Up @@ -180,7 +179,6 @@ QIcon* ledGreenIcon;
QIcon* ledDarkGreenIcon;

QPixmap* midi_transformIcon;
QPixmap* selectIcon;
QPixmap* select_allIcon;
QPixmap* select_all_parts_on_trackIcon;
QPixmap* select_deselect_allIcon;
Expand Down Expand Up @@ -389,6 +387,10 @@ QIcon* routeSourceSVGIcon;
QIcon* routeDestSVGIcon;

QIcon* gridOnSVGIcon;
QIcon* rangeToSelectionSVGIcon;
QIcon* quantizeSVGIcon;

QIcon* dummySVGIcon;

//----------------------------------
// Cursors
Expand Down Expand Up @@ -535,7 +537,6 @@ void initIcons(int cursorSize, const QString& gpath, const QString& upath)
veloPerNote_OffIcon = new QPixmap(velo_all_xpm);

midi_transformIcon = new QPixmap(midi_transform_xpm);
selectIcon = new QPixmap(select_xpm);
select_allIcon = new QPixmap(select_all_xpm);
select_all_parts_on_trackIcon = new QPixmap(select_all_parts_on_track_xpm);
select_deselect_allIcon = new QPixmap(select_deselect_all);
Expand Down Expand Up @@ -783,6 +784,12 @@ void initIcons(int cursorSize, const QString& gpath, const QString& upath)
routeDestSVGIcon = icons.getSVG("route_destinations.svg");

gridOnSVGIcon = icons.getSVG("grid_on.svg");
rangeToSelectionSVGIcon = icons.getSVG("range_to_selection.svg");
quantizeSVGIcon = icons.getSVG("quantize.svg");

QPixmap px(10,10);
px.fill(Qt::transparent);
dummySVGIcon = new QIcon(px);

//----------------------------------
// Cursors
Expand Down Expand Up @@ -868,7 +875,6 @@ void deleteIcons()
delete veloPerNote_OffIcon;

delete midi_transformIcon;
delete selectIcon;
delete select_allIcon;
delete select_all_parts_on_trackIcon;
delete select_deselect_allIcon;
Expand Down Expand Up @@ -1078,6 +1084,10 @@ void deleteIcons()
delete routeDestSVGIcon;

delete gridOnSVGIcon;
delete rangeToSelectionSVGIcon;
delete quantizeSVGIcon;

delete dummySVGIcon;

//----------------------------------
// Cursors
Expand Down
5 changes: 4 additions & 1 deletion src/muse/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ extern QPixmap* veloPerNote_OnIcon;
extern QPixmap* veloPerNote_OffIcon;

extern QPixmap* midi_transformIcon;
extern QPixmap* selectIcon;
extern QPixmap* select_allIcon;
extern QPixmap* select_all_parts_on_trackIcon;
extern QPixmap* select_deselect_allIcon;
Expand Down Expand Up @@ -308,6 +307,10 @@ extern QIcon* routeSourceSVGIcon;
extern QIcon* routeDestSVGIcon;

extern QIcon* gridOnSVGIcon;
extern QIcon* rangeToSelectionSVGIcon;
extern QIcon* quantizeSVGIcon;

extern QIcon* dummySVGIcon;

//----------------------------------
// Cursors
Expand Down
15 changes: 9 additions & 6 deletions src/muse/midiedit/drumedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un
connect(deleteAction, &QAction::triggered, [this]() { cmd(DrumCanvas::CMD_DEL); } );

menuEdit->addSeparator();
menuSelect = menuEdit->addMenu(QIcon(*selectIcon), tr("&Select"));
menuSelect = menuEdit->addMenu(tr("&Select"));

sallAction = menuSelect->addAction(QIcon(*select_allIcon), tr("Select All"));
snoneAction = menuSelect->addAction(QIcon(*select_deselect_allIcon), tr("Select None"));
Expand All @@ -289,7 +289,7 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un

menuSelect->addSeparator();

selectRangeToSelectionAction = menuSelect->addAction(tr("Set &Range to Selection"));
selectRangeToSelectionAction = menuSelect->addAction(*rangeToSelectionSVGIcon, tr("Set &Range to Selection"));
connect(selectRangeToSelectionAction, &QAction::triggered, [this]() { cmd(DrumCanvas::CMD_RANGE_TO_SELECTION); } );

if (parts()->size() > 1) {
Expand Down Expand Up @@ -318,13 +318,16 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un

// menuFunctions->setTearOffEnabled(true);

fixedAction = menuFunctions->addAction(tr("Set Fixed Length"));
quantizeAction = menuFunctions->addAction(*quantizeSVGIcon, tr("Quantize"));
veloAction = menuFunctions->addAction(tr("Modify Velocity"));
crescAction = menuFunctions->addAction(tr("Crescendo/Decrescendo"));
quantizeAction = menuFunctions->addAction(tr("Quantize"));
QAction* eraseEventAction = menuFunctions->addAction(tr("Erase Event"));
QAction* noteShiftAction = menuFunctions->addAction(tr("Move Notes"));
QAction* delOverlapsAction = menuFunctions->addAction(tr("Delete Overlaps"));
QAction* eraseEventAction = menuFunctions->addAction(tr("Erase Events"));

menuFunctions->addSeparator();

fixedAction = menuFunctions->addAction(*dummySVGIcon, tr("Set Length to Drummap Value"));

connect(fixedAction, &QAction::triggered, [this]() { cmd(DrumCanvas::CMD_FIXED_LEN); } );
connect(veloAction, &QAction::triggered, [this]() { cmd(DrumCanvas::CMD_MODIFY_VELOCITY); } );
Expand Down Expand Up @@ -370,7 +373,7 @@ DrumEdit::DrumEdit(MusECore::PartList* pl, QWidget* parent, const char* name, un
QMenu* menuShowHide=settingsMenu->addMenu(tr("Show/Hide"));
QAction* ignoreHideAction = menuShowHide->addAction(tr("Also Show Hidden Instruments"));
menuShowHide->addSeparator();
QAction* showAllAction = menuShowHide->addAction(tr("Show All Instruments"));
QAction* showAllAction = menuShowHide->addAction(*dummySVGIcon, tr("Show All Instruments"));
QAction* hideAllAction = menuShowHide->addAction(tr("Hide All Instruments"));
QAction* hideUnusedAction = menuShowHide->addAction(tr("Only Show Used Instruments"));
QAction* hideEmptyAction = menuShowHide->addAction(tr("Only Show Instruments With Non-empty Name or Used Instruments"));
Expand Down
38 changes: 20 additions & 18 deletions src/muse/midiedit/pianoroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,

menuEdit->addSeparator();

menuSelect = menuEdit->addMenu(QIcon(*selectIcon), tr("&Select"));
menuSelect = menuEdit->addMenu(tr("&Select"));

selectAllAction = menuSelect->addAction(QIcon(*select_allIcon), tr("Select &All"));
connect(selectAllAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_SELECT_ALL); } );
Expand All @@ -209,7 +209,7 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,

menuSelect->addSeparator();

selectRangeToSelectionAction = menuSelect->addAction(tr("Set &Range to Selection"));
selectRangeToSelectionAction = menuSelect->addAction(*rangeToSelectionSVGIcon, tr("Set &Range to Selection"));
connect(selectRangeToSelectionAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_RANGE_TO_SELECTION); } );

if (parts()->size() > 1) {
Expand All @@ -231,33 +231,35 @@ PianoRoll::PianoRoll(MusECore::PartList* pl, QWidget* parent, const char* name,

// menuFunctions->setTearOffEnabled(true);

funcQuantizeAction = menuFunctions->addAction(tr("Quantize"));
funcQuantizeAction = menuFunctions->addAction(*quantizeSVGIcon, tr("Quantize"));
connect(funcQuantizeAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_QUANTIZE); } );

funcGateTimeAction = menuFunctions->addAction(tr("Modify Note Length"));
connect(funcGateTimeAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_MODIFY_GATE_TIME); } );

funcModVelAction = menuFunctions->addAction(tr("Modify Velocity"));
funcModVelAction = menuFunctions->addAction(tr("Change Event Velocity"));
connect(funcModVelAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_MODIFY_VELOCITY); } );

funcCrescAction = menuFunctions->addAction(tr("Crescendo/Decrescendo"));
connect(funcCrescAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_CRESCENDO); } );

funcTransposeAction = menuFunctions->addAction(tr("Transpose"));
connect(funcTransposeAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_TRANSPOSE); } );


funcNoteShiftAction = menuFunctions->addAction(tr("Move Events"));
connect(funcNoteShiftAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_NOTE_SHIFT); } );

funcDelOverlapsAction = menuFunctions->addAction(tr("Delete Overlaps"));
connect(funcDelOverlapsAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_DELETE_OVERLAPS); } );

funcEraseEventAction = menuFunctions->addAction(tr("Erase Events"));
connect(funcEraseEventAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_ERASE_EVENT); } );

menuFunctions->addSeparator();

funcGateTimeAction = menuFunctions->addAction(tr("Change Event Length"));
connect(funcGateTimeAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_MODIFY_GATE_TIME); } );

funcNoteShiftAction = menuFunctions->addAction(tr("Move Notes"));
connect(funcNoteShiftAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_NOTE_SHIFT); } );

funcSetFixedLenAction = menuFunctions->addAction(tr("Set Fixed Length"));
connect(funcSetFixedLenAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_FIXED_LEN); } );

funcDelOverlapsAction = menuFunctions->addAction(tr("Delete Overlaps"));
connect(funcDelOverlapsAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_DELETE_OVERLAPS); } );

funcTransposeAction = menuFunctions->addAction(tr("Transpose"));
connect(funcTransposeAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_TRANSPOSE); } );

QAction* funcLegatoAction = menuFunctions->addAction(tr("Legato"));
connect(funcLegatoAction, &QAction::triggered, [this]() { cmd(PianoCanvas::CMD_LEGATO); } );

Expand Down
15 changes: 9 additions & 6 deletions src/muse/midiedit/scoreedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)

edit_menu->addSeparator();

QMenu* select_menu = edit_menu->addMenu(QIcon(*selectIcon), tr("&Select"));
QMenu* select_menu = edit_menu->addMenu(tr("&Select"));

select_all_action = select_menu->addAction(QIcon(*select_allIcon), tr("Select &All"));
connect(select_all_action, &QAction::triggered, [this]() { menu_command(CMD_SELECT_ALL); } );
Expand All @@ -437,15 +437,18 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos)

QMenu* functions_menu = menuBar()->addMenu(tr("Fu&nctions"));

func_quantize_action = functions_menu->addAction(tr("&Quantize"));
func_notelen_action = functions_menu->addAction(tr("Change Note &Length"));
func_quantize_action = functions_menu->addAction(*quantizeSVGIcon, tr("&Quantize"));
func_velocity_action = functions_menu->addAction(tr("Change Note &Velocity"));
func_cresc_action = functions_menu->addAction(tr("Crescendo/Decrescendo"));
func_transpose_action = functions_menu->addAction(tr("Transpose"));
func_erase_action = functions_menu->addAction(tr("Erase Events"));
func_move_action = functions_menu->addAction(tr("Move Notes"));
func_fixed_len_action = functions_menu->addAction(tr("Set Fixed Length"));
func_del_overlaps_action = functions_menu->addAction(tr("Delete Overlaps"));
func_erase_action = functions_menu->addAction(tr("Erase Events"));

functions_menu->addSeparator();

func_notelen_action = functions_menu->addAction(tr("Change Note &Length"));
func_fixed_len_action = functions_menu->addAction(tr("Set Fixed Length"));
func_transpose_action = functions_menu->addAction(tr("Transpose"));
func_legato_action = functions_menu->addAction(tr("Legato"));

connect(func_quantize_action, &QAction::triggered, [this]() { menu_command(CMD_QUANTIZE); } );
Expand Down
15 changes: 10 additions & 5 deletions src/muse/scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ void Scripts::executeScript(QWidget *parent, const char* scriptfile, PartList* p

if (onlyIfSelected) // if this is set means we are probably inside a midi editor and we ask again to be sure
{
if(QMessageBox::question(parent, QString("Process events"),
tr("Do you want to process ALL or only selected events?"), tr("&Selected"), tr("&All"),
QString(), 0, 1 ) == 1)
{
QMessageBox m;
m.setText(tr("Do you want to process all or only selected events?"));
m.addButton(tr("&Selected"), QMessageBox::YesRole);
m.addButton(tr("&All"), QMessageBox::NoRole);
m.addButton(tr("&Cancel"), QMessageBox::RejectRole);
m.exec();
if (m.buttonRole(m.clickedButton()) == QMessageBox::RejectRole)
return;
else if (m.buttonRole(m.clickedButton()) == QMessageBox::NoRole)
onlyIfSelected = false;
}
}

QProgressDialog progress(parent);
progress.setLabelText("Process parts");
progress.setRange(0,parts->size());
Expand Down
4 changes: 2 additions & 2 deletions src/muse/waveedit/waveedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ WaveEdit::WaveEdit(MusECore::PartList* pl, QWidget* parent, const char* name)
selectAllAction = menuEdit->addAction(QIcon(*select_allIcon), tr("Select &All"));
connect(selectAllAction, &QAction::triggered, [this]() { cmd(WaveCanvas::CMD_SELECT_ALL); } );

selectNoneAction = menuEdit->addAction(QIcon(*select_allIcon), tr("&Deselect All"));
selectNoneAction = menuEdit->addAction(QIcon(*select_deselect_allIcon), tr("&Deselect All"));
connect(selectNoneAction, &QAction::triggered, [this]() { cmd(WaveCanvas::CMD_SELECT_NONE); } );

menuEdit->addSeparator();

selectRangeToSelectionAction = menuEdit->addAction(tr("Set &Range to Selection"));
selectRangeToSelectionAction = menuEdit->addAction(*rangeToSelectionSVGIcon, tr("Set &Range to Selection"));
connect(selectRangeToSelectionAction, &QAction::triggered, [this]() { cmd(WaveCanvas::CMD_RANGE_TO_SELECTION); } );

// only 1 part can be opened
Expand Down
2 changes: 2 additions & 0 deletions src/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,7 @@
<file>svg/filesave_revision.svg</file>
<file>svg/filesave_project.svg</file>
<file>svg/filesave_template.svg</file>
<file>svg/range_to_selection.svg</file>
<file>svg/quantize.svg</file>
</qresource>
</RCC>
4 changes: 4 additions & 0 deletions src/svg/quantize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/svg/range_to_selection.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 833cbf1

Please sign in to comment.