MenuBar.cc 34.1 KB
Newer Older
1
/*===========================================================================*\
Jan Möbius's avatar
Jan Möbius committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
*                                                                            *
*                              OpenFlipper                                   *
*      Copyright (C) 2001-2010 by Computer Graphics Group, RWTH Aachen       *
*                           www.openflipper.org                              *
*                                                                            *
*--------------------------------------------------------------------------- *
*  This file is part of OpenFlipper.                                         *
*                                                                            *
*  OpenFlipper is free software: you can redistribute it and/or modify       *
*  it under the terms of the GNU Lesser General Public License as            *
*  published by the Free Software Foundation, either version 3 of            *
*  the License, or (at your option) any later version with the               *
*  following exceptions:                                                     *
*                                                                            *
*  If other files instantiate templates or use macros                        *
*  or inline functions from this file, or you compile this file and          *
*  link it with other files to produce an executable, this file does         *
*  not by itself cause the resulting executable to be covered by the         *
*  GNU Lesser General Public License. This exception does not however        *
*  invalidate any other reasons why the executable file might be             *
*  covered by the GNU Lesser General Public License.                         *
*                                                                            *
*  OpenFlipper is distributed in the hope that it will be useful,            *
*  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
*  GNU Lesser General Public License for more details.                       *
*                                                                            *
*  You should have received a copy of the GNU LesserGeneral Public           *
*  License along with OpenFlipper. If not,                                   *
*  see <http://www.gnu.org/licenses/>.                                       *
*                                                                            *
33
34
35
\*===========================================================================*/

/*===========================================================================*\
Jan Möbius's avatar
Jan Möbius committed
36
37
38
39
40
*                                                                            *
*   $Revision$                                                       *
*   $LastChangedBy$                                                *
*   $Date$                     *
*                                                                            *
41
\*===========================================================================*/
Jan Möbius's avatar
   
Jan Möbius committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56



//=============================================================================
//
//  CLASS CoreWidget - IMPLEMENTATION
//
//=============================================================================


//== INCLUDES =================================================================

// -------------------- mview
#include "CoreWidget.hh"
#include <OpenFlipper/common/GlobalOptions.hh>
Jan Möbius's avatar
Jan Möbius committed
57
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
Jan Möbius's avatar
Jan Möbius committed
58
#include <OpenFlipper/BasePlugin/MenuInterface.hh>
Jan Möbius's avatar
   
Jan Möbius committed
59

60
//== IMPLEMENTATION ==========================================================
Jan Möbius's avatar
   
Jan Möbius committed
61
62
63



Jan Möbius's avatar
Jan Möbius committed
64
65
66
67
68
69
70
71
72
void CoreWidget::slotAddMenubarAction( QAction* _action , QString _name ) {

  if (!menus_.contains (_name))
    return;

  if (_name == FILEMENU)
  {
    fileMenu_->insertSeparator(fileMenuEnd_);
    fileMenu_->insertAction( fileMenuEnd_ , _action );
Jan Möbius's avatar
   
Jan Möbius committed
73
  }
Jan Möbius's avatar
Jan Möbius committed
74
75
76
  else
    menus_[_name]->addAction (_action);
}
77

Jan Möbius's avatar
Jan Möbius committed
78
79
80
81
82
83
84
85
86
87
88
89
90
//=============================================================================

void CoreWidget::slotGetMenubarMenu (QString _name, QMenu *& _menu, bool _create)
{
  if (menus_.contains (_name))
    _menu = menus_[_name];
  else if (_create)
  {
    _menu = new QMenu(_name);
    menus_[_name] = _menu;
    menuBar()->insertAction(helpMenu_->menuAction() ,_menu->menuAction ());
  } else
    _menu = NULL;
Jan Möbius's avatar
   
Jan Möbius committed
91
92
93
94
}


//=============================================================================
Jan Möbius's avatar
   
Jan Möbius committed
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
bool CoreWidget::eventFilter(QObject *obj, QEvent *event)
 {
     if (obj == menuBar() ) {
       emit log(LOGERR,"Alt filter menubar " + QString::number(int(event->type())));
         if (event->type() == QEvent::ShortcutOverride) {
             QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
             if ( (keyEvent->key() == Qt::Key_Alt ||
                   keyEvent->key() == Qt::Key_Meta ) &&
                   keyEvent->modifiers() == Qt::AltModifier )
                   emit log(LOGERR,"Alt key press");
             return obj->eventFilter(obj, event);
         } else {
             return obj->eventFilter(obj, event);
         }
     } else {
         // pass the event on to the parent class
         return QMainWindow::eventFilter(obj, event);
     }
 }*/
Jan Möbius's avatar
   
Jan Möbius committed
115
116
117

