|
|
|
This is an abstract class that presents the interface for drawing a piano-roll type chart: it shows the time spent in each of a number of collectors as a horizontal bar of color, with time as the horizontal axis.
More...
#include "pStatPianoRoll.h"
List of all members.
Classes |
| class | BarBuilder |
| class | ColorBar |
Public Member Functions |
|
| PStatPianoRoll (PStatMonitor *monitor, int thread_index, int xsize, int ysize) |
| float | get_horizontal_scale () const |
| | Returns the amount of total time the width of the horizontal axis represents.
|
| int | height_to_pixel (float value) const |
| | Converts a value (i.e.
|
| float | pixel_to_height (int y) const |
| | Converts a horizontal pixel offset to a value (a "height" in the strip chart).
|
| float | pixel_to_timestamp (int x) const |
| | Converts a horizontal pixel offset to a timestamp.
|
| void | set_horizontal_scale (float time_width) |
| | Changes the amount of time the width of the horizontal axis represents.
|
| int | timestamp_to_pixel (float time) const |
| | Converts a timestamp to a horizontal pixel offset.
|
| void | update () |
| | Updates the chart with the latest data.
|
Protected Member Functions |
| virtual void | begin_draw () |
| | Should be overridden by the user class.
|
| virtual void | begin_row (int row) |
| | Should be overridden by the user class.
|
| void | changed_size (int xsize, int ysize) |
| | To be called by the user class when the widget size has changed.
|
| virtual void | draw_bar (int row, int from_x, int to_x) |
| | Draws a single bar in the chart for the indicated row, in the color get_row_color(row), for the indicated horizontal pixel range.
|
| virtual void | end_draw () |
| | Should be overridden by the user class.
|
| virtual void | end_row (int row) |
| | Should be overridden by the user class.
|
| void | force_redraw () |
| | To be called by the user class when the whole thing needs to be redrawn for some reason.
|
| virtual void | idle () |
| | Should be overridden by the user class to perform any other updates might be necessary after the bars have been redrawn.
|
| virtual void | normal_guide_bars () |
| | Calls update_guide_bars with parameters suitable to this kind of graph.
|
Protected Attributes |
|
int | _thread_index |
Detailed Description
This is an abstract class that presents the interface for drawing a piano-roll type chart: it shows the time spent in each of a number of collectors as a horizontal bar of color, with time as the horizontal axis.
This class just manages all the piano-roll logic; the actual nuts and bolts of drawing pixels is left to a user-derived class.
Definition at line 43 of file pStatPianoRoll.h.
Member Function Documentation
| void PStatPianoRoll::begin_draw |
( |
| ) |
[protected, virtual] |
| void PStatPianoRoll::begin_row |
( |
int |
row | ) |
[protected, virtual] |
Should be overridden by the user class.
This hook will be called before drawing any one row of bars. These bars correspond to the collector whose index is get_row_collector(row), and in the color get_row_color(row).
Definition at line 225 of file pStatPianoRoll.cxx.
Referenced by force_redraw().
| void PStatPianoRoll::changed_size |
( |
int |
xsize, |
|
|
int |
ysize |
|
) |
| [protected] |
| void PStatPianoRoll::draw_bar |
( |
int |
row, |
|
|
int |
from_x, |
|
|
int |
to_x |
|
) |
| [protected, virtual] |
| void PStatPianoRoll::end_draw |
( |
| ) |
[protected, virtual] |
| void PStatPianoRoll::end_row |
( |
int |
row | ) |
[protected, virtual] |
Should be overridden by the user class.
This hook will be called after drawing a series of color bars for a single row.
Definition at line 247 of file pStatPianoRoll.cxx.
Referenced by force_redraw().
| void PStatPianoRoll::force_redraw |
( |
| ) |
[protected] |
| float PStatPianoRoll::get_horizontal_scale |
( |
| ) |
const [inline] |
Returns the amount of total time the width of the horizontal axis represents.
Definition at line 37 of file pStatPianoRoll.I.
| int PStatPianoRoll::height_to_pixel |
( |
float |
value | ) |
const [inline] |
Converts a value (i.e.
a "height" in the strip chart) to a horizontal pixel offset.
Definition at line 68 of file pStatPianoRoll.I.
| void PStatPianoRoll::idle |
( |
| ) |
[protected, virtual] |
| void PStatPianoRoll::normal_guide_bars |
( |
| ) |
[protected, virtual] |
| float PStatPianoRoll::pixel_to_height |
( |
int |
y | ) |
const [inline] |
Converts a horizontal pixel offset to a value (a "height" in the strip chart).
Definition at line 79 of file pStatPianoRoll.I.
| float PStatPianoRoll::pixel_to_timestamp |
( |
int |
x | ) |
const [inline] |
Converts a horizontal pixel offset to a timestamp.
Definition at line 57 of file pStatPianoRoll.I.
| void PStatPianoRoll::set_horizontal_scale |
( |
float |
time_width | ) |
[inline] |
| int PStatPianoRoll::timestamp_to_pixel |
( |
float |
time | ) |
const [inline] |
| void PStatPianoRoll::update |
( |
| ) |
|
The documentation for this class was generated from the following files:
| | |