CycloBranch
cLinearWidget.h File Reference

Visualization of a linear peptide. More...

#include <QWidget>
#include "core/cTheoreticalSpectrum.h"

Go to the source code of this file.

Classes

struct  cIonLabel
 Auxiliary structure for visualization of labels of fragment ions. More...
 
struct  hash_cIonLabel
 The structure defining a hash function of cIonLabel. More...
 
class  cLinearWidget
 Visualization of a linear peptide. More...
 

Functions

bool operator== (cIonLabel const &a, cIonLabel const &b)
 Overloaded operator ==. More...
 
void insertLabel (unordered_set< cIonLabel, hash_cIonLabel > &labels, int x, int y, string &description, bool alignright)
 Insert a fragment ion label into an unordered set of labels and concatenate descriptions of labels on the same coordinates. More...
 
void drawLabels (QPainter &painter, unordered_set< cIonLabel, hash_cIonLabel > &labels, int width)
 Draw labels of fragment ions. More...
 

Detailed Description

Visualization of a linear peptide.

Function Documentation

◆ drawLabels()

void drawLabels ( QPainter &  painter,
unordered_set< cIonLabel, hash_cIonLabel > &  labels,
int  width 
)

Draw labels of fragment ions.

Parameters
painterreference to a painter
labelsunordered set of labels
widthwidget width

◆ insertLabel()

void insertLabel ( unordered_set< cIonLabel, hash_cIonLabel > &  labels,
int  x,
int  y,
string &  description,
bool  alignright 
)

Insert a fragment ion label into an unordered set of labels and concatenate descriptions of labels on the same coordinates.

Parameters
labelsunordered set of labels
xx coordinate
yy coordinate
descriptiona description of a fragment ion
alignrighttrue when the description is aligned right

◆ operator==()

bool operator== ( cIonLabel const &  a,
cIonLabel const &  b 
)

Overloaded operator ==.

Parameters
afirst ion label
bsecond ion label
Return values
booltrue when labels have equal coordinates