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() )
void writeApplicationOptions(INIFile &_ini)
Write Application options to ini file.
QTextStream * logStream_
stream for logging to file
void saveOptions()
Save the current options to the standard ini file.
void disconnect()
Remove connection of this object to a file.
double wheelZoomFactorShift()
Zoom factor when using mouse wheel and pressing shift.
int objectCount()
Get the number of available objects.
void setFixedView(int _mode, int _viewer)
Set a fixed View for a viewer.
double wheelZoomFactor()
Zoom factor when using mouse wheel.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
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 viewers()
Get the number of viewers.
void perspectiveProjection(int _viewer)
Switch to perspective Projection.
bool wheelInvert()
Invert mouse wheel direction?
void setupOptions()
Get all ini files and set basic paths and options.
void updateView()
Called when a plugin requests an update in the viewer.
void readApplicationOptions(INIFile &_ini)
Get and set Application options from ini file.
Class for the handling of simple configuration files.
bool connect(const QString &name, const bool create)
Connect INIFile object with given filename.
Viewer::ViewerProperties & viewerProperties(int _id)
Get the viewer properties Use this functions to get basic viewer properties such as backgroundcolor o...
void restoreKeyBindings()
Restore key assignments from configs files.
void allowRotation(bool _mode, int _viewer)
void setValue(const QString &key, const QVariant &value)
Wrapper function which makes it possible to enable Debugging output with -DOPENFLIPPER_SETTINGS_DEBUG...
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
void orthographicProjection(int _viewer)
Switch to orthographic Projection.