-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] Refactor the way copy/paste is handled
- Loading branch information
Showing
27 changed files
with
422 additions
and
243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/bin/bash -eux | ||
|
||
export SCORE_DIR=$PWD | ||
|
||
mkdir -p /build || true | ||
chown -R $(whoami) /build | ||
cd /build | ||
|
||
export QT=/opt/ossia-sdk-wasm/qt5 | ||
|
||
source /opt/ossia-sdk-wasm/emsdk/emsdk_env.sh | ||
export CC=$(which emcc) | ||
export CXX=$(which em++) | ||
|
||
cmake -GNinja $SCORE_DIR \ | ||
-DCMAKE_C_FLAGS="-O3 -g0" \ | ||
-DCMAKE_CXX_FLAGS="-O3 -g0" \ | ||
-DCMAKE_CXX_STANDARD=17 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_UNITY_BUILD=1 \ | ||
-DCMAKE_TOOLCHAIN_FILE=/opt/ossia-sdk-wasm/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ | ||
-DOSSIA_PCH=0 \ | ||
-DSCORE_PCH=0 \ | ||
-DQt6_DIR=$QT/lib/cmake/Qt6 \ | ||
-DQt6Core_DIR=$QT/lib/cmake/Qt6Core \ | ||
-DQt6DeviceDiscoverySupport_DIR=$QT/lib/cmake/Qt6DeviceDiscoverySupport \ | ||
-DQt6EdidSupport_DIR=$QT/lib/cmake/Qt6EdidSupport \ | ||
-DQt6EglSupport_DIR=$QT/lib/cmake/Qt6EglSupport \ | ||
-DQt6EventDispatcherSupport_DIR=$QT/lib/cmake/Qt6EventDispatcherSupport \ | ||
-DQt6FbSupport_DIR=$QT/lib/cmake/Qt6FbSupport \ | ||
-DQt6FontDatabaseSupport_DIR=$QT/lib/cmake/Qt6FontDatabaseSupport \ | ||
-DQt6Gui_DIR=$QT/lib/cmake/Qt6Gui \ | ||
-DQt6Multimedia_DIR=$QT/lib/cmake/Qt6Multimedia \ | ||
-DQt6MultimediaQuick_DIR=$QT/lib/cmake/Qt6MultimediaQuick \ | ||
-DQt6MultimediaWidgets_DIR=$QT/lib/cmake/Qt6MultimediaWidgets \ | ||
-DQt6Network_DIR=$QT/lib/cmake/Qt6Network \ | ||
-DQt6OpenGL_DIR=$QT/lib/cmake/Qt6OpenGL \ | ||
-DQt6OpenGLExtensions_DIR=$QT/lib/cmake/Qt6OpenGLExtensions \ | ||
-DQt6PlatformCompositorSupport_DIR=$QT/lib/cmake/Qt6PlatformCompositorSupport \ | ||
-DQt6Qml_DIR=$QT/lib/cmake/Qt6Qml \ | ||
-DQt6QmlDevTools_DIR=$QT/lib/cmake/Qt6QmlDevTools \ | ||
-DQt6QmlImportScanner_DIR=$QT/lib/cmake/Qt6QmlImportScanner \ | ||
-DQt6QmlModels_DIR=$QT/lib/cmake/Qt6QmlModels \ | ||
-DQt6Quick_DIR=$QT/lib/cmake/Qt6Quick \ | ||
-DQt6QuickCompiler_DIR=$QT/lib/cmake/Qt6QuickCompiler \ | ||
-DQt6QuickParticles_DIR=$QT/lib/cmake/Qt6QuickParticles \ | ||
-DQt6QuickShapes_DIR=$QT/lib/cmake/Qt6QuickShapes \ | ||
-DQt6QuickWidgets_DIR=$QT/lib/cmake/Qt6QuickWidgets \ | ||
-DQt6ServiceSupport_DIR=$QT/lib/cmake/Qt6ServiceSupport \ | ||
-DQt6ThemeSupport_DIR=$QT/lib/cmake/Qt6ThemeSupport \ | ||
-DQt6WebSockets_DIR=$QT/lib/cmake/Qt6WebSockets \ | ||
-DQt6Widgets_DIR=$QT/lib/cmake/Qt6Widgets \ | ||
-DQt6Xml_DIR=$QT/lib/cmake/Qt6Xml \ | ||
-DQt6Zlib_DIR=$QT/lib/cmake/Qt6Zlib | ||
|
||
|
||
cmake --build . | ||
~/libs/qt6-wasm/qtbase/bin/qt-cmake -GNinja $SCORE_DIR \ | ||
-DCMAKE_C_FLAGS="-O3 -g0" \ | ||
-DCMAKE_CXX_FLAGS="-O3 -g0" \ | ||
-DCMAKE_CXX_STANDARD=17 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_UNITY_BUILD=1 \ | ||
-DQT_VERSION="Qt6;6.3" \ | ||
-DOSSIA_PCH=0 \ | ||
-DSCORE_PCH=0 | ||
|
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,7 @@ | ||
#include <score/model/ObjectRemover.hpp> | ||
|
||
namespace score | ||
{ | ||
ObjectEditor::~ObjectEditor() { } | ||
ObjectEditorList::~ObjectEditorList() { } | ||
} |
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,29 @@ | ||
#pragma once | ||
#include <score/plugins/Interface.hpp> | ||
#include <score/plugins/InterfaceList.hpp> | ||
#include <score/selection/Selection.hpp> | ||
|
||
class QMimeData; | ||
namespace score | ||
{ | ||
struct DocumentContext; | ||
// TODO do it for curve, c.f. CurvePresenter::removeSelection | ||
struct SCORE_LIB_BASE_EXPORT ObjectEditor : public score::InterfaceBase | ||
{ | ||
SCORE_INTERFACE(ObjectEditor, "12951ea1-ffb0-4f77-8a3a-bf28ccb60a2e") | ||
public: | ||
virtual ~ObjectEditor() override; | ||
|
||
virtual bool copy(JSONReader& r, const Selection& s, const score::DocumentContext& ctx) = 0; | ||
virtual bool paste(QPoint pos, const QMimeData& mime, const score::DocumentContext& ctx) = 0; | ||
virtual bool remove(const Selection& s, const score::DocumentContext& ctx) = 0; | ||
}; | ||
|
||
class SCORE_LIB_BASE_EXPORT ObjectEditorList final | ||
: public score::InterfaceList<ObjectEditor> | ||
{ | ||
public: | ||
virtual ~ObjectEditorList() override; | ||
}; | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
#pragma once | ||
|
||
#include <score/model/ObjectRemover.hpp> | ||
|
||
namespace Midi | ||
{ | ||
class NoteEditor : public score::ObjectEditor | ||
{ | ||
SCORE_CONCRETE("94325561-b73b-4593-a4ef-46c7e2100078") | ||
|
||
bool copy(JSONReader& r, const Selection& s, const score::DocumentContext& ctx) override; | ||
bool paste(QPoint pos, const QMimeData& mime, const score::DocumentContext& ctx) override; | ||
bool remove(const Selection& s, const score::DocumentContext& ctx) override; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.