VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCoreQt
DtQtToolbarAssembler.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2010 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtQtToolbarAssembler.h,v $ $Revision: 1.12 $ $State: Exp $
7
******************************************************************************/
8
12
13
#pragma once
14
15
#include <
vrvCoreQt/vrvCoreQt.h
>
16
#include <
vrvCoreQt/DtQtMenuAssembler.h
>
17
18
#include <
vrvCore/DtToolbarAssembler.h
>
19
20
#include <QtCore/QSize>
21
22
class
QWidget
;
23
class
QToolBar
;
24
class
QAction
;
25
26
namespace
makVrv
27
{
28
class
DtToolbar;
29
class
DtQtToolbarManager;
30
class
DtWidgetBuilder;
31
36
class
DT_DLL_VRVCOREQT
DtQtToolbarMenuAssembler
:
public
DtQtMenuAssembler
37
{
38
public
:
39
DtQtToolbarMenuAssembler
(
DtDe
&);
40
virtual
~
DtQtToolbarMenuAssembler
();
41
43
virtual
QMenuBar
* menuBar();
44
46
virtual
QWidget
* menuWindow();
47
49
virtual
DtMenuManager
& menuManager();
50
51
public
:
53
virtual
void
assemble(
const
DtMenuConfiguration
& configuration );
54
55
protected
:
56
DtMenuManager
*
myMenuManager
;
57
};
58
61
class
DT_DLL_VRVCOREQT
DtQtToolbarAssembler
:
public
DtToolbarAssembler
62
{
63
public
:
64
65
typedef
std::map<std::string,DtToolbar*>
ToolbarBuilderMap
;
66
67
friend
class
DtQtToolbarAssemblerCreator
;
68
70
virtual
~
DtQtToolbarAssembler
();
71
73
static
DtQtToolbarAssembler
& instance(
DtDe
& de);
74
76
void
registerToolbar(
DtToolbar
*);
77
79
DtToolbar
* toolbarBuilder(
const
std::string&)
const
;
80
82
void
unregisterToolbar(
DtToolbar
*,
bool
deleteBuilder =
true
);
83
84
const
ToolbarBuilderMap
& toolbarBuilderMap()
const
85
{
86
return
myToolbarBuilders;
87
}
88
89
ToolbarBuilderMap
& toolbarBuilderMap()
90
{
91
return
myToolbarBuilders;
92
}
93
95
virtual
void
setIconSize(
const
QSize&);
96
97
const
QSize& iconSize()
const
;
98
101
virtual
void
merge(
const
DtQtToolbarAssembler::ToolbarBuilderMap
&);
102
105
virtual
void
registerWidgetBuilder(
const
std::string&,
DtWidgetBuilder
*,
bool
deleteExisting =
true
);
106
108
virtual
DtWidgetBuilder
* widgetBuilder(
const
std::string&);
109
111
virtual
void
unregisterWidgetBuilder(
const
std::string&,
bool
deleteExisting =
true
);
112
113
protected
:
114
116
DtQtToolbarAssembler
(
DtDe
&);
117
118
virtual
QAction
* findMenuItem(
const
std::string& item,
const
std::map<DtMenuPath, QAction*>& menuItems)
const
;
119
122
virtual
void
assembleRow(
const
DtToolbarPath
& toolbarPath,
123
DtToolbarConfiguration::ToolbarLocation
location);
124
126
virtual
void
assembleToolbar(
const
DtToolbarPath
& toolbarPath,
const
DtToolbarConfiguration
& configuration);
127
129
virtual
void
assembleToolbarItem(
const
DtToolbarPath
& toolbarPath);
130
132
virtual
void
assembleToolbarMenuItem(
const
DtToolbarPath
& toolbarPath);
133
135
virtual
void
assembleToolbarWidget(
const
DtToolbarPath
& toolbarPath);
136
139
virtual
void
assembleToolbarMenu(
const
DtToolbarPath
& toolbarPath);
140
141
virtual
QWidget
* toolbarWindow();
142
virtual
DtQtToolbarManager
& toolbarManager();
143
145
virtual
void
assemble(
const
DtToolbarConfiguration
& configuration );
146
148
virtual
void
addToolbarBreak(
DtToolbarConfiguration::ToolbarLocation
loc);
149
150
protected
:
151
152
ToolbarBuilderMap
myToolbarBuilders
;
153
DtQtToolbarMenuAssembler
myToolbarMenuAssembler
;
154
155
typedef
std::map<std::string, DtWidgetBuilder*>
WidgetBuilders
;
156
WidgetBuilders
myWidgetBuilders
;
157
158
QSize
myIconSize
;
159
160
typedef
std::map<int, std::string>
RowBreakMap
;
161
RowBreakMap
myOnRow
;
162
};
163
166
class
DT_DLL_VRVCOREQT
DtQtToolbarAssemblerCreator
:
public
DtToolbarAssemblerCreator
167
{
168
public
:
170
static
void
registerInstance(
DtDe
& de);
171
172
virtual
~
DtQtToolbarAssemblerCreator
();
173
175
virtual
DtToolbarAssembler
* create(
DtDe
& de);
176
177
protected
:
178
179
DtQtToolbarAssemblerCreator
();
180
};
181
}
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
)