Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
viewMode.cc
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (c) 2001-2015, RWTH-Aachen University *
5 * Department of Computer Graphics and Multimedia *
6 * All rights reserved. *
7 * www.openflipper.org *
8 * *
9 *---------------------------------------------------------------------------*
10 * This file is part of OpenFlipper. *
11 *---------------------------------------------------------------------------*
12 * *
13 * Redistribution and use in source and binary forms, with or without *
14 * modification, are permitted provided that the following conditions *
15 * are met: *
16 * *
17 * 1. Redistributions of source code must retain the above copyright notice, *
18 * this list of conditions and the following disclaimer. *
19 * *
20 * 2. Redistributions in binary form must reproduce the above copyright *
21 * notice, this list of conditions and the following disclaimer in the *
22 * documentation and/or other materials provided with the distribution. *
23 * *
24 * 3. Neither the name of the copyright holder nor the names of its *
25 * contributors may be used to endorse or promote products derived from *
26 * this software without specific prior written permission. *
27 * *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49
50
51
52 #include "CoreWidget.hh"
53
54 #include <OpenFlipper/widgets/viewModeWidget/viewModeWidget.hh>
55 #include <OpenFlipper/widgets/viewModeWidget/viewModeChangeWidget.hh>
56
57 //=============================================================================
58
60 void CoreWidget::initViewModes(){
61 //init viewMode subMenu
62 if (!viewModeMenu_){
63 viewModeMenu_ = new QMenu(tr("View Modes"));
64 viewModeButton_ = viewMenu_->addMenu(viewModeMenu_);
65 viewGroup_ = new QActionGroup(0);
66 viewGroup_->setExclusive(true);
67 connect( viewGroup_, SIGNAL( triggered( QAction* ) ), this, SLOT( slotSetViewMode( QAction* ) ) );
68 }
69
70 viewModeMenu_->clear();
71
72 bool seenCustom = false;
73
74 for (int i=0; i < viewModes_.size(); i++){
75
76 //Add Separator above the custom widgets
77 if (viewModes_[i]->custom && !seenCustom){
78 viewModeMenu_->addSeparator();
79 seenCustom = true;
80 }
81
82 //add Action to viewMenu
83 QAction* acViewMode = new QAction(viewModes_[i]->name, this);
84 acViewMode->setStatusTip(tr("Change ViewMode"));
85 viewGroup_->addAction(acViewMode);
86 viewModeMenu_->addAction(acViewMode);
87
88 //add Separator after viewMode 'all'
89 if (viewModes_[i]->name == "All")
90 viewModeMenu_->addSeparator();
91 }
92
93
94 if ( OpenFlipperSettings().value("Core/Gui/TaskSwitcher/Hide",false).toBool() ) {
95 viewModeButton_->setVisible(false);
96 }
97 }
98
99 void CoreWidget::slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets){
100 slotAddViewModeToolboxes(_mode, false, _usedWidgets);
101 }
102
103 void CoreWidget::slotAddViewModeToolboxes(QString _mode, bool _custom, QStringList _usedWidgets){
104 int id = -1;
105
106 // Check if it already exists
107 for ( int i = 0 ; i < viewModes_.size(); i++) {
108 if ( viewModes_[i]->name == _mode ) {
109 id = i;
110 break;
111 }
112 }
113
114 ViewMode* vm = 0;
115 if ( id == -1 ) {
116 vm = new ViewMode();
117 vm->name = _mode;
118 vm->custom = _custom;
119 vm->icon = "Unknown.png";
120
121 vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
122 vm->visibleContextMenus = QString("ALL_THAT_EXIST").split(" ");
123
124 if (_custom) {
125 viewModes_.push_back(vm);
126 } else {
127 //insert before custom viewModes
128 int i = viewModes_.size();
129 for (int k=0; k < viewModes_.size(); k++)
130 if (viewModes_[k]->custom == true){
131 i = k;
132 break;
133 }
134 viewModes_.insert(i,vm);
135 }
136
137 } else {
138 vm = viewModes_[id];
139 }
140
141 vm->visibleToolboxes = _usedWidgets;
142
143 initViewModes();
144 }
145
146 void CoreWidget::slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars) {
147 slotAddViewModeToolbars(_mode,false,_usedToolbars);
148 }
149
150 void CoreWidget::slotAddViewModeToolbars(QString _mode, bool _custom, QStringList _usedToolbars) {
151 int id = -1;
152
153 // Check if it already exists
154 for ( int i = 0 ; i < viewModes_.size(); i++) {
155 if ( viewModes_[i]->name == _mode ) {
156 id = i;
157 break;
158 }
159 }
160
161 ViewMode* vm = 0;
162 if ( id == -1 ) {
163 vm = new ViewMode();
164 vm->name = _mode;
165 vm->custom = _custom;
166 vm->icon = "Unknown.png";
167
168 vm->visibleContextMenus = QString("ALL_THAT_EXIST").split(" ");
169
170 if (_custom) {
171 viewModes_.push_back(vm);
172 } else {
173 //insert before custom viewModes
174 int i = viewModes_.size();
175 for (int k=0; k < viewModes_.size(); k++)
176 if (viewModes_[k]->custom == true){
177 i = k;
178 break;
179 }
180 viewModes_.insert(i,vm);
181 }
182 } else {
183 vm = viewModes_[id];
184 }
185
186 // Always add the viewer Toolbar
187 if ( ! _usedToolbars.contains("Viewer Toolbar") )
188 _usedToolbars.prepend("Viewer Toolbar");
189
190 // Always add the main Toolbar
191 if ( ! _usedToolbars.contains("Main Toolbar") )
192 _usedToolbars.prepend("Main Toolbar");
193
194 vm->visibleToolbars = _usedToolbars;
195
196 initViewModes();
197 }
198
199
200 void CoreWidget::slotAddViewModeContextMenus(QString _mode, QStringList _usedContextMenus){
201 slotAddViewModeContextMenus(_mode, false, _usedContextMenus);
202 }
203
204 void CoreWidget::slotAddViewModeContextMenus(QString _mode, bool _custom, QStringList _usedContextMenus){
205 int id = -1;
206
207 // Check if it already exists
208 for ( int i = 0 ; i < viewModes_.size(); i++) {
209 if ( viewModes_[i]->name == _mode ) {
210 id = i;
211 break;
212 }
213 }
214
215 ViewMode* vm = 0;
216 if ( id == -1 ) {
217 vm = new ViewMode();
218 vm->name = _mode;
219 vm->custom = _custom;
220 vm->icon = "Unknown.png";
221
222 vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
223
224 if (_custom) {
225 viewModes_.push_back(vm);
226 } else {
227 //insert before custom viewModes
228 int i = viewModes_.size();
229 for (int k=0; k < viewModes_.size(); k++)
230 if (viewModes_[k]->custom == true){
231 i = k;
232 break;
233 }
234 viewModes_.insert(i,vm);
235 }
236
237 } else {
238 vm = viewModes_[id];
239 }
240
241 vm->visibleContextMenus = _usedContextMenus;
242
243 initViewModes();
244 }
245
247 void CoreWidget::slotSetViewModeIcon(QString _mode, QString _iconName) {
248 slotSetViewModeIcon(_mode,false,_iconName);
249 }
250
252 void CoreWidget::slotSetViewModeIcon(QString _mode, bool _custom, QString _iconName) {
253
254 int id = -1;
255
256 // Check if it already exists
257 for ( int i = 0 ; i < viewModes_.size(); i++) {
258 if ( viewModes_[i]->name == _mode ) {
259 id = i;
260 break;
261 }
262 }
263
264 ViewMode* vm = 0;
265 if ( id == -1 ) {
266 vm = new ViewMode();
267 vm->name = _mode;
268 vm->custom = _custom;
269 vm->icon = _iconName;
270
271 if (_custom) {
272 viewModes_.push_back(vm);
273 } else {
274 //insert before custom viewModes
275 int i = viewModes_.size();
276 for (int k=0; k < viewModes_.size(); k++)
277 if (viewModes_[k]->custom == true){
278 i = k;
279 break;
280 }
281 viewModes_.insert(i,vm);
282 }
283 } else {
284 vm = viewModes_[id];
285 }
286
287 vm->icon = _iconName;
288
289 initViewModes();
290 }
291
293 void CoreWidget::slotRemoveViewMode(QString _name){
294 for (int i=0; i < viewModes_.size(); i++)
295 if (viewModes_[i]->name == _name && viewModes_[i]->custom == true){ //remove only userdefined viewModes
296 viewModes_.remove(i);
297 //remove action from menu
298 for (int a=0; a < viewModeMenu_->actions().size(); a++)
299 if (viewModeMenu_->actions()[a]->text() == _name){
300 QAction* action = viewModeMenu_->actions()[a];
301 viewModeMenu_->removeAction(action);
302 viewGroup_->removeAction(action);
303 delete action;
304 }
305 break;
306
307 }
308 }
309
311 void CoreWidget::slotSetViewMode( QAction* action){
312 setViewMode( action->text() );
313 }
314
316 void CoreWidget::setViewMode( QString _mode, bool _expandAll ){
317 slotChangeView(_mode, QStringList(), QStringList(), QStringList(), _expandAll);
318 }
319
320 void CoreWidget::slotAddViewModeComplete(QString _mode , bool _custom, QStringList _toolboxes, QStringList _toolbars, QStringList _contextmenus) {
321 slotAddViewModeToolbars(_mode,_custom,_toolbars);
322 slotAddViewModeToolboxes(_mode,_custom,_toolboxes);
323 slotAddViewModeContextMenus(_mode,_custom,_contextmenus);
324 }
325
327 void CoreWidget::slotViewModeDialog(){
328 //init widget
329 static viewModeWidget* widget = 0;
330 if ( !widget ){
331 widget = new viewModeWidget(viewModes_);
332 widget->setWindowIcon( OpenFlipper::Options::OpenFlipperIcon() );
333 connect(widget, SIGNAL(changeView(QString, QStringList, QStringList, QStringList)), this, SLOT(slotChangeView(QString, QStringList, QStringList, QStringList)) );
334 connect(widget, SIGNAL(saveMode(QString, bool, QStringList, QStringList, QStringList)), this, SLOT(slotAddViewModeComplete(QString, bool, QStringList, QStringList, QStringList)) );
335 connect(widget, SIGNAL(removeMode(QString)), this, SLOT(slotRemoveViewMode(QString)) );
336 }
337 widget->show( OpenFlipper::Options::currentViewMode() );
338 }
339
340 void CoreWidget::closeChangeViewModePopup() {
341 QWidget *parent = qobject_cast<QWidget*>(modeChangeWidget->parent());
342 if (parent)
343 parent->close();
344 }
345
347 void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll ){
348
349 //try to find Widgets if they aren't given
350 if (_mode != "" && _toolboxWidgets.size() == 0 && _toolbars.size() == 0)
351 for (int i=0; i < viewModes_.size(); i++)
352 if (viewModes_[i]->name == _mode) {
353 _toolboxWidgets = viewModes_[i]->visibleToolboxes;
354 _toolbars = viewModes_[i]->visibleToolbars;
355 _contextmenus = viewModes_[i]->visibleContextMenus;
356 }
357
358
359 // Remove all toolbox entries if the view has changed
360 if (_mode != OpenFlipper::Options::currentViewMode()) {
361 toolBox_->saveViewModeState(OpenFlipper::Options::currentViewMode());
362 toolBox_->clear();
363 }
364
365 //find all widgets that should be visible
366 for (int i=0; i < _toolboxWidgets.size(); i++) {
367 for (uint p=0; p < plugins_.size(); p++){
368 for ( uint j = 0 ; j < plugins_[p].toolboxWidgets.size(); ++j )
369 if (_toolboxWidgets[i] == plugins_[p].toolboxWidgets[j].first ) {
370
371 bool skip = false;
372 if (toolBox_->plugins().contains(plugins_[p].plugin)) {
373 // account for the case, where a plugin can have several
374 // toolboxes, for example 'Scripting'
375 if (toolBox_->names().contains(_toolboxWidgets[i]))
376 skip = true;
377 }
378
379 // only add items that have not been added yet
380 if (!skip) {
381 toolBox_->addItem (plugins_[p].plugin, plugins_[p].toolboxWidgets[j].second, plugins_[p].toolboxWidgets[j].first, plugins_[p].toolboxIcons[j], plugins_[p].headerAreaWidgets[j].second );
382
383 // move item to the correct position
384 if (i < toolBox_->lastPos_) {
385 toolBox_->moveItemToPosition(plugins_[p].plugin, _toolboxWidgets[i], i);
386 } else
387 toolBox_->lastPos_ = i;
388
389 // check if we have to restore the state
390 // of toolboxes added via scripts
391 if (plugins_[p].name == "Scripting") {
392
393 QFile statesFile(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat");
394
395 if (statesFile.exists() ) {
396 QSettings windowStates(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
397
398
399 windowStates.beginGroup ("Core");
400 windowStates.beginGroup("SideArea");
401 windowStates.beginGroup(_toolboxWidgets[i]);
402 bool active = windowStates.value ("Active", false).toBool();
403 windowStates.endGroup();
404 windowStates.endGroup();
405 windowStates.endGroup();
406
407 toolBox_->setElementActive(_toolboxWidgets[i], active);
408 }
409 }
410 }
411 }
412 }
413 }
414
415 if (_mode != OpenFlipper::Options::currentViewMode()) {
416 toolBox_->restoreViewModeState(_mode);
417 }
418
419 if (_expandAll)
420 toolBox_->expandAll();
421
422 if ( ! OpenFlipperSettings().value("Core/Gui/Toolbar/hidden",false).toBool())
423 {
424 //find all Toolbars that should be visible and hide the others
425 for (uint p=0; p < plugins_.size(); p++)
426 for ( uint j = 0 ; j < plugins_[p].toolbars.size(); ++j )
427 if (_toolbars.contains( plugins_[p].toolbars[j].first ) )
428 plugins_[p].toolbars[j].second->show();
429 else
430 plugins_[p].toolbars[j].second->hide();
431
432
433 // Check the Main Toolbar:
434 if ( _toolbars.contains(tr("Main Toolbar")) )
435 mainToolbar_->show();
436 else
437 mainToolbar_->hide();
438
439 // Check the Main Toolbar:
440 if ( _toolbars.contains(tr("Viewer Toolbar")) )
441 viewerToolbar_->show();
442 else
443 viewerToolbar_->hide();
444 }
445
446
447 if (_mode != "")
448 OpenFlipper::Options::currentViewMode(_mode);
449
450 }
451
452 void CoreWidget::moveToolBoxToTop(QString _name) {
453
454 toolBox_->moveItemToPosition(_name, 0);
455 }
456
457 void CoreWidget::moveToolBoxToBottom(QString _name) {
458
459 toolBox_->moveItemToPosition(_name, toolBox_->getNumberOfWidgets()-1);
460 }
461
462 void CoreWidget::stereoButtonContextMenu(const QPoint& _pos) {
463
464 // Grey out OpenGL stereo mode option if not available
465 if(!OpenFlipper::Options::glStereo()) {
466 stereoSettingsWidget_->stereoOpengl->setDisabled(true);
467 } else {
468 stereoSettingsWidget_->stereoOpengl->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::OpenGL);
469 }
470
471 // Set values
472 stereoSettingsWidget_->stereoAnaglyph->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::AnaglyphRedCyan);
473 stereoSettingsWidget_->stereoCustomAnaglyph->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::AnaglyphCustom);
474
475 stereoSettingsWidget_->eyeDistance->setValue( OpenFlipperSettings().value("Core/Stereo/EyeDistance").toDouble() );
476 stereoSettingsWidget_->focalDistance->setValue( OpenFlipperSettings().value("Core/Stereo/FocalDistance").toDouble() * 1000);
477
478 // Move widget to the position of the cursor
479 stereoSettingsWidget_->move(stereoButton_->mapToGlobal(_pos) - QPoint((int)(stereoSettingsWidget_->width()/2), 0));
480 // Show widget
481 stereoSettingsWidget_->show();
482 }
483
484 void CoreWidget::slotApplyStereoSettings(int /*_tmpParam*/) {
485
486 // Update values
487 if (stereoSettingsWidget_->stereoCustomAnaglyph->isChecked()) {
488 // Update option entry
489 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphCustom);
490 // Show right stacked widget
491 stereoSettingsWidget_->stackedWidget->setCurrentIndex(0);
492 } else if (stereoSettingsWidget_->stereoAnaglyph->isChecked()) {
493 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphRedCyan);
494 stereoSettingsWidget_->stackedWidget->setCurrentIndex(0);
495 } else {
496 OpenFlipper::Options::stereoMode(OpenFlipper::Options::OpenGL);
497 stereoSettingsWidget_->stackedWidget->setCurrentIndex(0);
498 }
499
500 // Save everything
501 OpenFlipperSettings().setValue("Core/Stereo/EyeDistance",stereoSettingsWidget_->eyeDistance->value());
502 OpenFlipperSettings().setValue("Core/Stereo/FocalDistance",double(stereoSettingsWidget_->focalDistance->value()/1000.0));
503
504 // Update all views
505 for (unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i) {
506 examiner_widgets_[i]->updateGL();
507 }
508 }
509
510 void CoreWidget::slotUpdateExaminer(unsigned _id)
511 {
512 examiner_widgets_[_id]->updateGL();
513 }
OpenFlipperSettings
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
Definition: GlobalOptions.cc:938
CoreWidget::slotSetViewMode
void slotSetViewMode(QAction *action)
Slot for setting ViewMode from Menu.
Definition: viewMode.cc:311
SideArea::plugins
const QList< const QObject * > & plugins()
Get plugins in side area.
Definition: SideArea.cc:230
CoreWidget::moveToolBoxToBottom
void moveToolBoxToBottom(QString _name)
Move a specific toolbox widget to the bottom of the side area.
Definition: viewMode.cc:457
CoreWidget::slotAddViewModeToolboxes
void slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets)
Add or change Toolboxes for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:99
CoreWidget::slotApplyStereoSettings
void slotApplyStereoSettings(int _tmpParam=0)
Definition: viewMode.cc:484
SideArea::moveItemToPosition
void moveItemToPosition(const QString &_name, int _position)
Move a toolbox widget to a given position.
Definition: SideArea.cc:90
CoreWidget::viewMenu_
QMenu * viewMenu_
View Menu.
Definition: CoreWidget.hh:792
CoreWidget::mainToolbar_
QToolBar * mainToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:1233
CoreWidget::slotAddViewModeContextMenus
void slotAddViewModeContextMenus(QString _mode, QStringList _usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:200
SideArea::setElementActive
void setElementActive(QString _name, bool _active)
set the active state of given element
Definition: SideArea.cc:218
viewModeWidget::show
void show(QString _lastMode)
overloaded show function
Definition: viewModeWidget.cc:841
CoreWidget::toolBox_
SideArea * toolBox_
Toolbox.
Definition: CoreWidget.hh:726
CoreWidget::slotViewModeDialog
void slotViewModeDialog()
Show a dialog in which the viewMode can be edited.
Definition: viewMode.cc:327
CoreWidget::viewModeMenu_
QMenu * viewModeMenu_
Submenu holding all ViewMode actions.
Definition: CoreWidget.hh:584
CoreWidget::slotSetViewModeIcon
void slotSetViewModeIcon(QString _mode, QString _iconName)
Sets the Icon for a given View Mode (non-userdefined viewMode)
Definition: viewMode.cc:247
CoreWidget::slotChangeView
void slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll=false)
Slot for Changing visible toolWidgets.
Definition: viewMode.cc:347
CoreWidget::slotUpdateExaminer
void slotUpdateExaminer(unsigned _id)
update the content of the specified examiner
Definition: viewMode.cc:510
CoreWidget::slotRemoveViewMode
void slotRemoveViewMode(QString _name)
Remove viewMode.
Definition: viewMode.cc:293
SideArea::getNumberOfWidgets
int getNumberOfWidgets() const
Get number of widgets.
Definition: SideArea.cc:138
SideArea::saveViewModeState
void saveViewModeState(const QString &_viewMode)
saves the active state of _viewMode
Definition: SideArea.cc:202
CoreWidget::initViewModes
void initViewModes()
init ViewModes that were loaded via ini-file
Definition: viewMode.cc:60
ViewMode::visibleContextMenus
QStringList visibleContextMenus
List of context Menus in this view mode.
Definition: CoreWidget.hh:148
ViewMode::custom
bool custom
Is this a user defined custom view mode or a plugin generated one.
Definition: CoreWidget.hh:139
ViewMode::name
QString name
Name of the View Mode.
Definition: CoreWidget.hh:132
ViewMode::visibleToolboxes
QStringList visibleToolboxes
List of Visible Toolboxes in this view mode.
Definition: CoreWidget.hh:142
CoreWidget::setViewMode
void setViewMode(QString _mode, bool _expandAll=false)
Set the view Mode to the given Mode.
Definition: viewMode.cc:316
CoreWidget::stereoButtonContextMenu
void stereoButtonContextMenu(const QPoint &_pos)
Creates custom context menu for stereo viewer settings.
Definition: viewMode.cc:462
SideArea::names
const QStringList & names()
Get item names.
Definition: SideArea.cc:236
viewModeWidget
Definition: viewModeWidget.hh:62
CoreWidget::modeChangeWidget
viewModeChangeWidget * modeChangeWidget
Handle to picking toolbar.
Definition: CoreWidget.hh:750
CoreWidget::viewGroup_
QActionGroup * viewGroup_
Group for all menu items.
Definition: CoreWidget.hh:867
CoreWidget::closeChangeViewModePopup
void closeChangeViewModePopup()
Closes the change view mode popup.
Definition: viewMode.cc:340
SideArea::restoreViewModeState
void restoreViewModeState(const QString &_viewMode)
restores the active state of _viewMode
Definition: SideArea.cc:210
ViewMode::icon
QString icon
Definition: CoreWidget.hh:136
SideArea::clear
void clear()
clears the whole tool widget area
Definition: SideArea.cc:144
ViewMode
ViewMode struct This struct contains a ViewMode and its status information such as used widgets...
Definition: CoreWidget.hh:129
CoreWidget::moveToolBoxToTop
void moveToolBoxToTop(QString _name)
Move a specific toolbox widget to the top of the side area.
Definition: viewMode.cc:452
SideArea::addItem
void addItem(QObject const *const _plugin, QWidget *_w, QString _name, QIcon *_icon=0, QWidget *_headerAreaWidget=0)
Definition: SideArea.cc:78
CoreWidget::slotAddViewModeComplete
void slotAddViewModeComplete(QString _mode, bool _custom, QStringList _toolboxes, QStringList _toolbars, QStringList _contextmenus)
Completly configure a view mode ( set toolbars, toolboxes, context menus, ... )
Definition: viewMode.cc:320
CoreWidget::viewModeButton_
QAction * viewModeButton_
a List of all widgets in the toolbar
Definition: CoreWidget.hh:581
ViewMode::visibleToolbars
QStringList visibleToolbars
List of Toolbars in this view mode.
Definition: CoreWidget.hh:145
CoreWidget::viewModes_
QVector< ViewMode * > & viewModes_
List of currently available viewModes.
Definition: CoreWidget.hh:577
OpenFlipperQSettings::setValue
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
Definition: OpenFlipperQSettings.cc:68
CoreWidget.hh
CoreWidget::stereoButton_
QToolButton * stereoButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:814
CoreWidget::viewerToolbar_
QToolBar * viewerToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:810
CoreWidget::slotAddViewModeToolbars
void slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:146
CoreWidget::stereoSettingsWidget_
StereoSettingsWidget * stereoSettingsWidget_
Widget to change stereo settings.
Definition: CoreWidget.hh:1162
CoreWidget::examiner_widgets_
std::vector< glViewer * > examiner_widgets_
Examiner Widget.
Definition: CoreWidget.hh:669