A window that draws a piano-roll style chart, which shows the collectors explicitly stopping and starting, one frame at a time. More...
#include "winStatsPianoRoll.h"
Public Member Functions | |
WinStatsPianoRoll (WinStatsMonitor *monitor, int thread_index) | |
virtual void | changed_graph_size (int graph_xsize, int graph_ysize) |
Called when the user has resized the window, forcing a resize of the graph. More... | |
virtual void | clicked_label (int collector_index) |
Called when the user single-clicks on a label. More... | |
virtual void | force_redraw () |
Called when it is necessary to redraw the entire graph. More... | |
virtual void | new_data (int thread_index, int frame_number) |
Called as each frame's data is made available. More... | |
void | set_horizontal_scale (double time_width) |
Changes the amount of time the width of the horizontal axis represents. More... | |
virtual void | set_time_units (int unit_mask) |
Called when the user selects a new time units from the monitor pulldown menu, this should adjust the units for the graph to the indicated mask if it is a time-based graph. More... | |
Public Member Functions inherited from PStatPianoRoll | |
PStatPianoRoll (PStatMonitor *monitor, int thread_index, int xsize, int ysize) | |
double | get_horizontal_scale () const |
Returns the amount of total time the width of the horizontal axis represents. More... | |
int | height_to_pixel (double value) const |
Converts a value (i.e. More... | |
double | pixel_to_height (int y) const |
Converts a horizontal pixel offset to a value (a "height" in the strip chart). More... | |
double | pixel_to_timestamp (int x) const |
Converts a horizontal pixel offset to a timestamp. More... | |
void | set_horizontal_scale (double time_width) |
Changes the amount of time the width of the horizontal axis represents. More... | |
int | timestamp_to_pixel (double time) const |
Converts a timestamp to a horizontal pixel offset. More... | |
void | update () |
Updates the chart with the latest data. More... | |
Public Member Functions inherited from PStatGraph | |
PStatGraph (PStatMonitor *monitor, int xsize, int ysize) | |
int | add_user_guide_bar (double height) |
Creates a new user guide bar and returns its index number. More... | |
int | find_user_guide_bar (double from_height, double to_height) const |
Returns the index number of the first user guide bar found whose height is within the indicated range, or -1 if no user guide bars fall within the range. More... | |
const GuideBar & | get_guide_bar (int n) const |
Returns the nth horizontal guide bar. More... | |
const std::string & | get_guide_bar_unit_name () const |
Returns the name of the units to be used for the guide bars if the units type is set to GBU_named | GBU_show_units. More... | |
int | get_guide_bar_units () const |
Returns the units that are displayed for the guide bar labels. More... | |
int | get_label_collector (int n) const |
Returns the collector index associated with the nth label. More... | |
LRGBColor | get_label_color (int n) const |
Returns the color associated with the nth label. More... | |
std::string | get_label_name (int n) const |
Returns the text associated with the nth label. More... | |
PStatMonitor * | get_monitor () const |
Returns the monitor associated with this chart. More... | |
int | get_num_guide_bars () const |
Returns the number of horizontal guide bars that should be drawn, based on the indicated target frame rate. More... | |
int | get_num_labels () const |
Returns the number of labels to be drawn for this chart. More... | |
int | get_num_user_guide_bars () const |
Returns the current number of user-defined guide bars. More... | |
double | get_target_frame_rate () const |
Returns the indicated target frame rate in Hz. More... | |
GuideBar | get_user_guide_bar (int n) const |
Returns the nth user-defined guide bar. More... | |
int | get_xsize () const |
Returns the width of the chart in pixels. More... | |
int | get_ysize () const |
Returns the height of the chart in pixels. More... | |
void | move_user_guide_bar (int n, double height) |
Adjusts the height of the nth user-defined guide bar. More... | |
void | remove_user_guide_bar (int n) |
Removes the user guide bar with the indicated index number. More... | |
void | set_guide_bar_unit_name (const std::string &unit_name) |
Sets the name of the units to be used for the guide bars if the units type is set to GBU_named | GBU_show_units. More... | |
void | set_guide_bar_units (int unit_mask) |
Sets the units that are displayed for the guide bar labels. More... | |
void | set_target_frame_rate (double frame_rate) |
Sets the target frame rate of the application in Hz. More... | |
Public Member Functions inherited from WinStatsGraph | |
WinStatsGraph (WinStatsMonitor *monitor) | |
virtual void | new_collector (int collector_index) |
Called whenever a new Collector definition is received from the client. More... | |
void | set_pause (bool pause) |
Changes the pause flag for the graph. More... | |
virtual void | set_scroll_speed (double scroll_speed) |
Called when the user selects a new scroll speed from the monitor pulldown menu, this should adjust the speed for the graph to the indicated value. More... | |
void | user_guide_bars_changed () |
Called when the user guide bars have been changed. More... | |
Additional Inherited Members | |
Public Types inherited from PStatGraph | |
enum | GuideBarStyle { GBS_normal, GBS_target, GBS_user } |
enum | GuideBarUnits { GBU_hz = 0x0001, GBU_ms = 0x0002, GBU_named = 0x0004, GBU_show_units = 0x0008 } |
Public Types inherited from WinStatsGraph | |
enum | DragMode { DM_none, DM_scale, DM_left_margin, DM_right_margin, DM_guide_bar, DM_new_guide_bar, DM_sizing } |
Static Public Member Functions inherited from PStatGraph | |
static std::string | format_number (double value) |
Returns a string representing the value nicely formatted for its range. More... | |
static std::string | format_number (double value, int guide_bar_units, const std::string &unit_name=std::string()) |
Returns a string representing the value nicely formatted for its range, including the units as indicated. More... | |
A window that draws a piano-roll style chart, which shows the collectors explicitly stopping and starting, one frame at a time.
Definition at line 31 of file winStatsPianoRoll.h.
|
virtual |
Called when the user has resized the window, forcing a resize of the graph.
Reimplemented from WinStatsGraph.
Definition at line 78 of file winStatsPianoRoll.cxx.
|
virtual |
Called when the user single-clicks on a label.
Reimplemented from WinStatsGraph.
Definition at line 106 of file winStatsPianoRoll.cxx.
References WinStatsMonitor::open_strip_chart().
|
virtual |
Called when it is necessary to redraw the entire graph.
Reimplemented from WinStatsGraph.
Definition at line 70 of file winStatsPianoRoll.cxx.
|
virtual |
Called as each frame's data is made available.
There is no gurantee the frames will arrive in order, or that all of them will arrive at all. The monitor should be prepared to accept frames received out-of-order or missing.
Reimplemented from WinStatsGraph.
Definition at line 60 of file winStatsPianoRoll.cxx.
void WinStatsPianoRoll::set_horizontal_scale | ( | double | time_width | ) |
Changes the amount of time the width of the horizontal axis represents.
This may force a redraw.
Definition at line 117 of file winStatsPianoRoll.cxx.
References PStatPianoRoll::set_horizontal_scale().
|
virtual |
Called when the user selects a new time units from the monitor pulldown menu, this should adjust the units for the graph to the indicated mask if it is a time-based graph.
Reimplemented from WinStatsGraph.
Definition at line 88 of file winStatsPianoRoll.cxx.
Referenced by WinStatsMonitor::open_piano_roll().