GlobalOptions.hh 23.7 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1
/*===========================================================================*\
Jan Möbius's avatar
Jan Möbius committed
2
3
*                                                                            *
*                              OpenFlipper                                   *
Jan Möbius's avatar
Jan Möbius committed
4
*      Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen       *
Jan Möbius's avatar
Jan Möbius committed
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
*                           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/>.                                       *
*                                                                            *
Jan Möbius's avatar
Jan Möbius committed
33
34
35
\*===========================================================================*/

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




//=============================================================================
//
//  Options used throughout the System
//
//=============================================================================

/**
\file GlobalOptions.hh
 * This Header provides access to globally defined variables such as
 * Aplication Directories. You may use these Functions inside your plugins.
*/

#ifndef OPTIONS_HH
#define OPTIONS_HH

#include <OpenFlipper/common/GlobalDefines.hh>
Jan Möbius's avatar
Jan Möbius committed
62
#include <ACG/Scenegraph/DrawModes.hh>
Jan Möbius's avatar
Jan Möbius committed
63
64
65
66
#include <QDir>
#include <QStringList>
#include <QColor>
#include <QIcon>
67
#include "OpenFlipperQSettings.hh"
Jan Möbius's avatar
Jan Möbius committed
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

//===========================================================================
/** @name Persistent settings
* @{ */
//===========================================================================

/** \brief QSettings object containing all program settings of OpenFlipper.
*
* To get the settings use:\n
* OpenFlipperSettings().value("<Key>").toDouble();\n
* OpenFlipperSettings().value("<Key>").toBool();
*
* To change settings do:\n
* OpenFlipperSettings().setValue("<Key>","<Value>");\n
* For detailed info about the values see the documentation of QSettings and the QVariant.\n
*
Jan Möbius's avatar
Jan Möbius committed
84
* \note For each of your plugins, the key has to start with your plugin name!!!
Jan Möbius's avatar
Jan Möbius committed
85
86
87
*
* The following entries are available through the settings:
*
88
89
90
91
92
93
94
* <b>User Interface Settings</b>\n
* * Core/Gui/glViewer/defaultBackgroundColor This controls the default background color of the glViewer (QColor)\n
* * Core/Gui/glViewer/showControlWheels      This setting controls if the control wheels should be visible in the glViewer (bool)\n
* * Core/Gui/glViewer/glMouse                This setting controls if the mouse is rendered in OpenGL or in the window manager(bool)\n
* * Core/Gui/glViewer/stereoMousePick        This setting controls if the mouse depth is picked in stereo mode(bool)\n
* * Core/Gui/glViewer/restrictFrameRate      This setting controls if the maximum frame rate should be restricted (bool)\n
* * Core/Gui/glViewer/maxFrameRate           If restrictFrameRate is set to yes, this setting controls the maximum frameRate used (unsigned int)\n
Jan Möbius's avatar
Jan Möbius committed
95
* * Core/Gui/glViewer/useMultipleViewers     Use only one viewer or automatically generate multiple viewers (bool)\n
96
* * Core/Gui/glViewer/minimalSceneSize       The minimal scene radius. If the scene is smaller, than the size will be set to this value (double)\n
Jan Möbius's avatar
Jan Möbius committed
97
* * Core/Gui/ToolBoxes/hidden                Hide the toolbox sidebar (bool)\n
Jan Möbius's avatar
Jan Möbius committed
98
* * Core/Gui/ToolBoxes/ToolBoxOnTheRight     Toolbox on the right or on the left (bool)\n
99
* * Core/Gui/ToolBars/PickToolbarInScene     Render picking toolbar into gl scene or as toolbox into main widget
100
* * Core/Gui/TaskSwitcher/Hide               Show or Hide the task switcher(bool)\n
101
* * Core/Gui/LogWindow/LogWindowMode         Log Window Mode .. 0 InScene, 1 Window, 2 Hidden (int)\n
102
* * Core/Gui/LogWindow/OpenMeshErrors        Log OpenMesh Errors? (bool)\n
103
* * Core/Gui/splash                          This setting controls if the splash screen is shown at startup(bool)\n
Jan Möbius's avatar
Jan Möbius committed
104
* * Core/Gui/fullscreen                      Show OpenFlipper in Fullscreen Mode(bool)\n
Jan Möbius's avatar
Jan Möbius committed
105
* * Core/Projection/FOVY                     Field of view for projection matrix in perspective mode(double)\n
Jan Möbius's avatar
Jan Möbius committed
106
*
107
108
* <b>User Interface Settings for each of the viewers</b>\n
* * Viewer<viewer>/perspectiveProjection     Orthogonal = false,Perspective = true (bool)\n
109
* * Viewer<viewer>/defaultViewingDirection   0:VIEW_FREE; 1:VIEW_TOP; 2:VIEW_BOTTOM; 3:VIEW_LEFT; 4:VIEW_RIGHT; 5:VIEW_FRONT; 6:VIEW_BACK (int)\n
110
111
112
113
114
* * Viewer<viewer>/defaultLockRotation       true: locked , false: unlocked (bool)\n
* * Viewer<viewer>/Animation                 true: enabled, false: disabled (bool)\n
* * Viewer<viewer>/BackfaceCulling           true: enabled, false: disabled (bool)\n
* * Viewer<viewer>/TwoSidedLighting          true: enabled, false: disabled (bool)\n
* * Viewer<viewer>/BackgroundColor           Color of the viewer background (QColor)\n
Jan Möbius's avatar
Jan Möbius committed
115
* * Viewer<viewer>/DefaultRenderer           Name of the default Renderer   (QString)\n
116
*
117
118
119
120
121
122
* <b>File Handling</b>\n
* * Core/CurrentDir                          The current Directory of the Application \n
* * Core/File/RecentFiles                    List of Recent Files \n
* * Core/File/RecentTypes                    DataTypes of Recent Files \n
* * Core/File/MaxRecent                      Maximum entries in recent File list \n
* * Core/File/UseLoadDefaults                Use the defaults saved in the file plugins \n
Jan Möbius's avatar
Jan Möbius committed
123
*
124
* <b>Log Settings</b>\n
125
126
127
* * Core/Log/Logfile                         This is the location of the log file \n
* * Core/Log/logFileEnabled                  This controls, if logging to file is enabled(bool)\n
*
128
129
130
* <b>Language Settings</b>\n
* * Core/Language/Translation                This is the translation to use ( default is en_US)  \n
*
131
132
133
134
* <b>Update Settings</b>\n
* * Core/Update/UserName                     Update UserName
* * Core/Update/Pass                         Update Password
* * Core/Update/URL                          Update URL
Jan Möbius's avatar
Jan Möbius committed
135
* 
Jan Möbius's avatar
Jan Möbius committed
136
* <b>Mouse Controls</b>\n
Jan Möbius's avatar
Jan Möbius committed
137
138
139
* * Core/Mouse/Wheel/ZoomFactor       Zoom factor used when turning the mouse wheel (double)\n
* * Core/Mouse/Wheel/ZoomFactorShift  Zoom factor used when turning the mouse wheel while shift is pressed (makes zoom slower while shift is pressed)  (double)\n
*
Jan Möbius's avatar
Jan Möbius committed
140
* <b>General Stereo Settings</b>\n
Jan Möbius's avatar
Jan Möbius committed
141
142
143
* * Core/Stereo/EyeDistance    Distance between eyes. Defaults to 7 cm (double)\n
* * Core/Stereo/FocalDistance  Focal distance. Defaults to center of scene (double)\n
* \n
Jan Möbius's avatar
Jan Möbius committed
144
* <b>Philips stereo display settings</b>\n
Jan Möbius's avatar
Jan Möbius committed
145
146
147
148
149
* * Core/Stereo/Philips/Content  Philips stereo header content type (int)\n
* * Core/Stereo/Philips/Factor   Philips stereo header factor (int)\n
* * Core/Stereo/Philips/Offset   Philips stereo header offset cc (int)\n
* * Core/Stereo/Philips/Select   Philips stereo header select (int)\n
* \n
Jan Möbius's avatar
Jan Möbius committed
150
* <b>Rendering debugger Settings</b>\n
151
152
* * Core/Debug/Picking/RenderPicking      Enable picking rendering (bool)\n
* * Core/Debug/Picking/RenderPickingMode  The Mode used for picking rendering(QString) \n
153
* * Core/Debug/Picking/RenderDepthImage   Renders the depth buffer as a grayscale image (bool) \n
154
* \n
Jan Möbius's avatar
Jan Möbius committed
155
156
* Anaglyph stereo mode settings:\n
*/
157
158


