diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-07 12:43:56 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-07 12:43:56 +0100 |
commit | 5891de489db0e172162279247fb633a719fa3756 (patch) | |
tree | 2cda126a35ebe9ba130299455f515618b4ab898b /grapher/GraphWidget.hxx | |
parent | e88061ec1fb047b65c247424dbadb10a85ff69ae (diff) | |
download | systemtap-steved-5891de489db0e172162279247fb633a719fa3756.tar.gz systemtap-steved-5891de489db0e172162279247fb633a719fa3756.tar.xz systemtap-steved-5891de489db0e172162279247fb633a719fa3756.zip |
option to display graph times relative to the start time
This avoids having humongous numbers displayed on the graphs' x
axis. Also, the dialog for adding a data set to a graph was cleaned
up.
* grapher/graph-dialog.glade: Add check box for display of relative
time and a label for the data set list. Force the list of data sets
to be larger.
* grapher/Graph.hxx (_timeBase): new member
* grapher/Graph.cxx (draw): Subtract _timeBase from displayed time
value.
* grapher/GraphWidget.hxx (DataModelColumns): Add a column for a data
set's title, which is optional at the moment.
* grapher/GraphWidget.hxx (_globalTimeBase, _timeBaseInitialized,
_relativeTimesButton, _displayRelativeTimes): new members
* grapher/GraphWidget.hxx (GraphWidget): Hook up check button for
displaying relative time.
(on_expose_event): Determine base time if needed; set base time in
graphs.
(onDataDialogOpen): Insert graph data set's name (key) and title
into the list of data sets.
Diffstat (limited to 'grapher/GraphWidget.hxx')
-rw-r--r-- | grapher/GraphWidget.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index 61d50e70..ea10720c 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -19,9 +19,11 @@ namespace systemtap DataModelColumns() { add(_dataName); + add(_dataTitle); add(_graphData); } Gtk::TreeModelColumn<Glib::ustring> _dataName; + Gtk::TreeModelColumn<Glib::ustring> _dataTitle; Gtk::TreeModelColumn<std::tr1::shared_ptr<GraphDataBase> > _graphData; }; @@ -72,8 +74,13 @@ namespace systemtap std::tr1::shared_ptr<CairoTextBox> _hoverText; double _mouseX; double _mouseY; + int64_t _globalTimeBase; + bool _timeBaseInitialized; std::tr1::shared_ptr<Graph> getGraphUnderPoint(double x, double y); void establishHoverTimeout(); + Gtk::CheckButton* _relativeTimesButton; + bool _displayRelativeTimes; + void onRelativeTimesButtonClicked(); }; } #endif // SYSTEMTAP_GRAPHWIDGET_H |