aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/designer/designercontext.cpp
blob: 266a347bbb20411ac96b451bd0cfc9c5558f19a3 (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
30
31
32
33
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "designercontext.h"
#include "formeditor.h"

#include <QDesignerFormEditorInterface>
#include <QDesignerIntegration>

#include <QWidget>
#include <QDebug>

enum { debug = 0 };

namespace Designer {
namespace Internal {

DesignerContext::DesignerContext(const Core::Context &context,
                                 QWidget *widget, QObject *parent)
  : Core::IContext(parent)
{
    setContext(context);
    setWidget(widget);
}

void DesignerContext::contextHelp(const HelpCallback &callback) const
{
    const QDesignerFormEditorInterface *core = designerEditor();
    callback(core->integration()->contextHelpId());
}

} // namespace Internal
} // namespace Designer