void fchangedir(char *path) { int ret, state; ret = locateFileName(path, &state); setPwd(ret); return; }
void GLESettings::readAll() { // Read the application settings setPosition(settingStore->value("application/position", QPoint(200,200)).toPoint()); setSize(settingStore->value("application/size", QSize(400,400)).toSize()); setMainWindowState(settingStore->value("application/mainstate").toByteArray()); setDrawingAreaSize(settingStore->value("application/drawingsize", QSize(400,400)).toSize()); setStoreSize(settingStore->value("application/storeSize", true).toBool()); setStoreDirectory(settingStore->value("application/storeDirectory", true).toBool()); setSaveOnPreview(settingStore->value("application/saveOnPreview", false).toBool()); setAskAboutObjects(settingStore->value("application/askAboutKeepingObjects", true).toBool()); setAutoScaleOnOpen(settingStore->value("application/autoScaleOnOpen", true).toBool()); setLibGSLocation(settingStore->value("application/libGSLocation", QString()).toString()); setEditorLocation(settingStore->value("application/editorLocation", QString("")).toString()); setDPI(settingStore->value("application/resolution", 100).toInt()); setMonitorOpenFile(settingStore->value("application/monitorOpenFile", true).toBool()); setMonitorAutoReloadFile(settingStore->value("application/monitorAutoReload", true).toBool()); setSplitterPosition(settingStore->value("application/splitterSizes").toByteArray()); setConsoleWindowAutoShowSize(settingStore->value("application/consoleAutoShowSize", 0).toInt()); setEmulateGLEVersion(settingStore->value("application/emulateGLEVersion", 0).toInt()); setExportFormat(settingStore->value("application/exportFormat", 0).toInt()); setExportPageSize(settingStore->value("application/exportPageSize", 0).toInt()); setPreviewPageSize(settingStore->value("application/previewPageSize", 0).toInt()); setOpenExportedFigure(settingStore->value("application/openExportedFigure", true).toBool()); setExportGrayScale(settingStore->value("application/exportGrayScale", false).toBool()); setExportTransparent(settingStore->value("application/exportTransparent", false).toBool()); setExportBitmapResolution(settingStore->value("application/exportBitmapResolution", 150).toInt()); setExportVectorResolution(settingStore->value("application/exportVectorResolution", 600).toInt()); setRenderUsingCairo(settingStore->value("application/renderUsingCairo", false).toBool()); if (storeDirectory()) setPwd(settingStore->value("application/workingDirectory", "").toString()); // Read the server settings setPort(settingStore->value("server/portNumber", DEFAULT_PORT).toInt()); setAutoStartServer(settingStore->value("server/autoStart", true).toBool()); // Read the drawing settings setGrid(QPointF(settingStore->value("drawing/gridX", 1.0).toDouble(), settingStore->value("drawing/gridY", 1.0).toDouble())); setEqualGrid(settingStore->value("drawing/equalGrid", false).toBool()); setPolarSnapStartAngle(settingStore->value("drawing/polarSnapStartAngle", 0.0).toDouble()); setPolarSnapIncAngle(settingStore->value("drawing/polarSnapIncAngle", 30.0).toDouble()); setOsnapOnStart(settingStore->value("drawing/osnapOnStart", false).toBool()); setOrthoSnapOnStart(settingStore->value("drawing/orthoSnapOnStart", false).toBool()); setPolarSnapOnStart(settingStore->value("drawing/polarSnapOnStart", false).toBool()); setPolarTrackOnStart(settingStore->value("drawing/polarTrackOnStart", false).toBool()); setGridSnapOnStart(settingStore->value("drawing/gridSnapOnStart", false).toBool()); }