void CoreWidget::setupMenuBar()
{
Jan Möbius's avatar
   
Jan Möbius committed
118
119
120

 // menuBar()->installEventFilter(this);

Jan Möbius's avatar
   
Jan Möbius committed
121
122
123
  // ======================================================================
  // File Menu
  // ======================================================================
Jan Möbius's avatar
Jan Möbius committed
124
  fileMenu_ = new QMenu( FILEMENU );
Jan Möbius's avatar
   
Jan Möbius committed
125
  menuBar()->addMenu(fileMenu_ );
Jan Möbius's avatar
Jan Möbius committed
126
  menus_[tr("File")] = fileMenu_;
Jan Möbius's avatar
   
Jan Möbius committed
127

Jan Möbius's avatar
   
Jan Möbius committed
128
  //Clear all
Jan Möbius's avatar
Jan Möbius committed
129
  QAction* AC_clear_all = new QAction(tr("Clear All"), this);;
Jan Möbius's avatar
   
Jan Möbius committed
130
  AC_clear_all->setStatusTip(tr("Clear all Objects"));
131
  AC_clear_all->setWhatsThis(tr("Close all open Objects"));
132
  AC_clear_all->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-clear.png"));
Jan Möbius's avatar
   
Jan Möbius committed
133
134
  connect(AC_clear_all, SIGNAL(triggered()), this, SIGNAL(clearAll()));
  fileMenu_->addAction(AC_clear_all);
135

Jan Möbius's avatar
   
Jan Möbius committed
136
  fileMenu_->addSeparator();
137
138

  //Load object
Jan Möbius's avatar
Jan Möbius committed
139
  QAction* AC_Load = new QAction(tr("Load Object"), this);
Jan Möbius's avatar
   
Jan Möbius committed
140
  AC_Load->setStatusTip(tr("Load an object"));
141
  AC_Load->setWhatsThis(tr("Load a new object"));
142
  AC_Load->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-open.png"));
143

Jan Möbius's avatar
   
Jan Möbius committed
144
145
  connect(AC_Load, SIGNAL(triggered()), this, SIGNAL(loadMenu()));
  fileMenu_->addAction(AC_Load);
146

Jan Möbius's avatar
   
Jan Möbius committed
147
  //Add empty object
Jan Möbius's avatar
Jan Möbius committed
148
  QAction* AC_AddEmpty = new QAction(tr("Add Empty Object"), this);
Jan Möbius's avatar
   
Jan Möbius committed
149
  AC_AddEmpty->setStatusTip(tr("Add an empty object"));
150
  AC_AddEmpty->setWhatsThis(tr("Creates a new empty object of a given type"));
151
  AC_AddEmpty->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"add-empty-object.png"));
Jan Möbius's avatar
   
Jan Möbius committed
152
153
  connect(AC_AddEmpty, SIGNAL(triggered()), this, SIGNAL(addEmptyObjectMenu()));
  fileMenu_->addAction(AC_AddEmpty);
154

Jan Möbius's avatar
   
Jan Möbius committed
155
  fileMenu_->addSeparator();
156

Jan Möbius's avatar
   
Jan Möbius committed
157
  //Save object
158
  QAction* AC_Save = new QAction(tr("Save Objects"), this);
Dirk Wilden's avatar
Dirk Wilden committed
159
//   AC_Save->setShortcut (Qt::CTRL + Qt::Key_S);
160
161
  AC_Save->setStatusTip(tr("Save current objects"));
  AC_Save->setWhatsThis(tr("Save current objects"));
162
  AC_Save->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-save.png"));
Jan Möbius's avatar
   
Jan Möbius committed
163
164
  connect(AC_Save, SIGNAL(triggered()), this, SIGNAL(saveMenu()));
  fileMenu_->addAction(AC_Save);
165

Jan Möbius's avatar
   
Jan Möbius committed
166
  //Save object to
167
168
169
  QAction* AC_Save_to = new QAction(tr("Save Objects to"), this);
  AC_Save_to->setStatusTip(tr("Save current Object(s) to"));
  AC_Save_to->setWhatsThis(tr("Save current Object(s) under a new name"));
170
  AC_Save_to->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-save-as.png"));
Jan Möbius's avatar
   
Jan Möbius committed
171
172
  connect(AC_Save_to, SIGNAL(triggered()), this, SIGNAL(saveToMenu()));
  fileMenu_->addAction(AC_Save_to);
173

Jan Möbius's avatar
   
Jan Möbius committed
174
  fileMenu_->addSeparator();
175

Jan Möbius's avatar
   
Jan Möbius committed
176
  //Load ini
Jan Möbius's avatar
Jan Möbius committed
177
  QAction* AC_load_ini = new QAction(tr("Load Settings"), this);
Jan Möbius's avatar
   
Jan Möbius committed
178
  AC_load_ini->setStatusTip(tr("Load Settings from INI file"));
179
  AC_load_ini->setWhatsThis(tr("Load a previous settings from file (objects,colors,...)"));
180
  AC_load_ini->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"load-settings.png"));
Jan Möbius's avatar
   
Jan Möbius committed
181
182
  connect(AC_load_ini, SIGNAL(triggered()), this, SIGNAL(loadIniMenu()));
  fileMenu_->addAction(AC_load_ini);
183

Jan Möbius's avatar
   
Jan Möbius committed
184
  //Save ini
Jan Möbius's avatar
Jan Möbius committed
185
  QAction* AC_save_ini = new QAction(tr("Save Settings"), this);
Jan Möbius's avatar
   
Jan Möbius committed
186
  AC_save_ini->setStatusTip(tr("Save current settings to INI file"));
187
  AC_save_ini->setWhatsThis(tr("Save settings to file (objects,colors,...)"));
188
  AC_save_ini->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"save-settings.png"));
Jan Möbius's avatar
   
Jan Möbius committed
189
190
  connect(AC_save_ini, SIGNAL(triggered()), this, SIGNAL(saveIniMenu()));
  fileMenu_->addAction(AC_save_ini);
191
192
193
194

  fileMenu_->addSeparator();

  //Options
Jan Möbius's avatar
Jan Möbius committed
195
  QAction* AC_Options = new QAction(tr("Options"), this);
196
  AC_Options->setStatusTip(tr("Edit OpenFlipper Options"));
197
  AC_Options->setWhatsThis(tr("Edit OpenFlipper Options"));
198
  AC_Options->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"options.png"));
199
200
  connect(AC_Options, SIGNAL(triggered()), this, SLOT(showOptionsWidget()));
  fileMenu_->addAction(AC_Options);
201
202

  //Remember entry of menu (required for adding File Menu entries from plugins)
Jan Möbius's avatar
   
Jan Möbius committed
203
  fileMenuEnd_ = fileMenu_->addSeparator();
204

Jan Möbius's avatar
   
Jan Möbius committed
205
  //Recent files
Jan Möbius's avatar
Jan Möbius committed
206
  recentFilesMenu_ = new QMenu(tr("Recent Files"));
207
  recentFilesMenu_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-open-recent.png"));
208
  recentFilesMenu_->setWhatsThis(tr("Open recent files"));
Jan Möbius's avatar
   
Jan Möbius committed
209
210
  connect(recentFilesMenu_,SIGNAL(triggered(QAction*)),this,SIGNAL(recentOpen(QAction*)));
  fileMenu_->addMenu(recentFilesMenu_);
211

Jan Möbius's avatar
   
Jan Möbius committed
212
  fileMenu_->addSeparator();
213

Jan Möbius's avatar
   
Jan Möbius committed
214
  //Main Application exit menu entry
Jan Möbius's avatar
Jan Möbius committed
215
  QAction* AC_exit = new QAction(tr("Exit"), this);;
Jan Möbius's avatar
   
Jan Möbius committed
216
217
  AC_exit->setShortcut (Qt::CTRL + Qt::Key_Q);
  AC_exit->setStatusTip(tr("Exit Application"));
218
  recentFilesMenu_->setWhatsThis(tr("Close OpenFlipper"));
219
  AC_exit->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"application-exit.png"));
Jan Möbius's avatar
   
Jan Möbius committed
220
221
222
  connect(AC_exit, SIGNAL(triggered()), this, SIGNAL(exit()));
  fileMenu_->addAction(AC_exit);

Jan Möbius's avatar
   
Jan Möbius committed
223

224
225
226
  // ======================================================================
  // View Menu
  // ======================================================================
Jan Möbius's avatar
Jan Möbius committed
227
  viewMenu_ = new QMenu( VIEWMENU );
228
  menuBar()->addMenu(viewMenu_ );
Jan Möbius's avatar
Jan Möbius committed
229
  menus_[tr("View")] = viewMenu_;
Jan Möbius's avatar
   
Jan Möbius committed
230

231
232
  slotUpdateGlobalDrawMenu();
  viewMenu_->addMenu(globalDrawMenu_);
Jan Möbius's avatar
   
Jan Möbius committed
233

234
235
236
  //============================================================================================================
  // Rendering options Menu
  //============================================================================================================
Jan Möbius's avatar
   
Jan Möbius committed
237

238
  QMenu* renderingOptionsMenu = new QMenu(tr("Global Rendering Options"),viewMenu_);
Jan Möbius's avatar
Jan Möbius committed
239
  renderingOptionsMenu->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"core_renderingOptions.png") );
240
  viewMenu_->addMenu(renderingOptionsMenu);
Jan Möbius's avatar
   
Jan Möbius committed
241

242
  orthogonalProjectionAction_ = new QAction( tr("Switch Viewers to Orthogonal Projection"), renderingOptionsMenu );;
243
244
  orthogonalProjectionAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"orthogonal.png") );
  orthogonalProjectionAction_->setCheckable( false );
245
246
247
  orthogonalProjectionAction_->setToolTip(   tr("Switch to orthogonal projection mode."));
  orthogonalProjectionAction_->setWhatsThis( tr("Switch projection mode<br><br>"
      "Switch to <b>orthogonal</b> projection mode."));
248
249
  connect( orthogonalProjectionAction_,SIGNAL( triggered() ), this, SLOT( slotGlobalOrthographicProjection() ) );
  renderingOptionsMenu->addAction( orthogonalProjectionAction_);
Jan Möbius's avatar
   
Jan Möbius committed
250

251
252
253
254
255
256
257
258
259
  perspectiveProjectionAction_ = new QAction( tr("Switch Viewers to Perspective Projection"), viewMenu_ );;
  perspectiveProjectionAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"perspective.png") );
  perspectiveProjectionAction_->setCheckable( false );
  perspectiveProjectionAction_->setStatusTip( tr("Switch to perspective projection mode."));
  perspectiveProjectionAction_->setWhatsThis( tr("Switch projection mode<br><br>"
                                                 "Switch to <b>perspective</b> projection mode."));
  connect( perspectiveProjectionAction_,SIGNAL( triggered() ), this, SLOT( slotGlobalPerspectiveProjection() ) );
  renderingOptionsMenu->addAction( perspectiveProjectionAction_);

260
  // =====================
261

262
  globalAnimationAction_ = renderingOptionsMenu->addAction(tr("Global Animation"));
263
  globalAnimationAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"animation.png") );
264
  connect(globalAnimationAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalToggleAnimation() ) );
Jan Möbius's avatar
   
Jan Möbius committed
265

266
  //======================
Jan Möbius's avatar
   
Jan Möbius committed
267

268
  globalBackfaceCullingAction_ = renderingOptionsMenu->addAction(tr("Global Backface Culling"));
269
  globalBackfaceCullingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"backFaceCulling.png") );
270
  connect(globalBackfaceCullingAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalToggleBackFaceCulling() ) );
271
272
273

  //======================

274
  globalTwosidedLightingAction_ = renderingOptionsMenu->addAction(tr("Global Two-sided Lighting"));
275
  globalTwosidedLightingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"twosidedLighting.png") );
276
  connect(globalTwosidedLightingAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalToggleTwoSidedLighting() ) );
277

278
279
  //======================

280
281
282
283
284
285
286
287
288
  globalMultisamplingAction_ = renderingOptionsMenu->addAction(tr("Global Multisampling"));
  globalMultisamplingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multisampling.png") );
  connect(globalMultisamplingAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalToggleMultisampling()) );
  //======================

  globalMipmappingAction_ = renderingOptionsMenu->addAction(tr("Global Mipmapping"));
  globalMipmappingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"mipmapping.png") );
  connect(globalMipmappingAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalToggleMipmapping()) );
  
