-
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 workspace module
- Loading branch information
1 parent
b2ff7d6
commit 15d4d47
Showing
24 changed files
with
618 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
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. | ||
#============================================================================= | ||
|
||
set(MODULE workspace) | ||
set(MODULE_QRC workspace.qrc) | ||
|
||
set(MODULE_SRC | ||
${CMAKE_CURRENT_LIST_DIR}/workspacestubmodule.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/workspacestubmodule.h | ||
${CMAKE_CURRENT_LIST_DIR}/workspacestub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/workspacestub.h | ||
${CMAKE_CURRENT_LIST_DIR}/workspacemanagerstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/workspacemanagerstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/workspaceconfigurationstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/workspaceconfigurationstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/workspacedatastreamregisterstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/workspacedatastreamregisterstub.h | ||
${CMAKE_CURRENT_LIST_DIR}/internal/workspacecreatorstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/internal/workspacecreatorstub.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,28 @@ | ||
//============================================================================= | ||
// 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 "workspacecreatorstub.h" | ||
|
||
#include "workspacestub.h" | ||
|
||
using namespace mu::workspace; | ||
|
||
IWorkspacePtr WorkspaceCreatorStub::newWorkspace(const std::string&) const | ||
{ | ||
return std::make_shared<WorkspaceStub>(); | ||
} |
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_WORKSPACE_WORKSPACECREATORSTUB_H | ||
#define MU_WORKSPACE_WORKSPACECREATORSTUB_H | ||
|
||
#include "workspace/internal/iworkspacecreator.h" | ||
|
||
namespace mu::workspace { | ||
class WorkspaceCreatorStub : public IWorkspaceCreator | ||
{ | ||
public: | ||
IWorkspacePtr newWorkspace(const std::string& workspaceName) const override; | ||
}; | ||
} | ||
|
||
#endif // MU_WORKSPACE_WORKSPACECREATORSTUB_H |
21 changes: 21 additions & 0 deletions
21
src/stubs/workspace/qml/MuseScore/Workspace/NewWorkspaceDialog.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,21 @@ | ||
import QtQuick 2.15 | ||
|
||
import MuseScore.Ui 1.0 | ||
import MuseScore.UiComponents 1.0 | ||
|
||
QmlDialog { | ||
id: root | ||
|
||
height: 600 | ||
width: 1024 | ||
|
||
Rectangle { | ||
anchors.fill: parent | ||
color: ui.theme.backgroundPrimaryColor | ||
|
||
StyledTextLabel { | ||
anchors.centerIn: parent | ||
text: "New Workspace Dialog Stub" | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/stubs/workspace/qml/MuseScore/Workspace/WorkspacesControl.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,12 @@ | ||
import QtQuick 2.15 | ||
|
||
import MuseScore.UiComponents 1.0 | ||
|
||
Rectangle { | ||
color: ui.theme.backgroundPrimaryColor | ||
|
||
StyledTextLabel { | ||
anchors.centerIn: parent | ||
text: "Workspace Control Stub" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/stubs/workspace/qml/MuseScore/Workspace/WorkspacesDialog.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,21 @@ | ||
import QtQuick 2.15 | ||
|
||
import MuseScore.Ui 1.0 | ||
import MuseScore.UiComponents 1.0 | ||
|
||
QmlDialog { | ||
id: root | ||
|
||
height: 600 | ||
width: 1024 | ||
|
||
Rectangle { | ||
anchors.fill: parent | ||
color: ui.theme.backgroundPrimaryColor | ||
|
||
StyledTextLabel { | ||
anchors.centerIn: parent | ||
text: "Workspaces Dialog Stub" | ||
} | ||
} | ||
} |
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,4 @@ | ||
module MuseScore.Workspace | ||
WorkspacesControl 1.0 WorkspacesControl.qml | ||
WorkspacesDialog 1.0 WorkspacesDialog.qml | ||
NewWorkspaceDialog 1.0 NewWorkspaceDialog.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,8 @@ | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>qml/MuseScore/Workspace/WorkspacesControl.qml</file> | ||
<file>qml/MuseScore/Workspace/WorkspacesDialog.qml</file> | ||
<file>qml/MuseScore/Workspace/NewWorkspaceDialog.qml</file> | ||
<file>qml/MuseScore/Workspace/qmldir</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,46 @@ | ||
//============================================================================= | ||
// 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 "workspaceconfigurationstub.h" | ||
|
||
using namespace mu::workspace; | ||
using namespace mu; | ||
|
||
io::paths WorkspaceConfigurationStub::workspacePaths() const | ||
{ | ||
return {}; | ||
} | ||
|
||
io::path WorkspaceConfigurationStub::userWorkspacesDirPath() const | ||
{ | ||
return io::path(); | ||
} | ||
|
||
io::path WorkspaceConfigurationStub::userWorkspacePath(const std::string&) const | ||
{ | ||
return io::path(); | ||
} | ||
|
||
ValCh<std::string> WorkspaceConfigurationStub::currentWorkspaceName() const | ||
{ | ||
return ValCh<std::string>(); | ||
} | ||
|
||
void WorkspaceConfigurationStub::setCurrentWorkspaceName(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,38 @@ | ||
//============================================================================= | ||
// 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_WORKSPACE_WORKSPACECONFIGURATIONSTUB_H | ||
#define MU_WORKSPACE_WORKSPACECONFIGURATIONSTUB_H | ||
|
||
#include "workspace/iworkspaceconfiguration.h" | ||
|
||
namespace mu::workspace { | ||
class WorkspaceConfigurationStub : public IWorkspaceConfiguration | ||
{ | ||
public: | ||
io::paths workspacePaths() const override; | ||
|
||
io::path userWorkspacesDirPath() const override; | ||
io::path userWorkspacePath(const std::string& workspaceName) const override; | ||
|
||
ValCh<std::string> currentWorkspaceName() const override; | ||
void setCurrentWorkspaceName(const std::string& workspaceName) override; | ||
}; | ||
} | ||
|
||
#endif // MU_WORKSPACE_WORKSPACECONFIGURATIONSTUB_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,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 "workspacedatastreamregisterstub.h" | ||
|
||
using namespace mu::workspace; | ||
|
||
void WorkspaceDataStreamRegisterStub::regStream(IWorkspaceDataStreamPtr) | ||
{ | ||
} | ||
|
||
IWorkspaceDataStreamPtrList WorkspaceDataStreamRegisterStub::streams() const | ||
{ | ||
return {}; | ||
} |
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_WORKSPACE_WORKSPACEDATASTREAMREGISTERSTUB_H | ||
#define MU_WORKSPACE_WORKSPACEDATASTREAMREGISTERSTUB_H | ||
|
||
#include "workspace/iworkspacedatastreamregister.h" | ||
|
||
namespace mu::workspace { | ||
class WorkspaceDataStreamRegisterStub : public IWorkspaceDataStreamRegister | ||
{ | ||
public: | ||
void regStream(IWorkspaceDataStreamPtr stream) override; | ||
IWorkspaceDataStreamPtrList streams() const override; | ||
}; | ||
} | ||
|
||
#endif // MU_WORKSPACE_WORKSPACEDATASTREAMREGISTERSTUB_H |
Oops, something went wrong.