|
19 | 19 | * You should have received a copy of the GNU General Public License
|
20 | 20 | * along with this program. If not, see <https://www.gnu.org/licenses/>.
|
21 | 21 | */
|
22 |
| -#ifndef MU_NOTATION_INOTATIONINTERACTION_H |
23 |
| -#define MU_NOTATION_INOTATIONINTERACTION_H |
| 22 | +#pragma once |
24 | 23 |
|
25 | 24 | #include <functional>
|
26 | 25 |
|
@@ -95,17 +94,23 @@ class INotationInteraction
|
95 | 94 | virtual void endDrag() = 0;
|
96 | 95 | virtual muse::async::Notification dragChanged() const = 0;
|
97 | 96 |
|
98 |
| - virtual bool isDragCopyStarted() const = 0; |
99 | 97 | virtual bool dragCopyAllowed(const EngravingItem* element) const = 0;
|
100 |
| - virtual void startDragCopy(const EngravingItem* element, QObject* dragSource) = 0; |
| 98 | + virtual void prepareDragCopyElement(const EngravingItem* element, QObject* dragSource) = 0; |
| 99 | + virtual void prepareDragCopyRange(QObject* dragSource) = 0; |
| 100 | + virtual bool hasDragCopy() const = 0; |
| 101 | + virtual bool hasStartedDragCopy() const = 0; |
| 102 | + virtual void startDragCopy() = 0; |
101 | 103 | virtual void endDragCopy() = 0;
|
102 | 104 |
|
103 | 105 | // Drop
|
104 | 106 | //! TODO Change KeyboardModifiers to modes
|
105 |
| - virtual void startDrop(const QByteArray& edata) = 0; |
106 |
| - virtual bool startDrop(const QUrl& url) = 0; |
107 |
| - virtual bool isDropAccepted(const muse::PointF& pos, Qt::KeyboardModifiers modifiers) = 0; //! NOTE Also may set drop target |
108 |
| - virtual bool drop(const muse::PointF& pos, Qt::KeyboardModifiers modifiers) = 0; |
| 107 | + virtual bool startDropSingle(const QByteArray& edata) = 0; |
| 108 | + virtual bool startDropRange(const QByteArray& data) = 0; |
| 109 | + virtual bool startDropImage(const QUrl& url) = 0; |
| 110 | + virtual bool isDropSingleAccepted(const muse::PointF& pos, Qt::KeyboardModifiers modifiers) = 0; //! NOTE Also may set drop target |
| 111 | + virtual bool isDropRangeAccepted(const muse::PointF& pos) = 0; |
| 112 | + virtual bool dropSingle(const muse::PointF& pos, Qt::KeyboardModifiers modifiers) = 0; |
| 113 | + virtual bool dropRange(const QByteArray& data, const muse::PointF& pos) = 0; |
109 | 114 | virtual void setDropTarget(EngravingItem* item, bool notify = true) = 0;
|
110 | 115 | virtual void setDropRect(const muse::RectF& rect) = 0;
|
111 | 116 | virtual void endDrop() = 0;
|
@@ -317,5 +322,3 @@ using INotationInteractionPtr = std::shared_ptr<INotationInteraction>;
|
317 | 322 |
|
318 | 323 | EngravingItem* contextItem(INotationInteractionPtr);
|
319 | 324 | }
|
320 |
| - |
321 |
| -#endif // MU_NOTATION_INOTATIONINTERACTION_H |
|
0 commit comments