CycloBranch
cGlobalPreferences.h
Go to the documentation of this file.
1
7#ifndef _CGLOBALPREFERENCES_H
8#define _CGLOBALPREFERENCES_H
9
10#include "core/utilities.h"
11#include "core/cFragmentIons.h"
13#include <QString>
14#include <QSettings>
15#include <QFile>
16
17
21struct cIonType {
22
26 string name;
27
28
32 string formula;
33
34
39
40
45
46
51
52
57 clear();
58 }
59
60
64 void clear() {
65 name = "[M+H]+";
66 formula = "H+";
67 massdifference = H - e;
68 positive = true;
69 multiplier = 1;
70 }
71
72
77 void store(ofstream& os) {
78 storeString(name, os);
80 os.write((char *)&massdifference, sizeof(double));
81 os.write((char *)&positive, sizeof(bool));
82 os.write((char *)&multiplier, sizeof(int));
83 }
84
85
90 void load(ifstream& is) {
91 loadString(name, is);
93 is.read((char *)&massdifference, sizeof(double));
94 is.read((char *)&positive, sizeof(bool));
95 is.read((char *)&multiplier, sizeof(int));
96 }
97
98};
99
100
105
106 QString settingsfile;
107
108public:
109
110 vector<cIonType> customions;
111
112 int linebafprocessingmethod;
113 int profilebafprocessingmethod;
114
115 int rawdataprocessingmethod;
116
117 QString settingsdefaultdir;
118 QString peaklistsdefaultdir;
119 QString blocksdefaultdir;
120 QString sequencesdefaultdir;
121 QString modificationsdefaultdir;
122 QString openopticalimagedir;
123 QString openhistologyimagedir;
124 QString openmicroscopyimagedir;
125 QString resultsdefaultdir;
126 QString exportcsvdefaultdir;
127 QString exporthtmldefaultdir;
128 QString exportimagedefaultdir;
129
130 QString bookmarkname1;
131 QString bookmarkurl1;
132
133 QString bookmarkname2;
134 QString bookmarkurl2;
135
136 QString bookmarkname3;
137 QString bookmarkurl3;
138
139 QString bookmarkname4;
140 QString bookmarkurl4;
141
142 QString bookmarkname5;
143 QString bookmarkurl5;
144
145 QString bookmarkname6;
146 QString bookmarkurl6;
147
148 QString bookmarkname7;
149 QString bookmarkurl7;
150
151 QString bookmarkname8;
152 QString bookmarkurl8;
153
154 QString bookmarkname9;
155 QString bookmarkurl9;
156
157 QString bookmarkname10;
158 QString bookmarkurl10;
159
160 bool viewbookmarks;
161
162
167
168
172 void setDefaultIonTypes();
173
174
179
180
185
186
190 void setDefaultURLs();
191
192
196 void loadSettings();
197
198
202 void saveSettings();
203
204
205};
206
207
208#endif
209
Basic definitions of fragment ions occurring in the mass spectra.
The representation of a summary formula.
The class storing global preferences.
Definition: cGlobalPreferences.h:104
void loadSettings()
Load settings.
Definition: cGlobalPreferences.cpp:22
void setDefaultDirectories()
Set default directories.
Definition: cGlobalPreferences.cpp:978
void setDefaultIonTypes()
Set default ion types.
Definition: cGlobalPreferences.cpp:272
cGlobalPreferences()
The constructor.
Definition: cGlobalPreferences.cpp:4
void saveSettings()
Save settings.
Definition: cGlobalPreferences.cpp:199
void setDefaultURLs()
Set default URLs.
Definition: cGlobalPreferences.cpp:1009
void setDefaultDataProcessingMethods()
Set default data processing methods.
Definition: cGlobalPreferences.cpp:970
The struct for definition of a ion type.
Definition: cGlobalPreferences.h:21
void clear()
Clear the structure.
Definition: cGlobalPreferences.h:64
cIonType()
The default constructor.
Definition: cGlobalPreferences.h:56
bool positive
Charge of the ion.
Definition: cGlobalPreferences.h:44
void store(ofstream &os)
Store the structure into an output stream.
Definition: cGlobalPreferences.h:77
int multiplier
The multiplier n in [nM + H]+.
Definition: cGlobalPreferences.h:50
string formula
Formula of the ion.
Definition: cGlobalPreferences.h:32
string name
Name of the ion.
Definition: cGlobalPreferences.h:26
double massdifference
Mass difference of the ion from the neutral molecule.
Definition: cGlobalPreferences.h:38
void load(ifstream &is)
Load the structure from an input stream.
Definition: cGlobalPreferences.h:90
Auxiliary funtions and structures.
void storeString(string &s, ofstream &os)
Store a string into an output stream.
Definition: utilities.cpp:59
void loadString(string &s, ifstream &is)
Load a string from an input stream.
Definition: utilities.cpp:66