Developer Documentation
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 
45 
46 #include "CoreWidget.hh"
47 
48 #include <OpenFlipper/widgets/viewModeWidget/viewModeWidget.hh>
49 #include <OpenFlipper/widgets/viewModeWidget/viewModeChangeWidget.hh>
50 
51 //=============================================================================
52 
55  //init viewMode subMenu
56  if (!viewModeMenu_){
57  viewModeMenu_ = new QMenu(tr("View Modes"));
59  viewGroup_ = new QActionGroup(0);
60  viewGroup_->setExclusive(true);
61  connect( viewGroup_, SIGNAL( triggered( QAction* ) ), this, SLOT( slotSetViewMode( QAction* ) ) );
62  }
63 
64  viewModeMenu_->clear();
65 
66  bool seenCustom = false;
67 
68  for (int i=0; i < viewModes_.size(); i++){
69 
70  //Add Separator above the custom widgets
71  if (viewModes_[i]->custom && !seenCustom){
72  viewModeMenu_->addSeparator();
73  seenCustom = true;
74  }
75 
76  //add Action to viewMenu
77  QAction* acViewMode = new QAction(viewModes_[i]->name, this);
78  acViewMode->setStatusTip(tr("Change ViewMode"));
79  viewGroup_->addAction(acViewMode);
80  viewModeMenu_->addAction(acViewMode);
81 
82  //add Separator after viewMode 'all'
83  if (viewModes_[i]->name == "All")
84  viewModeMenu_->addSeparator();
85  }
86 
87 
88  if ( OpenFlipperSettings().value("Core/Gui/TaskSwitcher/Hide",false).toBool() ) {
89  viewModeButton_->setVisible(false);
90  }
91 }
92 
93 void CoreWidget::slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets){
94  slotAddViewModeToolboxes(_mode, false, _usedWidgets);
95 }
96 
97 void CoreWidget::slotAddViewModeToolboxes(QString _mode, bool _custom, QStringList _usedWidgets){
98  int id = -1;
99 
100  // Check if it already exists
101  for ( int i = 0 ; i < viewModes_.size(); i++) {
102  if ( viewModes_[i]->name == _mode ) {
103  id = i;
104  break;
105  }
106  }
107 
108  ViewMode* vm = 0;
109  if ( id == -1 ) {
110  vm = new ViewMode();
111  vm->name = _mode;
112  vm->custom = _custom;
113  vm->icon = "Unknown.png";
114 
115  vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
116  vm->visibleContextMenus = QString("ALL_THAT_EXIST").split(" ");
117 
118  if (_custom) {
119  viewModes_.push_back(vm);
120  } else {
121  //insert before custom viewModes
122  int i = viewModes_.size();
123  for (int k=0; k < viewModes_.size(); k++)
124  if (viewModes_[k]->custom == true){
125  i = k;
126  break;
127  }
128  viewModes_.insert(i,vm);
129  }
130 
131  } else {
132  vm = viewModes_[id];
133  }
134 
135  vm->visibleToolboxes = _usedWidgets;
136 
137  initViewModes();
138 }
139 
140 void CoreWidget::slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars) {
141  slotAddViewModeToolbars(_mode,false,_usedToolbars);
142 }
143 
144 void CoreWidget::slotAddViewModeToolbars(QString _mode, bool _custom, QStringList _usedToolbars) {
145  int id = -1;
146 
147  // Check if it already exists
148  for ( int i = 0 ; i < viewModes_.size(); i++) {
149  if ( viewModes_[i]->name == _mode ) {
150  id = i;
151  break;
152  }
153  }
154 
155  ViewMode* vm = 0;
156  if ( id == -1 ) {
157  vm = new ViewMode();
158  vm->name = _mode;
159  vm->custom = _custom;
160  vm->icon = "Unknown.png";
161 
162  vm->visibleContextMenus = QString("ALL_THAT_EXIST").split(" ");
163 
164  if (_custom) {
165  viewModes_.push_back(vm);
166  } else {
167  //insert before custom viewModes
168  int i = viewModes_.size();
169  for (int k=0; k < viewModes_.size(); k++) {
170  if (viewModes_[k]->custom == true){
171  i = k;
172  break;
173  }
174  }
175 
176  viewModes_.insert(i,vm);
177  }
178  } else {
179  vm = viewModes_[id];
180  }
181 
182  // Always add the viewer Toolbar
183  if ( ! _usedToolbars.contains("Viewer Toolbar") )
184  _usedToolbars.prepend("Viewer Toolbar");
185 
186  // Always add the main Toolbar
187  if ( ! _usedToolbars.contains("Main Toolbar") )
188  _usedToolbars.prepend("Main Toolbar");
189 
190  vm->visibleToolbars = _usedToolbars;
191 
192  initViewModes();
193 }
194 
195 
196 void CoreWidget::slotAddViewModeContextMenus(QString _mode, QStringList _usedContextMenus){
197  slotAddViewModeContextMenus(_mode, false, _usedContextMenus);
198 }
199 
200 void CoreWidget::slotAddViewModeContextMenus(QString _mode, bool _custom, QStringList _usedContextMenus){
201  int id = -1;
202 
203  // Check if it already exists
204  for ( int i = 0 ; i < viewModes_.size(); i++) {
205  if ( viewModes_[i]->name == _mode ) {
206  id = i;
207  break;
208  }
209  }
210 
211  ViewMode* vm = 0;
212  if ( id == -1 ) {
213  vm = new ViewMode();
214  vm->name = _mode;
215  vm->custom = _custom;
216  vm->icon = "Unknown.png";
217 
218  vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
219 
220  if (_custom) {
221  viewModes_.push_back(vm);
222  } else {
223  //insert before custom viewModes
224  int i = viewModes_.size();
225  for (int k=0; k < viewModes_.size(); k++)
226  if (viewModes_[k]->custom == true){
227  i = k;
228  break;
229  }
230  viewModes_.insert(i,vm);
231  }
232 
233  } else {
234  vm = viewModes_[id];
235  }
236 
237  vm->visibleContextMenus = _usedContextMenus;
238 
239  initViewModes();
240 }
241 
243 void CoreWidget::slotSetViewModeIcon(QString _mode, QString _iconName) {
244  slotSetViewModeIcon(_mode,false,_iconName);
245 }
246 
248 void CoreWidget::slotSetViewModeIcon(QString _mode, bool _custom, QString _iconName) {
249 
250  int id = -1;
251 
252  // Check if it already exists
253  for ( int i = 0 ; i < viewModes_.size(); i++) {
254  if ( viewModes_[i]->name == _mode ) {
255  id = i;
256  break;
257  }
258  }
259 
260  ViewMode* vm = 0;
261  if ( id == -1 ) {
262  vm = new ViewMode();
263  vm->name = _mode;
264  vm->custom = _custom;
265  vm->icon = _iconName;
266 
267  if (_custom) {
268  viewModes_.push_back(vm);
269  } else {
270 
271  //insert before custom viewModes
272  int i = viewModes_.size();
273 
274  for (int k=0; k < viewModes_.size(); k++) {
275  if (viewModes_[k]->custom == true){
276  i = k;
277  break;
278  }
279  }
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 
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 
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()) {
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 
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 
511 {
512  examiner_widgets_[_id]->updateGL();
513 }
StereoSettingsWidget * stereoSettingsWidget_
Widget to change stereo settings.
Definition: CoreWidget.hh:1173
QMenu * viewModeMenu_
Submenu holding all ViewMode actions.
Definition: CoreWidget.hh:592
QActionGroup * viewGroup_
Group for all menu items.
Definition: CoreWidget.hh:878
void slotApplyStereoSettings(int _tmpParam=0)
Definition: viewMode.cc:484
QToolButton * stereoButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:825
void setElementActive(QString _name, bool _active)
set the active state of given element
Definition: SideArea.cc:212
QStringList visibleContextMenus
List of context Menus in this view mode.
Definition: CoreWidget.hh:143
ViewMode struct This struct contains a ViewMode and its status information such as used widgets...
Definition: CoreWidget.hh:124
QAction * viewModeButton_
a List of all widgets in the toolbar
Definition: CoreWidget.hh:589
void moveToolBoxToBottom(QString _name)
Move a specific toolbox widget to the bottom of the side area.
Definition: viewMode.cc:457
void slotViewModeDialog()
Show a dialog in which the viewMode can be edited.
Definition: viewMode.cc:327
QToolBar * mainToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:1260
viewModeChangeWidget * modeChangeWidget
Handle to picking toolbar.
Definition: CoreWidget.hh:758
void slotRemoveViewMode(QString _name)
Remove viewMode.
Definition: viewMode.cc:293
std::vector< PluginInfo > & plugins()
Convenient way to access plugin list.
Definition: CoreWidget.cc:661
void slotAddViewModeContextMenus(QString _mode, QStringList _usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:196
void initViewModes()
init ViewModes that were loaded via ini-file
Definition: viewMode.cc:54
SideArea * toolBox_
Toolbox.
Definition: CoreWidget.hh:734
void slotSetViewModeIcon(QString _mode, QString _iconName)
Sets the Icon for a given View Mode (non-userdefined viewMode)
Definition: viewMode.cc:243
void setViewMode(QString _mode, bool _expandAll=false)
Set the view Mode to the given Mode.
Definition: viewMode.cc:316
void slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:140
void slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll=false)
Slot for Changing visible toolWidgets.
Definition: viewMode.cc:347
void show(QString _lastMode)
overloaded show function
void moveToolBoxToTop(QString _name)
Move a specific toolbox widget to the top of the side area.
Definition: viewMode.cc:452
QString icon
Definition: CoreWidget.hh:131
QString name
Name of the View Mode.
Definition: CoreWidget.hh:127
std::vector< glViewer *> examiner_widgets_
Examiner Widget.
Definition: CoreWidget.hh:677
void stereoButtonContextMenu(const QPoint &_pos)
Creates custom context menu for stereo viewer settings.
Definition: viewMode.cc:462
void moveItemToPosition(const QString &_name, int _position)
Move a toolbox widget to a given position.
Definition: SideArea.cc:84
void addItem(QObject const *const _plugin, QWidget *_w, QString _name, QIcon *_icon=0, QWidget *_headerAreaWidget=0)
Definition: SideArea.cc:72
int getNumberOfWidgets() const
Get number of widgets.
Definition: SideArea.cc:132
QVector< ViewMode * > & viewModes_
List of currently available viewModes.
Definition: CoreWidget.hh:585
void slotSetViewMode(QAction *action)
Slot for setting ViewMode from Menu.
Definition: viewMode.cc:311
void closeChangeViewModePopup()
Closes the change view mode popup.
Definition: viewMode.cc:340
QStringList visibleToolboxes
List of Visible Toolboxes in this view mode.
Definition: CoreWidget.hh:137
QStringList visibleToolbars
List of Toolbars in this view mode.
Definition: CoreWidget.hh:140
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
void restoreViewModeState(const QString &_viewMode)
restores the active state of _viewMode
Definition: SideArea.cc:204
void slotUpdateExaminer(unsigned _id)
update the content of the specified examiner
Definition: viewMode.cc:510
QToolBar * viewerToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:821
void clear()
clears the whole tool widget area
Definition: SideArea.cc:138
bool custom
Is this a user defined custom view mode or a plugin generated one.
Definition: CoreWidget.hh:134
const QList< const QObject * > & plugins()
Get plugins in side area.
Definition: SideArea.cc:224
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
QMenu * viewMenu_
View Menu.
Definition: CoreWidget.hh:800
void saveViewModeState(const QString &_viewMode)
saves the active state of _viewMode
Definition: SideArea.cc:196
const QStringList & names()
Get item names.
Definition: SideArea.cc:230
void slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets)
Add or change Toolboxes for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:93