Skip to content

Commit 9153905

Browse files
authored
Merge pull request #26282 from Eism/tours_system
Implemented tours system
2 parents 97c163c + a04b5ff commit 9153905

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1600
-15
lines changed

src/app/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ if (MUSE_MODULE_UI)
159159
list(APPEND LINK_LIB muse::dockwindow)
160160
endif()
161161

162+
if (MUSE_MODULE_TOURS)
163+
list(APPEND LINK_LIB muse::tours)
164+
endif()
165+
162166
if (MUSE_MODULE_AUDIOPLUGINS)
163167
list(APPEND LINK_LIB muse::audioplugins)
164168
endif()

src/app/appfactory.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@
7777
#include "framework/stubs/shortcuts/shortcutsstubmodule.h"
7878
#endif
7979

80+
#ifdef MUSE_MODULE_TOURS
81+
#include "framework/tours/toursmodule.h"
82+
#else
83+
#include "framework/stubs/tours/toursstubmodule.h"
84+
#endif
85+
8086
#ifdef MUSE_MODULE_UI
8187
#include "framework/dockwindow/dockmodule.h"
8288
#include "framework/ui/uimodule.h"
@@ -254,6 +260,7 @@ std::shared_ptr<muse::IApplication> AppFactory::newGuiApp(const CmdOptions& opti
254260
app->addModule(new muse::uicomponents::UiComponentsModule());
255261
app->addModule(new muse::dock::DockModule());
256262
#endif
263+
app->addModule(new muse::tours::ToursModule());
257264
app->addModule(new muse::vst::VSTModule());
258265

259266
// modules
@@ -360,6 +367,7 @@ std::shared_ptr<muse::IApplication> AppFactory::newConsoleApp(const CmdOptions&
360367
app->addModule(new muse::uicomponents::UiComponentsModule());
361368
app->addModule(new muse::dock::DockModule());
362369
#endif
370+
app->addModule(new muse::tours::ToursModule());
363371
app->addModule(new muse::vst::VSTModule());
364372

365373
// modules

src/appshell/qml/AppWindow.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import Muse.Ui 1.0
2626
import Muse.Shortcuts 1.0
2727
import MuseScore.AppShell 1.0
2828

29+
import Muse.Tours 1.0
30+
2931
ApplicationWindow {
3032
id: root
3133

@@ -69,6 +71,8 @@ ApplicationWindow {
6971

7072
ToolTipProvider { }
7173

74+
ToursProvider { }
75+
7276
//! NOTE Need only create
7377
Shortcuts { }
7478

src/framework/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ if (MUSE_MODULE_SHORTCUTS)
8181
add_subdirectory(shortcuts)
8282
endif()
8383

84+
if (MUSE_MODULE_TOURS)
85+
add_subdirectory(tours)
86+
endif()
87+
8488
if (MUSE_MODULE_MULTIINSTANCES)
8589
add_subdirectory(multiinstances)
8690
endif()

src/framework/cmake/MuseDeclareOptions.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ option(MUSE_MODULE_NETWORK_WEBSOCKET "Enable websocket support" OFF)
4949

5050
declare_muse_module_opt(SHORTCUTS ON)
5151

52+
declare_muse_module_opt(TOURS ON)
53+
5254
declare_muse_module_opt(UI ON)
5355
option(MUSE_MODULE_UI_DISABLE_MODALITY "Disable dialogs modality for testing purpose" OFF)
5456

src/framework/cmake/muse_framework_config.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@
106106
#cmakedefine MUSE_MODULE_SHORTCUTS_TESTS 1
107107
#cmakedefine MUSE_MODULE_SHORTCUTS_API 1
108108

109+
#cmakedefine MUSE_MODULE_TOURS 1
110+
#cmakedefine MUSE_MODULE_TOURS_TESTS 1
111+
#cmakedefine MUSE_MODULE_TOURS_API 1
112+
109113
#cmakedefine MUSE_MODULE_UI 1
110114
#cmakedefine MUSE_MODULE_UI_TESTS 1
111115
#cmakedefine MUSE_MODULE_UI_API 1

src/framework/dockwindow/view/dockpageview.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class DockPageView : public QQuickItem, public muse::Injectable
5858
Q_PROPERTY(muse::dock::DockCentralView * centralDock READ centralDock WRITE setCentralDock NOTIFY centralDockChanged)
5959
Q_PROPERTY(muse::dock::DockStatusBarView * statusBar READ statusBar WRITE setStatusBar NOTIFY statusBarChanged)
6060

61-
muse::Inject<ui::INavigationController> navigationController = { this };
61+
Inject<ui::INavigationController> navigationController = { this };
6262

6363
public:
6464
explicit DockPageView(QQuickItem* parent = nullptr);

src/framework/global/types/uri.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,13 @@ inline muse::logger::Stream& operator<<(muse::logger::Stream& s, const muse::Uri
115115
return s;
116116
}
117117

118+
template<>
119+
struct std::hash<muse::Uri>
120+
{
121+
std::size_t operator()(const muse::Uri& uri) const noexcept
122+
{
123+
return std::hash<std::string> {}(uri.toString());
124+
}
125+
};
126+
118127
#endif // MUSE_GLOBAL_URI_H

src/framework/stubs/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ if (NOT MUSE_MODULE_SHORTCUTS)
5858
add_subdirectory(shortcuts)
5959
endif()
6060

61+
if (NOT MUSE_MODULE_TOURS)
62+
add_subdirectory(tours)
63+
endif()
64+
6165
if (NOT MUSE_MODULE_UPDATE)
6266
add_subdirectory(update)
6367
endif()
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-License-Identifier: GPL-3.0-only
2+
# MuseScore-CLA-applies
3+
#
4+
# MuseScore
5+
# Music Composition & Notation
6+
#
7+
# Copyright (C) 2025 MuseScore BVBA and others
8+
#
9+
# This program is free software: you can redistribute it and/or modify
10+
# it under the terms of the GNU General Public License version 3 as
11+
# published by the Free Software Foundation.
12+
#
13+
# This program is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
# GNU General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU General Public License
19+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
21+
declare_module(muse_tours)
22+
set(MODULE_ALIAS muse::tours)
23+
24+
set(MODULE_QRC tours.qrc)
25+
26+
set(MODULE_QML_IMPORT ${CMAKE_CURRENT_LIST_DIR}/qml)
27+
28+
set(MODULE_SRC
29+
${CMAKE_CURRENT_LIST_DIR}/toursstubmodule.cpp
30+
${CMAKE_CURRENT_LIST_DIR}/toursstubmodule.h
31+
${CMAKE_CURRENT_LIST_DIR}/toursconfigurationstub.cpp
32+
${CMAKE_CURRENT_LIST_DIR}/toursconfigurationstub.h
33+
${CMAKE_CURRENT_LIST_DIR}/toursservicestub.cpp
34+
${CMAKE_CURRENT_LIST_DIR}/toursservicestub.h
35+
36+
${CMAKE_CURRENT_LIST_DIR}/view/toursproviderstub.cpp
37+
${CMAKE_CURRENT_LIST_DIR}/view/toursproviderstub.h
38+
)
39+
40+
set(MODULE_IS_STUB ON)
41+
setup_module()

0 commit comments

Comments
 (0)