VAPOR3 3.9.4
SettingsParams.h
Go to the documentation of this file.
1//************************************************************************
2// *
3// Copyright (C) 2015 *
4// University Corporation for Atmospheric Research *
5// All Rights Reserved *
6// *
7//************************************************************************/
8//
9// File: SettingsParams.h
10//
11// Authors:
12// Scott Pearse
13// Alan Norton
14// National Center for Atmospheric Research
15// PO 3000, Boulder, Colorado
16//
17// Date: February 2018
18//
19// Description: Defines the SettingsParams class.
20// This class supports parameters associted with the
21// Settings panel, describing the settings settings of the app.
22//
23#ifndef SETTINGSPARAMS_H
24#define SETTINGSPARAMS_H
25
26#include <vector>
27#include <vapor/ParamsBase.h>
28
35
41public:
42 SettingsParams(VAPoR::ParamsBase::StateSave *ssave, bool loadFromFile = true);
46
47 void Init();
48
50
51 int GetNumThreads() const;
52 void SetNumThreads(int num);
53
54 long GetCacheMB() const;
55 void SetCacheMB(long val);
56
57 long GetTextureSize() const;
58 void SetTextureSize(long val);
59 void SetTexSizeEnable(bool val);
60 bool GetTexSizeEnable() const;
61
63 void SetAutoStretchEnabled(bool val);
64
65 int GetJpegQuality() const;
66 void SetJpegQuality(int quality);
67
69 void SetSessionAutoSaveEnabled(bool enabled);
70
72 void SetChangesPerAutoSave(int changes);
73
74 string GetAutoSaveSessionFile() const;
75 void SetAutoSaveSessionFile(string file);
76 void SetDefaultAutoSaveFile(string file);
77
78 string GetSessionDir() const;
79 void SetSessionDir(string name);
80 string GetDefaultSessionDir() const;
81 void SetDefaultSessionDir(string dir);
82
83 string GetMetadataDir() const;
84 void SetMetadataDir(string dir);
85 string GetDefaultMetadataDir() const;
86 void SetDefaultMetadataDir(string dir);
87
88 string GetTFDir() const;
89 void SetTFDir(string dir);
90 string GetDefaultTFDir() const;
91 void SetDefaultTFDir(string dir);
92
93 string GetFlowDir() const;
94 void SetFlowDir(string dir);
95 string GetDefaultFlowDir() const;
96 void SetDefaultFlowDir(string dir);
97
98 string GetPythonDir() const;
99 void SetPythonDir(string dir);
100 string GetDefaultPythonDir() const;
101 void SetDefaultPythonDir(string dir);
102
103 int GetFontSize() const;
104 void SetFontSize(int size);
105
106 string GetFontFile() const;
107 void SetFontFile(string file);
108
111
112 string GetCurrentPrefsPath() const;
113 void SetCurrentPrefsPath(string pth);
114
115 void Reinit();
116 const std::string getShortName() { return _shortName; }
117
118 void SetFidelityDefault3D(long lodDef, long refDef);
119 void SetFidelityDefault2D(long lodDef, long refDef);
120
121 static string GetClassType() { return (_classType); }
122
123 int SaveSettings() const;
124
125 static const string _sessionAutoSaveEnabledTag;
126
127 std::string GetSettingsPath() const;
128
135
136 static const string UseAllCoresTag;
137 static const string AutoCheckForUpdatesTag;
138 static const string AutoCheckForNoticesTag;
139 static const string CasperVGLCheck;
140
142
143private:
144 static const string _classType;
145 static const string _shortName;
146 static const string _numThreadsTag;
147 static const string _cacheMBTag;
148 static const string _texSizeTag;
149 static const string _texSizeEnableTag;
150 static const string _currentPrefsPathTag;
151 static const string _sessionDirTag;
152 static const string _defaultSessionDirTag;
153 static const string _metadataDirTag;
154 static const string _defaultMetadataDirTag;
155 static const string _tfDirTag;
156 static const string _defaultTfDirTag;
157 static const string _flowDirTag;
158 static const string _defaultFlowDirTag;
159 static const string _pythonDirTag;
160 static const string _defaultPythonDirTag;
161 static const string _fidelityDefault2DTag;
162 static const string _fidelityDefault3DTag;
163 static const string _autoStretchTag;
164 static const string _jpegQualityTag;
165 static const string _changesPerAutoSaveTag;
166 static const string _autoSaveFileLocationTag;
167 static const string _defaultAutoSaveFileTag;
168 static const string _fontFileTag;
169 static const string _fontSizeTag;
170 static const string _dontShowIntelDriverWarningTag;
171 static const string _settingsNeedsWriteTag;
172
173 void _swapTildeWithHome(std::string &file) const;
174
175 string _settingsPath;
176};
177
178#endif // SETTINGS_H
A class for describing settings at settings.
int GetNumThreads() const
string GetMetadataDir() const
void SetAutoCheckForNotices(bool b)
string GetFlowDir() const
string GetDefaultFlowDir() const
static const string AutoCheckForUpdatesTag
string GetDefaultSessionDir() const
bool GetAutoStretchEnabled() const
static const string CasperVGLCheck
bool GetDontShowIntelDriverWarning() const
void SetFidelityDefault2D(long lodDef, long refDef)
void SetFontFile(string file)
string GetSessionDir() const
void SetTFDir(string dir)
void SetTextureSize(long val)
bool GetAutoCheckForUpdates() const
void SetJpegQuality(int quality)
void SetCasperCheckForVGL(bool b)
void SetAutoStretchEnabled(bool val)
void SetDontShowIntelDriverWarning(bool b)
static const string AutoCheckForNoticesTag
static const string _sessionAutoSaveEnabledTag
string GetAutoSaveSessionFile() const
const std::string getShortName()
void SetFontSize(int size)
void SetNumThreads(int num)
int GetChangesPerAutoSave() const
SettingsParams(VAPoR::ParamsBase::StateSave *ssave, VAPoR::XmlNode *node)
void SetTexSizeEnable(bool val)
void SetFidelityDefault3D(long lodDef, long refDef)
SettingsParams(const SettingsParams &rhs)
bool GetTexSizeEnable() const
static const string UseAllCoresTag
SettingsParams & operator=(const SettingsParams &rhs)
void SetChangesPerAutoSave(int changes)
long GetCacheMB() const
void SetDefaultTFDir(string dir)
bool GetCasperCheckForVGL() const
void SetAutoCheckForUpdates(bool b)
string GetDefaultTFDir() const
void SetDefaultAutoSaveFile(string file)
void SetDefaultMetadataDir(string dir)
SettingsParams(VAPoR::ParamsBase::StateSave *ssave, bool loadFromFile=true)
void SetDefaultFlowDir(string dir)
int GetJpegQuality() const
string GetDefaultPythonDir() const
string GetDefaultMetadataDir() const
bool GetSessionAutoSaveEnabled() const
string GetCurrentPrefsPath() const
std::string GetSettingsPath() const
void SetSessionAutoSaveEnabled(bool enabled)
void SetFlowDir(string dir)
bool LoadFromSettingsFile()
string GetTFDir() const
void SetAutoSaveSessionFile(string file)
string GetFontFile() const
long GetTextureSize() const
void SetDefaultPythonDir(string dir)
void SetPythonDir(string dir)
bool GetAutoCheckForNotices() const
void SetMetadataDir(string dir)
void SetDefaultSessionDir(string dir)
void SetCurrentPrefsPath(string pth)
static string GetClassType()
void SetSessionDir(string name)
int SaveSettings() const
void SetCacheMB(long val)
string GetPythonDir() const
int GetFontSize() const
State capture class.
Definition: ParamsBase.h:62
Nodes with state in Xml tree representation.
Definition: ParamsBase.h:50
An Xml tree.
Definition: XmlNode.h:49
#define PARAMS_API
Definition: common.h:77