CycloBranch
cParametersWidget.h
Go to the documentation of this file.
1
7#ifndef _CPARAMETERSWIDGET_H
8#define _CPARAMETERSWIDGET_H
9
10#include <iostream>
11#include <string>
12
13#include <QWidget>
14#include <QDesktopServices>
15#include <QUrl>
16#include <QFileInfo>
17#include <QLineEdit>
18#include <QPushButton>
19
20#include "core/utilities.h"
23#include "core/cParameters.h"
26
27
28using namespace std;
29
30
31// forward declarations
32class QFormLayout;
33class QGridLayout;
34class QTextEdit;
35class QVBoxLayout;
36class QHBoxLayout;
37class QComboBox;
38class QSpinBox;
39class QDoubleSpinBox;
40class QDialogButtonBox;
41class QGroupBox;
42class QCheckBox;
43class QTableWidget;
44class QListWidget;
45class QMessageBox;
46class QScrollArea;
47class QLabel;
48
49
53class cParametersWidget : public QWidget
54{
55 Q_OBJECT
56
57public:
58
59
65 cParametersWidget(cGlobalPreferences* globalpreferences, QWidget* parent = (QWidget *)0);
66
67
72
73
79
80
85 void setAndRestoreParameters(cParameters& parameters);
86
87
92 void closeEvent(QCloseEvent *event);
93
94
100 void setSequence(int peptidetypeindex, QString sequence);
101
102
108 void setTag(int peptidetypeindex, QString tag);
109
110
115 void applyGlobalPreferences(cGlobalPreferences* globalpreferences);
116
117
118private:
119
120 bool hideunusedparameters;
121
122 QWidget* parent;
123
124 cGlobalPreferences* globalpreferences;
125 cParameters parameters;
126
127 QVBoxLayout* vlayout1;
128 QVBoxLayout* vlayout2;
129 QVBoxLayout* vlayout;
130 QHBoxLayout* hlayout;
131 QWidget* hlayoutwidget;
132 QScrollArea* hlayoutscroll;
133
134 QString settingsfile;
135 QString oldsettingsfile;
136
137 QDialogButtonBox* stdbuttons;
138 QHBoxLayout* buttons;
139 QPushButton* load;
140 QPushButton* save;
141 QPushButton* saveas;
142
143 QGroupBox* searchgroupbox;
144 QGridLayout* searchgridlayout;
145 QLabel* modelabel;
146 QComboBox* mode;
147 eModeType oldmodetype;
148 QSpinBox* maximumnumberofthreads;
149 QLabel* maximumnumberofthreadslabel;
150
151 QGroupBox* experimentalspectragroupbox;
152 QGridLayout* experimentalspectragridlayout;
153 QLabel* peptidetypelabel;
154 QComboBox* peptidetype;
155 QLabel* peaklistlabel;
156 QLineEdit* peaklistline;
157 QCheckBox* useprofiledata;
158 QPushButton* peaklistbutton;
159 QHBoxLayout* peaklistlayout;
160 QWidget* peaklistwidget;
161 QLabel* scannumberlabel;
162 QSpinBox* scannumber;
163 QLabel* precursormasslabel;
164 QDoubleSpinBox* precursormass;
165 QLabel* precursoradductlabel;
166 QLineEdit* precursoradduct;
167 QLabel* precursorchargelabel;
168 QSpinBox* precursorcharge;
169 QLabel* precursormasserrortolerancelabel;
170 QDoubleSpinBox* precursormasserrortolerance;
171 QLabel* fragmentmasserrortolerancelabel;
172 QDoubleSpinBox* fragmentmasserrortolerance;
173 QLabel* minimumrelativeintensitythresholdlabel;
174 QDoubleSpinBox* minimumrelativeintensitythreshold;
175 QLabel* minimumabsoluteintensitythresholdlabel;
176 QSpinBox* minimumabsoluteintensitythreshold;
177 QLabel* mzratiolabel;
178 QDoubleSpinBox* minimummz;
179 QDoubleSpinBox* maximummz;
180 QHBoxLayout* mzratiolayout;
181 QWidget* mzratiowidget;
182 QLabel* rtlabel;
183 QDoubleSpinBox* minimumrt;
184 QDoubleSpinBox* maximumrt;
185 QHBoxLayout* rtlayout;
186 QWidget* rtwidget;
187 QLabel* fwhmlabel;
188 QDoubleSpinBox* fwhm;
189
190 QGroupBox* isotoperatiosgroupbox;
191 QGridLayout* isotoperatiosgridlayout;
192
193 QLabel* ratio54Fe56FeLabel;
194 QCheckBox* ratio54Fe56FeEnabled;
195 QDoubleSpinBox* minratio54Fe56Fe;
196 QDoubleSpinBox* maxratio54Fe56Fe;
197 QHBoxLayout* ratio54Fe56FeLayout;
198 QWidget* ratio54Fe56FeWidget;
199
200 QLabel* ratio60Ni58NiLabel;
201 QCheckBox* ratio60Ni58NiEnabled;
202 QDoubleSpinBox* minratio60Ni58Ni;
203 QDoubleSpinBox* maxratio60Ni58Ni;
204 QHBoxLayout* ratio60Ni58NiLayout;
205 QWidget* ratio60Ni58NiWidget;
206
207 QLabel* ratio62Ni58NiLabel;
208 QCheckBox* ratio62Ni58NiEnabled;
209 QDoubleSpinBox* minratio62Ni58Ni;
210 QDoubleSpinBox* maxratio62Ni58Ni;
211 QHBoxLayout* ratio62Ni58NiLayout;
212 QWidget* ratio62Ni58NiWidget;
213
214 QLabel* ratio65Cu63CuLabel;
215 QCheckBox* ratio65Cu63CuEnabled;
216 QDoubleSpinBox* minratio65Cu63Cu;
217 QDoubleSpinBox* maxratio65Cu63Cu;
218 QHBoxLayout* ratio65Cu63CuLayout;
219 QWidget* ratio65Cu63CuWidget;
220
221 QLabel* ratio66Zn64ZnLabel;
222 QCheckBox* ratio66Zn64ZnEnabled;
223 QDoubleSpinBox* minratio66Zn64Zn;
224 QDoubleSpinBox* maxratio66Zn64Zn;
225 QHBoxLayout* ratio66Zn64ZnLayout;
226 QWidget* ratio66Zn64ZnWidget;
227
228 QLabel* ratio67Zn64ZnLabel;
229 QCheckBox* ratio67Zn64ZnEnabled;
230 QDoubleSpinBox* minratio67Zn64Zn;
231 QDoubleSpinBox* maxratio67Zn64Zn;
232 QHBoxLayout* ratio67Zn64ZnLayout;
233 QWidget* ratio67Zn64ZnWidget;
234
235 QLabel* ratio68Zn64ZnLabel;
236 QCheckBox* ratio68Zn64ZnEnabled;
237 QDoubleSpinBox* minratio68Zn64Zn;
238 QDoubleSpinBox* maxratio68Zn64Zn;
239 QHBoxLayout* ratio68Zn64ZnLayout;
240 QWidget* ratio68Zn64ZnWidget;
241
242 QGroupBox* brickdatabasegroupbox;
243 QGridLayout* brickdatabasegridlayout;
244 QLabel* brickdatabaselabel;
245 QLineEdit* brickdatabaseline;
246 QPushButton* brickdatabasebutton;
247 QHBoxLayout* brickdatabaselayout;
248 QWidget* brickdatabasewidget;
249 QLabel* maximumbricksincombinatiolabel;
250 QSpinBox* maximumbricksincombinationbegin;
251 QSpinBox* maximumbricksincombinationmiddle;
252 QSpinBox* maximumbricksincombinationend;
253 QHBoxLayout* maximumbricksincombinationlayout;
254 QWidget* maximumbricksincombinationwidget;
255 QLabel* maximumcumulativemasslabel;
256 QDoubleSpinBox* maximumcumulativemass;
257 QLabel* modificationslabel;
258 QLineEdit* modificationsline;
259 QPushButton* modificationsbutton;
260 QHBoxLayout* modificationslayout;
261 QWidget* modificationswidget;
262
263 QGroupBox* miscgroupbox;
264 QGridLayout* miscgridlayout;
265 QLabel* blindedgeslabel;
266 QComboBox* blindedges;
267 QLabel* cyclicnterminuslabel;
268 QCheckBox* cyclicnterminus;
269 QLabel* cycliccterminuslabel;
270 QCheckBox* cycliccterminus;
271 QLabel* internalfragmentslabel;
272 QCheckBox* internalfragments;
273 QLabel* enablescramblinglabel;
274 QCheckBox* enablescrambling;
275 QLabel* similaritysearchlabel;
276 QCheckBox* similaritysearch;
277 QLabel* regularblocksorderlabel;
278 QCheckBox* regularblocksorder;
279
280 QGroupBox* theoreticalspectragroupbox;
281 QGridLayout* theoreticalspectragridlayout;
282 QLabel* sequencedatabaselabel;
283 QLineEdit* sequencedatabaseline;
284 QPushButton* sequencedatabasebutton;
285 QHBoxLayout* sequencedatabaselayout;
286 QWidget* sequencedatabasewidget;
287 QLabel* scoretypelabel;
288 QComboBox* scoretype;
289 QLabel* hitsreportedlabel;
290 QSpinBox* hitsreported;
291 QLabel* sequencetaglabel;
292 QLineEdit* sequencetag;
293 QLabel* iontypeslabel;
294 cFragmentIonsListWidget* iontypes;
295 QLabel* neutrallosstypeslabel;
296 cNeutralLossesListWidget* neutrallosstypes;
297 QLabel* maximumcombinedlosseslabel;
298 QSpinBox* maximumcombinedlosses;
299 QLabel* elementstypeslabel;
300 cNeutralLossesListWidget* elementstypes;
301 QLabel* maximumcombinedelementslabel;
302 QSpinBox* maximumcombinedelements;
303 //QCheckBox* clearhitswithoutparent;
304 QLabel* reportunmatchedtheoreticalpeakslabel;
305 QCheckBox* reportunmatchedtheoreticalpeaks;
306 QLabel* generateisotopepatternlabel;
307 QCheckBox* generateisotopepattern;
308 QLabel* minimumpatternsizelabel;
309 QSpinBox* minimumpatternsize;
310 QLabel* minimumfeaturesizelabel;
311 QSpinBox* minimumfeaturesize;
312 QLabel* minimumiontypeslabel;
313 QSpinBox* minimumiontypes;
314 QLabel* basicformulachecklabel;
315 QCheckBox* basicformulacheck;
316 QLabel* advancedformulachecklabel;
317 QCheckBox* advancedformulacheck;
318 QLabel* noratiochecklabel;
319 QCheckBox* noratiocheck;
320 QLabel* calculatefdrslabel;
321 QCheckBox* calculatefdrs;
322
323 QLabel* minimumannotationintensitylabel;
324 QDoubleSpinBox* minimumannotationintensityrelative;
325 QSpinBox* minimumannotationintensityabsolute;
326 QHBoxLayout* minimumannotationintensitylayout;
327 QWidget* minimumannotationintensitywidget;
328
329 QLabel* mzdifftolerancelabel;
330 QDoubleSpinBox* mzdifftolerance;
331 QLabel* intensitytolerancelabel;
332 QDoubleSpinBox* intensitytolerance;
333
334 QGroupBox* searchedsequencegroupbox;
335 QGridLayout* searchedsequencegridlayout;
336 QLabel* searchedsequencelabel;
337 QLineEdit* searchedsequenceline;
338 QPushButton* searchedsequencebutton;
339 QHBoxLayout* searchedsequencelayout;
340 QWidget* searchedsequencewidget;
341 QLabel* searchedsequencemodiflabel;
342 QLineEdit* searchedsequenceNtermmodif;
343 QLineEdit* searchedsequenceCtermmodif;
344 QLineEdit* searchedsequenceTmodif;
345 QHBoxLayout* searchedsequencemodiflayout;
346 QWidget* searchedsequencemodifwidget;
347 QLabel* searchedsequenceformulalabel;
348 QLineEdit* searchedsequenceformula;
349
350 QString lastdirloadsettings;
351 QString lastdirsavesettings;
352
353 QString defaultdirselectpeaklist;
354 QString defaultdirselectbricksdatabase;
355 QString defaultdirselectmodifications;
356 QString defaultdirselectsequencedatabase;
357
358
359protected:
360
361
366 void keyPressEvent(QKeyEvent *event);
367
368
369private slots:
370
371 void loadSettings();
372
373 void saveSettings();
374
375 void saveSettingsAs();
376
377 void peaklistButtonReleased();
378
379 void brickDatabaseButtonReleased();
380
381 void modificationsButtonReleased();
382
383 void sequenceDatabaseButtonReleased();
384
385 bool updateParameters();
386
387 void updateParametersAndHide();
388
389 void restoreParameters();
390
391 void updateSettingsWhenPeptideTypeChanged(int index);
392
393 void updateSettingsWhenModeChanged(int index);
394
395 void resetFragmentIonTypes();
396
397 void drawPeptideButtonReleased();
398
399
400signals:
401
407 void sendSequenceLine(int peptidetypeindex, QString sequence);
408
409
413 void setHCON();
414
415
420
421};
422
423#endif
The implementation of a widget where types of fragment ions generated in theoretical spectra are sele...
The representation of a set of peptide sequence candidates.
The implementation of a widget where types of neutral losses generated in theoretical spectra are sel...
Definitions of program parameters.
The representation of a summary formula.
The widget for selection of fragment ion types.
Definition: cFragmentIonsListWidget.h:26
The class storing global preferences.
Definition: cGlobalPreferences.h:104
The widget for selection of types of neutral losses.
Definition: cNeutralLossesListWidget.h:26
The class storing parameters of the application.
Definition: cParameters.h:82
The class representing a widget for editing parameters of the application.
Definition: cParametersWidget.h:54
void sendSequenceLine(int peptidetypeindex, QString sequence)
Send index of peptide type and searched sequence.
cParameters & getParameters()
Get parameters.
Definition: cParametersWidget.cpp:1219
void setAndRestoreParameters(cParameters &parameters)
Set and restore parameters.
Definition: cParametersWidget.cpp:1224
void applyGlobalPreferences(cGlobalPreferences *globalpreferences)
Apply new global preferences.
Definition: cParametersWidget.cpp:1263
void setHCON()
Set list of neutral losses to HCON.
~cParametersWidget()
The destructor.
Definition: cParametersWidget.cpp:998
cParametersWidget(cGlobalPreferences *globalpreferences, QWidget *parent=(QWidget *) 0)
The constructor.
Definition: cParametersWidget.cpp:34
void clearIonSelection()
Clear the selection of ions.
void closeEvent(QCloseEvent *event)
Handle the window close event.
Definition: cParametersWidget.cpp:1239
void setSequence(int peptidetypeindex, QString sequence)
Set peptide type and searched sequence.
Definition: cParametersWidget.cpp:1245
void keyPressEvent(QKeyEvent *event)
Handle a key press event.
Definition: cParametersWidget.cpp:1284
void setTag(int peptidetypeindex, QString tag)
Set peptide type and sequence tag.
Definition: cParametersWidget.cpp:1254
Auxiliary funtions and structures.
eModeType
Running modes of the application.
Definition: utilities.h:92