Jan Möbius's avatar
   
Jan Möbius committed
289

290
291
292
  //============================================================================================================
  // Other toplevel actions
  //============================================================================================================
Jan Möbius's avatar
   
Jan Möbius committed
293

294
  viewMenu_->addSeparator();
Jan Möbius's avatar
   
Jan Möbius committed
295

Mike Kremer's avatar
Mike Kremer committed
296
  QAction* navigationSwitchAction = new QAction( tr("First-person Navigation"), viewMenu_ );
297
  navigationSwitchAction->setCheckable( true );
Jan Möbius's avatar
Jan Möbius committed
298
  navigationSwitchAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"core_firstPersonMode.png") );
Mike Kremer's avatar
Mike Kremer committed
299
300
  navigationSwitchAction->setStatusTip( tr("Switch between normal and first-person navigation mode."));
  navigationSwitchAction->setWhatsThis( tr("Switch between normal and first-person navigation mode."));
301
302
303
304
305
306
307
  navigationSwitchAction->setChecked( false );

  connect( navigationSwitchAction, SIGNAL( toggled(bool) ), this, SLOT( slotSwitchNavigation(bool) ) );
  viewMenu_->addAction( navigationSwitchAction);

  viewMenu_->addSeparator();

308
  connect( viewMenu_,SIGNAL( aboutToShow() ), this, SLOT( slotViewMenuAboutToShow() ) );
Jan Möbius's avatar
   
Jan Möbius committed
309

310
  QAction* homeAction = new QAction(tr("Restore Home View"),viewMenu_);
311
312
  homeAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"go-home.png") );
  homeAction->setCheckable( false );
313
314
315
  homeAction->setStatusTip( tr("Restore <b>home</b> view."));
  homeAction->setWhatsThis( tr("Restore home view<br><br>"
                               "Resets the view to the home view"));
316
317
  viewMenu_->addAction( homeAction );
  connect( homeAction,SIGNAL( triggered() ), this, SLOT( slotGlobalHomeView() ) );
Jan Möbius's avatar
   
Jan Möbius committed
318
319


320
  QAction* setHomeAction = new QAction( tr("Set Home View") , viewMenu_ );
321
322
  setHomeAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"set-home.png") );
  setHomeAction->setCheckable( false );
323
324
325
  setHomeAction->setStatusTip( tr("Set <b>home</b> view"));
  setHomeAction->setWhatsThis( tr("Store home view<br><br>"
                                  "Stores the current view as the home view"));
326
327
  viewMenu_->addAction( setHomeAction);
  connect( setHomeAction,SIGNAL( triggered() ), this, SLOT( slotGlobalSetHomeView() ) );
Jan Möbius's avatar
   
Jan Möbius committed
328

329
  QAction* viewAllAction = new QAction( tr("View all"), viewMenu_ );
330
331
  viewAllAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"viewall.png") );
  viewAllAction->setCheckable( false );
332
333
334
335
  viewAllAction->setStatusTip( tr("View all.") );
  viewAllAction->setWhatsThis( tr("View all<br><br>"
                                  "Move the objects in the scene so that"
                                  " the whole scene is visible."));
336
337
  connect( viewAllAction,SIGNAL( triggered() ), this, SLOT( slotGlobalViewAll() ) );
  viewMenu_->addAction( viewAllAction);
Jan Möbius's avatar
   
Jan Möbius committed
338

Dirk Wilden's avatar
Dirk Wilden committed
339
  viewMenu_->addSeparator();
Dirk Wilden's avatar
Dirk Wilden committed
340

341
  QAction* snapShotAction = new QAction( tr("Viewer Snapshot"), viewMenu_ );
Dirk Wilden's avatar
Dirk Wilden committed
342
343
  snapShotAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"viewerSnapshot.png") );
  snapShotAction->setCheckable( false );
344
345
346
  snapShotAction->setStatusTip( tr("Take a snapshot from all viewers."));
  snapShotAction->setWhatsThis( tr("Viewer Snapshot<br><br>"
                                   "Take a snapshot of all viewers at once."));
Dirk Wilden's avatar
Dirk Wilden committed
347
348
  connect( snapShotAction,SIGNAL( triggered() ), this, SLOT( viewerSnapshotDialog() ) );
  viewMenu_->addAction( snapShotAction);
Dirk Wilden's avatar
Dirk Wilden committed
349

350
  QAction* appSnapShotAction = new QAction( tr("Application Snapshot"), viewMenu_ );
Dirk Wilden's avatar
Dirk Wilden committed
351
352
  appSnapShotAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"snapshot.png") );
  appSnapShotAction->setCheckable( false );
353
354
355
  appSnapShotAction->setStatusTip( tr("Take a snapshot from OpenFlipper."));
  appSnapShotAction->setWhatsThis( tr("Snapshot<br><br>"
                                      "Take a snapshot from OpenFlipper."));
Dirk Wilden's avatar
Dirk Wilden committed
356
357
358
  connect( appSnapShotAction,SIGNAL( triggered() ), this, SLOT( applicationSnapshotDialog() ) );
  viewMenu_->addAction( appSnapShotAction);

Dirk Wilden's avatar
Dirk Wilden committed
359
360
  viewMenu_->addSeparator();

361
  QAction* wheelSwitchAction = new QAction( tr("Show / hide wheels"), viewMenu_ );
Jan Möbius's avatar
Jan Möbius committed
362
  wheelSwitchAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"core_wheels.png") );
363
  wheelSwitchAction->setCheckable( true );
