CycloBranch
cCyclicWidget.h
Go to the documentation of this file.
1
7#ifndef _CCYCLICWIDGET_H
8#define _CCYCLICWIDGET_H
9
10#include <math.h>
11#include <QWidget>
12#include <QPalette>
13
15#include "gui/cLinearWidget.h"
16
17
18// forward declaration
19class QPaintEvent;
20
21
37void paintCircle(QPainter& painter, vector<string>& acronymsofblocks, int centerx, int centery, int radius, double angle, int horizontalstep, int linesize, int cornerlinesize, bool drawdashlines, int visiblerotationid, unordered_set<cIonLabel, hash_cIonLabel>& labels);
38
39
63void generateCyclicLabelsToRight(bool nterminal, int rotationid, int rotationstart, int fragmentstart, int fragmentend, int numberofringblocks, unordered_set<cIonLabel, hash_cIonLabel>& labels, cParameters* parameters, cTheoreticalSpectrum* theoreticalspectrum, int centerx, int centery, int radius, double angle, int linesize, int cornerlinesize, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchstart, int branchend);
64
65
89void generateCyclicLabelsToLeft(bool nterminal, int rotationid, int rotationstart, int fragmentstart, int fragmentend, int numberofringblocks, unordered_set<cIonLabel, hash_cIonLabel>& labels, cParameters* parameters, cTheoreticalSpectrum* theoreticalspectrum, int centerx, int centery, int radius, double angle, int linesize, int cornerlinesize, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchstart, int branchend);
90
91
95class cCyclicWidget : public QWidget
96{
97 Q_OBJECT
98
99public:
100
101
106
107
113 void initialize(cParameters* parameters, cTheoreticalSpectrum* theoreticalspectrum);
114
115
121 void exportToPDF(QString filename, bool postscript);
122
123
128 void exportToPNG(QString filename);
129
130
135 void exportToSVG(QString filename);
136
137
142 void setReportIsomers(bool reportisomers);
143
144
149 void hidePeakLabels(bool state);
150
151
152protected:
153
154
159 void paintEvent(QPaintEvent *event);
160
161
162private:
163
164 void paint(QPainter& painter);
165
166 cParameters* parameters;
167 cTheoreticalSpectrum* theoreticalspectrum;
168
169 string visibleionseries;
170 string visibleneutralloss;
171 int visiblerotationid;
172
173 bool reportisomers;
174 bool hidelabels;
175
176
177private slots:
178
179 void ionSeriesChanged(QString text);
180
181 void neutralLossChanged(QString text);
182
183 void rotationChanged(int index);
184
185};
186
187#endif
void generateCyclicLabelsToLeft(bool nterminal, int rotationid, int rotationstart, int fragmentstart, int fragmentend, int numberofringblocks, unordered_set< cIonLabel, hash_cIonLabel > &labels, cParameters *parameters, cTheoreticalSpectrum *theoreticalspectrum, int centerx, int centery, int radius, double angle, int linesize, int cornerlinesize, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchstart, int branchend)
Generate labels of fragment ions of a cyclic peptide (direction left).
Definition: cCyclicWidget.cpp:308
void generateCyclicLabelsToRight(bool nterminal, int rotationid, int rotationstart, int fragmentstart, int fragmentend, int numberofringblocks, unordered_set< cIonLabel, hash_cIonLabel > &labels, cParameters *parameters, cTheoreticalSpectrum *theoreticalspectrum, int centerx, int centery, int radius, double angle, int linesize, int cornerlinesize, string visibleionseries, string visibleneutralloss, int visiblerotationid, int branchstart, int branchend)
Generate labels of fragment ions of a cyclic peptide (direction right).
Definition: cCyclicWidget.cpp:208
void paintCircle(QPainter &painter, vector< string > &acronymsofblocks, int centerx, int centery, int radius, double angle, int horizontalstep, int linesize, int cornerlinesize, bool drawdashlines, int visiblerotationid, unordered_set< cIonLabel, hash_cIonLabel > &labels)
Paint the circle of a cyclic or a branch-cyclic peptide.
Definition: cCyclicWidget.cpp:12
Visualization of a linear peptide.
The representation of a theoretical mass spectrum.
Visualization of a cyclic peptide.
Definition: cCyclicWidget.h:96
cCyclicWidget()
The constructor.
Definition: cCyclicWidget.cpp:408
void exportToSVG(QString filename)
Export peptide scene into a SVG file.
Definition: cCyclicWidget.cpp:478
void hidePeakLabels(bool state)
Hide/Show labels of peaks.
Definition: cCyclicWidget.cpp:505
void initialize(cParameters *parameters, cTheoreticalSpectrum *theoreticalspectrum)
Initialize the widget.
Definition: cCyclicWidget.cpp:421
void exportToPDF(QString filename, bool postscript)
Export peptide into a PDF or a PS file.
Definition: cCyclicWidget.cpp:427
void paintEvent(QPaintEvent *event)
Handle the paint event.
Definition: cCyclicWidget.cpp:511
void setReportIsomers(bool reportisomers)
Set the report isomers state.
Definition: cCyclicWidget.cpp:499
void exportToPNG(QString filename)
Export peptide scene into a PNG file.
Definition: cCyclicWidget.cpp:458
The class storing parameters of the application.
Definition: cParameters.h:82
The class representing a theoretical mass spectrum.
Definition: cTheoreticalSpectrum.h:106