VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
examples
guiLocalCreateObject
guiLocalCreateObjectMenu.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2012 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/DtVrfStateViewCollectionManager.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 320
122
class
DtGuiLocalCreateObjectAirbus320
:
public
DtGuiLocalCreateObjectMenuItem
123
{
124
public
:
125
DtGuiLocalCreateObjectAirbus320
(
makVrv::DtDe
& de);
126
virtual
~DtGuiLocalCreateObjectAirbus320
();
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
148
protected
:
149
makVrv::DtIntervisibilityElement
*
myElement
;
150
makVrv::DtDe
&
myDe
;
151
QAction
*
myAction
;
152
};
153
154
//Creates intervisibility line and attaches to M1A2 and Airbus
155
class
DtGuiLocalCreateObjectAttachedLine
:
public
makVrv::DtMenuItem
156
{
157
public
:
158
DtGuiLocalCreateObjectAttachedLine
(
makVrv::DtDe
&);
159
virtual
~DtGuiLocalCreateObjectAttachedLine
();
160
161
protected
:
162
//Build a menu item (via an action).
163
virtual
QAction
*
createAction
(
makVrv::DtDe
&,
QWidget
* parent);
164
virtual
void
on_aboutToShow
();
165
virtual
void
on_triggered
();
166
167
//Called when state views are removed, if m1a2 or airbus, also remove this line if
168
//created
169
virtual
void
slot_stateViewAboutToBeRemoved
(
const
makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>
&);
170
171
protected
:
172
makVrv::DtIntervisibilityElement
*
myElement
;
173
makVrv::DtDe
&
myDe
;
174
QAction
*
myAction
;
175
};
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)