-
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 inspector module
- Loading branch information
1 parent
71267de
commit 1a261e5
Showing
13 changed files
with
326 additions
and
5 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,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. | ||
#============================================================================= | ||
set(MODULE "inspector") | ||
|
||
set(MODULE_QRC ${CMAKE_CURRENT_LIST_DIR}/view/inspector_resources.qrc) | ||
|
||
set(MODULE_QML_IMPORT ${CMAKE_CURRENT_LIST_DIR}/view/qml) | ||
|
||
set(MODULE_SRC | ||
${CMAKE_CURRENT_LIST_DIR}/inspectorstubmodule.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/inspectorstubmodule.h | ||
${CMAKE_CURRENT_LIST_DIR}/inspectoradapterstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/inspectoradapterstub.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,109 @@ | ||
//============================================================================= | ||
// 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 "inspectoradapterstub.h" | ||
|
||
using namespace mu::inspector; | ||
|
||
bool InspectorAdapterStub::isNotationExisting() const | ||
{ | ||
return false; | ||
} | ||
|
||
bool InspectorAdapterStub::isTextEditingStarted() const | ||
{ | ||
return false; | ||
} | ||
|
||
mu::async::Notification InspectorAdapterStub::isTextEditingChanged() const | ||
{ | ||
return mu::async::Notification(); | ||
} | ||
|
||
void InspectorAdapterStub::beginCommand() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::endCommand() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateStyleValue(const Ms::Sid&, const QVariant&) | ||
{ | ||
} | ||
|
||
QVariant InspectorAdapterStub::styleValue(const Ms::Sid&) | ||
{ | ||
return QVariant(); | ||
} | ||
|
||
void InspectorAdapterStub::showSpecialCharactersDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::showStaffTextPropertiesDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::showPageSettingsDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::showStyleSettingsDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::showTimeSignaturePropertiesDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::showArticulationPropertiesDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::showGridConfigurationDialog() | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updatePageMarginsVisibility(const bool) | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateFramesVisibility(const bool) | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateHorizontalGridSnapping(const bool) | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateVerticalGridSnapping(const bool) | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateUnprintableElementsVisibility(const bool) | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateInvisibleElementsDisplaying(const bool) | ||
{ | ||
} | ||
|
||
void InspectorAdapterStub::updateNotation() | ||
{ | ||
} |
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,62 @@ | ||
//============================================================================= | ||
// 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_INSPECTOR_INSPECTORADAPTERSTUB_H | ||
#define MU_INSPECTOR_INSPECTORADAPTERSTUB_H | ||
|
||
#include "inspector/iinspectoradapter.h" | ||
|
||
namespace mu::inspector { | ||
class InspectorAdapterStub : public IInspectorAdapter | ||
{ | ||
public: | ||
bool isNotationExisting() const override; | ||
bool isTextEditingStarted() const override; | ||
async::Notification isTextEditingChanged() const override; | ||
|
||
// notation commands | ||
void beginCommand() override; | ||
void endCommand() override; | ||
|
||
// notation styling | ||
void updateStyleValue(const Ms::Sid& styleId, const QVariant& newValue) override; | ||
QVariant styleValue(const Ms::Sid& styleId) override; | ||
|
||
// dialogs | ||
void showSpecialCharactersDialog() override; | ||
void showStaffTextPropertiesDialog() override; | ||
void showPageSettingsDialog() override; | ||
void showStyleSettingsDialog() override; | ||
void showTimeSignaturePropertiesDialog() override; | ||
void showArticulationPropertiesDialog() override; | ||
void showGridConfigurationDialog() override; | ||
|
||
// actions | ||
void updatePageMarginsVisibility(const bool isVisible) override; | ||
void updateFramesVisibility(const bool isVisible) override; | ||
void updateHorizontalGridSnapping(const bool isSnapped) override; | ||
void updateVerticalGridSnapping(const bool isSnapped) override; | ||
void updateUnprintableElementsVisibility(const bool isVisible) override; | ||
void updateInvisibleElementsDisplaying(const bool isVisible) override; | ||
|
||
// notation layout | ||
void updateNotation() override; | ||
}; | ||
} | ||
|
||
#endif // MU_INSPECTOR_INSPECTORADAPTERSTUB_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,52 @@ | ||
//============================================================================= | ||
// 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 "inspectorstubmodule.h" | ||
|
||
#include "modularity/ioc.h" | ||
#include "ui/iuiengine.h" | ||
|
||
#include "inspectoradapterstub.h" | ||
|
||
using namespace mu::inspector; | ||
using namespace mu::framework; | ||
|
||
static void inspector_init_qrc() | ||
{ | ||
Q_INIT_RESOURCE(inspector_resources); | ||
} | ||
|
||
std::string InspectorModule::moduleName() const | ||
{ | ||
return "inspector"; | ||
} | ||
|
||
void InspectorModule::registerExports() | ||
{ | ||
ioc()->registerExport<IInspectorAdapter>(moduleName(), new InspectorAdapterStub()); | ||
} | ||
|
||
void InspectorModule::registerResources() | ||
{ | ||
inspector_init_qrc(); | ||
} | ||
|
||
void InspectorModule::registerUiTypes() | ||
{ | ||
ioc()->resolve<ui::IUiEngine>(moduleName())->addSourceImportPath(inspector_QML_IMPORT); | ||
} |
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_INSPECTOR_INSPECTORSTUBMODULE_H | ||
#define MU_INSPECTOR_INSPECTORSTUBMODULE_H | ||
|
||
#include "modularity/imodulesetup.h" | ||
|
||
namespace mu::inspector { | ||
class InspectorModule : public mu::framework::IModuleSetup | ||
{ | ||
public: | ||
InspectorModule() = default; | ||
|
||
std::string moduleName() const override; | ||
void registerExports() override; | ||
void registerResources() override; | ||
void registerUiTypes() override; | ||
}; | ||
} | ||
|
||
#endif // MU_INSPECTOR_INSPECTORSTUBMODULE_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/Inspector/InspectorForm.qml</file> | ||
<file>qml/MuseScore/Inspector/qmldir</file> | ||
</qresource> | ||
</RCC> |
14 changes: 14 additions & 0 deletions
14
src/stubs/inspector/view/qml/MuseScore/Inspector/InspectorForm.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,14 @@ | ||
import QtQuick 2.15 | ||
|
||
import MuseScore.UiComponents 1.0 | ||
|
||
Rectangle { | ||
property var model: null | ||
|
||
color: ui.theme.backgroundPrimaryColor | ||
|
||
StyledTextLabel { | ||
anchors.centerIn: parent | ||
text: "Inspector Form 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,2 @@ | ||
module MuseScore.Inspector | ||
InspectorForm 1.0 InspectorForm.qml |