ScoreTrackWidget Class Reference

Inheritance diagram for ScoreTrackWidget:
DataTrackWidget TrackWidget

List of all members.

Public Member Functions

 ScoreTrackWidget (GVec *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 *)
void draw_data_record (QPainter *, size_t, vector< QColor * > *colors=0)
void draw_data_record_lr (QPainter *, size_t, vector< QColor * > *colors=0)

Member Function Documentation

void ScoreTrackWidget::draw_data_record ( QPainter *  painter,
size_t  i,
vector< QColor * > *  colors = 0 
) [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.

void ScoreTrackWidget::draw_data_record_lr ( QPainter *  painter,
size_t  i,
vector< QColor * > *  colors = 0 
) [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.

void ScoreTrackWidget::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.


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

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