VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
examples
guiLocalCreateObject
guiLocalCreateObjectMenu.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2015 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
//\file guiLocalCreateObjectMenu.h
7
8
//This file defines all the menus and menu items that will be used for the object demo
9
//Note that this demo expectes to be working on ground-db.mtf
10
11
#include <
vrfGuiCore/vrfStateViewCollectionManager.h
>
12
#include <
vrvCoreQt/DtMenuItem.h
>
13
#include <
vrvCoreQt/DtMenu.h
>
14
15
#pragma once
16
17
namespace
makVrf
18
{
19
class
DtVrfObjectFacadeInterface;
20
}
21
22
namespace
makVrv
23
{
24
class
DtIntervisibilityElement;
25
}
26
27
//New main menu. This menu will be used to hold the Object Demo menu items
28
class
DtGuiLocalCreateObjectMenu
:
public
makVrv::DtMenu
29
{
30
public
:
31
DtGuiLocalCreateObjectMenu
(
makVrv::DtDe
& de);
32
virtual
~DtGuiLocalCreateObjectMenu
();
33
34
protected
:
35
virtual
QMenu
*
createMenu
(
makVrv::DtDe
& de, QWidget* parent );
36
};
37
38
//Base class for creating object demo menu items. Override the create() method to create the
39
//appropriate local object
40
class
DtGuiLocalCreateObjectMenuItem
:
public
makVrv::DtMenuItem
41
{
42
public
:
43
DtGuiLocalCreateObjectMenuItem
(
makVrv::DtDe
&,
const
std::string& item);
44
45
virtual
~DtGuiLocalCreateObjectMenuItem
();
46
47
protected
:
48
virtual
void
on_triggered
();
49
virtual
void
remove
();
50
virtual
makVrf::DtVrfObjectFacadeInterface
*
create
() = 0;
51
52
//Called when an object is to be deleted. If our interface, set to 0 and uncheck menu item if checked
53
virtual
void
objectAboutToBeDeleted
(
makVrf::DtVrfObjectFacadeInterface
*);
54
55
protected
:
56
makVrv::DtDe
&
myDe
;
57
makVrf::DtVrfObjectFacadeInterface
*
myInterface
;
58
QAction
*
myAction
;
59
};
60
61
//Menu item for creating a line
62
class
DtGuiLocalCreateObjectLine
:
public
DtGuiLocalCreateObjectMenuItem
63
{
64
public
:
65
DtGuiLocalCreateObjectLine
(
makVrv::DtDe
& de);
66
virtual
~DtGuiLocalCreateObjectLine
();
67
68
//Build a menu item (via an action).
69
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
70
71
protected
:
72
virtual
makVrf::DtVrfObjectFacadeInterface
*
create
();
73
74
};
75
76
//Menu item for creating an area
77
class
DtGuiLocalCreateObjectArea
:
public
DtGuiLocalCreateObjectMenuItem
78
{
79
public
:
80
DtGuiLocalCreateObjectArea
(
makVrv::DtDe
& de);
81
virtual
~DtGuiLocalCreateObjectArea
();
82
83
//Build a menu item (via an action).
84
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
85
86
protected
:
87
virtual
makVrf::DtVrfObjectFacadeInterface
*
create
();
88
89
};
90
91
//Menu item for creating a waypoint
92
class
DtGuiLocalCreateObjectWaypoint
:
public
DtGuiLocalCreateObjectMenuItem
93
{
94
public
:
95
DtGuiLocalCreateObjectWaypoint
(
makVrv::DtDe
& de);
96
virtual
~DtGuiLocalCreateObjectWaypoint
();
97
98
//Build a menu item (via an action).
99
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
100
101
protected
:
102
virtual
makVrf::DtVrfObjectFacadeInterface
*
create
();
103
104
};
105
106
//Menu item for creating a M1A2
107
class
DtGuiLocalCreateObjectM1A2
:
public
DtGuiLocalCreateObjectMenuItem
108
{
109
public
:
110
DtGuiLocalCreateObjectM1A2
(
makVrv::DtDe
& de);
111
virtual
~DtGuiLocalCreateObjectM1A2
();
112
113
//Build a menu item (via an action).
114
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
115
116
protected
:
117
virtual
makVrf::DtVrfObjectFacadeInterface
*
create
();
118
119
};
120
121
//Menu item for creating a Airbus 310
122
class
DtGuiLocalCreateObjectAirbus310
:
public
DtGuiLocalCreateObjectMenuItem
123
{
124
public
:
125
DtGuiLocalCreateObjectAirbus310
(
makVrv::DtDe
& de);
126
virtual
~DtGuiLocalCreateObjectAirbus310
();
127
128
//Build a menu item (via an action).
129
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
130
131
protected
:
132
virtual
makVrf::DtVrfObjectFacadeInterface
*
create
();
133
134
};
135
136
//Creates an intervisibility fan
137
class
DtGuiLocalCreateObjectFan
:
public
makVrv::DtMenuItem
138
{
139
public
:
140
DtGuiLocalCreateObjectFan
(
makVrv::DtDe
&);
141
virtual
~DtGuiLocalCreateObjectFan
();
142
143
protected
:
144
//Build a menu item (via an action).
145
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
146
virtual
void
on_triggered
();
147
virtual
void
elementDestroyed
(
makVrv::DtIntervisibilityElement
*);
148
149
protected
:
150
makVrv::DtIntervisibilityElement
*
myElement
;
151
makVrv::DtDe
&
myDe
;
152
QAction
*
myAction
;
153
};
154
155
//Creates intervisibility line and attaches to M1A2 and Airbus
156
class
DtGuiLocalCreateObjectAttachedLine
:
public
makVrv::DtMenuItem
157
{
158
public
:
159
DtGuiLocalCreateObjectAttachedLine
(
makVrv::DtDe
&);
160
virtual
~DtGuiLocalCreateObjectAttachedLine
();
161
162
protected
:
163
//Build a menu item (via an action).
164
virtual
QAction
*
createAction
(
makVrv::DtDe
&, QWidget* parent);
165
virtual
void
on_aboutToShow
();
166
virtual
void
on_triggered
();
167
168
//Called when state views are removed, if m1a2 or airbus, also remove this line if
169
//created
170
virtual
void
slot_stateViewAboutToBeRemoved
(
const
makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>
&);
171
172
protected
:
173
makVrv::DtIntervisibilityElement
*
myElement
;
174
makVrv::DtDe
&
myDe
;
175
QAction
*
myAction
;
176
};
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)