2020-06-08 16:31:03 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2020 MuseScore BVBA and others
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2.
|
|
|
|
//
|
|
|
|
// 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, write to the Free Software
|
|
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
//=============================================================================
|
2020-11-24 12:27:49 +01:00
|
|
|
#ifndef MU_NOTATION_INOTATIONNOTEINPUT_H
|
|
|
|
#define MU_NOTATION_INOTATIONNOTEINPUT_H
|
2020-06-08 16:31:03 +02:00
|
|
|
|
2020-11-25 12:44:08 +01:00
|
|
|
#include "async/notification.h"
|
2020-06-08 16:31:03 +02:00
|
|
|
#include "notationtypes.h"
|
|
|
|
|
2020-11-06 16:26:06 +01:00
|
|
|
namespace mu::notation {
|
2020-11-24 12:27:49 +01:00
|
|
|
class INotationNoteInput
|
2020-06-08 16:31:03 +02:00
|
|
|
{
|
|
|
|
public:
|
2020-11-24 12:27:49 +01:00
|
|
|
virtual ~INotationNoteInput() = default;
|
2020-06-08 16:31:03 +02:00
|
|
|
|
2020-11-24 12:27:49 +01:00
|
|
|
virtual bool isNoteInputMode() const = 0;
|
2020-11-25 12:44:08 +01:00
|
|
|
|
2020-11-24 12:56:35 +01:00
|
|
|
virtual NoteInputState state() const = 0;
|
2020-11-23 19:12:28 +01:00
|
|
|
|
2020-11-24 12:27:49 +01:00
|
|
|
virtual void startNoteInput() = 0;
|
|
|
|
virtual void endNoteInput() = 0;
|
2020-11-25 10:30:23 +01:00
|
|
|
virtual void toggleNoteInputMethod(NoteInputMethod method) = 0;
|
2020-11-23 19:12:28 +01:00
|
|
|
virtual void addNote(NoteName noteName, NoteAddingMode addingMode) = 0;
|
|
|
|
virtual void padNote(const Pad& pad) = 0;
|
|
|
|
virtual void putNote(const QPointF& pos, bool replace, bool insert) = 0;
|
2020-11-24 12:27:49 +01:00
|
|
|
virtual void toogleAccidental(AccidentalType accidentalType) = 0;
|
2020-11-23 19:12:28 +01:00
|
|
|
|
2020-11-25 19:03:54 +01:00
|
|
|
virtual void addSlur(Ms::Slur* slur) = 0;
|
|
|
|
virtual void resetSlur() = 0;
|
|
|
|
|
2020-11-23 19:12:28 +01:00
|
|
|
virtual async::Notification noteAdded() const = 0;
|
|
|
|
virtual async::Notification stateChanged() const = 0;
|
2020-06-08 16:31:03 +02:00
|
|
|
};
|
2020-10-29 09:05:11 +01:00
|
|
|
|
2020-11-24 12:27:49 +01:00
|
|
|
using INotationNoteInputPtr = std::shared_ptr<INotationNoteInput>;
|
2020-06-08 16:31:03 +02:00
|
|
|
}
|
|
|
|
|
2020-11-24 12:27:49 +01:00
|
|
|
#endif // MU_NOTATION_INOTATIONNOTEINPUT_H
|