CycloBranch
cBranchCyclicWidget.h
Go to the documentation of this file.
1
7#ifndef _CBRANCHCYCLICWIDGET_H
8#define _CBRANCHCYCLICWIDGET_H
9
10#include <math.h>
11#include <QWidget>
12#include <QPalette>
13
15#include "gui/cLinearWidget.h"
16#include "gui/cCyclicWidget.h"
17
18
19// forward declaration
20class QPaintEvent;
21
22
39void generateBranchLabelsDown(bool nterminal, int rotationid, unordered_set<cIonLabel, hash_cIonLabel>& labels, cParameters* parameters, cTheoreticalSpectrum* theoreticalspectrum, int centerx, int topmargin, int horizontalstep, int verticalstep, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchstart);
40
41
59void generateBranchLabelsUp(bool nterminal, int rotationid, unordered_set<cIonLabel, hash_cIonLabel>& labels, cParameters* parameters, cTheoreticalSpectrum* theoreticalspectrum, int centerx, int topmargin, int horizontalstep, int verticalstep, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchend, int fragmentend);
60
61
65class cBranchCyclicWidget : public QWidget
66{
67 Q_OBJECT
68
69public:
70
71
76
77
83 void initialize(cParameters* parameters, cTheoreticalSpectrum* theoreticalspectrum);
84
85
91 void exportToPDF(QString filename, bool postscript);
92
93
98 void exportToPNG(QString filename);
99
100
105 void exportToSVG(QString filename);
106
107
112 void setReportIsomers(bool reportisomers);
113
114
119 void hidePeakLabels(bool state);
120
121
122protected:
123
124
129 void paintEvent(QPaintEvent *event);
130
131
132private:
133
134 void paint(QPainter& painter);
135
136 cParameters* parameters;
137 cTheoreticalSpectrum* theoreticalspectrum;
138
139 string visibleionseries;
140 string visibleneutralloss;
141 int visiblerotationid;
142 int visibletrotationid;
143
144 bool reportisomers;
145 bool hidelabels;
146
147
148private slots:
149
150 void ionSeriesChanged(QString text);
151
152 void neutralLossChanged(QString text);
153
154 void rotationChanged(int index);
155
156 void trotationChanged(int index);
157
158};
159
160#endif
void generateBranchLabelsDown(bool nterminal, int rotationid, unordered_set< cIonLabel, hash_cIonLabel > &labels, cParameters *parameters, cTheoreticalSpectrum *theoreticalspectrum, int centerx, int topmargin, int horizontalstep, int verticalstep, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchstart)
Generate labels of fragment ions on a branch of a branch-cyclic peptide (direction down).
Definition: cBranchCyclicWidget.cpp:12
void generateBranchLabelsUp(bool nterminal, int rotationid, unordered_set< cIonLabel, hash_cIonLabel > &labels, cParameters *parameters, cTheoreticalSpectrum *theoreticalspectrum, int centerx, int topmargin, int horizontalstep, int verticalstep, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchend, int fragmentend)
Generate labels of fragment ions on a branch of a branch-cyclic peptide (direction up).
Definition: cBranchCyclicWidget.cpp:78
Visualization of a cyclic peptide.
Visualization of a linear peptide.
The representation of a theoretical mass spectrum.
Visualization of a branch-cyclic peptide.
Definition: cBranchCyclicWidget.h:66
cBranchCyclicWidget()
The constructor.
Definition: cBranchCyclicWidget.cpp:144
void paintEvent(QPaintEvent *event)
Handle the paint event.
Definition: cBranchCyclicWidget.cpp:248
void exportToSVG(QString filename)
Export peptide scene into a SVG file.
Definition: cBranchCyclicWidget.cpp:215
void setReportIsomers(bool reportisomers)
Set the report isomers state.
Definition: cBranchCyclicWidget.cpp:236
void initialize(cParameters *parameters, cTheoreticalSpectrum *theoreticalspectrum)
Initialize the widget.
Definition: cBranchCyclicWidget.cpp:158
void exportToPNG(QString filename)
Export peptide scene into a PNG file.
Definition: cBranchCyclicWidget.cpp:195
void hidePeakLabels(bool state)
Hide/Show labels of peaks.
Definition: cBranchCyclicWidget.cpp:242
void exportToPDF(QString filename, bool postscript)
Export peptide into a PDF or a PS file.
Definition: cBranchCyclicWidget.cpp:164
The class storing parameters of the application.
Definition: cParameters.h:82
The class representing a theoretical mass spectrum.
Definition: cTheoreticalSpectrum.h:106