71 if ( OpenFlipper::Options::gui() ) {
93 case 1 :
coreWidget_->setIconSize( QSize(16,16) );
break;
94 case 2 :
coreWidget_->setIconSize( QSize(32,32) );
break;
111 if ( OpenFlipper::Options::defaultPerspectiveProjectionMode(i) )
125 for (
unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
156 QString inifile = OpenFlipper::Options::configDirStr() +
"OpenFlipper.ini";
159 if ( ! ini.
connect( inifile ,
false) ) {
160 emit
log(
LOGERR,tr(
"Failed to connect to users ini file"));
162 if ( ! ini.
connect( inifile,
true) ) {
163 emit
log(
LOGERR,tr(
"Can not create user ini file"));
177 OpenFlipper::Options::initializeSettings();
179 QStringList optionFiles;
184 QFile globalIni(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
185 if ( globalIni.exists() )
186 optionFiles.push_back(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
191 QFile localIni(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
192 if ( localIni.exists() )
193 optionFiles.push_back(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
196 OpenFlipper::Options::optionFiles(optionFiles);
202 OpenFlipper::Options::currentTextureDir(OpenFlipper::Options::textureDirStr());
211 for (
int i = 0 ; i < (int)optionFiles.size(); ++i) {
215 if ( ! _ini.
connect(optionFiles[i],
false) ) {
216 emit
log(
LOGERR,tr(
"Failed to connect to _ini file") + optionFiles[i]);
230 QStringList optionFiles;
235 QFile globalIni(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
236 if ( globalIni.exists() )
237 optionFiles.push_back(OpenFlipper::Options::applicationDir().absolutePath() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
242 QFile localIni(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
243 if ( localIni.exists() )
244 optionFiles.push_back(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() +
"OpenFlipper.ini");
247 OpenFlipper::Options::optionFiles(optionFiles);
254 for (
int i = 0 ; i < (int)optionFiles.size(); ++i) {
258 if ( ! _ini.
connect(optionFiles[i],
false) ) {
259 emit
log(
LOGERR,tr(
"Failed to connect to _ini file") + optionFiles[i]);
263 if ( OpenFlipper::Options::gui() )
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void perspectiveProjection(int _viewer)
Switch to perspective Projection.
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.
QSize defaultIconSize()
Show logger in splitter or not.
void allowRotation(bool _mode, int _viewer)
void disconnect()
Remove connection of this object to a file.
void setForceNativeCursor(bool _state)
Use native or gl painted cursor.
double wheelZoomFactor()
Zoom factor when using mouse wheel.
bool connect(const QString &name, const bool create)
Connect INIFile object with given filename.
void showLogger(OpenFlipper::Options::LoggerState _state)
Change visibility of the logger.
void setViewerLayout(int _idx)
Change viewer layout that was selected in the combo box.
QTextStream * logStream_
stream for logging to file
bool wheelInvert()
Invert mouse wheel direction?
void initViewModes()
init ViewModes that were loaded via ini-file
Class for the handling of simple configuration files.
void showToolbox(bool _state)
Show or hide toolbox.
void saveOptions()
Save the current options to the standard ini file.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
void restoreKeyBindings()
Restore key assignments from configs files.
void setToolBoxOrientationOnTheRight(bool _toolBoxRight)
Set orientation of tool box (either on the right or the left side of the screen)
int viewers()
Get the number of viewers.
void readApplicationOptions(INIFile &_ini)
Get and set Application options from ini file.
void setFixedView(int _mode, int _viewer)
Set a fixed View for a viewer.
void applyOptions()
after ini-files have been loaded and core is up or if options have been changed -> apply Options ...
CoreWidget * coreWidget_
The main applications widget ( only created in gui mode )
int objectCount()
Get the number of available objects.
void orthographicProjection(int _viewer)
Switch to orthographic Projection.
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
double wheelZoomFactorShift()
Zoom factor when using mouse wheel and pressing shift.
void loadKeyBindings(INIFile &_ini)
Load key assignments from a given INI file.
void writeApplicationOptions(INIFile &_ini)
Write Application options to ini file.
void updateView()
Called when a plugin requests an update in the viewer.