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
93void CoreWidget::slotAddViewModeToolboxes(const QString& _mode, const QStringList& _usedWidgets){
94 slotAddViewModeToolboxes(_mode, false, _usedWidgets);
95}
96
97void CoreWidget::slotAddViewModeToolboxes(const QString& _mode, bool _custom, const 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 = nullptr;
109
110 if ( id == -1 ) {
111 vm = new ViewMode();
112 vm->name = _mode;
113 vm->custom = _custom;
114 vm->icon = "Unknown.png";
115
116 vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
117 vm->visibleContextMenus = QString("ALL_THAT_EXIST").split(" ");
118
119 if (_custom) {
120 viewModes_.push_back(vm);
121 } else {
122 //insert before custom viewModes
123 int i = viewModes_.size();
124 for (int k=0; k < viewModes_.size(); k++)
125 if (viewModes_[k]->custom == true){
126 i = k;
127 break;
128 }
129 viewModes_.insert(i,vm);
130 }
131
132 } else {
133 vm = viewModes_[id];
134 }
135
136 vm->visibleToolboxes = _usedWidgets;
137
139}
140
141void CoreWidget::slotAddViewModeToolbars(const QString& _mode, const QStringList& _usedToolbars) {
142 slotAddViewModeToolbars(_mode,false,_usedToolbars);
143}
144
145void CoreWidget::slotAddViewModeToolbars(const QString& _mode, bool _custom, const QStringList& _usedToolbars) {
146 int id = -1;
147
148 // Check if it already exists
149 for ( int i = 0 ; i < viewModes_.size(); i++) {
150 if ( viewModes_[i]->name == _mode ) {
151 id = i;
152 break;
153 }
154 }
155
156 ViewMode* vm = nullptr;
157
158 if ( id == -1 ) {
159 vm = new ViewMode();
160 vm->name = _mode;
161 vm->custom = _custom;
162 vm->icon = "Unknown.png";
163
164 vm->visibleContextMenus = QString("ALL_THAT_EXIST").split(" ");
165
166 if (_custom) {
167 viewModes_.push_back(vm);
168 } else {
169 //insert before custom viewModes
170 int i = viewModes_.size();
171 for (int k=0; k < viewModes_.size(); k++) {
172 if (viewModes_[k]->custom == true){
173 i = k;
174 break;
175 }
176 }
177
178 viewModes_.insert(i,vm);
179 }
180 } else {
181 vm = viewModes_[id];
182 }
183
184 vm->visibleToolbars = _usedToolbars;
185
186 // Always add the viewer Toolbar
187 if ( ! _usedToolbars.contains("Viewer Toolbar") )
188 vm->visibleToolbars.prepend("Viewer Toolbar");
189
190 // Always add the main Toolbar
191 if ( ! _usedToolbars.contains("Main Toolbar") )
192 vm->visibleToolbars.prepend("Main Toolbar");
193
195}
196
197
198void CoreWidget::slotAddViewModeContextMenus(const QString& _mode, const QStringList& _usedContextMenus){
199 slotAddViewModeContextMenus(_mode, false, _usedContextMenus);
200}
201
202void CoreWidget::slotAddViewModeContextMenus(const QString& _mode, bool _custom, const QStringList& _usedContextMenus){
203 int id = -1;
204
205 // Check if it already exists
206 for ( int i = 0 ; i < viewModes_.size(); i++) {
207 if ( viewModes_[i]->name == _mode ) {
208 id = i;
209 break;
210 }
211 }
212
213 ViewMode* vm = 0;
214 if ( id == -1 ) {
215 vm = new ViewMode();
216 vm->name = _mode;
217 vm->custom = _custom;
218 vm->icon = "Unknown.png";
219
220 vm->visibleToolbars = QString("Main Toolbar;Viewer Toolbar").split(";");
221
222 if (_custom) {
223 viewModes_.push_back(vm);
224 } else {
225 //insert before custom viewModes
226 int i = viewModes_.size();
227 for (int k=0; k < viewModes_.size(); k++)
228 if (viewModes_[k]->custom == true){
229 i = k;
230 break;
231 }
232 viewModes_.insert(i,vm);
233 }
234
235 } else {
236 vm = viewModes_[id];
237 }
238
239 vm->visibleContextMenus = _usedContextMenus;
240
242}
243
245void CoreWidget::slotSetViewModeIcon(const QString& _mode, const QString& _iconName) {
246 slotSetViewModeIcon(_mode,false,_iconName);
247}
248
250void CoreWidget::slotSetViewModeIcon(const QString& _mode, bool _custom, const QString& _iconName) {
251
252 int id = -1;
253
254 // Check if it already exists
255 for ( int i = 0 ; i < viewModes_.size(); i++) {
256 if ( viewModes_[i]->name == _mode ) {
257 id = i;
258 break;
259 }
260 }
261
262 ViewMode* vm = 0;
263 if ( id == -1 ) {
264 vm = new ViewMode();
265 vm->name = _mode;
266 vm->custom = _custom;
267 vm->icon = _iconName;
268
269 if (_custom) {
270 viewModes_.push_back(vm);
271 } else {
272
273 //insert before custom viewModes
274 int i = viewModes_.size();
275
276 for (int k=0; k < viewModes_.size(); k++) {
277 if (viewModes_[k]->custom == true){
278 i = k;
279 break;
280 }
281 }
282
283 viewModes_.insert(i,vm);
284 }
285 } else {
286 vm = viewModes_[id];
287 }
288
289 vm->icon = _iconName;
290
292}
293
295void CoreWidget::slotRemoveViewMode(const QString& _name){
296 for (int i=0; i < viewModes_.size(); i++)
297 if (viewModes_[i]->name == _name && viewModes_[i]->custom == true){ //remove only userdefined viewModes
298 viewModes_.remove(i);
299 //remove action from menu
300 for (int a=0; a < viewModeMenu_->actions().size(); a++)
301 if (viewModeMenu_->actions()[a]->text() == _name){
302 QAction* action = viewModeMenu_->actions()[a];
303 viewModeMenu_->removeAction(action);
304 viewGroup_->removeAction(action);
305 delete action;
306 }
307 break;
308
309 }
310}
311
313void CoreWidget::slotSetViewMode( QAction* action){
314 setViewMode( action->text() );
315}
316
318void CoreWidget::setViewMode( const QString& _mode, bool _expandAll ){
319 slotChangeView(_mode, QStringList(), QStringList(), QStringList(), _expandAll);
320}
321
322void CoreWidget::slotAddViewModeComplete(const QString& _mode , bool _custom, const QStringList& _toolboxes, const QStringList& _toolbars, const QStringList& _contextmenus) {
323 slotAddViewModeToolbars(_mode,_custom,_toolbars);
324 slotAddViewModeToolboxes(_mode,_custom,_toolboxes);
325 slotAddViewModeContextMenus(_mode,_custom,_contextmenus);
326}
327
330 //init widget
331 static viewModeWidget* widget = 0;
332 if ( !widget ){
333 widget = new viewModeWidget(viewModes_);
334 widget->setWindowIcon( OpenFlipper::Options::OpenFlipperIcon() );
335 connect(widget, SIGNAL(changeView(QString, QStringList, QStringList, QStringList)), this, SLOT(slotChangeView(QString, QStringList, QStringList, QStringList)) );
336 connect(widget, SIGNAL(saveMode(QString, bool, QStringList, QStringList, QStringList)), this, SLOT(slotAddViewModeComplete(QString, bool, QStringList, QStringList, QStringList)) );
337 connect(widget, SIGNAL(removeMode(QString)), this, SLOT(slotRemoveViewMode(QString)) );
338 }
339 widget->show( OpenFlipper::Options::currentViewMode() );
340}
341
343 QWidget *parent = qobject_cast<QWidget*>(modeChangeWidget->parent());
344 if (parent)
345 parent->close();
346}
347
349void CoreWidget::slotFilterToolboxes(QString searchBarText) {
350
351 // all toolboxes containing the search bar text as a substring
352 QStringList filteredToolboxes = viewModes_[0]->visibleToolboxes.filter(searchBarText, Qt::CaseInsensitive);
353
354 toolBox_->clear();
355
356 // find all widgets that should be visible after filtering
357 for (int i=0; i < filteredToolboxes.size(); i++)
358 {
359 for (uint p=0; p < plugins().size(); p++)
360 {
361 for ( uint j = 0 ; j < plugins()[p].toolboxWidgets.size(); ++j )
362 if (filteredToolboxes[i] == plugins()[p].toolboxWidgets[j].first )
363 {
364 bool skip = false;
365 if (toolBox_->plugins().contains(plugins()[p].plugin))
366 {
367 // account for the case, where a plugin can have several
368 // toolboxes, for example 'Scripting'
369 if (toolBox_->names().contains(filteredToolboxes[i]))
370 skip = true;
371 }
372
373 // only add items that have not been added yet
374 if (!skip)
375 toolBox_->addItem (plugins()[p].plugin, plugins()[p].toolboxWidgets[j].second, plugins()[p].toolboxWidgets[j].first, plugins()[p].toolboxIcons[j], plugins()[p].headerAreaWidgets[j].second );
376 }
377 }
378 }
379}
380
382void CoreWidget::slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll ){
383
384 //try to find Widgets if they aren't given
385 if (_mode != "" && _toolboxWidgets.size() == 0 && _toolbars.size() == 0)
386 for (int i=0; i < viewModes_.size(); i++)
387 if (viewModes_[i]->name == _mode) {
388 _toolboxWidgets = viewModes_[i]->visibleToolboxes;
389 _toolbars = viewModes_[i]->visibleToolbars;
390 _contextmenus = viewModes_[i]->visibleContextMenus;
391 }
392
393
394 // Remove all toolbox entries if the view has changed
395 if (_mode != OpenFlipper::Options::currentViewMode()) {
396 toolBox_->saveViewModeState(OpenFlipper::Options::currentViewMode());
397 toolBox_->clear();
398 }
399
400 //find all widgets that should be visible
401 for (int i=0; i < _toolboxWidgets.size(); i++) {
402 for (uint p=0; p < plugins().size(); p++){
403 for ( uint j = 0 ; j < plugins()[p].toolboxWidgets.size(); ++j )
404 if (_toolboxWidgets[i] == plugins()[p].toolboxWidgets[j].first ) {
405
406 bool skip = false;
407 if (toolBox_->plugins().contains(plugins()[p].plugin)) {
408 // account for the case, where a plugin can have several
409 // toolboxes, for example 'Scripting'
410 if (toolBox_->names().contains(_toolboxWidgets[i]))
411 skip = true;
412 }
413
414 // only add items that have not been added yet
415 if (!skip) {
416 toolBox_->addItem (plugins()[p].plugin, plugins()[p].toolboxWidgets[j].second, plugins()[p].toolboxWidgets[j].first, plugins()[p].toolboxIcons[j], plugins()[p].headerAreaWidgets[j].second );
417
418 // move item to the correct position
419 if (i < toolBox_->lastPos_) {
420 toolBox_->moveItemToPosition(plugins()[p].plugin, _toolboxWidgets[i], i);
421 } else
422 toolBox_->lastPos_ = i;
423
424 // check if we have to restore the state
425 // of toolboxes added via scripts
426 if (plugins()[p].name == "Scripting") {
427
428 QFile statesFile(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat");
429
430 if (statesFile.exists() ) {
431 QSettings windowStates(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
432
433
434 windowStates.beginGroup ("Core");
435 windowStates.beginGroup("SideArea");
436 windowStates.beginGroup(_toolboxWidgets[i]);
437 bool active = windowStates.value ("Active", false).toBool();
438 windowStates.endGroup();
439 windowStates.endGroup();
440 windowStates.endGroup();
441
442 toolBox_->setElementActive(_toolboxWidgets[i], active);
443 }
444 }
445 }
446 }
447 }
448 }
449
450 if (_mode != OpenFlipper::Options::currentViewMode()) {
452 }
453
454 if (_expandAll)
455 toolBox_->expandAll();
456
457 if ( ! OpenFlipperSettings().value("Core/Gui/Toolbar/hidden",false).toBool())
458 {
459 //find all Toolbars that should be visible and hide the others
460 for (uint p=0; p < plugins().size(); p++)
461 for ( uint j = 0 ; j < plugins()[p].toolbars.size(); ++j )
462 if (_toolbars.contains( plugins()[p].toolbars[j].first ) )
463 plugins()[p].toolbars[j].second->show();
464 else
465 plugins()[p].toolbars[j].second->hide();
466
467
468 // Check the Main Toolbar:
469 if ( _toolbars.contains(tr("Main Toolbar")) )
470 mainToolbar_->show();
471 else
472 mainToolbar_->hide();
473
474 // Check the Main Toolbar:
475 if ( _toolbars.contains(tr("Viewer Toolbar")) )
476 viewerToolbar_->show();
477 else
478 viewerToolbar_->hide();
479 }
480
481
482 if (_mode != "")
483 OpenFlipper::Options::currentViewMode(_mode);
484
485}
486
487void CoreWidget::moveToolBoxToTop(QString _name) {
488
489 toolBox_->moveItemToPosition(_name, 0);
490}
491
493
495}
496
497void CoreWidget::stereoButtonContextMenu(const QPoint& _pos) {
498
499 // Grey out OpenGL stereo mode option if not available
500 if(!OpenFlipper::Options::glStereo()) {
501 stereoSettingsWidget_->stereoOpengl->setDisabled(true);
502 } else {
503 stereoSettingsWidget_->stereoOpengl->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::OpenGL);
504 }
505
506 // Set values
507 stereoSettingsWidget_->stereoAnaglyph->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::AnaglyphRedCyan);
508 stereoSettingsWidget_->stereoCustomAnaglyph->setChecked(OpenFlipper::Options::stereoMode() == OpenFlipper::Options::AnaglyphCustom);
509
510 stereoSettingsWidget_->eyeDistance->setValue( OpenFlipperSettings().value("Core/Stereo/EyeDistance").toDouble() );
511 stereoSettingsWidget_->focalDistance->setValue( OpenFlipperSettings().value("Core/Stereo/FocalDistance").toDouble() * 1000);
512
513 // Move widget to the position of the cursor
514 stereoSettingsWidget_->move(stereoButton_->mapToGlobal(_pos) - QPoint((int)(stereoSettingsWidget_->width()/2), 0));
515 // Show widget
516 stereoSettingsWidget_->show();
517}
518
519void CoreWidget::slotApplyStereoSettings(int /*_tmpParam*/) {
520
521 // Update values
522 if (stereoSettingsWidget_->stereoCustomAnaglyph->isChecked()) {
523 // Update option entry
524 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphCustom);
525 // Show right stacked widget
526 stereoSettingsWidget_->stackedWidget->setCurrentIndex(0);
527 } else if (stereoSettingsWidget_->stereoAnaglyph->isChecked()) {
528 OpenFlipper::Options::stereoMode(OpenFlipper::Options::AnaglyphRedCyan);
529 stereoSettingsWidget_->stackedWidget->setCurrentIndex(0);
530 } else {
531 OpenFlipper::Options::stereoMode(OpenFlipper::Options::OpenGL);
532 stereoSettingsWidget_->stackedWidget->setCurrentIndex(0);
533 }
534
535 // Save everything
536 OpenFlipperSettings().setValue("Core/Stereo/EyeDistance",stereoSettingsWidget_->eyeDistance->value());
537 OpenFlipperSettings().setValue("Core/Stereo/FocalDistance",double(stereoSettingsWidget_->focalDistance->value()/1000.0));
538
539 // Update all views
540 for (unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i) {
541 examiner_widgets_[i]->updateGL();
542 }
543}
544
546{
547 examiner_widgets_[_id]->updateGL();
548}
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void stereoButtonContextMenu(const QPoint &_pos)
Creates custom context menu for stereo viewer settings.
Definition: viewMode.cc:497
QActionGroup * viewGroup_
Group for all menu items.
Definition: CoreWidget.hh:885
void slotSetViewMode(QAction *action)
Slot for setting ViewMode from Menu.
Definition: viewMode.cc:313
QToolButton * stereoButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:832
std::vector< glViewer * > examiner_widgets_
Examiner Widget.
Definition: CoreWidget.hh:684
void slotAddViewModeContextMenus(const QString &_mode, const QStringList &_usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:198
QVector< ViewMode * > & viewModes_
List of currently available viewModes.
Definition: CoreWidget.hh:589
QToolBar * viewerToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:828
SideArea * toolBox_
Toolbox.
Definition: CoreWidget.hh:741
void slotApplyStereoSettings(int _tmpParam=0)
Definition: viewMode.cc:519
viewModeChangeWidget * modeChangeWidget
Handle to picking toolbar.
Definition: CoreWidget.hh:765
void initViewModes()
init ViewModes that were loaded via ini-file
Definition: viewMode.cc:54
void slotViewModeDialog()
Show a dialog in which the viewMode can be edited.
Definition: viewMode.cc:329
void slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll=false)
Slot for Changing visible toolWidgets.
Definition: viewMode.cc:382
QMenu * viewMenu_
View Menu.
Definition: CoreWidget.hh:807
StereoSettingsWidget * stereoSettingsWidget_
Widget to change stereo settings.
Definition: CoreWidget.hh:1180
void moveToolBoxToBottom(QString _name)
Move a specific toolbox widget to the bottom of the side area.
Definition: viewMode.cc:492
std::vector< PluginInfo > & plugins()
Convenient way to access plugin list.
Definition: CoreWidget.cc:679
void slotSetViewModeIcon(const QString &_mode, const QString &_iconName)
Sets the Icon for a given View Mode (non-userdefined viewMode)
Definition: viewMode.cc:245
void slotAddViewModeComplete(const QString &_mode, bool _custom, const QStringList &_toolboxes, const QStringList &_toolbars, const QStringList &_contextmenus)
Completly configure a view mode ( set toolbars, toolboxes, context menus, ... )
Definition: viewMode.cc:322
void slotAddViewModeToolboxes(const QString &_mode, const QStringList &_usedWidgets)
Add or change Toolboxes for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:93
QAction * viewModeButton_
a List of all widgets in the toolbar
Definition: CoreWidget.hh:593
void moveToolBoxToTop(QString _name)
Move a specific toolbox widget to the top of the side area.
Definition: viewMode.cc:487
void closeChangeViewModePopup()
Closes the change view mode popup.
Definition: viewMode.cc:342
QMenu * viewModeMenu_
Submenu holding all ViewMode actions.
Definition: CoreWidget.hh:596
void slotUpdateExaminer(unsigned _id)
update the content of the specified examiner
Definition: viewMode.cc:545
void slotFilterToolboxes(QString searchBarText)
Slot for Filtering visible Toolboxes.
Definition: viewMode.cc:349
void slotRemoveViewMode(const QString &_name)
Remove viewMode.
Definition: viewMode.cc:295
void setViewMode(const QString &_mode, bool _expandAll=false)
Set the view Mode to the given Mode.
Definition: viewMode.cc:318
QToolBar * mainToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:1267
void slotAddViewModeToolbars(const QString &_mode, const QStringList &_usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:141
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
void moveItemToPosition(const QString &_name, int _position)
Move a toolbox widget to a given position.
Definition: SideArea.cc:84
int getNumberOfWidgets() const
Get number of widgets.
Definition: SideArea.cc:132
const QList< const QObject * > & plugins()
Get plugins in side area.
Definition: SideArea.cc:224
const QStringList & names()
Get item names.
Definition: SideArea.cc:230
void restoreViewModeState(const QString &_viewMode)
restores the active state of _viewMode
Definition: SideArea.cc:204
void addItem(QObject const *const _plugin, QWidget *_w, QString _name, QIcon *_icon=0, QWidget *_headerAreaWidget=0)
Definition: SideArea.cc:72
void setElementActive(const QString &_name, bool _active)
set the active state of given element
Definition: SideArea.cc:212
void clear()
clears the whole tool widget area
Definition: SideArea.cc:138
void saveViewModeState(const QString &_viewMode)
saves the active state of _viewMode
Definition: SideArea.cc:196
void show(const QString &_lastMode)
overloaded show function
ViewMode struct This struct contains a ViewMode and its status information such as used widgets,...
Definition: CoreWidget.hh:125
bool custom
Is this a user defined custom view mode or a plugin generated one.
Definition: CoreWidget.hh:135
QString name
Name of the View Mode.
Definition: CoreWidget.hh:128
QStringList visibleToolboxes
List of Visible Toolboxes in this view mode.
Definition: CoreWidget.hh:138
QStringList visibleContextMenus
List of context Menus in this view mode.
Definition: CoreWidget.hh:147
QStringList visibleToolbars
List of Toolbars in this view mode.
Definition: CoreWidget.hh:144
QString icon
Definition: CoreWidget.hh:132