blob: 1a44ba7a6ab84a4f8af075f0d9b34030d1149570 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <QPoint>
#include <QCoreApplication>
#include <abstractview.h>
#include "selectioncontext.h"
namespace QmlDesigner {
class ModelNodeContextMenu
{
Q_DECLARE_TR_FUNCTIONS(QmlDesigner::ModelNodeContextMenu)
public:
ModelNodeContextMenu(AbstractView *view);
void execute(const QPoint &pos, bool selectionMenu);
void setScenePos(const QPoint &pos);
static void showContextMenu(AbstractView *view, const QPoint &globalPosition, const QPoint &scenePosition, bool showSelection);
private:
QPoint m_scenePos;
SelectionContext m_selectionContext;
};
} // namespace QmlDesigner
|