364
365
366
367
  wheelSwitchAction->setStatusTip( tr("Show / hide navigation wheels in viewer widget."));
  wheelSwitchAction->setWhatsThis( tr("Show / hide navigation wheels in viewer widget.<br><br>"
                                      " These wheels appear in the corners of the viewports. "
                                      " Use wheels to rotate and scale scene."));
Jan Möbius's avatar
Jan Möbius committed
368
369
370
371
                                      
  if(OpenFlipperSettings().value("Core/Gui/glViewer/showControlWheels").toBool() ) 
    wheelSwitchAction->setChecked(true);

372
373
374
  connect( wheelSwitchAction,SIGNAL( toggled(bool) ), this, SLOT( slotSwitchWheels(bool) ) );
  viewMenu_->addAction( wheelSwitchAction);

375
  QAction* coordSys = viewMenu_->addAction(tr("Coordinate Systems"));
Dirk Wilden's avatar
Dirk Wilden committed
376
377
  coordSys->setCheckable(true);
  coordSys->setChecked(true);
378
  coordSys->setStatusTip(tr("Toggle visibility of the coordinate systems"));
379
  coordSys->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"coordsys.png") );
Dirk Wilden's avatar
Dirk Wilden committed
380
381
  connect(coordSys, SIGNAL(triggered(bool)), this, SLOT( slotCoordSysVisibility(bool) ) );

382
  viewMenu_->addSeparator();
Jan Möbius's avatar
   
Jan Möbius committed
383

Jan Möbius's avatar
Jan Möbius committed
384
  QAction* setGlobalBackgroundColor = new QAction(tr("Set Background Color"), this);;
385
386
  setGlobalBackgroundColor->setToolTip(tr("Set Background Color for all viewers"));
  setGlobalBackgroundColor->setStatusTip(tr("Set Background Color for all viewers"));
387
  setGlobalBackgroundColor->setWhatsThis(tr("Set Background Color for all viewers"));
388
389
390
  setGlobalBackgroundColor->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"BackgroundColor.png") );
  connect(setGlobalBackgroundColor, SIGNAL(triggered()), this, SLOT(slotSetGlobalBackgroundColor()));
  viewMenu_->addAction(setGlobalBackgroundColor);
Jan Möbius's avatar
   
Jan Möbius committed
391

392
393
394
  //===========================================================================================================================
  // Tools Menu
  //===========================================================================================================================
Jan Möbius's avatar
   
Jan Möbius committed
395

Jan Möbius's avatar
Jan Möbius committed
396
  toolsMenu_ = new QMenu( TOOLSMENU );
397
  menuBar()->addMenu(toolsMenu_ );
Jan Möbius's avatar
Jan Möbius committed
398
  menus_[tr("Tools")] = toolsMenu_;
Jan Möbius's avatar
   
Jan Möbius committed
399

400
  QAction* sceneGraphAction = new QAction( tr("Show SceneGraph ") ,toolsMenu_ );
401
402
  sceneGraphAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png") );
  sceneGraphAction->setCheckable( false );
403
404
405
406
  sceneGraphAction->setToolTip( tr("Show scene graph viewer.") );
  sceneGraphAction->setWhatsThis( tr("Toggle scene graph viewer<br><br>"
                                     "The scene graph viewer enables you to examine the "
                                     "displayed scene graph and to modify certain nodes.<br><br>" ) );
407
408
409
  QObject::connect( sceneGraphAction, SIGNAL( triggered() ),
                    this,             SLOT( slotShowSceneGraphDialog() ) );
  toolsMenu_->addAction( sceneGraphAction);
Jan Möbius's avatar
   
Jan Möbius committed
410

411
412
  toolsMenu_->addSeparator();

413
  QAction* startVideoCaptureAction =  new QAction( tr("Start Video Capture ") ,toolsMenu_ );
Dirk Wilden's avatar
Dirk Wilden committed
414
415
  startVideoCaptureAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"recordVideo.png") );
  startVideoCaptureAction->setCheckable( false );
416
417
  startVideoCaptureAction->setToolTip( tr("Start video capturing.") );
  startVideoCaptureAction->setWhatsThis( tr("Start to capture a video sequence of the user actions")) ;
Dirk Wilden's avatar
Dirk Wilden committed
418
419
420
  toolsMenu_->addAction( startVideoCaptureAction );
  connect(startVideoCaptureAction, SIGNAL(triggered()), this, SLOT(startVideoCaptureDialog()) );

421
  QAction* stopVideoCaptureAction =  new QAction( tr("Stop Video Capture ") ,toolsMenu_ );
Dirk Wilden's avatar
Dirk Wilden committed
422
423
  stopVideoCaptureAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"stopVideoCapture.png") );
  stopVideoCaptureAction->setCheckable( false );
424
425
  stopVideoCaptureAction->setToolTip( tr("Stop video capturing." ));
  stopVideoCaptureAction->setWhatsThis( tr("Stop Video capturing" ));
Dirk Wilden's avatar
Dirk Wilden committed
426
427
428

  toolsMenu_->addAction( stopVideoCaptureAction);
  connect(stopVideoCaptureAction, SIGNAL(triggered()), this, SIGNAL(stopVideoCapture()) );
