-
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 playback module
- Loading branch information
1 parent
25c3d61
commit 6295028
Showing
21 changed files
with
326 additions
and
19 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
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,35 @@ | ||
#============================================================================= | ||
# 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 playback) | ||
|
||
set(MODULE_QRC ${CMAKE_CURRENT_LIST_DIR}/playback.qrc) | ||
|
||
set(MODULE_QML_IMPORT ${CMAKE_CURRENT_LIST_DIR}/qml) | ||
|
||
set(MODULE_SRC | ||
${CMAKE_CURRENT_LIST_DIR}/playbackstubmodule.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/playbackstubmodule.h | ||
${CMAKE_CURRENT_LIST_DIR}/playbackcontrollerstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/playbackcontrollerstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/playbackconfigurationstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/playbackconfigurationstub.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,6 @@ | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>qml/MuseScore/Playback/qmldir</file> | ||
<file>qml/MuseScore/Playback/PlaybackToolBar.qml</file> | ||
</qresource> | ||
</RCC> |
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,30 @@ | ||
//============================================================================= | ||
// 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 "playbackconfigurationstub.h" | ||
|
||
using namespace mu::playback; | ||
|
||
bool PlaybackConfigurationStub::isPlayElementOnClick() const | ||
{ | ||
return false; | ||
} | ||
|
||
bool PlaybackConfigurationStub::isPlayHarmonyOnClick() const | ||
{ | ||
return false; | ||
} |
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_PLAYBACK_PLAYBACKCONFIGURATIONSTUB_H | ||
#define MU_PLAYBACK_PLAYBACKCONFIGURATIONSTUB_H | ||
|
||
#include "playback/iplaybackconfiguration.h" | ||
|
||
namespace mu::playback { | ||
class PlaybackConfigurationStub : public IPlaybackConfiguration | ||
{ | ||
public: | ||
bool isPlayElementOnClick() const override; | ||
bool isPlayHarmonyOnClick() const override; | ||
}; | ||
} | ||
|
||
#endif // MU_PLAYBACK_PLAYBACKCONFIGURATIONSTUB_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,55 @@ | ||
//============================================================================= | ||
// 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 "playbackcontrollerstub.h" | ||
|
||
using namespace mu::playback; | ||
|
||
bool PlaybackControllerStub::isPlayAllowed() const | ||
{ | ||
return false; | ||
} | ||
|
||
mu::async::Notification PlaybackControllerStub::isPlayAllowedChanged() const | ||
{ | ||
return mu::async::Notification(); | ||
} | ||
|
||
bool PlaybackControllerStub::isPlaying() const | ||
{ | ||
return false; | ||
} | ||
|
||
mu::async::Notification PlaybackControllerStub::isPlayingChanged() const | ||
{ | ||
return mu::async::Notification(); | ||
} | ||
|
||
float PlaybackControllerStub::playbackPosition() const | ||
{ | ||
return 0.f; | ||
} | ||
|
||
mu::async::Channel<uint32_t> PlaybackControllerStub::midiTickPlayed() const | ||
{ | ||
return mu::async::Channel<uint32_t>(); | ||
} | ||
|
||
void PlaybackControllerStub::playElementOnClick(const mu::notation::Element*) | ||
{ | ||
} |
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 @@ | ||
//============================================================================= | ||
// 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_PLAYBACK_PLAYBACKCONTROLLERSTUB_H | ||
#define MU_PLAYBACK_PLAYBACKCONTROLLERSTUB_H | ||
|
||
#include "playback/iplaybackcontroller.h" | ||
|
||
namespace mu::playback { | ||
class PlaybackControllerStub : public IPlaybackController | ||
{ | ||
public: | ||
bool isPlayAllowed() const override; | ||
async::Notification isPlayAllowedChanged() const override; | ||
|
||
bool isPlaying() const override; | ||
async::Notification isPlayingChanged() const override; | ||
|
||
float playbackPosition() const override; | ||
async::Channel<uint32_t> midiTickPlayed() const override; | ||
|
||
void playElementOnClick(const notation::Element* e) override; | ||
}; | ||
} | ||
|
||
#endif // MU_PLAYBACK_PLAYBACKCONTROLLERSTUB_H |
Oops, something went wrong.