CycloBranch
cMainWindow.h
Go to the documentation of this file.
1
7#ifndef _MAINWINDOW_H
8#define _MAINWINDOW_H
9
10#include <QMainWindow>
11#include <QDesktopServices>
12#include <QUrl>
13#include <QFileInfo>
14#include <QFile>
15#include <QTableView>
16#include <QStandardItemModel>
17#include <QStandardItem>
18#include <QItemDelegate>
19#include <QComboBox>
20#include "core/utilities.h"
22#include "gui/cAboutWidget.h"
23#include "gui/cGraphWidget.h"
31#include "gui/cMainThread.h"
33#include "gui/cImageWindow.h"
40
41
42// forward declaration
43class QTextEdit;
44class QSplitter;
45class QTableWidget;
46
47
51class cMainWindow : public QMainWindow
52{
53 Q_OBJECT
54
55public:
56
57
62
63
68
69
70protected:
71
76 void keyPressEvent(QKeyEvent *event);
77
78
79private:
80
81 QMenuBar* menuBar;
82
83 QMenu* menuFile;
84 QMenu* menuSearch;
85 QMenu* menuTools;
86 QMenu* menuBookmarks;
87 QMenu* menuView;
88 QMenu* menuHelp;
89
90 QToolBar* toolbarFile;
91 QToolBar* toolbarSearch;
92 QToolBar* toolbarTools;
93 QToolBar* toolbarBookmarks;
94 QToolBar* toolbarView;
95 QToolBar* toolbarHelp;
96 QToolBar* toolbarInputFilter;
97 QToolBar* toolbarRowsFilter;
98
99 QAction* actionOpenResults;
100 QAction* actionSaveResults;
101 QAction* actionExportToCsv;
102 QAction* actionExportToHTML;
103 QAction* actionPreferences;
104 QAction* actionQuit;
105 QAction* actionRun;
106 QAction* actionStop;
107 QAction* actionProperties;
108 QAction* actionBricksDatabase;
109 QAction* actionSequenceDatabase;
110 QAction* actionModifications;
111 QAction *actionDrawPeptide;
112 QAction *actionBookMark1;
113 QAction *actionBookMark2;
114 QAction *actionBookMark3;
115 QAction *actionBookMark4;
116 QAction *actionBookMark5;
117 QAction *actionBookMark6;
118 QAction *actionBookMark7;
119 QAction *actionBookMark8;
120 QAction *actionBookMark9;
121 QAction *actionBookMark10;
122 QAction* actionShowIsomers;
123 QAction* actionGraph;
124 QAction* actionSummaryTableOfMatchedPeaks;
125 QAction* actionMultipleDatasets;
126 QAction* actionChromatogramWindow;
127 QAction* actionImageWindow;
128 QAction* actionPatternSimulatorWindow;
129 QAction* actionFormulaPredictor;
130 QAction* actionLog;
131 QAction* actionHTMLDocumentation;
132 QAction* actionPDFManual;
133 QAction* actionAbout;
134
135 QWidget* inputfilterwidget;
136 QHBoxLayout* inputfilterhbox;
137 QComboBox* inputfiltercombobox;
138 QPushButton* inputfilterbutton;
139
140 QWidget* rowsfilterwidget;
141 QHBoxLayout* rowsfilterhbox;
142 QComboBox* rowsfilteroperator;
143 QComboBox* rowsfiltercombobox1;
144 QComboBox* rowsfiltercomparatorcombobox1;
145 QLineEdit* rowsfilterline1;
146 QComboBox* rowsfiltercombobox2;
147 QComboBox* rowsfiltercomparatorcombobox2;
148 QLineEdit* rowsfilterline2;
149 QCheckBox* rowsfiltercasesensitive;
150 QCheckBox* rowsfilterwholeword;
151 QPushButton* rowsfilterbutton;
152 QPushButton* rowsfilterclearbutton;
153
154 QTableView* results;
155 QStandardItemModel* resultsmodel;
156 cMainWindowProxyModel* resultsproxymodel;
157
158 cTheoreticalSpectrumList listoftheoreticalspectra;
159 cPeakListSeries eicchromatograms;
160 vector<cSpectrumDetailWidget> spectradetails;
161 vector<cSpectrumDetailWidget> avgspectra;
162
163 cGlobalPreferences globalpreferences;
164 cParameters parameters;
165
166 cPeakListSeries rawdata;
167 vector<cImzMLItem> imzmlprofilemetadata;
168 bool profilemz64precision;
169 bool profileintensity64precision;
170
171 QTextEdit* logWindow;
172 QSplitter* splitter;
173
174 cAboutWidget* about;
175 cGraphWidget* graph;
176 cBricksDatabaseWidget* bricksdatabasewidget;
177 cSequenceDatabaseWidget* sequencedatabasewidget;
178 cModificationsWidget* modificationswidget;
179 cDrawPeptideWidget* drawpeptidewidget;
180 cSummaryPeaksTableWidget* summarytableofmatchedpeaks;
181 cImageWindow* imagewindow;
182 cChromatogramWindow* chromatogramwindow;
183 cParametersWidget* parameterswidget;
184 cHTMLExportDialog* htmlexportdialog;
185 cPreferencesDialog* preferencesdialog;
186 cMultipleDatasetsTableWidget* multipledatasetswidget;
187 cPatternSimulatorWidget* patternsimulatorwidget;
188 cFormulaPredictor* formulapredictor;
189
190 int resultsbasecolumncount;
191 int resultsspecificcolumncount;
192 int searchspecificcolumncount;
193
194 QString lastdirexporttocsv;
195 QString lastdirexporttohtml;
196
197 QString lastdirsaveresults;
198 QString lastdiropenresults;
199
200 bool summarytableisprepared;
201 bool multipledatasetsisprepared;
202
203 int lastactivedetail;
204
205 QRect othernormalgeometry;
206 bool otherismaximized;
207 bool otherprofilespectrum;
208 bool otherabsoluteintensity;
209 bool othermatchedpeaks;
210 bool otherunmatchedpeaks;
211 bool otherscrambledpeaks;
212 bool otherlabelspeaks;
213 bool othermzselection;
214
215 int activefileid;
216
217 int avgspectrumused;
218 bool avgspectrumabsoluteintensityenabled;
219 QRect avgspectrumgeometry;
220 bool avgspectrummaximized;
221
222 bool quitapp;
223
224 void closeEvent(QCloseEvent *event);
225
226 void preparePeptideSequence(int row, string& peptidesequence, bool reportisomers);
227
228 void reportSpectrum(int row, cTheoreticalSpectrum& theoreticalspectrum, bool reportisomers);
229
230 void deleteResults();
231
232 void applyGlobalPreferences();
233
234 void openDetail(int rowid);
235
236 void calculateAvgSpectrum(int minscan, int maxscan);
237
238
239private slots:
240
241 void showHideLog();
242
243 void showAbout();
244
245 void showBricksDatabase();
246
247 void showSequenceDatabase();
248
249 void showModifications();
250
251 void showDrawPeptideWidget();
252
253 void setAndShowDrawPeptideWidget(int peptidetypeindex, QString sequence);
254
255 bool prepareSummaryTableOfMatchedPeaks();
256
257 void showSummaryTableOfMatchedPeaks();
258
259 void showImageWindow();
260
261 void showChromatogramWindow();
262
263 void showGraph();
264
265 void showProperties();
266
267 void showMultipleDatasetsOverview();
268
269 void showPatternSimulatorWindow();
270
271 void showFormulaPredictor();
272
273 void run();
274
275 void stop();
276
277 void updateLog(QString qstr);
278
279 void enableRunButtonAndSettings(bool enable);
280
281 void enableStopButton(bool enable);
282
283 void enableButtonsHandlingResults(bool enable);
284
285 void sendParameters(cParameters parameters);
286
287 void reportSpectra();
288
289 void showIsomersStateChanged();
290
291 void rowDoubleClicked(const QModelIndex& item);
292
293 void setGraph(string s);
294
295 void exportToCsv();
296
297 void exportToHTML();
298
299 void showPreferences();
300
301 void showHTMLDocumentation();
302
303 void showPDFManual();
304
305 void saveResultsFile();
306
307 void openResultsFile();
308
309 void setSequence(int peptidetypeindex, QString sequence);
310
311 void setTag(int peptidetypeindex, QString tag);
312
313 void insertSequence(int peptidetypeindex, QString tag);
314
315 void quitApplication();
316
317 void filterResults();
318
319 void resetFilter();
320
321 void lastActiveDetailSlot(int rowid);
322
323 void gotoBookMark1();
324
325 void gotoBookMark2();
326
327 void gotoBookMark3();
328
329 void gotoBookMark4();
330
331 void gotoBookMark5();
332
333 void gotoBookMark6();
334
335 void gotoBookMark7();
336
337 void gotoBookMark8();
338
339 void gotoBookMark9();
340
341 void gotoBookMark10();
342
343 void summaryPeaksTableCancelled();
344
345 void multipleDatasetsTableCancelled();
346
347 void summaryPeaksTableRowDoubleClicked(int rowid, double experimentalmz);
348
349 void multipleDatasetsTableRowClicked(int datasetid, int spectrumid, int peakid, int datatypeview, int peakshape, string name, string iontype, string mzstr);
350
351 void updateSummaryPeaksTableFilterSlot(int xmin, int xmax, int ymin, int ymax);
352
353 void chromatogramDoubleClicked(int scanid);
354
355 void imageWindowDoubleClicked(int spectrumid);
356
357 void inputFilterButtonReleased();
358
359 void filterSummaryTableIfPrepared();
360
361 void showAvgSpectrum(int minscan, int maxscan);
362
363 void avgSpectrumAbsoluteIntensityStateChanged(bool state);
364
365 //void showContextMenu(const QPoint &pt);
366
367signals:
368
373
374};
375
376
381
382
383#endif
The implementation of the dialog 'Help->About'.
An editor of building blocks database.
Chromatogram window.
Draw a peptide from a sequence of building blocks.
Predicts the molecular formula from the exact mass.
The implementation of the dialog 'View->Graph'.
The implementation of HTML export dialog.
Image window.
The thread launched by the command 'Search->Run'.
Q_DECLARE_METATYPE(string)
Register string by Qt.
A table proxy model.
An editor of N-/C-terminal modifications database.
Aggregated results from multiple datasets.
The widget for editing parameters of the application opened using the command 'Search->Settings'.
The implementation of an isotopic pattern simulator (window).
The implementation of preferences dialog.
An editor of sequences database.
The widget for visualisation of a detail of a spectrum (opened after doubleclick on a row when result...
Summary table of matched peaks.
The representation of a theoretical mass spectrum.
The widget representing the dialog 'About'.
Definition: cAboutWidget.h:24
An editor of building blocks database.
Definition: cBricksDatabaseWidget.h:52
Chromatogram window.
Definition: cChromatogramWindow.h:31
Draw a peptide from a sequence of building blocks.
Definition: cDrawPeptideWidget.h:44
Predicts the molecular formula from the exact mass.
Definition: cFormulaPredictor.h:56
The class storing global preferences.
Definition: cGlobalPreferences.h:104
The widget representing the dialog 'View->Graph'.
Definition: cGraphWidget.h:31
The implementation of HTML export dialog.
Definition: cHTMLExportDialog.h:23
Image window.
Definition: cImageWindow.h:240
The class representing the main window of the application.
Definition: cMainWindow.h:52
void keyPressEvent(QKeyEvent *event)
Handle a key press event.
Definition: cMainWindow.cpp:624
cMainWindow()
The constructor.
Definition: cMainWindow.cpp:22
~cMainWindow()
The destructor.
Definition: cMainWindow.cpp:533
void stopComputation()
The option 'Search->Stop' has been selected.
A table proxy model.
Definition: cMainWindowProxyModel.h:21
An editor of N-/C-terminal modifications database.
Definition: cModificationsWidget.h:43
Aggregated results from multiple datasets.
Definition: cMultipleDatasetsTableWidget.h:79
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
The implementation of an isotopic pattern simulator (window).
Definition: cPatternSimulatorWidget.h:52
The class representing a series of peaklists.
Definition: cPeakListSeries.h:21
Preferences dialog.
Definition: cPreferencesDialog.h:31
An editor of sequences database.
Definition: cSequenceDatabaseWidget.h:44
Summary table of matched peaks.
Definition: cSummaryPeaksTableWidget.h:251
The class representing a theoretical mass spectrum.
Definition: cTheoreticalSpectrum.h:106
The class representing lists of theoretical spectra.
Definition: cTheoreticalSpectrumList.h:25
Auxiliary funtions and structures.