AnnotationTrackWidget Class Reference

Inheritance diagram for AnnotationTrackWidget:
DataTrackWidget TrackWidget BarLineRelNotationTrackWidget

List of all members.

Public Member Functions

 AnnotationTrackWidget (GVec *, Preferences *prefs=0, QWidget *parent=0)
QString type_name ()

Static Public Member Functions

static QString name ()

Protected Member Functions

void paintEvent (QPaintEvent *)
void mousePressEvent (QMouseEvent *)
virtual void prune_records_y (int, vector< size_t > &)
virtual void prune_records_x (int, vector< size_t > &)
void draw_data_record (QPainter *, size_t, vector< QColor * > *)
void draw_data_record_lr (QPainter *, size_t, vector< QColor * > *)
void draw_record_default (QPainter *, size_t, vector< QColor * > *)
void draw_record_default_lr (QPainter *, size_t, vector< QColor * > *)
void draw_record_gff (QPainter *, size_t, vector< QColor * > *)
void draw_record_gff_lr (QPainter *, size_t, vector< QColor * > *)
void draw_record_delim (QPainter *, size_t, vector< QColor * > *)
void draw_record_delim_lr (QPainter *, size_t, vector< QColor * > *)
void draw_record_bed (QPainter *, size_t, vector< QColor * > *)
void draw_record_bed_lr (QPainter *, size_t, vector< QColor * > *)
size_t low_res_cutoff ()
void draw_left_arrow (QPainter *, int)
void draw_right_arrow (QPainter *, int)
void draw_arrow (QPainter *, const QPointF *)
void draw_strand_symbol (QPainter *, QString, int, int)
void draw_box (QPainter *, int, int, vector< QColor * > *)
void _draw_box (QPainter *, int, int)
QString find_attribute_name (map< QString, QString >)

Protected Attributes

void(AnnotationTrackWidget::* draw_record_pt )(QPainter *, size_t, vector< QColor * > *)
void(AnnotationTrackWidget::* draw_record_pt_lr )(QPainter *, size_t, vector< QColor * > *)

Member Function Documentation

void AnnotationTrackWidget::draw_data_record ( QPainter *  painter,
size_t  i,
vector< QColor * > *  colors 
) [protected, virtual]

This method is normally called from DataTrackWidget::draw_data( QPainter* painter ); however, nothing stops an implementation from using it directly. More importaly, the version supplied here does nothing. Reimplement it to provide the per record glyph drawing, ie. code that actually draws 1 single record should go in here.

The color parameter comes as a vector; all of the colors in this vector will be used one after another. When using low alpha values (opacity), this can help create layering affects.

Parameters:
QPainter* this is the painter created in a classes paintEvent( QPaintEvent* ) method
size_t the index of the record to be drawn
vector<QColor*>* the colors to paint the record
See also:
DataTrackWidget::draw_data_record_lr( QPainter* painter, size_t i, vector<QColor*>* colors )

Reimplemented from DataTrackWidget.

Reimplemented in BarLineRelNotationTrackWidget.

void AnnotationTrackWidget::draw_data_record_lr ( QPainter *  painter,
size_t  i,
vector< QColor * > *  colors 
) [protected, virtual]

This is the low resolution version of DataTrackWidget::draw_data_record( QPainter* painter, size_t i, vector<QColor*>* colors ).

Generally, this method can be used to create a simpler (faster) or otherwise more useful record glyph at far out zoom levels.

Parameters:
QPainter* this is the painter created in a classes paintEvent( QPaintEvent* ) method
size_t the index of the record to be drawn
vector<QColor*>* the colors to paint the record
See also:
DataTrackWidget::draw_data_record( QPainter* painter, size_t i, vector<QColor*>* colors )

Reimplemented from DataTrackWidget.

Reimplemented in BarLineRelNotationTrackWidget.

size_t AnnotationTrackWidget::low_res_cutoff (  )  [protected]

Here this method returns a constant, 350. That value is used to determine the threshold number of data points for switching between low resolution glyphs (fast rendering) and high resolution glyphs (generally more informative).

Reimplemented from DataTrackWidget.

Reimplemented in BarLineRelNotationTrackWidget.

void AnnotationTrackWidget::mousePressEvent ( QMouseEvent *  me  )  [protected]

This method originates from QWidget and under most circumstances will only ever need to be called by the Qt library. However, it is likely that a user implemented class overrides this class. In this basic rendition, several functions are supports: selecting and moving Drawable objects (y-axis bar, file name , etc...), adding and removing highlights and generating the FeatureInfoEvents that provide meta-data description about records under the mouse press. Therefore, if reimplementing this class, it's a good idea to call this method directly as well, for instance, by adding a call to DataTrackWidget::mousePressEvent( me ) explicitly in the reimplemented version.

Parameters:
QMouseEvent* see Qt's QWidget documentation

Reimplemented from DataTrackWidget.

Reimplemented in BarLineRelNotationTrackWidget.


The documentation for this class was generated from the following files:
 All Classes Functions

Generated on Thu Sep 17 15:19:41 2009 for BQGB by  doxygen 1.6.1