65 if ( OpenFlipper::Options::gui() ) {
87 case 1 :
coreWidget_->setIconSize( QSize(16,16) );
break;
88 case 2 :
coreWidget_->setIconSize( QSize(32,32) );
break;
105 if ( OpenFlipper::Options::defaultPerspectiveProjectionMode(i) )
119 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
150 QString inifile = OpenFlipper::Options::configDirStr() +
"OpenFlipper.ini";
153 if ( ! ini.
connect( inifile ,
false) ) {
154 emit
log(
LOGERR,tr(
"Failed to connect to users ini file"));
156 if ( ! ini.
connect( inifile,
true) ) {
157 emit
log(
LOGERR,tr(
"Can not create user ini file"));
171 OpenFlipper::Options::initializeSettings();
173 QStringList optionFiles;
178 QFile globalIni(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
179 if ( globalIni.exists() )
180 optionFiles.push_back(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
185 QFile localIni(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
186 if ( localIni.exists() )
187 optionFiles.push_back(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
190 OpenFlipper::Options::optionFiles(optionFiles);
196 OpenFlipper::Options::currentTextureDir(OpenFlipper::Options::textureDirStr());
205 for (
int i = 0 ; i < (int)optionFiles.size(); ++i) {
209 if ( ! _ini.
connect(optionFiles[i],
false) ) {
210 emit
log(
LOGERR,tr(
"Failed to connect to _ini file") + optionFiles[i]);
224 QStringList optionFiles;
229 QFile globalIni(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
230 if ( globalIni.exists() )
231 optionFiles.push_back(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
236 QFile localIni(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
237 if ( localIni.exists() )
238 optionFiles.push_back(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
241 OpenFlipper::Options::optionFiles(optionFiles);
248 for (
int i = 0 ; i < (int)optionFiles.size(); ++i) {
252 if ( ! _ini.
connect(optionFiles[i],
false) ) {
253 emit
log(
LOGERR,tr(
"Failed to connect to _ini file") + optionFiles[i]);
257 if ( OpenFlipper::Options::gui() )
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void allowRotation(bool _mode, int _viewer)
void setToolBoxOrientationOnTheRight(bool _toolBoxRight)
Set orientation of tool box (either on the right or the left side of the screen)
QTextStream * logStream_
stream for logging to file
void setFixedView(int _mode, int _viewer)
Set a fixed View for a viewer.
void setForceNativeCursor(bool _state)
Use native or gl painted cursor.
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
double wheelZoomFactor()
Zoom factor when using mouse wheel.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
bool connect(const QString &name, const bool create)
Connect INIFile object with given filename.
void setViewerLayout(int _idx)
Change viewer layout that was selected in the combo box.
CoreWidget * coreWidget_
The main applications widget ( only created in gui mode )
int viewers()
Get the number of viewers.
void showLogger(OpenFlipper::Options::LoggerState _state)
Change visibility of the logger.
void loadKeyBindings(INIFile &_ini)
Load key assignments from a given INI file.
void showToolbox(bool _state)
Show or hide toolbox.
Viewer::ViewerProperties & viewerProperties(int _id)
Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor o...
void setupOptions()
Get all ini files and set basic paths and options.
void orthographicProjection(int _viewer)
Switch to orthographic Projection.
void updateView()
Called when a plugin requests an update in the viewer.
void applyOptions()
after ini-files have been loaded and core is up or if options have been changed -> apply Options ...
bool wheelInvert()
Invert mouse wheel direction?
void restoreKeyBindings()
Restore key assignments from configs files.
void writeApplicationOptions(INIFile &_ini)
Write Application options to ini file.
void saveOptions()
Save the current options to the standard ini file.
void initViewModes()
init ViewModes that were loaded via ini-file
void perspectiveProjection(int _viewer)
Switch to perspective Projection.
double wheelZoomFactorShift()
Zoom factor when using mouse wheel and pressing shift.
int objectCount()
Get the number of available objects.
void readApplicationOptions(INIFile &_ini)
Get and set Application options from ini file.
void disconnect()
Remove connection of this object to a file.
QSize defaultIconSize()
Show logger in splitter or not.
Class for the handling of simple configuration files.