1 // Copyright (C) 2012-2019 The VPaint Developers. 2 // See the COPYRIGHT file at the top-level directory of this distribution 3 // and at https://github.com/dalboris/vpaint/blob/master/COPYRIGHT 4 // 5 // Licensed under the Apache License, Version 2.0 (the "License"); 6 // you may not use this file except in compliance with the License. 7 // You may obtain a copy of the License at 8 // 9 // http://www.apache.org/licenses/LICENSE-2.0 10 // 11 // Unless required by applicable law or agreed to in writing, software 12 // distributed under the License is distributed on an "AS IS" BASIS, 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 // See the License for the specific language governing permissions and 15 // limitations under the License. 16 17 #ifndef SETTINGS_H 18 #define SETTINGS_H 19 20 #include "SvgImportParams.h" 21 #include "Version.h" 22 23 class SettingsDialog; 24 class QSettings; 25 26 class Settings 27 { 28 public: 29 Settings(); 30 31 // Read and write from/to hard drive 32 void readFromDisk(QSettings & settings); 33 void writeToDisk(QSettings & settings); 34 35 // Edge width 36 double edgeWidth() const; 37 void setEdgeWidth(double value); 38 39 // About dialog 40 bool showAboutDialogAtStartup() const; 41 void setShowAboutDialogAtStartup(bool value); 42 43 // File version conversion 44 bool keepOldVersion() const; 45 void setKeepOldVersion(bool value); 46 47 bool dontNotifyConversion() const; 48 void setDontNotifyConversion(bool value); 49 50 // Check version 51 Version checkVersion() const; 52 void setCheckVersion(Version value); 53 54 // Import Preferences 55 SvgImportVertexMode svgImportVertexMode() const; 56 void setSvgImportVertexMode(SvgImportVertexMode value); 57 58 private: 59 double edgeWidth_; 60 bool showAboutDialogAtStartup_; 61 bool keepOldVersion_; 62 bool dontNotifyConversion_; 63 Version checkVersion_; 64 SvgImportVertexMode svgImportVertexMode_; 65 }; 66 67 #endif 68