Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
11
QView3DTool::QView3DTool(QDesignerFormWindowInterface *formWindow, QObject *parent)
12
: QDesignerFormWindowToolInterface(parent)
13
{
14
m_action =
new
QAction(tr(
"3DView"
),
this
);
15
m_formWindow = formWindow;
16
}
17
18
QDesignerFormEditorInterface
*
QView3DTool
::
core
()
const
19
{
20
return
m_formWindow->core();
21
}
22
23
QDesignerFormWindowInterface *
QView3DTool
::
formWindow
()
const
24
{
25
return
m_formWindow;
26
}
27
28
QWidget
*
QView3DTool
::
editor
()
const
29
{
30
if
(m_editor == 0)
31
m_editor =
new
QView3D(formWindow(), 0);
32
33
return
m_editor;
34
}
35
36
QAction
*
QView3DTool
::
action
()
const
37
{
38
return
m_action;
39
}
40
41
void
QView3DTool
::
activated
()
42
{
43
if
(m_editor != 0)
44
m_editor->updateForm();
45
}
46
47
void
QView3DTool
::
deactivated
()
48
{
49
}
50
51
bool
QView3DTool
::
handleEvent
(QWidget*, QWidget*, QEvent*)
52
{
53
return
false
;
54
}
QView3DTool
Definition
view3d_tool.h:17
QView3DTool::editor
QWidget * editor() const override
Definition
view3d_tool.cpp:28
QView3DTool::core
QDesignerFormEditorInterface * core() const override
Definition
view3d_tool.cpp:18
QView3DTool::action
QAction * action() const override
Definition
view3d_tool.cpp:36
QView3DTool::activated
virtual void activated()
Definition
view3d_tool.cpp:41
QView3DTool::deactivated
virtual void deactivated()
Definition
view3d_tool.cpp:47
QView3DTool::formWindow
QDesignerFormWindowInterface * formWindow() const override
Definition
view3d_tool.cpp:23
QView3DTool::handleEvent
bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event) override
Definition
view3d_tool.cpp:51
qttools
src
designer
src
plugins
tools
view3d
view3d_tool.cpp
Generated on
for Qt by
1.18.0