GlobalOptions.hh File Reference

#include <OpenFlipper/common/GlobalDefines.hh>
#include <ACG/Scenegraph/DrawModes.hh>
#include <QDir>
#include <QStringList>
#include <QColor>
#include <QIcon>
#include <QSettings>
Include dependency graph for GlobalOptions.hh:

Go to the source code of this file.

Functions

QDir OpenFlipper::Options::applicationDir ()
 Returns the base Path of the application.
QDir OpenFlipper::Options::pluginDir ()
 Returns the Path to the Standard Plugins.
QDir OpenFlipper::Options::textureDir ()
 Returns the Path to the Textures.
QDir OpenFlipper::Options::licenseDir ()
 Returns the Path to the License files.
QDir OpenFlipper::Options::scriptDir ()
 Returns the Path to the Scripts.
QDir OpenFlipper::Options::shaderDir ()
 Returns the Path to the shaders.
QDir OpenFlipper::Options::iconDir ()
 Returns the Path to the Icons.
QDir OpenFlipper::Options::translationsDir ()
 Returns the Path to the translation files.
QDir OpenFlipper::Options::fontsDir ()
 Returns the Path to Fonts.
QDir OpenFlipper::Options::dataDir ()
 Returns the Path to the main data directory.
QString OpenFlipper::Options::applicationDirStr ()
 Returns the base Path of the application.
QString OpenFlipper::Options::pluginDirStr ()
 Returns the Path to the Standard Plugins.
QString OpenFlipper::Options::shaderDirStr ()
 Returns the Path to the Shader directory.
QString OpenFlipper::Options::textureDirStr ()
 Returns the Path to the Textures.
QString OpenFlipper::Options::licenseDirStr ()
 Returns the Path to the License files.
QString OpenFlipper::Options::scriptDirStr ()
 Returns the Path to the Scripts.
QString OpenFlipper::Options::iconDirStr ()
 Returns the Path to the Icons.
QString OpenFlipper::Options::dataDirStr ()
 Returns the Path to the main data directory.
QIcon & OpenFlipper::Options::OpenFlipperIcon ()
 Returns the OpenFlipper Icon.
QString OpenFlipper::Options::translationsDirStr ()
 Returns the Path to the translation files.
QString OpenFlipper::Options::fontsDirStr ()
 Returns the Path to Fonts.
QString OpenFlipper::Options::helpDirStr ()
 Returns the Path to Help.
bool OpenFlipper::Options::initializeSettings ()
 Internal function called by the core to connect to the program options.
void OpenFlipper::Options::closeSettings ()
 Internal function called by the core to write the program options on exit.
Persistent settings

DLLEXPORT QSettings & OpenFlipperSettings ()
 QSettings object containing all program settings of OpenFlipper.
Option files / paths

void OpenFlipper::Options::optionFiles (QStringList _list)
 Set the list of option files.
QStringList OpenFlipper::Options::optionFiles ()
 returns a list of all available option files
DLLEXPORT void OpenFlipper::Options::configDir (QDir _dir)
 Sets the Path to the configuration directory.
DLLEXPORT bool OpenFlipper::Options::configDir (QString _dir)
 Sets the Path to the configuration directory.
QString OpenFlipper::Options::configDirStr ()
 Returns the base Path of the config Dir.
QDir OpenFlipper::Options::configDir ()
 Returns the base Path of the config Dir.
current status

QString OpenFlipper::Options::currentScriptDirStr ()
 return the current script-directory
QDir OpenFlipper::Options::currentScriptDir ()
 return the current Script-directory
DLLEXPORT void OpenFlipper::Options::currentScriptDir (QDir _dir)
 Sets the Path to the current Script-directory.
bool OpenFlipper::Options::currentScriptDir (QString _dir)
 Sets the Path to the current Script-directory.
QString OpenFlipper::Options::currentTextureDirStr ()
 return the current texture-directory
QDir OpenFlipper::Options::currentTextureDir ()
 return the current texture-directory
DLLEXPORT void OpenFlipper::Options::currentTextureDir (QDir _dir)
 Sets the Path to the current texture-directory.
