BarLineRelNotationTrackWidget Class Reference

Inheritance diagram for BarLineRelNotationTrackWidget:
AnnotationTrackWidget DataTrackWidget TrackWidget

List of all members.

Public Member Functions

 BarLineRelNotationTrackWidget (GVec *, Preferences *prefs, QWidget *parent=0)
QString type_name ()
GVecget_gvec ()
void prefs_changed ()
GraphControlsWidgetget_graph_controls_widget ()
long last_bp ()

Static Public Member Functions

static QString name ()

Protected Member Functions

void paintEvent (QPaintEvent *)
void resizeEvent (QResizeEvent *)
void mousePressEvent (QMouseEvent *)
void draw_data_record (QPainter *, size_t, vector< QColor * > *)
void draw_data_record_lr (QPainter *, size_t, vector< QColor * > *)
size_t low_res_cutoff ()
int gene_symbol_placement (size_t i)

Member Function Documentation

void BarLineRelNotationTrackWidget::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 AnnotationTrackWidget.

void BarLineRelNotationTrackWidget::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 AnnotationTrackWidget.

GraphControlsWidget * BarLineRelNotationTrackWidget::get_graph_controls_widget (  )  [virtual]

Graphs are likely to have control mechanisms that are particular to how they render data. For instance, in a histogram one would like to be able to set the bin size. The GraphControlsWidget class provides a mechanism for a graph to implement such controls. This method would be used to retrieve the track specific widget.

In left unimplemented, this default returns 0.

Returns:
GraphControlsWidget*
See also:
DataTrackWidget::type_specific_graphics_event( GraphTypeSpecificGraphicsEvent* )

Reimplemented from DataTrackWidget.

GVec * BarLineRelNotationTrackWidget::get_gvec (  )  [virtual]
Returns:
the GVec object currently set

Reimplemented from DataTrackWidget.

long BarLineRelNotationTrackWidget::last_bp (  )  [virtual]
Returns:
the value of GVec::last_bp( ) for the track's currently set GVec object

Reimplemented from DataTrackWidget.

size_t BarLineRelNotationTrackWidget::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 AnnotationTrackWidget.

void BarLineRelNotationTrackWidget::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 AnnotationTrackWidget.

void BarLineRelNotationTrackWidget::resizeEvent ( QResizeEvent *  re  )  [protected]

Note that this method sets a number of constants that are used frequently in drawing graphs, such as h3u and h3l, the upper and lower thirds of the graph. If a class overrides this method they should consider calling the parent's method somewhere in their implementation, eg. by calling DataTrackWidget::resizeEvent( re ) explicitly.

Normally this is called by Qt code.

Parameters:
QResizeEvent* 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:41 2009 for BQGB by  doxygen 1.6.1