Jan Möbius's avatar
Jan Möbius committed
159
DLLEXPORT
160
OpenFlipperQSettings& OpenFlipperSettings();
Jan Möbius's avatar
Jan Möbius committed
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282

/** @} */

namespace OpenFlipper {
namespace Options {

/// Returns the base Path of the application
DLLEXPORT
QDir applicationDir();

/// Returns the Path to the Standard Plugins
DLLEXPORT
QDir pluginDir();

/// Returns the Path to the Textures
DLLEXPORT
QDir textureDir();

/// Returns the Path to the License files
DLLEXPORT
QDir licenseDir();

/// Returns the Path to the Scripts
DLLEXPORT
QDir scriptDir();

/// Returns the Path to the shaders
DLLEXPORT
QDir shaderDir();

/// Returns the Path to the Icons
DLLEXPORT
QDir iconDir();

/// Returns the Path to the translation files
DLLEXPORT
QDir translationsDir();

/// Returns the Path to Fonts
DLLEXPORT
QDir fontsDir();

/// Returns the Path to the main data directory
DLLEXPORT
QDir dataDir();

/// Returns the base Path of the application
DLLEXPORT
QString applicationDirStr();

/// Returns the Path to the Standard Plugins
DLLEXPORT
QString pluginDirStr();

/// Returns the Path to the Shader directory
DLLEXPORT
QString shaderDirStr();

/// Returns the Path to the Textures
DLLEXPORT
QString textureDirStr();

/// Returns the Path to the License files
DLLEXPORT
QString licenseDirStr();

/// Returns the Path to the Scripts
DLLEXPORT
QString scriptDirStr();

/// Returns the Path to the Icons
DLLEXPORT
QString iconDirStr();

/// Returns the Path to the main data directory
DLLEXPORT
QString dataDirStr();

/// Returns the OpenFlipper Icon
DLLEXPORT
QIcon& OpenFlipperIcon();

/// Returns the Path to the translation files
DLLEXPORT
QString translationsDirStr();

/// Returns the Path to Fonts
DLLEXPORT
QString fontsDirStr();

/// Returns the Path to Help
DLLEXPORT
QString helpDirStr();

//===========================================================================
/** @name Option files / paths
* @{ */
//===========================================================================

  /// Set the list of option files
  DLLEXPORT
  void optionFiles(QStringList _list);

  /// returns a list of all available option files
  DLLEXPORT
  QStringList optionFiles();

  /// Sets the Path to the configuration directory
  DLLEXPORT
  void configDir(QDir _dir);

  /// Sets the Path to the configuration directory
  DLLEXPORT
  bool configDir(QString _dir);

  /// Returns the base Path of the config Dir
  DLLEXPORT
  QString configDirStr();

  /// Returns the base Path of the config Dir
  DLLEXPORT
  QDir configDir();
283
284
285
286
287
288
289
290
  
  /// Returns true if ini-file should be deleted on exit
  DLLEXPORT
  bool deleteIniFile();
  
  /// Set option to delete ini-files on exit
  DLLEXPORT
  void deleteIniFile(bool _delete);
Jan Möbius's avatar
Jan Möbius committed
291
292
293
294
295
296
297
298

/** @} */

//===========================================================================
/** @name current status
* @{ */
//===========================================================================

299
300
301
302
303
304
305
306
  ///  Returns if the system is currently in a startup phase
  DLLEXPORT
  bool startup();
  
  /// Set status to startup complete
  DLLEXPORT
  void finishedStartup();

Jan Möbius's avatar
Jan Möbius committed
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
  /// return the current script-directory
  DLLEXPORT
  QString currentScriptDirStr();

  /// return the current Script-directory
  DLLEXPORT
  QDir currentScriptDir();

  /// Sets the Path to the current Script-directory
  DLLEXPORT
  void currentScriptDir(QDir _dir);

  /// Sets the Path to the current Script-directory
  DLLEXPORT
  bool currentScriptDir(QString _dir);