bool OpenFlipper::Options::currentTextureDir (QString _dir)
 Sets the Path to the current texture-directory.
QString OpenFlipper::Options::lastDataType ()
 return last used dataType
void OpenFlipper::Options::lastDataType (QString _type)
 set the last used dataType
Architecture detection and Architecture specific stuff

bool OpenFlipper::Options::is64bit ()
bool OpenFlipper::Options::is32bit ()
bool OpenFlipper::Options::isLinux ()
bool OpenFlipper::Options::isWindows ()
bool OpenFlipper::Options::isDarwin ()
QString OpenFlipper::Options::dirSeparator ()
 Returns the right separator String for this architecture ( Linux: "/" Windows: "\" ).
Environment

QString OpenFlipper::Options::lang ()
 Returns the LANG environment variable string.
QString OpenFlipper::Options::translation ()
 Returns the translation language (locale, de_DE, en_US).
void OpenFlipper::Options::translation (QString _translation)
 Set the translation language (locale, de_DE, en_US).
Scripting Options

bool OpenFlipper::Options::scripting ()
void OpenFlipper::Options::scripting (bool _status)
Logging Options

bool OpenFlipper::Options::logToConsole ()
 Log to console output?
void OpenFlipper::Options::logToConsole (bool _logToConsole)
 Log to console output?
bool OpenFlipper::Options::debug ()
 Give extra debug information.
void OpenFlipper::Options::debug (bool _debug)
 Give extra debug information.
Backup operations

bool OpenFlipper::Options::backupEnabled ()
 Do backups?
void OpenFlipper::Options::enableBackup (bool _enableBackup)
 Do backups?
Settings

bool OpenFlipper::Options::loadingSettings ()
 currently loading Settings ?
void OpenFlipper::Options::loadingSettings (bool _loadingSettings)
 currently loading Settings ?
bool OpenFlipper::Options::savingSettings ()
 currently saving Settings ?
void OpenFlipper::Options::savingSettings (bool _savingSettings)
 currently saving Settings ?
bool OpenFlipper::Options::loadingRecentFile ()
 currently loading recent file ?
void OpenFlipper::Options::loadingRecentFile (bool _loadingRecentFile)
 currently loading recent file ?
Core parameters

int * OpenFlipper::Options::argc ()
 Get the argc parameter from the main application.
char *** OpenFlipper::Options::argv ()
 Get the argv parameter from the main application.
void OpenFlipper::Options::argc (int *_argc)
 Set the argc parameter from the main application ( Dont use it, only called from Core!!).
void OpenFlipper::Options::argv (char ***_argv)
 Set the argv parameter from the main application ( Dont use it, only called from Core!!).
bool OpenFlipper::Options::remoteControl ()
 is the core remoteControlled?
void OpenFlipper::Options::remoteControl (bool _remote)
 is the core remoteControlled?
Debugging Options

void OpenFlipper::Options::doSlotDebugging (bool _debugging)
bool OpenFlipper::Options::doSlotDebugging ()
Update Options

void OpenFlipper::Options::updateUrl (QString _url)
QString OpenFlipper::Options::updateUrl ()
void OpenFlipper::Options::updateUsername (QString _username)
QString OpenFlipper::Options::updateUsername ()
void OpenFlipper::Options::updatePassword (QString _password)
QString OpenFlipper::Options::updatePassword ()
Version information

QString OpenFlipper::Options::coreVersion ()
 Version of OpenFlipper Core.
QString OpenFlipper::Options::compilerInfo ()
 Information about the used compiler.
Picking Debugger

void OpenFlipper::Options::pickingRenderMode (QString _target)
QString OpenFlipper::Options::pickingRenderMode ()
void OpenFlipper::Options::renderPicking (bool _enable)
bool OpenFlipper::Options::renderPicking ()

Experience level of user



enum  Experience { NOVICE, ADVANCED, EXPERT }
Experience OpenFlipper::Options::getExperience ()
 Get experience level.
void OpenFlipper::Options::setExperience (Experience _exp)
 Set experience level.

Visualization Control



enum  StereoMode { OpenGL, AnaglyphRedCyan, AnaglyphCustom, Philips }
 

Stereo mode.


void OpenFlipper::Options::nogui (bool _nogui)
 Store if a gui should be visible or not.
bool OpenFlipper::Options::nogui ()
 get if a gui should be visible or not
bool OpenFlipper::Options::gui ()
 get if a gui should be visible or not
void OpenFlipper::Options::stereo (bool _stereo)
 Store stereo setting.
bool OpenFlipper::Options::stereo ()
 get current stereo setting
void OpenFlipper::Options::glStereo (bool _glStereo)
 Store opengl stereo mode setting.
bool OpenFlipper::Options::glStereo ()
 get current opengl stereo setting
void OpenFlipper::Options::stereoMode (StereoMode _mode)
 Store stereo mode setting.
StereoMode OpenFlipper::Options::stereoMode ()
 get current stereo mode setting
void OpenFlipper::Options::anaglyphLeftEyeColorMatrix (std::vector< float > _mat)
 Store the 3x3 left eye color matrix values for custom anaglyph stereo mode.
std::vector< float > OpenFlipper::Options::anaglyphLeftEyeColorMatrix ()
 get the 3x3 left eye color matrix values for custom anaglyph stereo mode
void OpenFlipper::Options::anaglyphRightEyeColorMatrix (std::vector< float > _mat)
 Store the 3x3 right eye color matrix values for custom anaglyph stereo mode.
std::vector< float > OpenFlipper::Options::anaglyphRightEyeColorMatrix ()
 get the 3x3 right eye color matrix values for custom anaglyph stereo mode
void OpenFlipper::Options::synchronization (bool _synchronization)
 Store synchronization mode setting.
bool OpenFlipper::Options::synchronization ()
 get current synchronization setting
void OpenFlipper::Options::restrictFrameRate (bool _enable)
 Store restrictFrameRate setting.
bool OpenFlipper::Options::restrictFrameRate ()
 get restrictFrameRate setting
void OpenFlipper::Options::maxFrameRate (int _fps)
 Store maxFrameRate setting.
int OpenFlipper::Options::maxFrameRate ()
 get maxFrameRate setting
void OpenFlipper::Options::defaultDrawMode (ACG::SceneGraph::DrawModes::DrawMode _mode, int _viewer)
 Store defaultDrawMode setting.
ACG::SceneGraph::DrawModes::DrawMode OpenFlipper::Options::defaultDrawMode (int _viewer)
 get defaultDrawMode setting
void OpenFlipper::Options::defaultProjectionMode (int _mode, int _viewer)
 Store defaultProjectionMode setting.
int OpenFlipper::Options::defaultProjectionMode (int _viewer)
 get defaultProjectionMode setting
void OpenFlipper::Options::defaultViewingDirection (int _mode, int _viewer)
 Store defaultViewingDirection setting.
int OpenFlipper::Options::defaultViewingDirection (int _viewer)
 get defaultViewingDirection setting
void OpenFlipper::Options::defaultViewerLayout (int _layout)
 Store defaultViewerLayout setting.
int OpenFlipper::Options::defaultViewerLayout ()
 get defaultViewerLayout setting
void OpenFlipper::Options::redrawDisabled (bool disable)
 Store disableRedraw setting.
bool OpenFlipper::Options::redrawDisabled ()
 get disableRedraw setting
bool OpenFlipper::Options::drawModesInContextMenu ()
 Get the flag if a drawMode Menu should always be visible in the context menu.
void OpenFlipper::Options::drawModesInContextMenu (bool _show)
 Set the flag if a drawMode Menu should always be visible in the context menu.
bool OpenFlipper::Options::gridVisible ()
 Get the flag if a grid should be drawn in every viewer.
void OpenFlipper::Options::gridVisible (bool _visible)
 Set the flag if a grid should be drawn in every viewer.

GUI Control



enum  LoggerState { InScene, Normal, Hidden }
 

State of the logging widget.


void OpenFlipper::Options::multiView (bool _multiView)
 Use multiview Mode?
bool OpenFlipper::Options::multiView ()
 Use multiview Mode?
unsigned int OpenFlipper::Options::examinerWidgets ()
 Number of examiner widgets.
void OpenFlipper::Options::loggerState (LoggerState _state)
 Set to current.
LoggerState OpenFlipper::Options::loggerState ()
 Current state of the logging window?
void OpenFlipper::Options::hideToolbox (bool _hide)
 Set if we start the toolbox widget closed.
bool OpenFlipper::Options::hideToolbox ()
 Start the toolbox widget closed?
void OpenFlipper::Options::fullScreen (bool _fs)
 Start fullscreen Mode?
bool OpenFlipper::Options::fullScreen ()
 Start fullscreen Mode?
QString OpenFlipper::Options::defaultToolboxMode ()
 Which mode should be the default for the toolbar?
void OpenFlipper::Options::defaultToolboxMode (QString _mode)
 Which mode should be the default for the toolbar?
QString OpenFlipper::Options::windowTitle ()
 Titel of the main window.
void OpenFlipper::Options::windowTitle (QString _titel)
 Set title of the main window.
void OpenFlipper::Options::defaultBaseColor (QColor _color)
 Default base color.
QColor OpenFlipper::Options::defaultBaseColor ()
 Default base color.
void OpenFlipper::Options::randomBaseColor (bool _random)
 use randomized base color
bool OpenFlipper::Options::randomBaseColor ()
 use randomized base color

Detailed Description

This Header provides access to globally defined variables such as Aplication Directories. You may use these Functions inside your plugins.

Definition in file GlobalOptions.hh.


Function Documentation

DLLEXPORT QSettings& OpenFlipperSettings (  ) 

QSettings object containing all program settings of OpenFlipper.

To get the settings use:
OpenFlipperSettings().value("<Key>").toDouble();
OpenFlipperSettings().value("<Key>").toBool();

To change settings do:
OpenFlipperSettings().setValue("<Key>","<Value>");
For detailed info about the values see the documentation of QSettings and the QVariant.

For each of your plugins, the key has to start with your plugin name!!!

The following entries are available through the settings:

User Interface Settings * Core/Gui/glViewer/defaultBackgroundColor This controls the default background color of the glViewer (QColor) * Core/Gui/glViewer/showControlWheels This setting controls if the control wheels should be visible in the glViewer (bool) * Core/Gui/glViewer/glMouse This setting controls if the mouse is rendered in OpenGL or in the window manager * Core/Gui/glViewer/stereoMousePick This setting controls if the mouse depth is picked in stereo mode * Core/Gui/splash This setting controls if the splash screen is shown at startup(bool)

File Handling * Core/CurrentDir The current Directory of the Application * Core/File/RecentFiles List of Recent Files * Core/File/RecentTypes DataTypes of Recent Files * Core/File/MaxRecent Maximum entries in recent File list * Core/File/UseLoadDefaults Use the defaults saved in the file plugins

Log Settings * Core/Log/Logfile This is the location of the log file * Core/Log/logFileEnabled This controls, if logging to file is enabled

Mouse Controls
* Core/Mouse/Wheel/ZoomFactor Zoom factor used when turning the mouse wheel (double)
* Core/Mouse/Wheel/ZoomFactorShift Zoom factor used when turning the mouse wheel while shift is pressed (makes zoom slower while shift is pressed) (double)

General Stereo Settings
* Core/Stereo/EyeDistance Distance between eyes. Defaults to 7 cm (double)
* Core/Stereo/FocalDistance Focal distance. Defaults to center of scene (double)

Philips stereo display settings
* Core/Stereo/Philips/Content Philips stereo header content type (int)
* Core/Stereo/Philips/Factor Philips stereo header factor (int)
* Core/Stereo/Philips/Offset Philips stereo header offset cc (int)
* Core/Stereo/Philips/Select Philips stereo header select (int)

Anaglyph stereo mode settings:

Definition at line 1011 of file GlobalOptions.cc.


acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .