ZIMA CAD Parts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Settings Class Reference

The Settings singleton. All settings I/O is handled in this class. The singleton is created in the main() function. Also the final Settings::save() is called in main() function. More...

#include <settings.h>

Public Types

enum  Languages { DETECT =0, ENGLISH, CZECH }
 

Public Member Functions

void save ()
 Write settings to disk. More...
 
QString getCurrentLanguageCode ()
 Get chosen language code or a default locale. More...
 
void setCurrentLanguageCode (const QString &lang)
 Set language code. More...
 
void recalculateFilters ()
 Recalculate the filtersRegex by user config. More...
 
int langIndex (const QString &lang)
 Map lang string to Languages enum. More...
 
QString langIndexToName (int lang)
 Map Languages enum to string code. More...
 

Static Public Member Functions

static Settingsget ()
 The main access method to settings. More...
 

Public Attributes

QHash< QString, QString > ExternalPrograms
 
QString WorkingDir
 Current working directory. More...
 
QByteArray MainWindowState
 State of the MainWindow. More...
 
QByteArray MainWindowGeometry
 Geometry of the MainWindow. More...
 
QList< int > ServersSplitterSizes
 Splitter position in the ServersWidget. Hack: It's a workaround for broken QSplitter::geometry. More...
 
int GUIThumbWidth
 Size of the thumbnails in FileModel. More...
 
int GUIPreviewWidth
 Size of the preview in FileModel. More...
 
bool GUISplashEnabled
 Flag if the splash creen should be shown. More...
 
int GUISplashDuration
 How long it should stop on splash screen. More...
 
bool DeveloperEnabled
 Flag: run in developer mode. More...
 
bool DeveloperTechSpecToolBar
 Flag: show developer tool bar. More...
 
QString ExtensionsProductViewPath
 ProEProductView path for external java applet. More...
 
QByteArray ExtensionsProductViewGeometry
 ProductView dialog geometry. More...
 
QPoint ExtensionsProductViewPosition
 ProductView dialog position. More...
 
QString ProeExecutable
 Executable of the Pro/E. More...
 
bool DataSourcesNeedsUpdate
 Internal flag if there was change in datasources to be updated in ServersWidget. More...
 
DataSourceList DataSources
 List of DataSources. More...
 
QList< FilterGroupFilterGroups
 Filter groups. More...
 
QRegExp filtersRegex
 
bool ShowProeVersions
 Flag to show Pro/E versions. More...
 
QStringList Languages
 Available languages in QLocale::name() form (en_EN,...) More...
 

Detailed Description

The Settings singleton. All settings I/O is handled in this class. The singleton is created in the main() function. Also the final Settings::save() is called in main() function.

The access to settings is done with Settings::get() Example: Settings::get()->WorkingDir

Most settings are raw attributes without getter/setter. Some settings where it makes sense are wrapped with getter/setter.

Member Enumeration Documentation

Enumerator
DETECT 
ENGLISH 
CZECH 

Member Function Documentation

Settings * Settings::get ( )
static

The main access method to settings.

QString Settings::getCurrentLanguageCode ( )

Get chosen language code or a default locale.

The default means that QLocale is used when there is no user preference. Returns language code in QLocale::name() form. Eg. en_EN

int Settings::langIndex ( const QString &  lang)

Map lang string to Languages enum.

QString Settings::langIndexToName ( int  lang)

Map Languages enum to string code.

void Settings::recalculateFilters ( )

Recalculate the filtersRegex by user config.

void Settings::save ( )

Write settings to disk.

void Settings::setCurrentLanguageCode ( const QString &  lang)

Set language code.

Parameters
langa QLocale::name() form of string or "default"

Member Data Documentation

DataSourceList Settings::DataSources

List of DataSources.

bool Settings::DataSourcesNeedsUpdate

Internal flag if there was change in datasources to be updated in ServersWidget.

bool Settings::DeveloperEnabled

Flag: run in developer mode.

bool Settings::DeveloperTechSpecToolBar

Flag: show developer tool bar.

QByteArray Settings::ExtensionsProductViewGeometry

ProductView dialog geometry.

QString Settings::ExtensionsProductViewPath

ProEProductView path for external java applet.

QPoint Settings::ExtensionsProductViewPosition

ProductView dialog position.

QHash<QString,QString> Settings::ExternalPrograms
QList<FilterGroup> Settings::FilterGroups

Filter groups.

QRegExp Settings::filtersRegex

A filter regexp for proxy file model in ServerTabWidget. Calculated in Settings::recalculateFilters()

int Settings::GUIPreviewWidth

Size of the preview in FileModel.

int Settings::GUISplashDuration

How long it should stop on splash screen.

bool Settings::GUISplashEnabled

Flag if the splash creen should be shown.

int Settings::GUIThumbWidth

Size of the thumbnails in FileModel.

QStringList Settings::Languages

Available languages in QLocale::name() form (en_EN,...)

QByteArray Settings::MainWindowGeometry

Geometry of the MainWindow.

QByteArray Settings::MainWindowState

State of the MainWindow.

QString Settings::ProeExecutable

Executable of the Pro/E.

QList<int> Settings::ServersSplitterSizes

Splitter position in the ServersWidget. Hack: It's a workaround for broken QSplitter::geometry.

bool Settings::ShowProeVersions

Flag to show Pro/E versions.

Todo:
what is it?
QString Settings::WorkingDir

Current working directory.


The documentation for this class was generated from the following files: