Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

QualityGui Class Reference

The visual appearance of a QualityData. More...

#include <featuregui.h>

Inheritance diagram for QualityGui:

Inheritance graph
[legend]
Collaboration diagram for QualityGui:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QualityGui (FeatureData *data)
void paintMe (QPainter *p, TR_PIX x_pix, TR_PIX y_pix, TR_DNA x1_dna, TR_DNA x2_dna, double width, int height, int center)

Private Member Functions

QualityDataqualityData ()

Detailed Description

The visual appearance of a QualityData.

Definition at line 118 of file featuregui.h.


Constructor & Destructor Documentation

QualityGui::QualityGui FeatureData data  )  [inline]
 

Definition at line 121 of file featuregui.h.

00121                                      : FeatureGui( data )
00122     {
00123 //         cerr << "in qualitygui ctor" << endl;
00124     }


Member Function Documentation

void QualityGui::paintMe QPainter *  p,
TR_PIX  x_pix,
TR_PIX  y_pix,
TR_DNA  x1_dna,
TR_DNA  x2_dna,
double  width,
int  height,
int  center
[virtual]
 

Paints the visual appearance of a feature.

Parameters:
p the QPainter to paint to
x_pix the pixel coordinate of the upper left corner of the rectangle where the feature should be painted
y_pix the pixel coordinate of the upper left corner of the rectangle where the feature should be painted
x1_dna the left most position that should be painted given as a dna coordinate relative the left side of the read.
x2_dna the right most position that should be painted given as a dna coordinate relative the left side of the read.

Implements FeatureGui.

Definition at line 277 of file featuregui.cpp.

References qualityData(), QualityData::qualityVector, and TrapperVector< T >::stlVector().

00279 {
00280     QString str;
00281     QBrush brush;
00282     brush.setStyle( Qt::SolidPattern );
00283 
00284     QColor color;
00285     brush.setColor( Qt::red );
00286     for ( int i = x1_dna; i <= x2_dna ; ++i )
00287     {
00288 //         color.setHsv( 0, 0, 255 -qualityData()->qualityVector.stlVector()[i] *4);
00289       
00290       int v_val = min<int>(255, qualityData()->qualityVector.stlVector()[i] *12);
00291       v_val = max<int>(v_val, 100);
00292 
00293       color.setHsv( 0, 0, v_val);
00294       
00295       brush.setColor( color );
00296       
00297       p->fillRect( x_pix + (i - x1_dna   )* width  ,
00298                    y_pix,  width , height , brush) ;
00299       
00300       
00301       
00302       
00303       
00304       
00305     }
00306     return;
00307 }

QualityData * QualityGui::qualityData  )  [private]
 

Definition at line 272 of file featuregui.cpp.

References FeatureGui::m_data.

Referenced by paintMe().

00273 {
00274     return dynamic_cast<QualityData *>( m_data );
00275 }


The documentation for this class was generated from the following files:
Generated on Fri Mar 17 17:45:00 2006 for trapper by  doxygen 1.4.4