Jan Möbius's avatar
Jan Möbius committed
429
430
431
432
433
434
435
436
437
438
  
  toolsMenu_->addSeparator();
  
  //show plugins
  QAction* AC_Plugins = new QAction(tr("Plugins"), this);
  AC_Plugins->setStatusTip(tr("Show loaded plugins"));
  AC_Plugins->setWhatsThis(tr("Show loaded plugins"));
  AC_Plugins->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"network-connect.png"));
  connect(AC_Plugins, SIGNAL(triggered()), this, SIGNAL(showPlugins()));
  toolsMenu_->addAction(AC_Plugins);
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
  
  // ======================================================================
  // Window Menu
  // ======================================================================
  windowMenu_ = new QMenu(tr("Windows"));
  menuBar()->addMenu(windowMenu_);
  menus_[tr("Windows")] = windowMenu_;
  
  
  // Show or Hide the View Mode Controls
  AC_ShowViewModeControls_ = new QAction(tr("Show View Mode Controls"), this);
  AC_ShowViewModeControls_->setStatusTip(tr("Show or Hide View Mode Control Widget"));
  //   AC_HelpBrowser->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-browser.png"));
  AC_ShowViewModeControls_->setWhatsThis(tr("Show or Hide View Mode Control Widget"));
  AC_ShowViewModeControls_->setCheckable(true);
  AC_ShowViewModeControls_->setChecked( ! OpenFlipperSettings().value("Core/Gui/TaskSwitcher/Hide",false).toBool()  );
  connect(AC_ShowViewModeControls_, SIGNAL(toggled( bool )), this, SLOT(showViewModeControls(bool)));
  windowMenu_->addAction(AC_ShowViewModeControls_);
  
  // Show or Hide the View Mode Controls
  AC_ShowToolbox_ = new QAction(tr("Show Toolboxes"), this);
  AC_ShowToolbox_->setStatusTip(tr("Show or Hide the Toolbox Widget"));
  //   AC_HelpBrowser->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-browser.png"));
  AC_ShowToolbox_->setWhatsThis(tr("Show or Hide the Toolbox Widget"));
  AC_ShowToolbox_->setCheckable(true);
  AC_ShowToolbox_->setChecked( ! OpenFlipperSettings().value("Core/Gui/ToolBoxes/hidden",false).toBool()  );
  connect(AC_ShowToolbox_, SIGNAL( toggled( bool )), this, SLOT(showToolbox(bool)));
  windowMenu_->addAction(AC_ShowToolbox_);
  
468

Jan Möbius's avatar
   
Jan Möbius committed
469
470
471
  // ======================================================================
  // help Menu
  // ======================================================================
Jan Möbius's avatar
Jan Möbius committed
472
  helpMenu_ = new QMenu(tr("Help"));
Jan Möbius's avatar
   
Jan Möbius committed
473
  menuBar()->addMenu(helpMenu_);
Jan Möbius's avatar
Jan Möbius committed
474
  menus_[tr("Help")] = helpMenu_;
475

Jan Möbius's avatar
   
Jan Möbius committed
476
  //Open Help Browser
Jan Möbius's avatar
Jan Möbius committed
477
  QAction* AC_HelpBrowser = new QAction(tr("Help"), this);
478
  AC_HelpBrowser->setStatusTip(tr("Open Help Browser with Documentation"));
479
  AC_HelpBrowser->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-browser.png"));
480
  AC_HelpBrowser->setWhatsThis(tr("Open the <b>Help Browser</b>"));
481
  connect(AC_HelpBrowser, SIGNAL(triggered()), this, SLOT(showHelpBrowser()));
Jan Möbius's avatar
   
Jan Möbius committed
482
  helpMenu_->addAction(AC_HelpBrowser);
483

Jan Möbius's avatar
   
Jan Möbius committed
484
485
486
  //Switch to whats this mode
  QAction* AC_Whats_this = QWhatsThis::createAction ( this );
  AC_Whats_this->setStatusTip(tr("Enter What's this Mode"));
487
  AC_Whats_this->setWhatsThis(tr("Get information about a specific Button/Widget/..."));
Jan Möbius's avatar
   
Jan Möbius committed
488
  helpMenu_->addAction(AC_Whats_this);
489

Jan Möbius's avatar
   
Jan Möbius committed
490
  helpMenu_->addSeparator();
491

Jan Möbius's avatar
   
Jan Möbius committed
492
  //About Action
Jan Möbius's avatar
Jan Möbius committed
493
  QAction* AC_About = new QAction(tr("About"), this);
Jan Möbius's avatar
   
Jan Möbius committed
494
  AC_About->setStatusTip(tr("About OpenFlipper"));
495
  AC_About->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-about.png"));
496
  AC_About->setWhatsThis(tr("This entry shows information about <b>OpenFlipper</b>"));
Jan Möbius's avatar
Jan Möbius committed
497
  connect(AC_About, SIGNAL(triggered()), this, SLOT(showAboutWidget()));
Jan Möbius's avatar
   
Jan Möbius committed
498
  helpMenu_->addAction(AC_About);
499

Jan Möbius's avatar
   
Jan Möbius committed
500
501
502
503
504
505
506
507
508
509
510
  // Add Menu entries to the main Toolbar
  mainToolbar_->addAction(AC_Load);
  mainToolbar_->addAction(AC_AddEmpty);
  mainToolbar_->addSeparator();
  mainToolbar_->addAction(AC_Save);
  mainToolbar_->addAction(AC_Save_to);
  mainToolbar_->addSeparator();
  mainToolbar_->addAction(AC_load_ini);
  mainToolbar_->addAction(AC_save_ini);
}

511

512
void CoreWidget::slotViewMenuAboutToShow() {
Jan Möbius's avatar
   
Jan Möbius committed
513

514
  uint enabledCount  = 0;
515

516
517
518
519
520
  for ( int i = 0 ; i< PluginFunctions::viewers(); ++i ) {
    if ( PluginFunctions::viewerProperties(i).animation() )
      enabledCount++;
  }

521
  if ( enabledCount != 0 ) {
522
523
524
    globalAnimationAction_->setToolTip(tr("Disable animation for all viewers"));
    globalAnimationAction_->setStatusTip(tr("Disable animation for all viewers"));
    globalAnimationAction_->setText(tr("Disable animation"));
525
  } else {
526
527
528
    globalAnimationAction_->setToolTip(tr("Enable animation for all viewers"));
    globalAnimationAction_->setStatusTip(tr("Enable animation for all viewers"));
    globalAnimationAction_->setText(tr("Enable animation"));
529
  }
530

531
  //=============================================================================================================================
532

533
  enabledCount  = 0;
534

535
536
537
538
  for ( int i = 0 ; i< PluginFunctions::viewers(); ++i ) {
    if ( PluginFunctions::viewerProperties(i).backFaceCulling() )
      enabledCount++;
  }
539

540
  if ( enabledCount != 0 ) {
541
542
543
    globalBackfaceCullingAction_->setToolTip(tr("Disable backface culling for all viewers"));
    globalBackfaceCullingAction_->setStatusTip(tr("Disable backface culling for all viewers"));
    globalBackfaceCullingAction_->setText(tr("Disable backface culling"));
544
  } else {
545
546
547
    globalBackfaceCullingAction_->setToolTip(tr("Enable backface culling for all viewers"));
    globalBackfaceCullingAction_->setStatusTip(tr("Enable backface culling for all viewers"));
    globalBackfaceCullingAction_->setText(tr("Enable backface culling"));
548
549
550
  }

  //=============================================================================================================================
551

552
  enabledCount  = 0;
553

554
555
556
557
558
  for ( int i = 0 ; i< PluginFunctions::viewers(); ++i ) {
    if ( PluginFunctions::viewerProperties(i).twoSidedLighting() )
      enabledCount++;
  }

559
  if ( enabledCount != 0 ) {
560
561
562
    globalTwosidedLightingAction_->setToolTip(tr("Disable two-sided lighting for all viewers"));
    globalTwosidedLightingAction_->setStatusTip(tr("Disable two-sided lighting for all viewers"));
    globalTwosidedLightingAction_->setText(tr("Disable two-sided lighting"));
563
  } else {
564
565
566
    globalTwosidedLightingAction_->setToolTip(tr("Enable two-sided lighting for all viewers"));
    globalTwosidedLightingAction_->setStatusTip(tr("Enable two-sided lighting for all viewers"));
    globalTwosidedLightingAction_->setText(tr("Enable two-sided lighting"));
567
568
569
  }

  //=============================================================================================================================
570

571
  enabledCount  = 0;
572

573
574
575
576
577
  for ( int i = 0 ; i< PluginFunctions::viewers(); ++i ) {
    if ( PluginFunctions::viewerProperties(i).multisampling() )
      enabledCount++;
  }

578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
  if ( enabledCount != 0 ) {
    globalMultisamplingAction_->setToolTip(tr("Disable multisampling for all viewers"));
    globalMultisamplingAction_->setStatusTip(tr("Disable multisampling for all viewers"));
    globalMultisamplingAction_->setText(tr("Disable multisampling"));
  } else {
    globalMultisamplingAction_->setToolTip(tr("Enable multisampling for all viewers"));
    globalMultisamplingAction_->setStatusTip(tr("Enable multisampling for all viewers"));
    globalMultisamplingAction_->setText(tr("Enable multisampling"));
  }
  
  //=============================================================================================================================

  enabledCount  = 0;

  for ( int i = 0 ; i< PluginFunctions::viewers(); ++i ) {
    if ( PluginFunctions::viewerProperties(i).mipmapping() )
      enabledCount++;
  }

  if ( enabledCount != 0 ) {
    globalMipmappingAction_->setToolTip(tr("Disable mipmapping for all viewers"));
    globalMipmappingAction_->setStatusTip(tr("Disable mipmapping for all viewers"));
    globalMipmappingAction_->setText(tr("Disable mipmapping"));
601
  } else {
602
603
604
    globalMipmappingAction_->setToolTip(tr("Enable mipmapping for all viewers"));
    globalMipmappingAction_->setStatusTip(tr("Enable mipmapping for all viewers"));
    globalMipmappingAction_->setText(tr("Enable mipmapping"));
605
  }
606

607
608
  //=============================================================================================================================
    
609
610
  int perspectiveCount = 0;
  int orthogonalCount = 0;
Jan Möbius's avatar
   
Jan Möbius committed
611

612
613
614
615
616
617
  for ( int i = 0 ; i < PluginFunctions::viewers() ; ++i ) {
    if ( examiner_widgets_[ i ]->projectionMode() == glViewer::PERSPECTIVE_PROJECTION )
      perspectiveCount++;
    else
      orthogonalCount++;
  }
618
619
  
  if ( perspectiveCount == PluginFunctions::viewers() )
620
621
622
    perspectiveProjectionAction_->setVisible(false);
  else
    perspectiveProjectionAction_->setVisible(true);
Jan Möbius's avatar
   
Jan Möbius committed
623

624
  if ( orthogonalCount == PluginFunctions::viewers() )
625
626
627
    orthogonalProjectionAction_->setVisible(false);
  else
    orthogonalProjectionAction_->setVisible(true);
Jan Möbius's avatar
   
Jan Möbius committed
628

629
630
}

