-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work on resurrecting the shift string command.
This doesn't do much at the moment, and is mostly getting code compiling again. - Renamed the Shift Forward / Backward commands to Insert / Remove Space, to hopefully reduce confusion with string shifting (and potential future commands for shifting notes up / down by a semitone) - Name this command as Shift String Up/Down #20
- Loading branch information
1 parent
f6478ba
commit df80803
Showing
10 changed files
with
223 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (C) 2020 Cameron White | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "shiftstring.h" | ||
|
||
ShiftString::ShiftString(const ScoreLocation &location, bool shift_up) | ||
: QUndoCommand(shift_up ? QObject::tr("Shift String Up") | ||
: QObject::tr("Shift String Down")), | ||
myLocation(location), | ||
myShiftUp(shift_up) | ||
{ | ||
// TODO - copy original positions. | ||
} | ||
|
||
void | ||
ShiftString::redo() | ||
{ | ||
// TODO | ||
} | ||
|
||
void | ||
ShiftString::undo() | ||
{ | ||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (C) 2020 Cameron White | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef ACTIONS_SHIFTTABNUMBER_H | ||
#define ACTIONS_SHIFTTABNUMBER_H | ||
|
||
#include <QUndoCommand> | ||
#include <score/position.h> | ||
#include <score/scorelocation.h> | ||
#include <vector> | ||
|
||
/// Shift tab numbers to an adjacent string. | ||
class ShiftString : public QUndoCommand | ||
{ | ||
public: | ||
ShiftString(const ScoreLocation &location, bool shift_up); | ||
|
||
void undo() final; | ||
void redo() final; | ||
|
||
private: | ||
ScoreLocation myLocation; | ||
std::vector<Position> myOriginalPositions; | ||
const bool myShiftUp; | ||
}; | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.