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() )
double wheelZoomFactorShift()
Zoom factor when using mouse wheel and pressing shift.
bool wheelInvert()
Invert mouse wheel direction?
void writeApplicationOptions(INIFile &_ini)
Write Application options to ini file.
void readApplicationOptions(INIFile &_ini)
Get and set Application options from ini file.
void setToolBoxOrientationOnTheRight(bool _toolBoxRight)
Set orientation of tool box (either on the right or the left side of the screen)
CoreWidget * coreWidget_
The main applications widget ( only created in gui mode )
void applyOptions()
after ini-files have been loaded and core is up or if options have been changed -> apply Options ...
void showToolbox(bool _state)
Show or hide toolbox.
void setupOptions()
Get all ini files and set basic paths and options.
QTextStream * logStream_
stream for logging to file
void setForceNativeCursor(bool _state)
Use native or gl painted cursor.
int viewers()
Get the number of viewers.
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
QSize defaultIconSize()
Show logger in splitter or not.
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.
void disconnect()
Remove connection of this object to a file.
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
Viewer::ViewerProperties & viewerProperties(int _id)
Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor o...
int objectCount()
Get the number of available objects.
void setFixedView(int _mode, int _viewer)
Set a fixed View for a viewer.
void orthographicProjection(int _viewer)
Switch to orthographic Projection.
bool connect(const QString &name, const bool create)
Connect INIFile object with given filename.
Class for the handling of simple configuration files.
void restoreKeyBindings()
Restore key assignments from configs files.
void updateView()
Called when a plugin requests an update in the viewer.
void initViewModes()
init ViewModes that were loaded via ini-file
void perspectiveProjection(int _viewer)
Switch to perspective Projection.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
double wheelZoomFactor()
Zoom factor when using mouse wheel.
void allowRotation(bool _mode, int _viewer)
void loadKeyBindings(INIFile &_ini)
Load key assignments from a given INI file.
void saveOptions()
Save the current options to the standard ini file.