  /// return the current texture-directory
  DLLEXPORT
  QString currentTextureDirStr();

  /// return the current texture-directory
  DLLEXPORT
  QDir currentTextureDir();

  /// Sets the Path to the current texture-directory
  DLLEXPORT
  void currentTextureDir(QDir _dir);

  /// Sets the Path to the current texture-directory
  DLLEXPORT
  bool currentTextureDir(QString _dir);



  /// return last used dataType
  DLLEXPORT
  QString lastDataType();

  /// set the last used dataType
  DLLEXPORT
  void lastDataType(QString _type);

/** @} */

//===========================================================================
/** @name Architecture detection and Architecture specific stuff
* @{ */
//===========================================================================

  DLLEXPORT
  bool is64bit();

  DLLEXPORT
  bool is32bit();

  DLLEXPORT
  bool isLinux();

  DLLEXPORT
  bool isWindows();

  DLLEXPORT
  bool isDarwin();

  /// Returns the right separator String for this architecture ( Linux: "/" Windows: "\" )
  DLLEXPORT
  QString dirSeparator();

/** @} */

//===========================================================================
/** @name Environment
* @{ */
//===========================================================================

  /// Returns the LANG environment variable string
  DLLEXPORT
  QString lang();

/** @} */

//===========================================================================
/** @name Visualization Control
* @{ */
//===========================================================================

  /// Store if a gui should be visible or not
  DLLEXPORT
  void nogui( bool _nogui );

  /// get if a gui should be visible or not
  DLLEXPORT
  bool nogui( );

  /// get if a gui should be visible or not
  DLLEXPORT
  bool gui( );

  /// Store stereo support setting
  DLLEXPORT
  void stereo( bool _stereo );

  /// get current stereo support setting
  DLLEXPORT
  bool stereo( );

  /// Stereo mode
  enum StereoMode {
    OpenGL,
    AnaglyphRedCyan,
419
    AnaglyphCustom
Jan Möbius's avatar
Jan Möbius committed
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
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
  };

  /// Store opengl stereo support setting
  DLLEXPORT
  void glStereo( bool _stereo );

  /// will be set in core is opengl stereo is supported
  DLLEXPORT
  bool glStereo( );

  /// Store stereo mode setting
  DLLEXPORT
  void stereoMode( StereoMode _mode );

  /// get current stereo mode setting
  DLLEXPORT
  StereoMode stereoMode( );

  /// Store the 3x3 left eye color matrix values for custom anaglyph stereo mode
  DLLEXPORT
  void anaglyphLeftEyeColorMatrix( std::vector<float> _mat );

  /// get the 3x3 left eye color matrix values for custom anaglyph stereo mode
  DLLEXPORT
  std::vector<float> anaglyphLeftEyeColorMatrix( );

  /// Store the 3x3 right eye color matrix values for custom anaglyph stereo mode
  DLLEXPORT
  void anaglyphRightEyeColorMatrix( std::vector<float> _mat );

  /// get the 3x3 right eye color matrix values for custom anaglyph stereo mode
  DLLEXPORT
  std::vector<float> anaglyphRightEyeColorMatrix( );

  /// Store synchronization setting
  DLLEXPORT
  void synchronization( bool _synchronization );

  /// get current synchronization setting
  DLLEXPORT
  bool synchronization( );

  /// Store defaultDrawMode setting
  DLLEXPORT
Jan Möbius's avatar
Jan Möbius committed
464
  void defaultDrawMode( ACG::SceneGraph::DrawModes::DrawMode _mode, int _viewer );
Jan Möbius's avatar
Jan Möbius committed
465
466
467

  /// get defaultDrawMode setting
  DLLEXPORT
Jan Möbius's avatar
Jan Möbius committed
468
  ACG::SceneGraph::DrawModes::DrawMode defaultDrawMode( int _viewer );
Jan Möbius's avatar
Jan Möbius committed
469

470
471
472
473
474
  /** \brief Store defaultProjectionMode setting

    Perspective projection = true;
    Orthogonal Projection  = false;
  */
Jan Möbius's avatar
Jan Möbius committed
475
  DLLEXPORT
476
  void defaultPerspectiveProjectionMode( bool _mode, int _viewer );
Jan Möbius's avatar
Jan Möbius committed
477
478
479

  /// get defaultProjectionMode setting
  DLLEXPORT
480
  bool defaultPerspectiveProjectionMode( int _viewer );
Jan Möbius's avatar
Jan Möbius committed
481
482
483
484
485
486
487
488
489

  /// Store defaultViewingDirection setting
  DLLEXPORT
  void defaultViewingDirection( int _mode, int _viewer );

  /// get defaultViewingDirection setting
  DLLEXPORT
  int defaultViewingDirection( int _viewer );

490
491
492
493
494
495
496
497
  /// Store lockrotation setting
  DLLEXPORT
  void defaultLockRotation( bool _mode, int _viewer );

  /// get lockrotation setting
  DLLEXPORT
  bool defaultLockRotation( int _viewer );

Jan Möbius's avatar
Jan Möbius committed
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
  /// Store defaultViewerLayout setting
  DLLEXPORT
  void defaultViewerLayout( int _layout );

  /// get defaultViewerLayout setting
  DLLEXPORT
  int defaultViewerLayout();

  /// Store disableRedraw setting
  DLLEXPORT
  void redrawDisabled( bool disable );

  /// get disableRedraw setting
  DLLEXPORT
  bool redrawDisabled( );

  /// Get the flag if a drawMode Menu should always be visible in the context menu
  DLLEXPORT
  bool drawModesInContextMenu();

  /// Set the flag if a drawMode Menu should always be visible in the context menu
  DLLEXPORT
  void drawModesInContextMenu(bool _show);

/** @} */

//===========================================================================
/** @name GUI Control
* @{ */
//===========================================================================

  /// Number of examiner widgets
  DLLEXPORT
  unsigned int examinerWidgets();

  /// State of the logging widget
  enum LoggerState {
    InScene,
    Normal,
    Hidden
  };

  /// Set the logging widget state
  DLLEXPORT
  void loggerState( LoggerState _state);

  /// What is the current state of the logging widget?
  DLLEXPORT
  LoggerState loggerState( );

Jan Möbius's avatar
Marlin:    
Jan Möbius committed
548
  /// Which view mode is currently selected?
Jan Möbius's avatar
Jan Möbius committed
549
  DLLEXPORT
Jan Möbius's avatar
Marlin:    
Jan Möbius committed
550
  QString currentViewMode( );
Jan Möbius's avatar
Jan Möbius committed
551

Jan Möbius's avatar
Marlin:    
Jan Möbius committed
552
  /// Which view mode is currently selected?
Jan Möbius's avatar
Jan Möbius committed
553
  DLLEXPORT
Jan Möbius's avatar
Marlin:    
Jan Möbius committed
554
  void currentViewMode( QString _mode );
Jan Möbius's avatar
Jan Möbius committed
555
556
557
558
559
560
561
562
563

  /// Titel of the main window
  DLLEXPORT
  QString windowTitle( );

  /// Set title of the main window
  DLLEXPORT
  void windowTitle( QString _titel );

564
  /// Default color for objects
Jan Möbius's avatar
Jan Möbius committed
565
  DLLEXPORT
566
  void defaultColor( QColor _color );
Jan Möbius's avatar
Jan Möbius committed
567

568
  /// Default color for objects
Jan Möbius's avatar
Jan Möbius committed
569
  DLLEXPORT
570
  QColor defaultColor();
Jan Möbius's avatar
Jan Möbius committed
571

572
  /// use randomized color as default for objects
Jan Möbius's avatar
Jan Möbius committed
573
  DLLEXPORT
574
  void randomDefaultColor(bool _random);
Jan Möbius's avatar
Jan Möbius committed
575

576
  /// use randomized color as default for objects
Jan Möbius's avatar
Jan Möbius committed
577
  DLLEXPORT
578
  bool randomDefaultColor();
Jan Möbius's avatar
Jan Möbius committed
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641

/** @} */

//===========================================================================
/** @name Scripting Options
 * @{ */
//===========================================================================

  /** Scripting status. If this flag is set to true,
   * you should not call functions for multiple objects. Or do
   * remote procedure calls to functions which add scripting commands.
   * As this might call functions twice when executed via scripts. See the
   * scripting plugin for additional information
   */
  DLLEXPORT
  bool scripting( );

