VR-Forces 4.3 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
bhave3DGui
bhavePdgDrawerMenu.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2011 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
6
#pragma once
7
8
#include <
bhave3DGui/bhave3DGuiDefines.h
>
9
#include <
vrvCore/DtDe.h
>
10
#include <
vrvCoreQt/DtMenuItem.h
>
11
#include <
bhave3DGui/bhavePdgDrawerManager.h
>
12
#include <
bhave3DGui/bhavePdgThread.h
>
13
#include <
vrfGuiConstants/vrfMenuIds.h
>
14
15
#include <string>
16
#include <
vrvCoreQt/DtMenu.h
>
17
#include <QMenu>
18
19
namespace
BHAVE
20
{
21
namespace
BHAVE3DGui
22
{
23
class
DT_DLL_bhave3DGui
DtBhavePdgDrawerMenuItem
;
24
class
DT_DLL_bhave3DGui
DtBhavePdgDrawerMenu
;
25
28
class
DT_DLL_bhave3DGui
DtBhavePdgDrawerMenuQObject
:
public
QObject
29
{
30
Q_OBJECT
31
public
:
32
DtBhavePdgDrawerMenuQObject
(
DtBhavePdgDrawerMenu
*);
33
34
protected
slots:
36
virtual
void
onPdgGenerated(
int
result);
37
38
protected
:
39
DtBhavePdgDrawerMenu
*
myParentMenu
;
40
};
41
44
class
DT_DLL_bhave3DGui
DtBhavePdgDrawerMenu
:
public
makVrv::DtMenu
45
{
46
public
:
47
DtBhavePdgDrawerMenu
(
makVrv::DtDe
& de,
const
std::deque<DtBhavePdgDrawerMenuItem*>& subMenus,
DtBhavePdgThread
* pdgThread);
48
virtual
~
DtBhavePdgDrawerMenu
();
49
virtual
QMenu
* createMenu(
makVrv::DtDe
&,
QWidget
* parent);
50
52
virtual
void
toggleDrawer(
DtString
drawType);
53
56
virtual
void
setCheckOnDrawerItem(
DtString
drawType,
bool
check);
57
59
virtual
void
slot_onTerrainGeometryLoaded();
60
61
protected
:
63
virtual
void
slot_onTerrainLoaded(
const
std::string& terrain);
64
66
virtual
void
slot_onTerrainCleared();
67
68
std::deque<DtBhavePdgDrawerMenuItem*>
mySubMenus
;
69
DtBhavePdgDrawerManager
*
myPdgDrawerMgr
;
70
DtString
myActiveDrawer
;
71
DtBhavePdgDrawerMenuQObject
myInnerQObject
;
72
};
73
76
class
DT_DLL_bhave3DGui
DtBhavePdgDrawerMenuItem
:
public
makVrv::DtMenuItem
77
{
78
Q_OBJECT
79
public
:
80
DtBhavePdgDrawerMenuItem
(std::string name,
makVrv::DtDe
& de);
81
virtual
~
DtBhavePdgDrawerMenuItem
();
82
85
virtual
void
setMenuParent(
DtBhavePdgDrawerMenu
* parent);
86
88
virtual
DtString
type() = 0;
89
91
virtual
QString menuText() = 0;
92
93
virtual
QAction
* createAction(
makVrv::DtDe
&,
QWidget
* parent);
94
96
virtual
void
setEnabled(
bool
enable);
97
99
virtual
void
setChecked(
bool
check);
100
101
protected
slots:
103
virtual
void
on_triggered();
104
105
protected
:
106
makVrv::DtDe
&
myDe
;
107
QAction
*
myAction
;
108
QWidget
*
myParent
;
109
DtBhavePdgDrawerMenu
*
myMenuParent
;
110
};
111
112
117
class
DT_DLL_bhave3DGui
DtBhavePdgDrawGroundPlatformAction
:
public
DtBhavePdgDrawerMenuItem
118
{
119
Q_OBJECT
120
121
public
:
124
DtBhavePdgDrawGroundPlatformAction
(
makVrv::DtDe
& de)
125
:
DtBhavePdgDrawerMenuItem
(
DtBhavePdgDrawGroundPlatformActionId
, de) {}
126
virtual
~DtBhavePdgDrawGroundPlatformAction
() {}
127
129
inline
virtual
DtString
type
() {
return
DtString
(
"groundplatform"
); }
130
132
inline
virtual
QString
menuText
() {
return
tr(
"Ground Platform"
); }
133
};
134
139
class
DT_DLL_bhave3DGui
DtBhavePdgDrawLifeformAction
:
public
DtBhavePdgDrawerMenuItem
140
{
141
Q_OBJECT
142
143
public
:
144
DtBhavePdgDrawLifeformAction
(
makVrv::DtDe
& de)
145
:
DtBhavePdgDrawerMenuItem
(
DtBhavePdgDrawLifeformActionId
, de) {}
146
virtual
~DtBhavePdgDrawLifeformAction
() {}
147
inline
virtual
DtString
type
() {
return
DtString
(
"lifeform"
); }
148
inline
virtual
QString
menuText
() {
return
tr(
"Lifeform"
); }
149
};
150
}
151
}
Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)