Jan Möbius's avatar
Jan Möbius committed
631
632
void CoreWidget::slotUpdateGlobalDrawMenu() {
  if ( drawGroup_ ) {
Jan Möbius's avatar
   
Jan Möbius committed
633

Jan Möbius's avatar
Jan Möbius committed
634
635
636
637
    disconnect( drawGroup_ , SIGNAL( triggered( QAction * ) ),
                this       , SLOT( slotGlobalDrawMenu( QAction * ) ) );
    delete( drawGroup_ );
    drawGroup_ = 0;
Jan Möbius's avatar
   
Jan Möbius committed
638

Jan Möbius's avatar
Jan Möbius committed
639
  }
Jan Möbius's avatar
   
Jan Möbius committed
640

Jan Möbius's avatar
Jan Möbius committed
641
642
643
  // Recreate drawGroup
  drawGroup_ = new QActionGroup( this );
  drawGroup_->setExclusive( false );
Jan Möbius's avatar
   
Jan Möbius committed
644

Jan Möbius's avatar
Jan Möbius committed
645
  connect( drawGroup_ , SIGNAL( triggered( QAction * ) ),
Jan Möbius's avatar
   
Jan Möbius committed
646
647
           this       , SLOT( slotGlobalDrawMenu( QAction * ) ) );

Jan Möbius's avatar
Jan Möbius committed
648
  if ( !globalDrawMenu_ ) {
Jan Möbius's avatar
   
Jan Möbius committed
649

Jan Möbius's avatar
Jan Möbius committed
650
651
    QIcon icon;
    icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
652
    globalDrawMenu_  = new QMenu(tr("Set Global DrawMode"));
Jan Möbius's avatar
Jan Möbius committed
653
654
    globalDrawMenu_->setTearOffEnabled(true);
    globalDrawMenu_->setIcon(icon);
Jan Möbius's avatar
   
Jan Möbius committed
655

Jan Möbius's avatar
Jan Möbius committed
656
657
    connect(globalDrawMenu_,SIGNAL(aboutToShow () ) , this, SLOT(slotUpdateGlobalDrawMenu() ) );
  }
Jan Möbius's avatar
   
Jan Möbius committed
658
659

  // Collect available draw Modes
660
  // Single pass action, draw modes independent from multipass rendering
Jan Möbius's avatar
Jan Möbius committed
661
662
  ACG::SceneGraph::CollectDrawModesAction actionAvailable;
  ACG::SceneGraph::traverse( PluginFunctions::getRootNode() , actionAvailable);
Jan Möbius's avatar
Jan Möbius committed
663
  availableGlobalDrawModes_ = actionAvailable.drawModes();
Jan Möbius's avatar
   
Jan Möbius committed
664

Jan Möbius's avatar
Jan Möbius committed
665
666
  // Get currently active drawModes (first viewer only )
  // TODO: create combination from all viewers!
Jan Möbius's avatar
Jan Möbius committed
667
668
  activeDrawModes_ = PluginFunctions::drawMode(0);
  for ( int i = 1 ; i < PluginFunctions::viewers(); ++i )
Jan Möbius's avatar
Jan Möbius committed
669
    activeDrawModes_ &= PluginFunctions::drawMode(i);
Jan Möbius's avatar
   
Jan Möbius committed
670

Jan Möbius's avatar
Jan Möbius committed
671
  // Convert to ids
Jan Möbius's avatar
Jan Möbius committed
672
673
  std::vector< ACG::SceneGraph::DrawModes::DrawMode > availDrawModeIds;
  availDrawModeIds = availableGlobalDrawModes_.getAtomicDrawModes() ;
Jan Möbius's avatar
   
Jan Möbius committed
674

Jan Möbius's avatar
Jan Möbius committed
675
  globalDrawMenu_->clear();
Jan Möbius's avatar
   
Jan Möbius committed
676

Jan Möbius's avatar
Jan Möbius committed
677
678
  for ( unsigned int i = 0; i < availDrawModeIds.size(); ++i )
  {
Jan Möbius's avatar
Jan Möbius committed
679
680
    ACG::SceneGraph::DrawModes::DrawMode id    = availDrawModeIds[i];
    std::string  descr =  id.description();
Jan Möbius's avatar
Jan Möbius committed
681
682
683

    QAction * action = new QAction( descr.c_str(), drawGroup_ );
    action->setCheckable( true );
Jan Möbius's avatar
Jan Möbius committed
684
    action->setChecked( activeDrawModes_.containsAtomicDrawMode(id) );
Jan Möbius's avatar
Jan Möbius committed
685
686
687
688
689
690
691
  }

  globalDrawMenu_->addActions( drawGroup_->actions() );

}

void CoreWidget::slotGlobalDrawMenu(QAction * _action) {
Jan Möbius's avatar
   
Jan Möbius committed
692

Jan Möbius's avatar
Jan Möbius committed
693
694
695
  //======================================================================================
  // Get the mode toggled
  //======================================================================================
Jan Möbius's avatar
Jan Möbius committed
696
697
698
  ACG::SceneGraph::DrawModes::DrawMode mode(ACG::SceneGraph::DrawModes::NONE);
  std::vector< ACG::SceneGraph::DrawModes::DrawMode > availDrawModeIds;
  availDrawModeIds = availableGlobalDrawModes_.getAtomicDrawModes();
Jan Möbius's avatar
Jan Möbius committed
699
700
  for ( unsigned int i = 0; i < availDrawModeIds.size(); ++i )
  {
Jan Möbius's avatar
Jan Möbius committed
701
    QString descr = QString( ( availDrawModeIds[i].description() ).c_str() );
Jan Möbius's avatar
Jan Möbius committed
702
703
704
705
706
707

    if ( descr == _action->text() ) {
      mode = availDrawModeIds[i];
      break;
    }
  }
Jan Möbius's avatar
   
Jan Möbius committed
708

Jan Möbius's avatar
Jan Möbius committed
709
710
711
712
  if ( qApp->keyboardModifiers() & Qt::ShiftModifier )
    activeDrawModes_ = ( activeDrawModes_ ^ mode);
  else
    activeDrawModes_ = mode ;
Jan Möbius's avatar
   
Jan Möbius committed
713

Jan Möbius's avatar
Jan Möbius committed
714
715
716
717
  PluginFunctions::setDrawMode( activeDrawModes_ );
  slotUpdateGlobalDrawMenu();
}

718

Jan Möbius's avatar
   
Jan Möbius committed
719
//=============================================================================