Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
view3d_tool.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#include "view3d_tool.h"
6
7#include <QtDesigner/qdesignerformwindowinterface.h>
8
9#include <QtGui/qaction.h>
10
11QView3DTool::QView3DTool(QDesignerFormWindowInterface *formWindow, QObject *parent)
12 : QDesignerFormWindowToolInterface(parent)
13{
14 m_action = new QAction(tr("3DView"), this);
15 m_formWindow = formWindow;
16}
17
19{
20 return m_formWindow->core();
21}
22
23QDesignerFormWindowInterface *QView3DTool::formWindow() const
24{
25 return m_formWindow;
26}
27
29{
30 if (m_editor == 0)
31 m_editor = new QView3D(formWindow(), 0);
32
33 return m_editor;
34}
35
37{
38 return m_action;
39}
40
42{
43 if (m_editor != 0)
44 m_editor->updateForm();
45}
46
48{
49}
50
51bool QView3DTool::handleEvent(QWidget*, QWidget*, QEvent*)
52{
53 return false;
54}
QWidget * editor() const override
QDesignerFormEditorInterface * core() const override
QAction * action() const override
virtual void activated()
virtual void deactivated()
QDesignerFormWindowInterface * formWindow() const override
bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event) override