  /** Toggle scripting status (normally done by the Scripting plugin only)
   */
  DLLEXPORT
  void scripting(bool _status );

  /** @} */

//===========================================================================
/** @name Logging Options
 * @{ */
//===========================================================================

  /// Log to console output?
  DLLEXPORT
  bool logToConsole( );

  /// Log to console output?
  DLLEXPORT
  void logToConsole(bool _logToConsole );

  /// Give extra debug information
  DLLEXPORT
  bool debug();

  /// Give extra debug information
  DLLEXPORT
  void debug(bool _debug );

/** @} */

//===========================================================================
/** @name Backup operations
* @{ */
//===========================================================================

  /// Do backups?
  DLLEXPORT
  bool backupEnabled( );

  /// Do backups?
  DLLEXPORT
  void enableBackup(bool _enableBackup );


/** @} */

642
643
644
645
646
647
648
  //===========================================================================
  /** @name Update blocking
   *
   * Used to speedup system when creating/removing a lot of objects.
   * This disables the analysis of the scenegraph used for rendering.
  * @{ */
  //===========================================================================
Jan Möbius's avatar
Jan Möbius committed
649

650
  /// Block updates
Jan Möbius's avatar
Jan Möbius committed
651
  DLLEXPORT
652
  void blockSceneGraphUpdates( );
Jan Möbius's avatar
Jan Möbius committed
653

654
  /// unblockUpdates
Jan Möbius's avatar
Jan Möbius committed
655
  DLLEXPORT
656
657
658
659
660
661
662
663
664
665
666
667
  void unblockSceneGraphUpdates();

  /// Updates currently blocked?
  DLLEXPORT
  bool sceneGraphUpdatesBlocked( );

  /** @} */

//===========================================================================
/** @name Settings
* @{ */
//===========================================================================
Jan Möbius's avatar
Jan Möbius committed
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715

  /// currently saving Settings ?
  DLLEXPORT
  bool savingSettings( );

  /// currently saving Settings ?
  DLLEXPORT
  void savingSettings(bool _savingSettings );

  /// currently loading recent file ?
  DLLEXPORT
  bool loadingRecentFile( );

  /// currently loading recent file ?
  DLLEXPORT
  void loadingRecentFile(bool _loadingRecentFile );

/** @} */

//===========================================================================
/** @name Core parameters
* @{ */
//===========================================================================

/// Get the argc parameter from the main application
DLLEXPORT
int* argc();

/// Get the argv parameter from the main application
DLLEXPORT
char *** argv();

/// Set the argc parameter from the main application ( Dont use it, only called from Core!!)
DLLEXPORT
void  argc( int* _argc );

/// Set the argv parameter from the main application ( Dont use it, only called from Core!!)
DLLEXPORT
void argv( char*** _argv);

/// is the core remoteControlled?
DLLEXPORT
bool remoteControl();

/// is the core remoteControlled?
DLLEXPORT
void remoteControl( bool _remote );

Jan Möbius's avatar
Jan Möbius committed
716
717
718
719
720
721
722
723
/// Get the remote control port
DLLEXPORT
int remoteControlPort();

/// Set the remote control port
DLLEXPORT
void remoteControlPort(int _remotePort);

Jan Möbius's avatar
Jan Möbius committed
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
//===========================================================================
/** @name Debugging Options
 * @{ */
//===========================================================================

/** If you enable slot debugging, for some slots will be displayed who called them.
 * Currently supported slots are:\n
 * - updateView()
 * - updated_objects( objectId )
 */
DLLEXPORT
void doSlotDebugging( bool _debugging );

DLLEXPORT
bool doSlotDebugging( );

/** @} */

//===========================================================================
/** @name Version information
 * @{ */
//===========================================================================

/// Version of OpenFlipper Core
DLLEXPORT
QString coreVersion();

751
752
753
754
/// Information about the used compiler
DLLEXPORT
QString compilerInfo();

Jan Möbius's avatar
Jan Möbius committed
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
/** @} */


/// Internal function called by the core to connect to the program options
DLLEXPORT 
bool initializeSettings();

/// Internal function called by the core to write the program options on exit
DLLEXPORT 
void closeSettings();

}
}

//=============================================================================
#endif // OPTIONS_HH defined
//=============================================================================