SpeedCrunch
0.11
|
00001 // This file is part of the SpeedCrunch project 00002 // Copyright (C) 2004 Ariya Hidayat <ariya@kde.org> 00003 // Copyright (C) 2005-2006 Johan Thelin <e8johan@gmail.com> 00004 // Copyright (C) 2007-2013 Helder Correia <helder.pereira.correia@gmail.com> 00005 // 00006 // This program is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU General Public License 00008 // as published by the Free Software Foundation; either version 2 00009 // of the License, or (at your option) any later version. 00010 // 00011 // This program is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with this program; see the file COPYING. If not, write to 00018 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 // Boston, MA 02110-1301, USA. 00020 00021 #ifndef CORE_SETTINGS_H 00022 #define CORE_SETTINGS_H 00023 00024 #include <QtCore/QPoint> 00025 #include <QtCore/QSize> 00026 #include <QtCore/QStringList> 00027 #include <QtCore/QList> 00028 00029 class Settings { 00030 public: 00031 static Settings* instance(); 00032 00033 void load(); 00034 void save(); 00035 00036 char radixCharacter() const; // 0: Automatic. 00037 void setRadixCharacter(char c = 0); 00038 bool isRadixCharacterAuto() const; 00039 00040 bool parseAllRadixChar; 00041 bool strictDigitGrouping; 00042 00043 char angleUnit; // 'r': radian; 'd': degree. 00044 00045 char resultFormat; // See HMath documentation. 00046 int resultPrecision; // Ditto. 00047 00048 bool autoAns; 00049 bool autoCalc; 00050 bool autoCompletion; 00051 int digitGrouping; 00052 bool historySave; 00053 bool leaveLastExpression; 00054 bool syntaxHighlighting; 00055 bool systemTrayIconVisible; 00056 bool variableSave; 00057 bool userFunctionSave; 00058 bool windowAlwaysOnTop; 00059 bool autoResultToClipboard; 00060 bool windowPositionSave; 00061 00062 bool constantsDockVisible; 00063 bool functionsDockVisible; 00064 bool historyDockVisible; 00065 bool formulaBookDockVisible; 00066 bool statusBarVisible; 00067 bool variablesDockVisible; 00068 bool userFunctionsDockVisible; 00069 bool windowOnfullScreen; 00070 bool bitfieldVisible; 00071 00072 int colorScheme; 00073 QString displayFont; 00074 00075 QString language; 00076 00077 QStringList history; 00078 QStringList historyResults; 00079 QStringList variables; 00080 QList<QStringList> userFunctions; 00081 00082 QPoint windowPosition; 00083 QSize windowSize; 00084 QByteArray windowState; 00085 bool maximized; 00086 00087 private: 00088 Settings(); 00089 Q_DISABLE_COPY(Settings); 00090 }; 00091 00092 #endif