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
4#include "view3d_tool.h"
5
6#include <QtDesigner/qdesignerformwindowinterface.h>
7
8#include <QtGui/qaction.h>
9
10QView3DTool::QView3DTool(QDesignerFormWindowInterface *formWindow, QObject *parent)
11 : QDesignerFormWindowToolInterface(parent)
12{
13 m_action = new QAction(tr("3DView"), this);
14 m_formWindow = formWindow;
15}
16
18{
19 return m_formWindow->core();
20}
21
22QDesignerFormWindowInterface *QView3DTool::formWindow() const
23{
24 return m_formWindow;
25}
26
28{
29 if (m_editor == 0)
30 m_editor = new QView3D(formWindow(), 0);
31
32 return m_editor;
33}
34
36{
37 return m_action;
38}
39
41{
42 if (m_editor != 0)
43 m_editor->updateForm();
44}
45
47{
48}
49
50bool QView3DTool::handleEvent(QWidget*, QWidget*, QEvent*)
51{
52 return false;
53}
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