-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented stubs for shortcuts module
- Loading branch information
1 parent
41d47a0
commit 5029287
Showing
22 changed files
with
493 additions
and
3 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
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
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
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,42 @@ | ||
#============================================================================= | ||
# 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. | ||
#============================================================================= | ||
|
||
set(MODULE shortcuts) | ||
|
||
set(MODULE_QRC shortcuts.qrc) | ||
|
||
set(MODULE_QML_IMPORT ${CMAKE_CURRENT_LIST_DIR}/qml ) | ||
|
||
set(MODULE_SRC | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutsstubmodule.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutsstubmodule.h | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutsregisterstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutsregisterstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutscontrollerstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutscontrollerstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutsconfigurationstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutsconfigurationstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutcontextresolverstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/shortcutcontextresolverstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/midiremotestub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/midiremotestub.h | ||
) | ||
|
||
include(${PROJECT_SOURCE_DIR}/build/module.cmake) | ||
|
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 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#include "midiremotestub.h" | ||
|
||
using namespace mu::shortcuts; | ||
|
||
void MidiRemoteStub::setIsSettingMode(bool) | ||
{ | ||
} | ||
|
||
bool MidiRemoteStub::isSettingMode() const | ||
{ | ||
return false; | ||
} | ||
|
||
void MidiRemoteStub::setCurrentActionEvent(const mu::midi::Event&) | ||
{ | ||
} | ||
|
||
mu::Ret MidiRemoteStub::process(const mu::midi::Event&) | ||
{ | ||
return make_ret(Ret::Code::NotSupported); | ||
} |
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,37 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#ifndef MU_SHORTCUTS_MIDIREMOTESTUB_H | ||
#define MU_SHORTCUTS_MIDIREMOTESTUB_H | ||
|
||
#include "shortcuts/imidiremote.h" | ||
|
||
namespace mu::shortcuts { | ||
class MidiRemoteStub : public IMidiRemote | ||
{ | ||
public: | ||
void setIsSettingMode(bool arg) override; | ||
bool isSettingMode() const override; | ||
|
||
void setCurrentActionEvent(const midi::Event& ev) override; | ||
|
||
Ret process(const midi::Event& ev) override; | ||
}; | ||
} | ||
|
||
#endif // MU_SHORTCUTS_MIDIREMOTESTUB_H |
3 changes: 3 additions & 0 deletions
3
src/stubs/framework/shortcuts/qml/MuseScore/Shortcuts/Shortcuts.qml
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,3 @@ | ||
import QtQuick 2.15 | ||
|
||
QtObject { } |
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,2 @@ | ||
module MuseScore.Shortcuts | ||
Shortcuts 1.0 Shortcuts.qml |
26 changes: 26 additions & 0 deletions
26
src/stubs/framework/shortcuts/shortcutcontextresolverstub.cpp
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,26 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#include "shortcutcontextresolverstub.h" | ||
|
||
using namespace mu::shortcuts; | ||
|
||
ShortcutContext ShortcutContextResolverStub::currentShortcutContext() const | ||
{ | ||
return ShortcutContext(); | ||
} |
32 changes: 32 additions & 0 deletions
32
src/stubs/framework/shortcuts/shortcutcontextresolverstub.h
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,32 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#ifndef MU_SHORTCUTS_SHORTCUTCONTEXTRESOLVERSTUB_H | ||
#define MU_SHORTCUTS_SHORTCUTCONTEXTRESOLVERSTUB_H | ||
|
||
#include "shortcuts/ishortcutcontextresolver.h" | ||
|
||
namespace mu::shortcuts { | ||
class ShortcutContextResolverStub : public IShortcutContextResolver | ||
{ | ||
public: | ||
ShortcutContext currentShortcutContext() const override; | ||
}; | ||
} | ||
|
||
#endif // MU_SHORTCUTS_SHORTCUTCONTEXTRESOLVERSTUB_H |
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,6 @@ | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>qml/MuseScore/Shortcuts/qmldir</file> | ||
<file>qml/MuseScore/Shortcuts/Shortcuts.qml</file> | ||
</qresource> | ||
</RCC> |
31 changes: 31 additions & 0 deletions
31
src/stubs/framework/shortcuts/shortcutsconfigurationstub.cpp
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,31 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#include "shortcutsconfigurationstub.h" | ||
|
||
using namespace mu::shortcuts; | ||
|
||
mu::io::path ShortcutsConfigurationStub::shortcutsUserPath() const | ||
{ | ||
return mu::io::path(); | ||
} | ||
|
||
mu::io::path ShortcutsConfigurationStub::shortcutsDefaultPath() const | ||
{ | ||
return mu::io::path(); | ||
} |
33 changes: 33 additions & 0 deletions
33
src/stubs/framework/shortcuts/shortcutsconfigurationstub.h
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,33 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#ifndef MU_SHORTCUTS_SHORTCUTSCONFIGURATIONSTUB_H | ||
#define MU_SHORTCUTS_SHORTCUTSCONFIGURATIONSTUB_H | ||
|
||
#include "shortcuts/ishortcutsconfiguration.h" | ||
|
||
namespace mu::shortcuts { | ||
class ShortcutsConfigurationStub : public IShortcutsConfiguration | ||
{ | ||
public: | ||
io::path shortcutsUserPath() const override; | ||
io::path shortcutsDefaultPath() const override; | ||
}; | ||
} | ||
|
||
#endif // MU_SHORTCUTS_SHORTCUTSCONFIGURATIONSTUB_H |
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,25 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#include "shortcutscontrollerstub.h" | ||
|
||
using namespace mu::shortcuts; | ||
|
||
void ShortcutsControllerStub::activate(const std::string&) | ||
{ | ||
} |
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,32 @@ | ||
//============================================================================= | ||
// 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. | ||
//============================================================================= | ||
#ifndef MU_SHORTCUTS_SHORTCUTSCONTROLLERSTUB_H | ||
#define MU_SHORTCUTS_SHORTCUTSCONTROLLERSTUB_H | ||
|
||
#include "shortcuts/ishortcutscontroller.h" | ||
|
||
namespace mu::shortcuts { | ||
class ShortcutsControllerStub : public IShortcutsController | ||
{ | ||
public: | ||
void activate(const std::string& sequence) override; | ||
}; | ||
} | ||
|
||
#endif // MU_SHORTCUTS_SHORTCUTSCONTROLLERSTUB_H |
Oops, something went wrong.