aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h
blob: 1addfa596feca6ee9d2a3db7060c4885acdcb23c (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 "abstractaction.h"

namespace QmlDesigner {

class AddTabDesignerAction : public QObject, public AbstractAction
{
    Q_OBJECT
public:
    AddTabDesignerAction();

    QByteArray category() const override;
    QByteArray menuId() const override;
    int priority() const override;
    Type type() const override;

protected:
    bool isVisible(const SelectionContext &selectionContext) const override;
    bool isEnabled(const SelectionContext &selectionContext) const override;

private:
    void addNewTab();
};

} // namespace QmlDesigner